MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Null Platform Hook Library instance.
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,13 +18,13 @@
|
||||
/**
|
||||
Performs platform specific initialization required for the CPU to access
|
||||
the hardware associated with a SerialPortLib instance. This function does
|
||||
not intiailzie the serial port hardware itself. Instead, it initializes
|
||||
hardware devices that are required for the CPU to access the serial port
|
||||
not intiailzie the serial port hardware itself. Instead, it initializes
|
||||
hardware devices that are required for the CPU to access the serial port
|
||||
hardware. This function may be called more than once.
|
||||
|
||||
@retval RETURN_SUCCESS The platform specific initialization succeeded.
|
||||
@retval RETURN_DEVICE_ERROR The platform specific initialization could not be completed.
|
||||
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Null Reset System Library instance that only generates ASSERT() conditions.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
/**
|
||||
This function causes a system-wide reset (cold reset), in which
|
||||
all circuitry within the system returns to its initial state. This type of reset
|
||||
all circuitry within the system returns to its initial state. This type of reset
|
||||
is asynchronous to system operation and operates without regard to
|
||||
cycle boundaries.
|
||||
|
||||
If this function returns, it means that the system does not support cold reset.
|
||||
If this function returns, it means that the system does not support cold reset.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -35,7 +35,7 @@ ResetCold (
|
||||
}
|
||||
|
||||
/**
|
||||
This function causes a system-wide initialization (warm reset), in which all processors
|
||||
This function causes a system-wide initialization (warm reset), in which all processors
|
||||
are set to their initial state. Pending cycles are not corrupted.
|
||||
|
||||
If this function returns, it means that the system does not support warm reset.
|
||||
@@ -50,7 +50,7 @@ ResetWarm (
|
||||
}
|
||||
|
||||
/**
|
||||
This function causes the system to enter a power state equivalent
|
||||
This function causes the system to enter a power state equivalent
|
||||
to the ACPI G2/S5 or G3 states.
|
||||
|
||||
If this function returns, it means that the system does not support shut down reset.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
16550 UART Serial Port library functions
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2018, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -65,11 +65,11 @@ typedef struct {
|
||||
} PCI_UART_DEVICE_INFO;
|
||||
|
||||
/**
|
||||
Read an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is read from
|
||||
Read an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is read from
|
||||
MMIO space. If PcdSerialUseMmio is FALSE, then the value is read from I/O space. The
|
||||
parameter Offset is added to the base address of the 16550 registers that is specified
|
||||
by PcdSerialRegisterBase.
|
||||
|
||||
parameter Offset is added to the base address of the 16550 registers that is specified
|
||||
by PcdSerialRegisterBase.
|
||||
|
||||
@param Base The base address register of UART device.
|
||||
@param Offset The offset of the 16550 register to read.
|
||||
|
||||
@@ -92,9 +92,9 @@ SerialPortReadRegister (
|
||||
/**
|
||||
Write an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is written to
|
||||
MMIO space. If PcdSerialUseMmio is FALSE, then the value is written to I/O space. The
|
||||
parameter Offset is added to the base address of the 16550 registers that is specified
|
||||
by PcdSerialRegisterBase.
|
||||
|
||||
parameter Offset is added to the base address of the 16550 registers that is specified
|
||||
by PcdSerialRegisterBase.
|
||||
|
||||
@param Base The base address register of UART device.
|
||||
@param Offset The offset of the 16550 register to write.
|
||||
@param Value The value to write to the 16550 register specified by Offset.
|
||||
@@ -117,11 +117,11 @@ SerialPortWriteRegister (
|
||||
}
|
||||
|
||||
/**
|
||||
Update the value of an 16-bit PCI configuration register in a PCI device. If the
|
||||
PCI Configuration register specified by PciAddress is already programmed with a
|
||||
non-zero value, then return the current value. Otherwise update the PCI configuration
|
||||
Update the value of an 16-bit PCI configuration register in a PCI device. If the
|
||||
PCI Configuration register specified by PciAddress is already programmed with a
|
||||
non-zero value, then return the current value. Otherwise update the PCI configuration
|
||||
register specified by PciAddress with the value specified by Value and return the
|
||||
value programmed into the PCI configuration register. All values must be masked
|
||||
value programmed into the PCI configuration register. All values must be masked
|
||||
using the bitmask specified by Mask.
|
||||
|
||||
@param PciAddress PCI Library address of the PCI Configuration register to update.
|
||||
@@ -137,7 +137,7 @@ SerialPortLibUpdatePciRegister16 (
|
||||
)
|
||||
{
|
||||
UINT16 CurrentValue;
|
||||
|
||||
|
||||
CurrentValue = PciRead16 (PciAddress) & Mask;
|
||||
if (CurrentValue != 0) {
|
||||
return CurrentValue;
|
||||
@@ -146,11 +146,11 @@ SerialPortLibUpdatePciRegister16 (
|
||||
}
|
||||
|
||||
/**
|
||||
Update the value of an 32-bit PCI configuration register in a PCI device. If the
|
||||
PCI Configuration register specified by PciAddress is already programmed with a
|
||||
non-zero value, then return the current value. Otherwise update the PCI configuration
|
||||
Update the value of an 32-bit PCI configuration register in a PCI device. If the
|
||||
PCI Configuration register specified by PciAddress is already programmed with a
|
||||
non-zero value, then return the current value. Otherwise update the PCI configuration
|
||||
register specified by PciAddress with the value specified by Value and return the
|
||||
value programmed into the PCI configuration register. All values must be masked
|
||||
value programmed into the PCI configuration register. All values must be masked
|
||||
using the bitmask specified by Mask.
|
||||
|
||||
@param PciAddress PCI Library address of the PCI Configuration register to update.
|
||||
@@ -168,7 +168,7 @@ SerialPortLibUpdatePciRegister32 (
|
||||
)
|
||||
{
|
||||
UINT32 CurrentValue;
|
||||
|
||||
|
||||
CurrentValue = PciRead32 (PciAddress) & Mask;
|
||||
if (CurrentValue != 0) {
|
||||
return CurrentValue;
|
||||
@@ -177,11 +177,11 @@ SerialPortLibUpdatePciRegister32 (
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieve the I/O or MMIO base address register for the PCI UART device.
|
||||
|
||||
This function assumes Root Bus Numer is Zero, and enables I/O and MMIO in PCI UART
|
||||
Device if they are not already enabled.
|
||||
|
||||
Retrieve the I/O or MMIO base address register for the PCI UART device.
|
||||
|
||||
This function assumes Root Bus Numer is Zero, and enables I/O and MMIO in PCI UART
|
||||
Device if they are not already enabled.
|
||||
|
||||
@return The base address register of the UART device.
|
||||
|
||||
**/
|
||||
@@ -210,10 +210,10 @@ GetSerialRegisterBase (
|
||||
// Get PCI Device Info
|
||||
//
|
||||
DeviceInfo = (PCI_UART_DEVICE_INFO *) PcdGetPtr (PcdSerialPciDeviceInfo);
|
||||
|
||||
|
||||
//
|
||||
// If PCI Device Info is empty, then assume fixed address UART and return PcdSerialRegisterBase
|
||||
//
|
||||
//
|
||||
if (DeviceInfo->Device == 0xff) {
|
||||
return (UINTN)PcdGet64 (PcdSerialRegisterBase);
|
||||
}
|
||||
@@ -225,17 +225,17 @@ GetSerialRegisterBase (
|
||||
ParentMemoryLimit = 0xfff00000 >> 16;
|
||||
ParentIoBase = 0 >> 12;
|
||||
ParentIoLimit = 0xf000 >> 12;
|
||||
|
||||
|
||||
//
|
||||
// Enable I/O and MMIO in PCI Bridge
|
||||
// Assume Root Bus Numer is Zero.
|
||||
// Assume Root Bus Numer is Zero.
|
||||
//
|
||||
for (BusNumber = 0; (DeviceInfo + 1)->Device != 0xff; DeviceInfo++) {
|
||||
//
|
||||
// Compute PCI Lib Address to PCI to PCI Bridge
|
||||
//
|
||||
PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0);
|
||||
|
||||
|
||||
//
|
||||
// Retrieve and verify the bus numbers in the PCI to PCI Bridge
|
||||
//
|
||||
@@ -258,10 +258,10 @@ GetSerialRegisterBase (
|
||||
if (MemoryLimit < MemoryBase) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If PCI Bridge MMIO window is not in the address range decoded by the parent PCI Bridge, then return 0
|
||||
//
|
||||
//
|
||||
if (MemoryBase < ParentMemoryBase || MemoryBase > ParentMemoryLimit || MemoryLimit > ParentMemoryLimit) {
|
||||
return 0;
|
||||
}
|
||||
@@ -280,17 +280,17 @@ GetSerialRegisterBase (
|
||||
} else {
|
||||
IoBase = (PciRead16 (PciLibAddress + OFFSET_OF (PCI_TYPE01, Bridge.IoBaseUpper16)) << 4) | (IoBase >> 4);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If PCI Bridge I/O window is disabled, then return 0
|
||||
//
|
||||
if (IoLimit < IoBase) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If PCI Bridge I/O window is not in the address range decoded by the parent PCI Bridge, then return 0
|
||||
//
|
||||
//
|
||||
if (IoBase < ParentIoBase || IoBase > ParentIoLimit || IoLimit > ParentIoLimit) {
|
||||
return 0;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ GetSerialRegisterBase (
|
||||
// Compute PCI Lib Address to PCI UART
|
||||
//
|
||||
PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0);
|
||||
|
||||
|
||||
//
|
||||
// Find the first IO or MMIO BAR
|
||||
//
|
||||
@@ -336,16 +336,16 @@ GetSerialRegisterBase (
|
||||
|
||||
//
|
||||
// Program UART BAR
|
||||
//
|
||||
//
|
||||
SerialRegisterBase = SerialPortLibUpdatePciRegister32 (
|
||||
PciLibAddress + PCI_BASE_ADDRESSREG_OFFSET + BarIndex * 4,
|
||||
(UINT32)PcdGet64 (PcdSerialRegisterBase),
|
||||
(UINT32)PcdGet64 (PcdSerialRegisterBase),
|
||||
RegisterBaseMask
|
||||
);
|
||||
|
||||
//
|
||||
// Verify that the UART BAR is in the address range decoded by the parent PCI Bridge
|
||||
//
|
||||
//
|
||||
if (PcdGetBool (PcdSerialUseMmio)) {
|
||||
if (((SerialRegisterBase >> 16) & 0xfff0) < ParentMemoryBase || ((SerialRegisterBase >> 16) & 0xfff0) > ParentMemoryLimit) {
|
||||
return 0;
|
||||
@@ -355,7 +355,7 @@ GetSerialRegisterBase (
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Enable I/O and MMIO in PCI UART Device if they are not already enabled
|
||||
//
|
||||
@@ -376,7 +376,7 @@ GetSerialRegisterBase (
|
||||
SerialPortWriteRegister (SerialRegisterBase, R_UART_FCR, (UINT8)(PcdGet8 (PcdSerialFifoControl) & (B_UART_FCR_FIFOE | B_UART_FCR_FIFO64)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get PCI Device Info
|
||||
//
|
||||
@@ -384,22 +384,22 @@ GetSerialRegisterBase (
|
||||
|
||||
//
|
||||
// Enable I/O or MMIO in PCI Bridge
|
||||
// Assume Root Bus Numer is Zero.
|
||||
// Assume Root Bus Numer is Zero.
|
||||
//
|
||||
for (BusNumber = 0; (DeviceInfo + 1)->Device != 0xff; DeviceInfo++) {
|
||||
//
|
||||
// Compute PCI Lib Address to PCI to PCI Bridge
|
||||
//
|
||||
PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0);
|
||||
|
||||
|
||||
//
|
||||
// Enable the I/O or MMIO decode windows in the PCI to PCI Bridge
|
||||
//
|
||||
PciOr16 (
|
||||
PciLibAddress + PCI_COMMAND_OFFSET,
|
||||
PciLibAddress + PCI_COMMAND_OFFSET,
|
||||
PcdGetBool (PcdSerialUseMmio) ? EFI_PCI_COMMAND_MEMORY_SPACE : EFI_PCI_COMMAND_IO_SPACE
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Force D0 state if a Power Management and Status Register is specified
|
||||
//
|
||||
@@ -408,10 +408,10 @@ GetSerialRegisterBase (
|
||||
PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndControlRegister, (UINT16)~(BIT0 | BIT1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BusNumber = PciRead8 (PciLibAddress + PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET);
|
||||
}
|
||||
|
||||
|
||||
return SerialRegisterBase;
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ SerialPortWritable (
|
||||
return (BOOLEAN) ((SerialPortReadRegister (SerialRegisterBase, R_UART_MSR) & (B_UART_MSR_DSR | B_UART_MSR_CTS)) == (B_UART_MSR_DSR | B_UART_MSR_CTS));
|
||||
} else {
|
||||
//
|
||||
// Wait for both DSR and CTS to be set OR for DSR to be clear.
|
||||
// Wait for both DSR and CTS to be set OR for DSR to be clear.
|
||||
// DSR is set if a cable is connected.
|
||||
// CTS is set if it is ok to transmit data
|
||||
//
|
||||
@@ -465,11 +465,11 @@ SerialPortWritable (
|
||||
|
||||
/**
|
||||
Initialize the serial device hardware.
|
||||
|
||||
|
||||
If no initialization is required, then return RETURN_SUCCESS.
|
||||
If the serial device was successfully initialized, then return RETURN_SUCCESS.
|
||||
If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
|
||||
|
||||
|
||||
@retval RETURN_SUCCESS The serial device was initialized.
|
||||
@retval RETURN_DEVICE_ERROR The serial device could not be initialized.
|
||||
|
||||
@@ -483,7 +483,7 @@ SerialPortInitialize (
|
||||
RETURN_STATUS Status;
|
||||
UINTN SerialRegisterBase;
|
||||
UINT32 Divisor;
|
||||
UINT32 CurrentDivisor;
|
||||
UINT32 CurrentDivisor;
|
||||
BOOLEAN Initialized;
|
||||
|
||||
//
|
||||
@@ -535,7 +535,7 @@ SerialPortInitialize (
|
||||
// Verify that both the transmit FIFO and the shift register are empty.
|
||||
//
|
||||
while ((SerialPortReadRegister (SerialRegisterBase, R_UART_LSR) & (B_UART_LSR_TEMT | B_UART_LSR_TXRDY)) != (B_UART_LSR_TEMT | B_UART_LSR_TXRDY));
|
||||
|
||||
|
||||
//
|
||||
// Configure baud rate
|
||||
//
|
||||
@@ -563,20 +563,20 @@ SerialPortInitialize (
|
||||
|
||||
//
|
||||
// Put Modem Control Register(MCR) into its reset state of 0x00.
|
||||
//
|
||||
//
|
||||
SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, 0x00);
|
||||
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Write data from buffer to serial device.
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
The number of bytes actually written to the serial device is returned.
|
||||
If the return value is less than NumberOfBytes, then the write operation failed.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@@ -584,7 +584,7 @@ SerialPortInitialize (
|
||||
@param NumberOfBytes Number of bytes to written to the serial device.
|
||||
|
||||
@retval 0 NumberOfBytes is 0.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
If this value is less than NumberOfBytes, then the write operation failed.
|
||||
|
||||
**/
|
||||
@@ -608,7 +608,7 @@ SerialPortWrite (
|
||||
if (SerialRegisterBase ==0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (NumberOfBytes == 0) {
|
||||
//
|
||||
// Flush the hardware
|
||||
@@ -671,7 +671,7 @@ SerialPortWrite (
|
||||
@param NumberOfBytes Number of bytes to read from the serial device.
|
||||
|
||||
@retval 0 NumberOfBytes is 0.
|
||||
@retval >0 The number of bytes read from the serial device.
|
||||
@retval >0 The number of bytes read from the serial device.
|
||||
If this value is less than NumberOfBytes, then the read operation failed.
|
||||
|
||||
**/
|
||||
@@ -696,7 +696,7 @@ SerialPortRead (
|
||||
}
|
||||
|
||||
Mcr = (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) & ~B_UART_MCR_RTS);
|
||||
|
||||
|
||||
for (Result = 0; NumberOfBytes-- != 0; Result++, Buffer++) {
|
||||
//
|
||||
// Wait for the serial port to have some data.
|
||||
@@ -715,13 +715,13 @@ SerialPortRead (
|
||||
//
|
||||
SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, Mcr);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Read byte from the receive buffer.
|
||||
//
|
||||
*Buffer = SerialPortReadRegister (SerialRegisterBase, R_UART_RXBUF);
|
||||
}
|
||||
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ SerialPortPoll (
|
||||
)
|
||||
{
|
||||
UINTN SerialRegisterBase;
|
||||
|
||||
|
||||
SerialRegisterBase = GetSerialRegisterBase ();
|
||||
if (SerialRegisterBase ==0) {
|
||||
return FALSE;
|
||||
@@ -761,15 +761,15 @@ SerialPortPoll (
|
||||
SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) & ~B_UART_MCR_RTS));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (PcdGetBool (PcdSerialUseHardwareFlowControl)) {
|
||||
//
|
||||
// Set RTS to let the peer send some data
|
||||
//
|
||||
SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) | B_UART_MCR_RTS));
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# SerialPortLib instance for 16550 UART.
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
[Sources]
|
||||
BaseSerialPortLib16550.c
|
||||
|
||||
|
||||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl ## CONSUMES
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// SerialPortLib instance for 16550 UART.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -2,7 +2,7 @@
|
||||
This library is only intended to be used by PlatformBootManagerLib
|
||||
to show progress bar and LOGO.
|
||||
|
||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016, Microsoft Corporation<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
@@ -292,7 +292,7 @@ BootLogoEnableLogo (
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
// More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation.
|
||||
// More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation.
|
||||
//
|
||||
if (Blt != NULL) {
|
||||
FreePool (Blt);
|
||||
@@ -366,7 +366,7 @@ BootLogoEnableLogo (
|
||||
}
|
||||
|
||||
/**
|
||||
Use SystemTable Conout to turn on video based Simple Text Out consoles. The
|
||||
Use SystemTable Conout to turn on video based Simple Text Out consoles. The
|
||||
Simple Text Out screens will now be synced up with all non video output devices
|
||||
|
||||
@retval EFI_SUCCESS UGA devices are back in text mode and synced up.
|
||||
|
@@ -1,17 +1,17 @@
|
||||
## @file
|
||||
# This library is only intended to be used by PlatformBootManagerLib
|
||||
# to show progress bar and logo.
|
||||
#
|
||||
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2016, Microsoft Corporation<BR>
|
||||
# This program and the accompanying materials are licensed and made available under
|
||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||
# The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php.
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
[Sources]
|
||||
BootLogoLib.c
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
@@ -49,7 +49,7 @@
|
||||
[Protocols]
|
||||
gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport ## SOMETIMES_CONSUMES
|
||||
gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiUserManagerProtocolGuid ## CONSUMES
|
||||
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Utility routines used by boot maintenance modules.
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -70,7 +70,7 @@ EfiDevicePathInstanceCount (
|
||||
}
|
||||
|
||||
/**
|
||||
Get a string from the Data Hub record based on
|
||||
Get a string from the Data Hub record based on
|
||||
a device path.
|
||||
|
||||
@param DevPath The device Path.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The functions for Boot Maintainence Main menu.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH mBmmHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -118,9 +118,9 @@ CustomizeMenus (
|
||||
|
||||
/**
|
||||
This function will change video resolution and text mode
|
||||
according to defined setup mode or defined boot mode
|
||||
according to defined setup mode or defined boot mode
|
||||
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
|
||||
@retval EFI_SUCCESS Mode is changed successfully.
|
||||
@retval Others Mode failed to be changed.
|
||||
@@ -147,13 +147,13 @@ BmmSetConsoleMode (
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
UINTN CurrentColumn;
|
||||
UINTN CurrentRow;
|
||||
UINTN CurrentRow;
|
||||
|
||||
MaxGopMode = 0;
|
||||
MaxTextMode = 0;
|
||||
|
||||
//
|
||||
// Get current video resolution and text mode
|
||||
// Get current video resolution and text mode
|
||||
//
|
||||
Status = gBS->HandleProtocol (
|
||||
gST->ConsoleOutHandle,
|
||||
@@ -171,7 +171,7 @@ BmmSetConsoleMode (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
SimpleTextOut = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -192,12 +192,12 @@ BmmSetConsoleMode (
|
||||
NewHorizontalResolution = mBmmBootHorizontalResolution;
|
||||
NewVerticalResolution = mBmmBootVerticalResolution;
|
||||
NewColumns = mBmmBootTextModeColumn;
|
||||
NewRows = mBmmBootTextModeRow;
|
||||
NewRows = mBmmBootTextModeRow;
|
||||
}
|
||||
|
||||
if (GraphicsOutput != NULL) {
|
||||
MaxGopMode = GraphicsOutput->Mode->MaxMode;
|
||||
}
|
||||
}
|
||||
|
||||
if (SimpleTextOut != NULL) {
|
||||
MaxTextMode = SimpleTextOut->Mode->MaxMode;
|
||||
@@ -743,7 +743,7 @@ BootMaintExtractConfig (
|
||||
|
||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||
@param[in] Configuration A null-terminated Unicode string in
|
||||
<ConfigString> format.
|
||||
<ConfigString> format.
|
||||
@param[out] Progress A pointer to a string filled in with the
|
||||
offset of the most recent '&' before the
|
||||
first failing name / value pair (or the
|
||||
@@ -753,7 +753,7 @@ BootMaintExtractConfig (
|
||||
successful.
|
||||
|
||||
@retval EFI_SUCCESS The results have been distributed or are
|
||||
awaiting distribution.
|
||||
awaiting distribution.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||
parts of the results that must be
|
||||
stored awaiting possible future
|
||||
@@ -802,15 +802,15 @@ BootMaintRouteConfig (
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiHiiConfigRoutingProtocolGuid,
|
||||
NULL,
|
||||
&gEfiHiiConfigRoutingProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&ConfigRouting
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Private = BMM_CALLBACK_DATA_FROM_THIS (This);
|
||||
Private = BMM_CALLBACK_DATA_FROM_THIS (This);
|
||||
//
|
||||
// Get Buffer Storage data from EFI variable
|
||||
//
|
||||
@@ -828,15 +828,15 @@ BootMaintRouteConfig (
|
||||
&BufferSize,
|
||||
Progress
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
//
|
||||
// Compare new and old BMM configuration data and only do action for modified item to
|
||||
// Compare new and old BMM configuration data and only do action for modified item to
|
||||
// avoid setting unnecessary non-volatile variable
|
||||
//
|
||||
|
||||
//
|
||||
// Check data which located in BMM main page and save the settings if need
|
||||
//
|
||||
//
|
||||
if (CompareMem (&NewBmmData->BootNext, &OldBmmData->BootNext, sizeof (NewBmmData->BootNext)) != 0) {
|
||||
Status = Var_UpdateBootNext (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -847,10 +847,10 @@ BootMaintRouteConfig (
|
||||
|
||||
//
|
||||
// Check data which located in Boot Options Menu and save the settings if need
|
||||
//
|
||||
if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));
|
||||
//
|
||||
if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));
|
||||
Index ++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
|
||||
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
@@ -891,10 +891,10 @@ BootMaintRouteConfig (
|
||||
|
||||
//
|
||||
// Check data which located in Driver Options Menu and save the settings if need
|
||||
//
|
||||
if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));
|
||||
//
|
||||
if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));
|
||||
Index++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index);
|
||||
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
@@ -909,7 +909,7 @@ BootMaintRouteConfig (
|
||||
}
|
||||
}
|
||||
|
||||
if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {
|
||||
if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {
|
||||
Status = Var_UpdateDriverOrder (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Offset = OFFSET_OF (BMM_FAKE_NV_DATA, DriverOptionOrder);
|
||||
@@ -1128,14 +1128,14 @@ BootMaintCallback (
|
||||
if (Value == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
UpdatePageId (Private, QuestionId);
|
||||
|
||||
if (QuestionId < FILE_OPTION_OFFSET) {
|
||||
if (QuestionId < CONFIG_OPTION_OFFSET) {
|
||||
switch (QuestionId) {
|
||||
case FORM_BOOT_ADD_ID:
|
||||
// Leave BMM and enter FileExplorer.
|
||||
// Leave BMM and enter FileExplorer.
|
||||
ChooseFile (NULL, L".efi", CreateBootOptionFromFile, &File);
|
||||
break;
|
||||
|
||||
@@ -1213,7 +1213,7 @@ BootMaintCallback (
|
||||
if ((Value == NULL) || (ActionRequest == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) {
|
||||
CleanUselessBeforeSubmit (Private);
|
||||
CurrentFakeNVMap->BootOptionChanged = FALSE;
|
||||
@@ -1247,7 +1247,7 @@ BootMaintCallback (
|
||||
CurrentFakeNVMap->BootOptionChanged = TRUE;
|
||||
} else if (QuestionId == KEY_VALUE_DRIVER_DESCRIPTION || QuestionId == KEY_VALUE_DRIVER_OPTION) {
|
||||
CurrentFakeNVMap->DriverOptionChanged = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ((QuestionId >= BOOT_OPTION_DEL_QUESTION_ID) && (QuestionId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) {
|
||||
if (Value->b){
|
||||
@@ -1718,7 +1718,7 @@ BootMaintenanceManagerUiLibConstructor (
|
||||
|
||||
CreateUpdateData();
|
||||
//
|
||||
// Update boot maintenance manager page
|
||||
// Update boot maintenance manager page
|
||||
//
|
||||
InitializeBmmConfig(mBmmCallbackInfo);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for boot maintenance module.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -333,7 +333,7 @@ typedef struct {
|
||||
} BM_MENU_ENTRY;
|
||||
|
||||
typedef struct {
|
||||
|
||||
|
||||
UINTN Signature;
|
||||
|
||||
EFI_HII_HANDLE BmmHiiHandle;
|
||||
@@ -355,7 +355,7 @@ typedef struct {
|
||||
//
|
||||
// BMM main formset callback data.
|
||||
//
|
||||
|
||||
|
||||
EFI_FORM_ID BmmCurrentPageId;
|
||||
EFI_FORM_ID BmmPreviousPageId;
|
||||
BOOLEAN BmmAskSaveOrNot;
|
||||
@@ -403,7 +403,7 @@ BOpt_GetBootOptions (
|
||||
|
||||
@return EFI_SUCESS The functin completes successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to compete the operation.
|
||||
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -505,12 +505,12 @@ BOpt_GetMenuEntry (
|
||||
);
|
||||
|
||||
/**
|
||||
Get option number according to Boot#### and BootOrder variable.
|
||||
Get option number according to Boot#### and BootOrder variable.
|
||||
The value is saved as #### + 1.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
GetBootOrder (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
);
|
||||
@@ -519,9 +519,9 @@ GetBootOrder (
|
||||
Get driver option order from globalc DriverOptionMenu.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
GetDriverOrder (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
);
|
||||
@@ -596,11 +596,11 @@ ChangeVariableDevicePath (
|
||||
|
||||
/**
|
||||
Update the multi-instance device path of Terminal Device based on
|
||||
the global TerminalMenu. If ChangeTernimal is TRUE, the terminal
|
||||
the global TerminalMenu. If ChangeTernimal is TRUE, the terminal
|
||||
device path in the Terminal Device in TerminalMenu is also updated.
|
||||
|
||||
@param DevicePath The multi-instance device path.
|
||||
@param ChangeTerminal TRUE, then device path in the Terminal Device
|
||||
@param ChangeTerminal TRUE, then device path in the Terminal Device
|
||||
in TerminalMenu is also updated; FALSE, no update.
|
||||
|
||||
@return EFI_SUCCESS The function completes successfully.
|
||||
@@ -616,8 +616,8 @@ ChangeTerminalDevicePath (
|
||||
// Variable operation by menu selection
|
||||
//
|
||||
/**
|
||||
This function create a currently loaded Boot Option from
|
||||
the BMM. It then appends this Boot Option to the end of
|
||||
This function create a currently loaded Boot Option from
|
||||
the BMM. It then appends this Boot Option to the end of
|
||||
the "BootOrder" list. It also append this Boot Opotion to the end
|
||||
of BootOptionMenu.
|
||||
|
||||
@@ -635,9 +635,9 @@ Var_UpdateBootOption (
|
||||
/**
|
||||
Delete Boot Option that represent a Deleted state in BootOptionMenu.
|
||||
|
||||
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
|
||||
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
|
||||
BM_LOAD_CONTEXT marked for deletion is deleted
|
||||
@return Others If failed to update the "BootOrder" variable after deletion.
|
||||
@return Others If failed to update the "BootOrder" variable after deletion.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -646,8 +646,8 @@ Var_DelBootOption (
|
||||
);
|
||||
|
||||
/**
|
||||
This function create a currently loaded Drive Option from
|
||||
the BMM. It then appends this Driver Option to the end of
|
||||
This function create a currently loaded Drive Option from
|
||||
the BMM. It then appends this Driver Option to the end of
|
||||
the "DriverOrder" list. It append this Driver Opotion to the end
|
||||
of DriverOptionMenu.
|
||||
|
||||
@@ -719,11 +719,11 @@ Var_UpdateErrorOutOption (
|
||||
|
||||
/**
|
||||
This function delete and build Out of Band console device.
|
||||
|
||||
|
||||
@param MenuIndex Menu index which user select in the terminal menu list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The function complete successfully.
|
||||
@return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
|
||||
@return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
|
||||
**/
|
||||
EFI_STATUS
|
||||
Var_UpdateOutOfBandOption (
|
||||
@@ -731,7 +731,7 @@ Var_UpdateOutOfBandOption (
|
||||
);
|
||||
|
||||
/**
|
||||
This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,
|
||||
This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,
|
||||
this EFI Variable is deleted.
|
||||
It also update the BMM context data specified the "BootNext" value.
|
||||
|
||||
@@ -747,7 +747,7 @@ Var_UpdateBootNext (
|
||||
);
|
||||
|
||||
/**
|
||||
This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh
|
||||
This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh
|
||||
BootOptionMenu with the new "BootOrder" list.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
@@ -816,7 +816,7 @@ RefreshUpdateData (
|
||||
|
||||
/**
|
||||
Clean up the dynamic opcode at label and form specified by
|
||||
both LabelId.
|
||||
both LabelId.
|
||||
|
||||
@param LabelId It is both the Form ID and Label ID for
|
||||
opcode deletion.
|
||||
@@ -937,7 +937,7 @@ UpdateOptionPage(
|
||||
|
||||
@param VarName A Null-terminated Unicode string that is
|
||||
the name of the vendor's variable.
|
||||
|
||||
|
||||
@param VarGuid A unique identifier for the vendor.
|
||||
|
||||
@retval EFI_SUCCESS The variable was found and removed
|
||||
@@ -969,7 +969,7 @@ EfiDevicePathInstanceCount (
|
||||
);
|
||||
|
||||
/**
|
||||
Get a string from the Data Hub record based on
|
||||
Get a string from the Data Hub record based on
|
||||
a device path.
|
||||
|
||||
@param DevPath The device Path.
|
||||
@@ -1065,8 +1065,8 @@ InitBootMaintenance(
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
**/
|
||||
VOID
|
||||
GetConsoleInCheck (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
);
|
||||
@@ -1091,7 +1091,7 @@ GetConsoleOutCheck (
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
**/
|
||||
VOID
|
||||
GetConsoleErrCheck (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
@@ -1112,9 +1112,9 @@ GetTerminalAttribute (
|
||||
|
||||
/**
|
||||
This function will change video resolution and text mode
|
||||
according to defined setup mode or defined boot mode
|
||||
according to defined setup mode or defined boot mode
|
||||
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
|
||||
@retval EFI_SUCCESS Mode is changed successfully.
|
||||
@retval Others Mode failed to be changed.
|
||||
@@ -1195,7 +1195,7 @@ BootMaintExtractConfig (
|
||||
|
||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||
@param[in] Configuration A null-terminated Unicode string in
|
||||
<ConfigString> format.
|
||||
<ConfigString> format.
|
||||
@param[out] Progress A pointer to a string filled in with the
|
||||
offset of the most recent '&' before the
|
||||
first failing name / value pair (or the
|
||||
@@ -1205,7 +1205,7 @@ BootMaintExtractConfig (
|
||||
successful.
|
||||
|
||||
@retval EFI_SUCCESS The results have been distributed or are
|
||||
awaiting distribution.
|
||||
awaiting distribution.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||
parts of the results that must be
|
||||
stored awaiting possible future
|
||||
@@ -1262,7 +1262,7 @@ BootMaintCallback (
|
||||
@retval FALSE Not exit caller function.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
CreateBootOptionFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
@@ -1276,7 +1276,7 @@ CreateBootOptionFromFile (
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
CreateDriverOptionFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
@@ -1289,9 +1289,9 @@ CreateDriverOptionFromFile (
|
||||
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
BootFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
|
@@ -1,15 +1,15 @@
|
||||
///** @file
|
||||
// Boot Maintenance Utility Formset
|
||||
//
|
||||
// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
//
|
||||
//**/
|
||||
|
||||
#include "FormGuid.h"
|
||||
@@ -38,10 +38,10 @@ formset
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_TRIGGER_FORM_OPEN_ACTION;
|
||||
endif;
|
||||
|
||||
|
||||
label LABEL_FORM_MAIN_START;
|
||||
//
|
||||
// This is where we will dynamically add a Action type op-code to show
|
||||
// This is where we will dynamically add a Action type op-code to show
|
||||
// the platform information.
|
||||
//
|
||||
label LABEL_FORM_MAIN_END;
|
||||
@@ -144,7 +144,7 @@ formset
|
||||
text = STRING_TOKEN(STR_NO_SAVE_AND_EXIT),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_NO_SAVE_AND_EXIT_BOOT;
|
||||
|
||||
|
||||
endform;
|
||||
|
||||
form formid = FORM_BOOT_DEL_ID,
|
||||
@@ -181,7 +181,7 @@ formset
|
||||
|
||||
form formid = FORM_DRV_ADD_FILE_ID,
|
||||
title = STRING_TOKEN(STR_FORM_DRV_ADD_DESC_TITLE);
|
||||
|
||||
|
||||
label FORM_DRV_ADD_FILE_ID;
|
||||
label LABEL_END;
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
///** @file
|
||||
// String definitions for Boot Maintenance Utility.
|
||||
//
|
||||
// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
//
|
||||
//**/
|
||||
|
||||
/=#
|
||||
@@ -71,9 +71,9 @@
|
||||
#language fr-FR "UEFI Optimized Boot"
|
||||
#string STR_FORM_UEFI_OPTIMIZED_BOOT_HELP #language en-US "Modify the UEFI Optimized Boot setting"
|
||||
#language fr-FR "Modify the UEFI Optimized Boot setting"
|
||||
#string UEFI_OPTIMIZED_BOOT_DESCRIPTION #language en-US "UEFI Optimized Boot"
|
||||
#string UEFI_OPTIMIZED_BOOT_DESCRIPTION #language en-US "UEFI Optimized Boot"
|
||||
#language fr-FR "UEFI Optimized Boot"
|
||||
#string UEFI_OPTIMIZED_BOOT_HELP #language en-US "Check to enable UEFI Optimized Boot"
|
||||
#string UEFI_OPTIMIZED_BOOT_HELP #language en-US "Check to enable UEFI Optimized Boot"
|
||||
#language fr-FR "Check to enable UEFI Optimized Boot"
|
||||
#string STR_FORM_CON_MAIN_TITLE #language en-US "Console Options"
|
||||
#language fr-FR "Console Options"
|
||||
|
@@ -1,15 +1,15 @@
|
||||
## @file
|
||||
# Boot Maintenance Manager Library used by UiApp.
|
||||
#
|
||||
# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are licensed and made available under
|
||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||
# The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php.
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
@@ -62,7 +62,7 @@
|
||||
UefiHiiServicesLib
|
||||
UefiBootManagerLib
|
||||
FileExplorerLib
|
||||
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option)
|
||||
## SOMETIMES_PRODUCES ## Variable:L"BootXX" (Boot option variable)
|
||||
@@ -82,7 +82,7 @@
|
||||
gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID (Extended IFR Guid Opcode)
|
||||
gEfiIfrFrontPageGuid ## CONSUMES ## GUID
|
||||
gEfiIfrBootMaintenanceGuid ## CONSUMES ## GUID
|
||||
|
||||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
|
||||
gEfiLoadFileProtocolGuid ## CONSUMES
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
Boot option manipulation
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -309,8 +309,8 @@ BOpt_GetBootOptions (
|
||||
UINTN MenuCount;
|
||||
UINT8 *Ptr;
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
|
||||
UINTN BootOptionCount;
|
||||
|
||||
UINTN BootOptionCount;
|
||||
|
||||
MenuCount = 0;
|
||||
BootOrderListSize = 0;
|
||||
BootNextSize = 0;
|
||||
@@ -327,7 +327,7 @@ BOpt_GetBootOptions (
|
||||
if (BootOrderList == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get the BootNext from the Var
|
||||
//
|
||||
@@ -346,7 +346,7 @@ BOpt_GetBootOptions (
|
||||
if (((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) != 0) || ((BootOption[Index].Attributes & LOAD_OPTION_ACTIVE) == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
UnicodeSPrint (BootString, sizeof (BootString), L"Boot%04x", BootOrderList[Index]);
|
||||
//
|
||||
// Get all loadoptions from the VAR
|
||||
@@ -415,13 +415,13 @@ BOpt_GetBootOptions (
|
||||
|
||||
NewLoadContext->FilePathListLength = *(UINT16 *) LoadOptionPtr;
|
||||
LoadOptionPtr += sizeof (UINT16);
|
||||
|
||||
|
||||
StringSize = StrSize((UINT16*)LoadOptionPtr);
|
||||
|
||||
NewLoadContext->Description = AllocateZeroPool (StrSize((UINT16*)LoadOptionPtr));
|
||||
ASSERT (NewLoadContext->Description != NULL);
|
||||
StrCpyS (NewLoadContext->Description, StrSize((UINT16*)LoadOptionPtr) / sizeof (UINT16), (UINT16*)LoadOptionPtr);
|
||||
|
||||
|
||||
ASSERT (NewLoadContext->Description != NULL);
|
||||
NewMenuEntry->DisplayString = NewLoadContext->Description;
|
||||
NewMenuEntry->DisplayStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->DisplayString, NULL);
|
||||
@@ -437,7 +437,7 @@ BOpt_GetBootOptions (
|
||||
);
|
||||
|
||||
NewMenuEntry->HelpString = UiDevicePathToStr (NewLoadContext->FilePathList);
|
||||
NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL);
|
||||
NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL);
|
||||
|
||||
LoadOptionPtr += NewLoadContext->FilePathListLength;
|
||||
|
||||
@@ -703,7 +703,7 @@ BOpt_GetDriverOptions (
|
||||
if (DriverOrderList == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
for (Index = 0; Index < DriverOrderListSize / sizeof (UINT16); Index++) {
|
||||
UnicodeSPrint (
|
||||
DriverString,
|
||||
@@ -767,7 +767,7 @@ BOpt_GetDriverOptions (
|
||||
);
|
||||
|
||||
NewMenuEntry->HelpString = UiDevicePathToStr (NewLoadContext->FilePathList);
|
||||
NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL);
|
||||
NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL);
|
||||
|
||||
LoadOptionPtr += NewLoadContext->FilePathListLength;
|
||||
|
||||
@@ -803,29 +803,29 @@ BOpt_GetDriverOptions (
|
||||
}
|
||||
|
||||
/**
|
||||
Get option number according to Boot#### and BootOrder variable.
|
||||
Get option number according to Boot#### and BootOrder variable.
|
||||
The value is saved as #### + 1.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
GetBootOrder (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
BMM_FAKE_NV_DATA *BmmConfig;
|
||||
UINT16 Index;
|
||||
UINT16 OptionOrderIndex;
|
||||
UINT16 OptionOrderIndex;
|
||||
UINTN DeviceType;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_LOAD_CONTEXT *NewLoadContext;
|
||||
BM_LOAD_CONTEXT *NewLoadContext;
|
||||
|
||||
ASSERT (CallbackData != NULL);
|
||||
|
||||
DeviceType = (UINTN) -1;
|
||||
BmmConfig = &CallbackData->BmmFakeNvData;
|
||||
|
||||
DeviceType = (UINTN) -1;
|
||||
BmmConfig = &CallbackData->BmmFakeNvData;
|
||||
ZeroMem (BmmConfig->BootOptionOrder, sizeof (BmmConfig->BootOptionOrder));
|
||||
|
||||
|
||||
for (Index = 0, OptionOrderIndex = 0; ((Index < BootOptionMenu.MenuNumber) &&
|
||||
(OptionOrderIndex < (sizeof (BmmConfig->BootOptionOrder) / sizeof (BmmConfig->BootOptionOrder[0]))));
|
||||
Index++) {
|
||||
@@ -844,34 +844,34 @@ GetBootOrder (
|
||||
}
|
||||
}
|
||||
BmmConfig->BootOptionOrder[OptionOrderIndex++] = (UINT32) (NewMenuEntry->OptionNumber + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Get driver option order from globalc DriverOptionMenu.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
GetDriverOrder (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
BMM_FAKE_NV_DATA *BmmConfig;
|
||||
UINT16 Index;
|
||||
UINT16 OptionOrderIndex;
|
||||
UINT16 OptionOrderIndex;
|
||||
UINTN DeviceType;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_LOAD_CONTEXT *NewLoadContext;
|
||||
BM_LOAD_CONTEXT *NewLoadContext;
|
||||
|
||||
|
||||
ASSERT (CallbackData != NULL);
|
||||
|
||||
DeviceType = (UINTN) -1;
|
||||
BmmConfig = &CallbackData->BmmFakeNvData;
|
||||
|
||||
DeviceType = (UINTN) -1;
|
||||
BmmConfig = &CallbackData->BmmFakeNvData;
|
||||
ZeroMem (BmmConfig->DriverOptionOrder, sizeof (BmmConfig->DriverOptionOrder));
|
||||
|
||||
|
||||
for (Index = 0, OptionOrderIndex = 0; ((Index < DriverOptionMenu.MenuNumber) &&
|
||||
(OptionOrderIndex < (sizeof (BmmConfig->DriverOptionOrder) / sizeof (BmmConfig->DriverOptionOrder[0]))));
|
||||
Index++) {
|
||||
@@ -890,8 +890,8 @@ GetDriverOrder (
|
||||
}
|
||||
}
|
||||
BmmConfig->DriverOptionOrder[OptionOrderIndex++] = (UINT32) (NewMenuEntry->OptionNumber + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Boot the file specified by the input file path info.
|
||||
@@ -901,7 +901,7 @@ GetDriverOrder (
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
BootFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
@@ -982,7 +982,7 @@ ReSendForm(
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
CreateBootOptionFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
@@ -1000,7 +1000,7 @@ CreateBootOptionFromFile (
|
||||
@retval FALSE Not exit caller function.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
CreateDriverOptionFromFile (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
handles console redirection from boot manager
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -100,11 +100,11 @@ UpdateComAttributeFromVariable (
|
||||
|
||||
/**
|
||||
Update the multi-instance device path of Terminal Device based on
|
||||
the global TerminalMenu. If ChangeTernimal is TRUE, the terminal
|
||||
the global TerminalMenu. If ChangeTernimal is TRUE, the terminal
|
||||
device path in the Terminal Device in TerminalMenu is also updated.
|
||||
|
||||
@param DevicePath The multi-instance device path.
|
||||
@param ChangeTerminal TRUE, then device path in the Terminal Device
|
||||
@param ChangeTerminal TRUE, then device path in the Terminal Device
|
||||
in TerminalMenu is also updated; FALSE, no update.
|
||||
|
||||
@return EFI_SUCCESS The function completes successfully.
|
||||
@@ -732,7 +732,7 @@ UpdateComAttributeFromVariable (
|
||||
and BM_CONSOLE_ERR_CONTEXT_SELECT.
|
||||
|
||||
@retval EFI_UNSUPPORTED The type passed in is not in the 3 types defined.
|
||||
@retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev",
|
||||
@retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev",
|
||||
"ConInDev" or "ConErrDev" doesn't exists.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough resource to complete the operations.
|
||||
@retval EFI_SUCCESS Function completes successfully.
|
||||
@@ -1021,14 +1021,14 @@ GetConsoleOutMode (
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
**/
|
||||
VOID
|
||||
GetConsoleInCheck (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
UINT16 Index;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
UINT8 *ConInCheck;
|
||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||
@@ -1037,9 +1037,9 @@ GetConsoleInCheck (
|
||||
|
||||
ConInCheck = &CallbackData->BmmFakeNvData.ConsoleInCheck[0];
|
||||
for (Index = 0; ((Index < ConsoleInpMenu.MenuNumber) && \
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleInpMenu, Index);
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
ConInCheck[Index] = NewConsoleContext->IsActive;
|
||||
}
|
||||
|
||||
@@ -1058,14 +1058,14 @@ GetConsoleInCheck (
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
**/
|
||||
VOID
|
||||
GetConsoleOutCheck (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
UINT16 Index;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
UINT8 *ConOutCheck;
|
||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||
@@ -1073,9 +1073,9 @@ GetConsoleOutCheck (
|
||||
ASSERT (CallbackData != NULL);
|
||||
ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0];
|
||||
for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleOutMenu, Index);
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
ConOutCheck[Index] = NewConsoleContext->IsActive;
|
||||
}
|
||||
|
||||
@@ -1094,14 +1094,14 @@ GetConsoleOutCheck (
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
**/
|
||||
VOID
|
||||
GetConsoleErrCheck (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
UINT16 Index;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
UINT8 *ConErrCheck;
|
||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||
@@ -1109,9 +1109,9 @@ GetConsoleErrCheck (
|
||||
ASSERT (CallbackData != NULL);
|
||||
ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
|
||||
for (Index = 0; ((Index < ConsoleErrMenu.MenuNumber) && \
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
(Index < MAX_MENU_NUMBER)) ; Index++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index);
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
ConErrCheck[Index] = NewConsoleContext->IsActive;
|
||||
}
|
||||
|
||||
@@ -1131,22 +1131,22 @@ GetConsoleErrCheck (
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
GetTerminalAttribute (
|
||||
IN BMM_CALLBACK_DATA *CallbackData
|
||||
)
|
||||
{
|
||||
BMM_FAKE_NV_DATA *CurrentFakeNVMap;
|
||||
BM_MENU_ENTRY *NewMenuEntry;
|
||||
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||
UINT16 TerminalIndex;
|
||||
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||
UINT16 TerminalIndex;
|
||||
UINT8 AttributeIndex;
|
||||
|
||||
ASSERT (CallbackData != NULL);
|
||||
|
||||
CurrentFakeNVMap = &CallbackData->BmmFakeNvData;
|
||||
CurrentFakeNVMap = &CallbackData->BmmFakeNvData;
|
||||
for (TerminalIndex = 0; ((TerminalIndex < TerminalMenu.MenuNumber) && \
|
||||
(TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) {
|
||||
(TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, TerminalIndex);
|
||||
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
for (AttributeIndex = 0; AttributeIndex < sizeof (BaudRateList) / sizeof (BaudRateList [0]); AttributeIndex++) {
|
||||
@@ -1160,7 +1160,7 @@ GetTerminalAttribute (
|
||||
NewTerminalContext->DataBitsIndex = AttributeIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (ParityList); AttributeIndex++) {
|
||||
if (NewTerminalContext->Parity == (UINT64) (ParityList[AttributeIndex].Value)) {
|
||||
@@ -1178,7 +1178,7 @@ GetTerminalAttribute (
|
||||
CurrentFakeNVMap->COMBaudRate[TerminalIndex] = NewTerminalContext->BaudRateIndex;
|
||||
CurrentFakeNVMap->COMDataRate[TerminalIndex] = NewTerminalContext->DataBitsIndex;
|
||||
CurrentFakeNVMap->COMStopBits[TerminalIndex] = NewTerminalContext->StopBitsIndex;
|
||||
CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex;
|
||||
CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex;
|
||||
CurrentFakeNVMap->COMTerminalType[TerminalIndex] = NewTerminalContext->TerminalType;
|
||||
CurrentFakeNVMap->COMFlowControl[TerminalIndex] = NewTerminalContext->FlowControl;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Formset guids, form id and VarStore data structure for Boot Maintenance Manager.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -148,7 +148,7 @@ typedef struct {
|
||||
// At most 100 input/output/errorout device for console storage
|
||||
//
|
||||
UINT8 ConsoleCheck[MAX_MENU_NUMBER];
|
||||
|
||||
|
||||
//
|
||||
// At most 100 input/output/errorout device for console storage
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Dynamically update the pages.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -28,16 +28,16 @@ CreateUpdateData (
|
||||
//
|
||||
mStartOpCodeHandle = HiiAllocateOpCodeHandle ();
|
||||
ASSERT (mStartOpCodeHandle != NULL);
|
||||
|
||||
|
||||
mEndOpCodeHandle = HiiAllocateOpCodeHandle ();
|
||||
ASSERT (mEndOpCodeHandle != NULL);
|
||||
|
||||
|
||||
//
|
||||
// Create Hii Extend Label OpCode as the start opcode
|
||||
//
|
||||
mStartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (mStartOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));
|
||||
mStartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
|
||||
|
||||
|
||||
//
|
||||
// Create Hii Extend Label OpCode as the end opcode
|
||||
//
|
||||
@@ -57,7 +57,7 @@ RefreshUpdateData (
|
||||
{
|
||||
//
|
||||
// Free current updated date
|
||||
//
|
||||
//
|
||||
if (mStartOpCodeHandle != NULL) {
|
||||
HiiFreeOpCodeHandle (mStartOpCodeHandle);
|
||||
}
|
||||
@@ -78,7 +78,7 @@ RefreshUpdateData (
|
||||
/**
|
||||
Add a "Go back to main page" tag in front of the form when there are no
|
||||
"Apply changes" and "Discard changes" tags in the end of the form.
|
||||
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
**/
|
||||
@@ -162,7 +162,7 @@ UpdatePageEnd (
|
||||
}
|
||||
|
||||
/**
|
||||
Clean up the dynamic opcode at label and form specified by both LabelId.
|
||||
Clean up the dynamic opcode at label and form specified by both LabelId.
|
||||
|
||||
@param LabelId It is both the Form ID and Label ID for opcode deletion.
|
||||
@param CallbackData The BMM context data.
|
||||
@@ -264,7 +264,7 @@ UpdateBootDelPage (
|
||||
CallbackData->BmmFakeNvData.BootOptionDel[Index] = FALSE;
|
||||
CallbackData->BmmOldFakeNVData.BootOptionDel[Index] = FALSE;
|
||||
}
|
||||
|
||||
|
||||
HiiCreateCheckBoxOpCode (
|
||||
mStartOpCodeHandle,
|
||||
(EFI_QUESTION_ID) (BOOT_OPTION_DEL_QUESTION_ID + Index),
|
||||
@@ -368,7 +368,7 @@ UpdateDrvDelPage (
|
||||
}
|
||||
|
||||
/**
|
||||
Prepare the page to allow user to add description for
|
||||
Prepare the page to allow user to add description for
|
||||
a Driver Option.
|
||||
|
||||
@param CallbackData The BMM context data.
|
||||
@@ -582,8 +582,8 @@ UpdateOrderPage (
|
||||
OptionOrder = NULL;
|
||||
QuestionId = 0;
|
||||
VarOffset = 0;
|
||||
switch (UpdatePageId) {
|
||||
|
||||
switch (UpdatePageId) {
|
||||
|
||||
case FORM_BOOT_CHG_ID:
|
||||
//
|
||||
// If the BootOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,
|
||||
@@ -598,7 +598,7 @@ UpdateOrderPage (
|
||||
QuestionId = BOOT_OPTION_ORDER_QUESTION_ID;
|
||||
VarOffset = BOOT_OPTION_ORDER_VAR_OFFSET;
|
||||
break;
|
||||
|
||||
|
||||
case FORM_DRV_CHG_ID:
|
||||
//
|
||||
// If the DriverOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,
|
||||
@@ -613,12 +613,12 @@ UpdateOrderPage (
|
||||
QuestionId = DRIVER_OPTION_ORDER_QUESTION_ID;
|
||||
VarOffset = DRIVER_OPTION_ORDER_VAR_OFFSET;
|
||||
break;
|
||||
}
|
||||
ASSERT (OptionOrder != NULL);
|
||||
|
||||
}
|
||||
ASSERT (OptionOrder != NULL);
|
||||
|
||||
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
|
||||
ASSERT (OptionsOpCodeHandle != NULL);
|
||||
|
||||
|
||||
NewMenuEntry = NULL;
|
||||
for (OptionIndex = 0; (OptionOrder[OptionIndex] != 0 && OptionIndex < MAX_MENU_NUMBER); OptionIndex++) {
|
||||
BootOptionFound = FALSE;
|
||||
@@ -639,21 +639,21 @@ UpdateOrderPage (
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (OptionMenu->MenuNumber > 0) {
|
||||
HiiCreateOrderedListOpCode (
|
||||
mStartOpCodeHandle, // Container for dynamic created opcodes
|
||||
QuestionId, // Question ID
|
||||
VARSTORE_ID_BOOT_MAINT, // VarStore ID
|
||||
VarOffset, // Offset in Buffer Storage
|
||||
STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text
|
||||
STRING_TOKEN (STR_CHANGE_ORDER), // Question help text
|
||||
0, // Question flag
|
||||
HiiCreateOrderedListOpCode (
|
||||
mStartOpCodeHandle, // Container for dynamic created opcodes
|
||||
QuestionId, // Question ID
|
||||
VARSTORE_ID_BOOT_MAINT, // VarStore ID
|
||||
VarOffset, // Offset in Buffer Storage
|
||||
STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text
|
||||
STRING_TOKEN (STR_CHANGE_ORDER), // Question help text
|
||||
0, // Question flag
|
||||
0, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET
|
||||
EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value
|
||||
100, // Maximum container
|
||||
OptionsOpCodeHandle, // Option Opcode list
|
||||
NULL // Default Opcode is NULL
|
||||
EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value
|
||||
100, // Maximum container
|
||||
OptionsOpCodeHandle, // Option Opcode list
|
||||
NULL // Default Opcode is NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ UpdateConModePage (
|
||||
if (EFI_ERROR (Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Build mode string Column x Row
|
||||
//
|
||||
@@ -848,7 +848,7 @@ UpdateTerminalPage (
|
||||
OptionsOpCodeHandle,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
|
||||
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
|
||||
ASSERT (OptionsOpCodeHandle != NULL);
|
||||
@@ -1013,7 +1013,7 @@ UpdateTerminalPage (
|
||||
|
||||
UpdatePageEnd (CallbackData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Update add boot/driver option page.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Variable operation that will be used by bootmaint
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -17,10 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/**
|
||||
Delete Boot Option that represent a Deleted state in BootOptionMenu.
|
||||
|
||||
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
|
||||
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
|
||||
BM_LOAD_CONTEXT marked for deletion is deleted.
|
||||
@retval EFI_NOT_FOUND If can not find the boot option want to be deleted.
|
||||
@return Others If failed to update the "BootOrder" variable after deletion.
|
||||
@return Others If failed to update the "BootOrder" variable after deletion.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -124,7 +124,7 @@ Var_DelDriverOption (
|
||||
|
||||
This function clear the EFI variable defined by ConsoleName and
|
||||
gEfiGlobalVariableGuid. It then build the multi-instance device
|
||||
path by appending the device path of the Console (In/Out/Err) instance
|
||||
path by appending the device path of the Console (In/Out/Err) instance
|
||||
in ConsoleMenu. Then it scan all corresponding console device by
|
||||
scanning Terminal (built from device supporting Serial I/O instances)
|
||||
devices in TerminalMenu. At last, it save a EFI variable specifed
|
||||
@@ -188,7 +188,7 @@ Var_UpdateConsoleOption (
|
||||
) {
|
||||
Vendor.Header.Type = MESSAGING_DEVICE_PATH;
|
||||
Vendor.Header.SubType = MSG_VENDOR_DP;
|
||||
|
||||
|
||||
ASSERT (NewTerminalContext->TerminalType < (ARRAY_SIZE (TerminalTypeGuid)));
|
||||
CopyMem (
|
||||
&Vendor.Guid,
|
||||
@@ -261,7 +261,7 @@ Var_UpdateConsoleOutOption (
|
||||
console device.
|
||||
|
||||
@retval EFI_SUCCESS The function complete successfully.
|
||||
@return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
|
||||
@return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
|
||||
**/
|
||||
EFI_STATUS
|
||||
Var_UpdateErrorOutOption (
|
||||
@@ -272,8 +272,8 @@ Var_UpdateErrorOutOption (
|
||||
}
|
||||
|
||||
/**
|
||||
This function create a currently loaded Drive Option from
|
||||
the BMM. It then appends this Driver Option to the end of
|
||||
This function create a currently loaded Drive Option from
|
||||
the BMM. It then appends this Driver Option to the end of
|
||||
the "DriverOrder" list. It append this Driver Opotion to the end
|
||||
of DriverOptionMenu.
|
||||
|
||||
@@ -401,8 +401,8 @@ Var_UpdateDriverOption (
|
||||
}
|
||||
|
||||
/**
|
||||
This function create a currently loaded Boot Option from
|
||||
the BMM. It then appends this Boot Option to the end of
|
||||
This function create a currently loaded Boot Option from
|
||||
the BMM. It then appends this Boot Option to the end of
|
||||
the "BootOrder" list. It also append this Boot Opotion to the end
|
||||
of BootOptionMenu.
|
||||
|
||||
@@ -521,7 +521,7 @@ Var_UpdateBootOption (
|
||||
}
|
||||
|
||||
/**
|
||||
This function update the "BootNext" EFI Variable. If there is
|
||||
This function update the "BootNext" EFI Variable. If there is
|
||||
no "BootNext" specified in BMM, this EFI Variable is deleted.
|
||||
It also update the BMM context data specified the "BootNext"
|
||||
vaule.
|
||||
@@ -529,7 +529,7 @@ Var_UpdateBootOption (
|
||||
@param CallbackData The BMM context data.
|
||||
|
||||
@retval EFI_SUCCESS The function complete successfully.
|
||||
@return The EFI variable can be saved. See gRT->SetVariable
|
||||
@return The EFI variable can be saved. See gRT->SetVariable
|
||||
for detail return information.
|
||||
|
||||
**/
|
||||
@@ -633,7 +633,7 @@ Var_UpdateBootOrder (
|
||||
BootOrder
|
||||
);
|
||||
FreePool (BootOrder);
|
||||
|
||||
|
||||
BOpt_FreeMenu (&BootOptionMenu);
|
||||
BOpt_GetBootOptions (CallbackData);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The boot manager reference implementation
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
@@ -62,7 +62,7 @@ HII_VENDOR_DEVICE_PATH mBootManagerHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -82,9 +82,9 @@ BOOT_MANAGER_CALLBACK_DATA gBootManagerPrivate = {
|
||||
|
||||
/**
|
||||
This function will change video resolution and text mode
|
||||
according to defined setup mode or defined boot mode
|
||||
according to defined setup mode or defined boot mode
|
||||
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
|
||||
@retval EFI_SUCCESS Mode is changed successfully.
|
||||
@retval Others Mode failed to be changed.
|
||||
@@ -111,13 +111,13 @@ BmSetConsoleMode (
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
UINTN CurrentColumn;
|
||||
UINTN CurrentRow;
|
||||
UINTN CurrentRow;
|
||||
|
||||
MaxGopMode = 0;
|
||||
MaxTextMode = 0;
|
||||
|
||||
//
|
||||
// Get current video resolution and text mode
|
||||
// Get current video resolution and text mode
|
||||
//
|
||||
Status = gBS->HandleProtocol (
|
||||
gST->ConsoleOutHandle,
|
||||
@@ -156,7 +156,7 @@ BmSetConsoleMode (
|
||||
NewHorizontalResolution = mBmBootHorizontalResolution;
|
||||
NewVerticalResolution = mBmBootVerticalResolution;
|
||||
NewColumns = mBmBootTextModeColumn;
|
||||
NewRows = mBmBootTextModeRow;
|
||||
NewRows = mBmBootTextModeRow;
|
||||
}
|
||||
|
||||
if (GraphicsOutput != NULL) {
|
||||
@@ -340,7 +340,7 @@ BmSetupResetReminder (
|
||||
/**
|
||||
Group the legacy boot options in the BootOption.
|
||||
|
||||
The routine assumes the boot options in the beginning that covers all the device
|
||||
The routine assumes the boot options in the beginning that covers all the device
|
||||
types are ordered properly and re-position the following boot options just after
|
||||
the corresponding boot options with the same device type.
|
||||
For example:
|
||||
@@ -466,7 +466,7 @@ BmDevicePathToStr (
|
||||
This function invokes Boot Manager. It then enumerate all boot options. If
|
||||
a boot option from the Boot Manager page is selected, Boot Manager will boot
|
||||
from this boot option.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
UpdateBootManager (
|
||||
@@ -559,7 +559,7 @@ UpdateBootManager (
|
||||
NeedEndOp = FALSE;
|
||||
HiiCreateEndOpCode (StartOpCodeHandle);
|
||||
}
|
||||
|
||||
|
||||
if (IsLegacyOption && DeviceType != ((BBS_BBS_DEVICE_PATH *) BootOption[Index].FilePath)->DeviceType) {
|
||||
if (NeedEndOp) {
|
||||
HiiCreateEndOpCode (StartOpCodeHandle);
|
||||
|
@@ -1,24 +1,24 @@
|
||||
///** @file
|
||||
//
|
||||
// Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Module Name:
|
||||
//
|
||||
// BootManagerStrings.uni
|
||||
//
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
//
|
||||
// String definitions for Boot Manager formset.
|
||||
//
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
//
|
||||
// --*/
|
||||
|
||||
/=#
|
||||
|
@@ -1,12 +1,12 @@
|
||||
## @file
|
||||
# Boot Manager Library used by UiApp.
|
||||
#
|
||||
# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are licensed and made available under
|
||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||
# The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php.
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
CPU Exception Handler library implementition with empty functions.
|
||||
|
||||
Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,15 +16,15 @@
|
||||
|
||||
/**
|
||||
Initializes all CPU exceptions entries and provides the default exception handlers.
|
||||
|
||||
|
||||
Caller should try to get an array of interrupt and/or exception vectors that are in use and need to
|
||||
persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.
|
||||
If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
|
||||
If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
|
||||
If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.
|
||||
|
||||
@param[in] VectorInfo Pointer to reserved vector list.
|
||||
|
||||
@retval EFI_SUCCESS CPU Exception Entries have been successfully initialized
|
||||
|
||||
@retval EFI_SUCCESS CPU Exception Entries have been successfully initialized
|
||||
with default exception handlers.
|
||||
@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.
|
||||
@retval EFI_UNSUPPORTED This function is not supported.
|
||||
@@ -41,15 +41,15 @@ InitializeCpuExceptionHandlers (
|
||||
|
||||
/**
|
||||
Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers.
|
||||
|
||||
|
||||
Caller should try to get an array of interrupt and/or exception vectors that are in use and need to
|
||||
persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.
|
||||
If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
|
||||
If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
|
||||
If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.
|
||||
|
||||
@param[in] VectorInfo Pointer to reserved vector list.
|
||||
|
||||
@retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized
|
||||
|
||||
@retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized
|
||||
with default interrupt/exception handlers.
|
||||
@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.
|
||||
@retval EFI_UNSUPPORTED This function is not supported.
|
||||
@@ -67,9 +67,9 @@ InitializeCpuInterruptHandlers (
|
||||
/**
|
||||
Registers a function to be called from the processor interrupt handler.
|
||||
|
||||
This function registers and enables the handler specified by InterruptHandler for a processor
|
||||
interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the
|
||||
handler for the processor interrupt or exception type specified by InterruptType is uninstalled.
|
||||
This function registers and enables the handler specified by InterruptHandler for a processor
|
||||
interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the
|
||||
handler for the processor interrupt or exception type specified by InterruptType is uninstalled.
|
||||
The installed handler is called once for each processor interrupt or exception.
|
||||
NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or
|
||||
InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned.
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
This library class defines a set of interfaces to customize Display module
|
||||
|
||||
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
@@ -44,14 +44,14 @@ Statement
|
||||
**/
|
||||
|
||||
/**
|
||||
This funtion defines Page Frame and Backgroud.
|
||||
|
||||
Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,
|
||||
StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.
|
||||
This funtion defines Page Frame and Backgroud.
|
||||
|
||||
Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,
|
||||
StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page.
|
||||
@param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help)
|
||||
|
||||
|
||||
@return Status
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -120,8 +120,8 @@ DisplayPageFrame (
|
||||
This function updates customized key panel's help information.
|
||||
The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-.
|
||||
and arrange them in Footer panel.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.
|
||||
@param[in] Statement The statement current selected.
|
||||
@param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question.
|
||||
**/
|
||||
@@ -214,7 +214,7 @@ RefreshKeyHelp (
|
||||
} else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) {
|
||||
TimeOp = (EFI_IFR_TIME *) Statement->OpCode;
|
||||
HexDisplay = (TimeOp->Flags & EFI_IFR_DISPLAY_UINT_HEX) == EFI_IFR_DISPLAY_UINT_HEX;
|
||||
}
|
||||
}
|
||||
switch (Statement->OpCode->OpCode) {
|
||||
case EFI_IFR_ORDERED_LIST_OP:
|
||||
case EFI_IFR_ONE_OF_OP:
|
||||
@@ -232,7 +232,7 @@ RefreshKeyHelp (
|
||||
if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) ||
|
||||
(Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
|
||||
PrintAt (
|
||||
ColumnWidth1,
|
||||
ColumnWidth1,
|
||||
StartColumnOfHelp,
|
||||
BottomRowOfHelp,
|
||||
L"%c%c%c%c%s",
|
||||
@@ -259,7 +259,7 @@ RefreshKeyHelp (
|
||||
//
|
||||
// If it is a selected numeric with manual input, display different message
|
||||
//
|
||||
if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) ||
|
||||
if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) ||
|
||||
(Statement->OpCode->OpCode == EFI_IFR_DATE_OP) ||
|
||||
(Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
|
||||
ColumnStr2 = HexDisplay ? gHexNumericInput : gDecNumericInput;
|
||||
@@ -329,16 +329,16 @@ RefreshKeyHelp (
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Update status bar.
|
||||
|
||||
This function updates the status bar on the bottom of menu screen. It just shows StatusBar.
|
||||
This function updates the status bar on the bottom of menu screen. It just shows StatusBar.
|
||||
Original logic in this function should be splitted out.
|
||||
|
||||
@param[in] MessageType The type of message to be shown. InputError or Configuration Changed.
|
||||
@param[in] MessageType The type of message to be shown. InputError or Configuration Changed.
|
||||
@param[in] State Show or Clear Message.
|
||||
**/
|
||||
VOID
|
||||
@@ -395,17 +395,17 @@ UpdateStatusBar (
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Create popup window. It will replace CreateDialog().
|
||||
Create popup window. It will replace CreateDialog().
|
||||
|
||||
This function draws OEM/Vendor specific pop up windows.
|
||||
|
||||
@param[out] Key User Input Key
|
||||
@param ... String to be shown in Popup. The variable argument list is terminated by a NULL.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -453,17 +453,17 @@ CreateDialog (
|
||||
VA_START (Marker, Key);
|
||||
while ((String = VA_ARG (Marker, CHAR16 *)) != NULL) {
|
||||
LineNum ++;
|
||||
|
||||
|
||||
if ((LibGetStringWidth (String) / 2) > LargestString) {
|
||||
LargestString = (LibGetStringWidth (String) / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
VA_END (Marker);
|
||||
|
||||
if ((LargestString + 2) > DimensionsWidth) {
|
||||
LargestString = DimensionsWidth - 2;
|
||||
}
|
||||
|
||||
|
||||
CurrentAttribute = gST->ConOut->Mode->Attribute;
|
||||
CursorVisible = gST->ConOut->Mode->CursorVisible;
|
||||
gST->ConOut->EnableCursor (gST->ConOut, FALSE);
|
||||
@@ -551,8 +551,8 @@ CreateDialog (
|
||||
}
|
||||
|
||||
/**
|
||||
Confirm how to handle the changed data.
|
||||
|
||||
Confirm how to handle the changed data.
|
||||
|
||||
@return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values.
|
||||
**/
|
||||
UINTN
|
||||
@@ -566,10 +566,10 @@ ConfirmDataChange (
|
||||
EFI_INPUT_KEY Key;
|
||||
|
||||
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
|
||||
|
||||
YesResponse = gYesResponse[0];
|
||||
NoResponse = gNoResponse[0];
|
||||
|
||||
|
||||
//
|
||||
// If NV flag is up, prompt user
|
||||
//
|
||||
@@ -581,7 +581,7 @@ ConfirmDataChange (
|
||||
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (NoResponse | UPPER_LOWER_CASE_OFFSET)) &&
|
||||
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (YesResponse | UPPER_LOWER_CASE_OFFSET))
|
||||
);
|
||||
|
||||
|
||||
if (Key.ScanCode == SCAN_ESC) {
|
||||
return BROWSER_ACTION_NONE;
|
||||
} else if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (YesResponse | UPPER_LOWER_CASE_OFFSET)) {
|
||||
@@ -594,7 +594,7 @@ ConfirmDataChange (
|
||||
/**
|
||||
OEM specifies whether Setup exits Page by ESC key.
|
||||
|
||||
This function customized the behavior that whether Setup exits Page so that
|
||||
This function customized the behavior that whether Setup exits Page so that
|
||||
system able to boot when configuration is not changed.
|
||||
|
||||
@retval TRUE Exits FrontPage
|
||||
@@ -610,14 +610,14 @@ FormExitPolicy (
|
||||
}
|
||||
|
||||
/**
|
||||
Set Timeout value for a ceratain Form to get user response.
|
||||
|
||||
Set Timeout value for a ceratain Form to get user response.
|
||||
|
||||
This function allows to set timeout value on a ceratain form if necessary.
|
||||
If timeout is not zero, the form will exit if user has no response in timeout.
|
||||
|
||||
If timeout is not zero, the form will exit if user has no response in timeout.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page
|
||||
|
||||
@return 0 No timeout for this form.
|
||||
@return 0 No timeout for this form.
|
||||
@return > 0 Timeout value in 100 ns units.
|
||||
**/
|
||||
UINT64
|
||||
@@ -898,7 +898,7 @@ GetSubTitleTextColor (
|
||||
Clear Screen to the initial state.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
ClearDisplayPage (
|
||||
VOID
|
||||
)
|
||||
@@ -950,7 +950,7 @@ CustomizedDisplayLibDestructor (
|
||||
)
|
||||
{
|
||||
HiiRemovePackages(mCDLStringPackHandle);
|
||||
|
||||
|
||||
FreeLibStrings ();
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Customize display library used by display engine.
|
||||
#
|
||||
# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -34,7 +34,7 @@
|
||||
CustomizedDisplayLibInternal.h
|
||||
CustomizedDisplayLibInternal.c
|
||||
CustomizedDisplayLib.uni
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
[Guids]
|
||||
gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## UNDEFINED
|
||||
|
||||
|
||||
[Protocols]
|
||||
|
||||
[Pcd]
|
||||
@@ -62,4 +62,4 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
This library class defines a set of interfaces to customize Display module
|
||||
|
||||
Copyright (c) 2013-2015, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
Copyright (c) 2013-2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
@@ -47,10 +47,10 @@ CHAR16 *gInputErrorMessage;
|
||||
Print banner info for front page.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
PrintBannerInfo (
|
||||
PrintBannerInfo (
|
||||
IN FORM_DISPLAY_ENGINE_FORM *FormData
|
||||
)
|
||||
{
|
||||
@@ -84,15 +84,15 @@ PrintBannerInfo (
|
||||
) {
|
||||
RowIdx = (UINT8) (Line - (UINT8) gScreenDimensions.TopRow);
|
||||
ColumnIdx = (UINT8) (Alignment - (UINT8) gScreenDimensions.LeftColumn);
|
||||
|
||||
|
||||
ASSERT (RowIdx < BANNER_HEIGHT && ColumnIdx < BANNER_COLUMNS);
|
||||
|
||||
|
||||
if (gBannerData!= NULL && gBannerData->Banner[RowIdx][ColumnIdx] != 0x0000) {
|
||||
StrFrontPageBanner = LibGetToken (gBannerData->Banner[RowIdx][ColumnIdx], FormData->HiiHandle);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
switch (Alignment - gScreenDimensions.LeftColumn) {
|
||||
case 0:
|
||||
//
|
||||
@@ -100,7 +100,7 @@ PrintBannerInfo (
|
||||
//
|
||||
PrintStringAt (gScreenDimensions.LeftColumn + BANNER_LEFT_COLUMN_INDENT, Line, StrFrontPageBanner);
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
//
|
||||
// Handle center column
|
||||
@@ -111,7 +111,7 @@ PrintBannerInfo (
|
||||
StrFrontPageBanner
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
//
|
||||
// Handle right column
|
||||
@@ -123,7 +123,7 @@ PrintBannerInfo (
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
FreePool (StrFrontPageBanner);
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ PrintFramework (
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Buffer = AllocateZeroPool (0x10000);
|
||||
ASSERT (Buffer != NULL);
|
||||
Character = BOXDRAW_HORIZONTAL;
|
||||
@@ -187,7 +187,7 @@ PrintFramework (
|
||||
PrintCharAt (gScreenDimensions.LeftColumn, Row, Character);
|
||||
PrintCharAt (gScreenDimensions.RightColumn - 1, Row, Character);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Print Form Title
|
||||
//
|
||||
@@ -239,7 +239,7 @@ PrintFramework (
|
||||
|
||||
Character = BOXDRAW_UP_LEFT;
|
||||
PrintCharAt ((UINTN) -1, (UINTN) -1, Character);
|
||||
|
||||
|
||||
FreePool (Buffer);
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ ProcessUserOpcode(
|
||||
}
|
||||
break;
|
||||
|
||||
case EFI_IFR_GUID_OP:
|
||||
case EFI_IFR_GUID_OP:
|
||||
if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {
|
||||
//
|
||||
// Tiano specific GUIDed opcodes
|
||||
@@ -306,7 +306,7 @@ ProcessUserOpcode(
|
||||
gBannerData = AllocateZeroPool (sizeof (BANNER_DATA));
|
||||
ASSERT (gBannerData != NULL);
|
||||
}
|
||||
|
||||
|
||||
CopyMem (
|
||||
&gBannerData->Banner[((EFI_IFR_GUID_BANNER *) OpCodeData)->LineNumber][
|
||||
((EFI_IFR_GUID_BANNER *) OpCodeData)->Alignment],
|
||||
@@ -335,7 +335,7 @@ ProcessUserOpcode(
|
||||
|
||||
/**
|
||||
Process some op codes which is out side of current form.
|
||||
|
||||
|
||||
@param FormData Pointer to the form data.
|
||||
|
||||
@return EFI_SUCCESS Pass the statement success.
|
||||
@@ -386,7 +386,7 @@ ProcessExternedOpcode (
|
||||
@return EFI_INVALID_PARAMETER The input screen info is not acceptable.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ScreenDiemensionInfoValidate (
|
||||
IN FORM_DISPLAY_ENGINE_FORM *FormData
|
||||
)
|
||||
@@ -395,7 +395,7 @@ ScreenDiemensionInfoValidate (
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// Calculate total number of Register HotKeys.
|
||||
// Calculate total number of Register HotKeys.
|
||||
//
|
||||
Index = 0;
|
||||
if (!IsListEmpty (&FormData->HotKeyListHead)){
|
||||
@@ -584,7 +584,7 @@ PrintHotKeyHelpString (
|
||||
ColumnStr = gLibEmptyString;
|
||||
|
||||
//
|
||||
// Calculate total number of Register HotKeys.
|
||||
// Calculate total number of Register HotKeys.
|
||||
//
|
||||
Index = 0;
|
||||
Link = GetFirstNode (&FormData->HotKeyListHead);
|
||||
@@ -607,7 +607,7 @@ PrintHotKeyHelpString (
|
||||
CurrentRow = BottomRowOfHotKeyHelp - Index / 3;
|
||||
|
||||
//
|
||||
// Help string can't exceed ColumnWidth. One Row will show three Help information.
|
||||
// Help string can't exceed ColumnWidth. One Row will show three Help information.
|
||||
//
|
||||
BakChar = L'\0';
|
||||
if (StrLen (HotKey->HelpString) > ColumnIndexWidth) {
|
||||
@@ -632,7 +632,7 @@ PrintHotKeyHelpString (
|
||||
Link = GetNextNode (&FormData->HotKeyListHead, Link);
|
||||
Index ++;
|
||||
}
|
||||
|
||||
|
||||
if (SetState) {
|
||||
//
|
||||
// Clear KeyHelp
|
||||
@@ -651,13 +651,13 @@ PrintHotKeyHelpString (
|
||||
PrintStringAtWithWidth (CurrentCol, CurrentRow, gLibEmptyString, ColumnIndexWidth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
Get step info from numeric opcode.
|
||||
|
||||
|
||||
@param[in] OpCode The input numeric op code.
|
||||
|
||||
@return step info for this opcode.
|
||||
@@ -671,24 +671,24 @@ LibGetFieldFromNum (
|
||||
UINT64 Step;
|
||||
|
||||
NumericOp = (EFI_IFR_NUMERIC *) OpCode;
|
||||
|
||||
|
||||
switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {
|
||||
case EFI_IFR_NUMERIC_SIZE_1:
|
||||
Step = NumericOp->data.u8.Step;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_2:
|
||||
Step = NumericOp->data.u16.Step;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_4:
|
||||
Step = NumericOp->data.u32.Step;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_8:
|
||||
Step = NumericOp->data.u64.Step;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Step = 0;
|
||||
break;
|
||||
@@ -729,7 +729,7 @@ InitializeLibStrings (
|
||||
|
||||
gNvUpdateMessage = LibGetToken (STRING_TOKEN (NV_UPDATE_MESSAGE), mCDLStringPackHandle);
|
||||
gInputErrorMessage = LibGetToken (STRING_TOKEN (INPUT_ERROR_MESSAGE), mCDLStringPackHandle);
|
||||
|
||||
|
||||
//
|
||||
// SpaceBuffer;
|
||||
//
|
||||
@@ -770,7 +770,7 @@ FreeLibStrings (
|
||||
|
||||
FreePool (gNvUpdateMessage);
|
||||
FreePool (gInputErrorMessage);
|
||||
|
||||
|
||||
FreePool (mSpaceBuffer);
|
||||
}
|
||||
|
||||
@@ -799,7 +799,7 @@ WaitForKeyStroke (
|
||||
if (Status != EFI_NOT_READY) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
|
||||
}
|
||||
return Status;
|
||||
@@ -845,7 +845,7 @@ LibSetUnicodeMem (
|
||||
**/
|
||||
UINTN
|
||||
PrintInternal (
|
||||
IN UINTN Width,
|
||||
IN UINTN Width,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row,
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Out,
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
This library class defines a set of interfaces to customize Display module
|
||||
|
||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
@@ -121,10 +121,10 @@ extern CHAR16 *gInputErrorMessage;
|
||||
Print banner info for front page.
|
||||
|
||||
@param[in] FormData Form Data to be shown in Page
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
PrintBannerInfo (
|
||||
PrintBannerInfo (
|
||||
IN FORM_DISPLAY_ENGINE_FORM *FormData
|
||||
);
|
||||
|
||||
@@ -147,7 +147,7 @@ PrintFramework (
|
||||
@return EFI_INVALID_PARAMETER The input screen info is not acceptable.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ScreenDiemensionInfoValidate (
|
||||
IN FORM_DISPLAY_ENGINE_FORM *FormData
|
||||
);
|
||||
@@ -201,10 +201,10 @@ PrintHotKeyHelpString (
|
||||
IN FORM_DISPLAY_ENGINE_FORM *FormData,
|
||||
IN BOOLEAN SetState
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Get step info from numeric opcode.
|
||||
|
||||
|
||||
@param[in] OpCode The input numeric op code.
|
||||
|
||||
@return step info for this opcode.
|
||||
@@ -285,7 +285,7 @@ PrintAt (
|
||||
|
||||
/**
|
||||
Process some op codes which is out side of current form.
|
||||
|
||||
|
||||
@param FormData Pointer to the form data.
|
||||
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// CustomizedDisplayLib Module Localized Abstract and Description Content
|
||||
//
|
||||
// Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,11 +13,11 @@
|
||||
// **/
|
||||
|
||||
|
||||
#string STR_MODULE_ABSTRACT
|
||||
#language en-US
|
||||
#string STR_MODULE_ABSTRACT
|
||||
#language en-US
|
||||
"Customize display library used by display engine."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION
|
||||
#language en-US
|
||||
#string STR_MODULE_DESCRIPTION
|
||||
#language en-US
|
||||
"Customize display library used by display engine."
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The device manager reference implementation
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -58,7 +58,7 @@ HII_VENDOR_DEVICE_PATH mDeviceManagerHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -101,12 +101,12 @@ DmExtractDevicePathFromHiiHandle (
|
||||
/**
|
||||
Get the mac address string from the device path.
|
||||
if the device path has the vlan, get the vanid also.
|
||||
|
||||
@param MacAddressNode Device path begin with mac address
|
||||
|
||||
@param MacAddressNode Device path begin with mac address
|
||||
@param PBuffer Output string buffer contain mac address.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
GetMacAddressString(
|
||||
IN MAC_ADDR_DEVICE_PATH *MacAddressNode,
|
||||
OUT CHAR16 **PBuffer
|
||||
@@ -142,7 +142,7 @@ GetMacAddressString(
|
||||
*PBuffer = String;
|
||||
StrCpyS(String, BufferLen / sizeof (CHAR16), L"MAC:");
|
||||
String += 4;
|
||||
|
||||
|
||||
//
|
||||
// Convert the MAC address into a unicode string.
|
||||
//
|
||||
@@ -202,7 +202,7 @@ GetMacAddressString(
|
||||
@retval EFI_SUCCESS Add the item is successful.
|
||||
@return Other values if failed to Add the item.
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
AddIdToMacDeviceList (
|
||||
IN EFI_STRING MacAddrString
|
||||
)
|
||||
@@ -252,7 +252,7 @@ AddIdToMacDeviceList (
|
||||
if (TempDeviceList == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId;
|
||||
TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId;
|
||||
TempDeviceList[mMacDeviceList.CurListLen].QuestionId = (EFI_QUESTION_ID) (mMacDeviceList.CurListLen + NETWORK_DEVICE_LIST_KEY_OFFSET);
|
||||
|
||||
mMacDeviceList.NodeList = TempDeviceList;
|
||||
@@ -306,8 +306,8 @@ IsMacAddressDevicePath (
|
||||
if (DEVICE_MANAGER_FORM_ID == NextShowFormId) {
|
||||
*NeedAddItem = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!GetMacAddressString((MAC_ADDR_DEVICE_PATH*)DevicePath, &Buffer)) {
|
||||
break;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ IsMacAddressDevicePath (
|
||||
|
||||
if (NETWORK_DEVICE_LIST_FORM_ID == NextShowFormId) {
|
||||
//
|
||||
// Same handle may has two network child handle, so the questionid
|
||||
// Same handle may has two network child handle, so the questionid
|
||||
// has the offset of SAME_HANDLE_KEY_OFFSET.
|
||||
//
|
||||
if (AddIdToMacDeviceList (Buffer)) {
|
||||
@@ -351,7 +351,7 @@ IsMacAddressDevicePath (
|
||||
@return FALSE Do not need to add the menu about the network.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
IsNeedAddNetworkMenu (
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
IN EFI_FORM_ID NextShowFormId,
|
||||
@@ -360,7 +360,7 @@ IsNeedAddNetworkMenu (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN EntryCount;
|
||||
UINTN Index;
|
||||
UINTN Index;
|
||||
EFI_HANDLE DriverHandle;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
@@ -389,9 +389,9 @@ IsNeedAddNetworkMenu (
|
||||
}
|
||||
TmpDevicePath = DevicePath;
|
||||
|
||||
//
|
||||
//
|
||||
// Check whether this device path include mac address device path.
|
||||
// If this path has mac address path, get the value whether need
|
||||
// If this path has mac address path, get the value whether need
|
||||
// add this info to the menu and return.
|
||||
// Else check more about the child handle devcie path.
|
||||
//
|
||||
@@ -413,7 +413,7 @@ IsNeedAddNetworkMenu (
|
||||
}
|
||||
|
||||
if (!IsDevicePathEnd (TmpDevicePath)) {
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -452,7 +452,7 @@ IsNeedAddNetworkMenu (
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Check whether this device path include mac address device path.
|
||||
//
|
||||
if (!IsMacAddressDevicePath(ChildDevicePath, NextShowFormId,&IsNeedAdd)) {
|
||||
@@ -472,7 +472,7 @@ IsNeedAddNetworkMenu (
|
||||
} else {
|
||||
//
|
||||
// If need to update other form, return whether need to add to the menu.
|
||||
//
|
||||
//
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@@ -481,9 +481,9 @@ IsNeedAddNetworkMenu (
|
||||
|
||||
Done:
|
||||
if (OpenInfoBuffer != NULL) {
|
||||
FreePool (OpenInfoBuffer);
|
||||
FreePool (OpenInfoBuffer);
|
||||
}
|
||||
return IsNeedAdd;
|
||||
return IsNeedAdd;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -514,10 +514,10 @@ CreateDeviceManagerForm(
|
||||
EFI_STRING NewStringTitle;
|
||||
CHAR16 *DevicePathStr;
|
||||
EFI_STRING_ID DevicePathId;
|
||||
EFI_IFR_FORM_SET *Buffer;
|
||||
UINTN BufferSize;
|
||||
UINT8 ClassGuidNum;
|
||||
EFI_GUID *ClassGuid;
|
||||
EFI_IFR_FORM_SET *Buffer;
|
||||
UINTN BufferSize;
|
||||
UINT8 ClassGuidNum;
|
||||
EFI_GUID *ClassGuid;
|
||||
UINTN TempSize;
|
||||
UINT8 *Ptr;
|
||||
EFI_STATUS Status;
|
||||
@@ -599,7 +599,7 @@ CreateDeviceManagerForm(
|
||||
if (((EFI_IFR_OP_HEADER *) Ptr)->Length <= OFFSET_OF (EFI_IFR_FORM_SET, Flags)){
|
||||
Ptr += ((EFI_IFR_OP_HEADER *) Ptr)->Length;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ClassGuidNum = (UINT8) (((EFI_IFR_FORM_SET *)Ptr)->Flags & 0x3);
|
||||
ClassGuid = (EFI_GUID *) (VOID *)(Ptr + sizeof (EFI_IFR_FORM_SET));
|
||||
@@ -629,7 +629,7 @@ CreateDeviceManagerForm(
|
||||
|
||||
//
|
||||
// Network device process
|
||||
//
|
||||
//
|
||||
if (IsNeedAddNetworkMenu (HiiHandles[Index], NextShowFormId,&AddItemCount)) {
|
||||
if (NextShowFormId == DEVICE_MANAGER_FORM_ID) {
|
||||
//
|
||||
@@ -679,7 +679,7 @@ CreateDeviceManagerForm(
|
||||
0,
|
||||
(EFI_QUESTION_ID) (Index + DEVICE_KEY_OFFSET),
|
||||
0,
|
||||
&FormSetGuid,
|
||||
&FormSetGuid,
|
||||
DevicePathId
|
||||
);
|
||||
}
|
||||
@@ -899,7 +899,7 @@ DeviceManagerUiLibConstructor (
|
||||
ASSERT (gDeviceManagerPrivate.HiiHandle != NULL);
|
||||
|
||||
//
|
||||
// Update boot manager page
|
||||
// Update boot manager page
|
||||
//
|
||||
CreateDeviceManagerForm (DEVICE_MANAGER_FORM_ID);
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
//
|
||||
// String definitions for the Device Manager.
|
||||
//
|
||||
// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
//
|
||||
//**/
|
||||
|
||||
/=#
|
||||
|
@@ -1,15 +1,15 @@
|
||||
## @file
|
||||
# Device Manager Library used by UiApp
|
||||
#
|
||||
# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are licensed and made available under
|
||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||
# The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php.
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Null Dxe Capsule Library instance does nothing and returns unsupport status.
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -15,13 +15,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/CapsuleLib.h>
|
||||
|
||||
/**
|
||||
The firmware checks whether the capsule image is supported
|
||||
The firmware checks whether the capsule image is supported
|
||||
by the CapsuleGuid in CapsuleHeader or other specific information in capsule image.
|
||||
|
||||
Caution: This function may receive untrusted input.
|
||||
|
||||
@param CapsuleHeader Point to the UEFI capsule image to be checked.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -39,8 +39,8 @@ SupportCapsuleImage (
|
||||
|
||||
Caution: This function may receive untrusted input.
|
||||
|
||||
@param CapsuleHeader Point to the UEFI capsule image to be processed.
|
||||
|
||||
@param CapsuleHeader Point to the UEFI capsule image to be processed.
|
||||
|
||||
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -2,16 +2,16 @@
|
||||
Contains function prototypes for Memory Services in DxeCore.
|
||||
|
||||
This header file borrows the DxeCore Memory Allocation services as the primitive
|
||||
for memory allocation.
|
||||
for memory allocation.
|
||||
|
||||
Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Support routines for memory profile for DxeCore.
|
||||
|
||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Null routines for memory profile for DxeCore.
|
||||
|
||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -4,14 +4,14 @@
|
||||
This header file borrows the DxeCore Memory Profile services as the primitive
|
||||
for memory profile.
|
||||
|
||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,16 +1,16 @@
|
||||
/** @file
|
||||
Support routines for memory allocation routines based
|
||||
Support routines for memory allocation routines based
|
||||
on DxeCore Memory Allocation services for DxeCore,
|
||||
with memory profile support.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocatePages (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_PHYSICAL_ADDRESS Memory;
|
||||
EFI_PHYSICAL_ADDRESS Memory;
|
||||
|
||||
if (Pages == 0) {
|
||||
return NULL;
|
||||
@@ -171,11 +171,11 @@ AllocateReservedPages (
|
||||
must have been allocated on a previous call to the page allocation services of the Memory
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
|
||||
then ASSERT().
|
||||
If Pages is zero, then ASSERT().
|
||||
|
||||
|
||||
@param Buffer Pointer to the buffer of pages to free.
|
||||
@param Pages The number of 4 KB pages to free.
|
||||
|
||||
@@ -214,7 +214,7 @@ FreePages (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateAlignedPages (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages,
|
||||
IN UINTN Alignment
|
||||
)
|
||||
@@ -230,7 +230,7 @@ InternalAllocateAlignedPages (
|
||||
// Alignment must be a power of two or zero.
|
||||
//
|
||||
ASSERT ((Alignment & (Alignment - 1)) == 0);
|
||||
|
||||
|
||||
if (Pages == 0) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ InternalAllocateAlignedPages (
|
||||
// Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.
|
||||
//
|
||||
ASSERT (RealPages > Pages);
|
||||
|
||||
|
||||
Status = CoreAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return NULL;
|
||||
@@ -287,7 +287,7 @@ InternalAllocateAlignedPages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
|
||||
|
||||
@@ -328,7 +328,7 @@ AllocateAlignedPages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
|
||||
|
||||
@@ -369,7 +369,7 @@ AllocateAlignedRuntimePages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
|
||||
|
||||
@@ -409,13 +409,13 @@ AllocateAlignedReservedPages (
|
||||
|
||||
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
|
||||
must have been allocated on a previous call to the aligned page allocation services of the Memory
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
|
||||
Library, then ASSERT().
|
||||
If Pages is zero, then ASSERT().
|
||||
|
||||
|
||||
@param Buffer Pointer to the buffer of pages to free.
|
||||
@param Pages The number of 4 KB pages to free.
|
||||
|
||||
@@ -449,7 +449,7 @@ FreeAlignedPages (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocatePool (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN AllocationSize
|
||||
)
|
||||
{
|
||||
@@ -583,9 +583,9 @@ AllocateReservedPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateZeroPool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize
|
||||
)
|
||||
)
|
||||
{
|
||||
VOID *Memory;
|
||||
|
||||
@@ -709,7 +709,7 @@ AllocateReservedZeroPool (
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param PoolType The type of pool to allocate.
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@@ -720,10 +720,10 @@ AllocateReservedZeroPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
)
|
||||
{
|
||||
VOID *Memory;
|
||||
|
||||
@@ -735,7 +735,7 @@ InternalAllocateCopyPool (
|
||||
Memory = CopyMem (Memory, Buffer, AllocationSize);
|
||||
}
|
||||
return Memory;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Copies a buffer to an allocated buffer of type EfiBootServicesData.
|
||||
@@ -744,9 +744,9 @@ InternalAllocateCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -784,9 +784,9 @@ AllocateCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -824,9 +824,9 @@ AllocateRuntimeCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -861,19 +861,19 @@ AllocateReservedCopyPool (
|
||||
Reallocates a buffer of a specified memory type.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of the type
|
||||
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
|
||||
|
||||
@param PoolType The type of pool to allocate.
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -881,7 +881,7 @@ AllocateReservedCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalReallocatePool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN OldSize,
|
||||
IN UINTN NewSize,
|
||||
IN VOID *OldBuffer OPTIONAL
|
||||
@@ -901,18 +901,18 @@ InternalReallocatePool (
|
||||
Reallocates a buffer of type EfiBootServicesData.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -946,10 +946,10 @@ ReallocatePool (
|
||||
Reallocates a buffer of type EfiRuntimeServicesData.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
@@ -957,7 +957,7 @@ ReallocatePool (
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -991,10 +991,10 @@ ReallocateRuntimePool (
|
||||
Reallocates a buffer of type EfiReservedMemoryType.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
@@ -1002,7 +1002,7 @@ ReallocateRuntimePool (
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -1039,7 +1039,7 @@ ReallocateReservedPool (
|
||||
Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
|
||||
pool allocation services of the Memory Allocation Library. If it is not possible to free pool
|
||||
resources, then this function will perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
|
||||
then ASSERT().
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
This library provides the performance measurement interfaces and initializes performance
|
||||
logging for DXE phase. It first initializes its private global data structure for
|
||||
performance logging and saves the performance GUIDed HOB passed from PEI phase.
|
||||
performance logging and saves the performance GUIDed HOB passed from PEI phase.
|
||||
It initializes DXE phase performance logging by publishing the Performance and PerformanceEx Protocol,
|
||||
which are consumed by DxePerformanceLib to logging performance data in DXE phase.
|
||||
|
||||
|
@@ -1,24 +1,24 @@
|
||||
## @file
|
||||
# Performance library instance mainly for DxeCore usage.
|
||||
#
|
||||
#
|
||||
# This library provides the performance measurement interfaces and initializes performance
|
||||
# logging for DXE phase. It first initializes its private global data structure for
|
||||
# performance logging and saves the performance GUIDed HOB passed from PEI phase.
|
||||
# performance logging and saves the performance GUIDed HOB passed from PEI phase.
|
||||
# It initializes DXE phase performance logging by publishing the Performance and PerformanceEx Protocol,
|
||||
# which is consumed by DxePerformanceLib to logging performance data in DXE phase.
|
||||
# This library is mainly used by DxeCore to start performance logging to ensure that
|
||||
# Performance and PerformanceEx Protocol are installed at the very beginning of DXE phase.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -9,13 +9,13 @@
|
||||
// This library is mainly used by DxeCore to start performance logging to ensure that
|
||||
// Performance and PerformanceEx Protocol are installed at the very beginning of DXE phase.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -14,7 +14,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#ifndef _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
|
||||
#define _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
/** @file
|
||||
|
||||
This library registers CRC32 guided section handler
|
||||
This library registers CRC32 guided section handler
|
||||
to parse CRC32 encapsulation section and extract raw data.
|
||||
It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value.
|
||||
|
||||
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef struct {
|
||||
/**
|
||||
|
||||
GetInfo gets raw data size and attribute of the input guided section.
|
||||
It first checks whether the input guid section is supported.
|
||||
It first checks whether the input guid section is supported.
|
||||
If not, EFI_INVALID_PARAMETER will return.
|
||||
|
||||
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
@param ScratchBufferSize The size of ScratchBuffer.
|
||||
@param SectionAttribute The attribute of the input guided section.
|
||||
|
||||
@retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and
|
||||
@retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and
|
||||
the attribute of the input section are successfully retrieved.
|
||||
@retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid.
|
||||
|
||||
@@ -100,7 +100,7 @@ Crc32GuidedSectionGetInfo (
|
||||
|
||||
Extraction handler tries to extract raw data from the input guided section.
|
||||
It also does authentication check for 32bit CRC value in the input guided section.
|
||||
It first checks whether the input guid section is supported.
|
||||
It first checks whether the input guid section is supported.
|
||||
If not, EFI_INVALID_PARAMETER will return.
|
||||
|
||||
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||
@@ -137,7 +137,7 @@ Crc32GuidedSectionHandler (
|
||||
&(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get section Crc32 checksum.
|
||||
//
|
||||
@@ -159,7 +159,7 @@ Crc32GuidedSectionHandler (
|
||||
&(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get section Crc32 checksum.
|
||||
//
|
||||
|
@@ -1,13 +1,13 @@
|
||||
## @file
|
||||
# Dxe Crc32 Guided Section Extract library.
|
||||
#
|
||||
# This library doesn't produce any library class. The constructor function uses
|
||||
# This library doesn't produce any library class. The constructor function uses
|
||||
# ExtractGuidedSectionLib service to register CRC32 guided section handler
|
||||
# that parses CRC32 encapsulation section and extracts raw data.
|
||||
#
|
||||
# It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -4,10 +4,10 @@
|
||||
// This library doesn't produce any library class. The constructor function uses
|
||||
// ExtractGuidedSectionLib service to register CRC32 guided section handler
|
||||
// that parses CRC32 encapsulation section and extracts raw data.
|
||||
//
|
||||
//
|
||||
// It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Debug Print Error Level library instance that provide compatibility with the
|
||||
Debug Print Error Level library instance that provide compatibility with the
|
||||
"err" shell command. This includes support for the Debug Mask Protocol
|
||||
supports for global debug print error level mask stored in an EFI Variable.
|
||||
This library instance only support DXE Phase modules.
|
||||
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -32,7 +32,7 @@
|
||||
it in CurrentDebugMask.
|
||||
|
||||
@param This The protocol instance pointer.
|
||||
@param CurrentDebugMask Pointer to the debug print error level mask that
|
||||
@param CurrentDebugMask Pointer to the debug print error level mask that
|
||||
is returned.
|
||||
|
||||
@retval EFI_SUCCESS The current debug print error level mask was
|
||||
@@ -45,8 +45,8 @@
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetDebugMask (
|
||||
IN EFI_DEBUG_MASK_PROTOCOL *This,
|
||||
IN OUT UINTN *CurrentDebugMask
|
||||
IN EFI_DEBUG_MASK_PROTOCOL *This,
|
||||
IN OUT UINTN *CurrentDebugMask
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ EFI_DEBUG_MASK_PROTOCOL mDebugMaskProtocol = {
|
||||
};
|
||||
|
||||
///
|
||||
/// Global variable that is set to TRUE after the first attempt is made to
|
||||
/// Global variable that is set to TRUE after the first attempt is made to
|
||||
/// retrieve the global error level mask through the EFI Varibale Services.
|
||||
/// This variable prevents the EFI Variable Services from being called fort
|
||||
/// every DEBUG() macro.
|
||||
@@ -91,9 +91,9 @@ BOOLEAN mGlobalErrorLevelInitialized = FALSE;
|
||||
/// module that is using this library instance. This variable is initially
|
||||
/// set to the PcdDebugPrintErrorLevel value. If the EFI Variable exists that
|
||||
/// contains the global debug print error level mask, then that overrides the
|
||||
/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be
|
||||
/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be
|
||||
/// discovered via a HOB so early DXE drivers can access the variable. If the
|
||||
/// Debug Mask Protocol SetDebugMask() service is called, then that overrides
|
||||
/// Debug Mask Protocol SetDebugMask() service is called, then that overrides
|
||||
/// the PcdDebugPrintErrorLevel and the EFI Variable setting.
|
||||
///
|
||||
UINT32 mDebugPrintErrorLevel = 0;
|
||||
@@ -107,12 +107,12 @@ UINT32 mDebugPrintErrorLevel = 0;
|
||||
EFI_SYSTEM_TABLE *mSystemTable = NULL;
|
||||
|
||||
/**
|
||||
The constructor function caches the PCI Express Base Address and creates a
|
||||
The constructor function caches the PCI Express Base Address and creates a
|
||||
Set Virtual Address Map event to convert physical address to virtual addresses.
|
||||
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The constructor completed successfully.
|
||||
@retval Other value The constructor did not complete successfully.
|
||||
|
||||
@@ -125,15 +125,15 @@ DxeDebugPrintErrorLevelLibConstructor (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
//
|
||||
// Initialize the error level mask from PCD setting.
|
||||
//
|
||||
mDebugPrintErrorLevel = PcdGet32 (PcdDebugPrintErrorLevel);
|
||||
|
||||
|
||||
//
|
||||
// Install Debug Mask Protocol onto ImageHandle
|
||||
//
|
||||
//
|
||||
mSystemTable = SystemTable;
|
||||
Status = SystemTable->BootServices->InstallMultipleProtocolInterfaces (
|
||||
&ImageHandle,
|
||||
@@ -144,22 +144,22 @@ DxeDebugPrintErrorLevelLibConstructor (
|
||||
//
|
||||
// Attempt to retrieve the global debug print error level mask from the EFI Variable
|
||||
// If the EFI Variable can not be accessed when this module's library constructors are
|
||||
// executed a HOB can be used to set the global debug print error level. If no value
|
||||
// executed a HOB can be used to set the global debug print error level. If no value
|
||||
// was found then the EFI Variable access will be reattempted on every DEBUG() print
|
||||
// from this module until the EFI Variable services are available.
|
||||
//
|
||||
GetDebugPrintErrorLevel ();
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
The destructor function frees any allocated buffers and closes the Set Virtual
|
||||
The destructor function frees any allocated buffers and closes the Set Virtual
|
||||
Address Map event.
|
||||
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The destructor completed successfully.
|
||||
@retval Other value The destructor did not complete successfully.
|
||||
|
||||
@@ -173,7 +173,7 @@ DxeDebugPrintErrorLevelLibDestructor (
|
||||
{
|
||||
//
|
||||
// Uninstall the Debug Mask Protocol from ImageHandle
|
||||
//
|
||||
//
|
||||
return SystemTable->BootServices->UninstallMultipleProtocolInterfaces (
|
||||
ImageHandle,
|
||||
&gEfiDebugMaskProtocolGuid, &mDebugMaskProtocol,
|
||||
@@ -207,13 +207,13 @@ GetDebugPrintErrorLevel (
|
||||
if (mSystemTable == NULL) {
|
||||
return PcdGet32 (PcdDebugPrintErrorLevel);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Check to see if an attempt has been made to retrieve the global debug print
|
||||
// Check to see if an attempt has been made to retrieve the global debug print
|
||||
// error level mask. Since this library instance stores the global debug print
|
||||
// error level mask in an EFI Variable, the EFI Variable should only be accessed
|
||||
// once to reduce the overhead of reading the EFI Variable on every debug print
|
||||
//
|
||||
//
|
||||
if (!mGlobalErrorLevelInitialized) {
|
||||
//
|
||||
// Make sure the TPL Level is low enough for EFI Variable Services to be called
|
||||
@@ -222,15 +222,15 @@ GetDebugPrintErrorLevel (
|
||||
mSystemTable->BootServices->RestoreTPL (CurrentTpl);
|
||||
if (CurrentTpl <= TPL_CALLBACK) {
|
||||
//
|
||||
// Attempt to retrieve the global debug print error level mask from the
|
||||
// Attempt to retrieve the global debug print error level mask from the
|
||||
// EFI Variable
|
||||
//
|
||||
Size = sizeof (GlobalErrorLevel);
|
||||
Status = mSystemTable->RuntimeServices->GetVariable (
|
||||
DEBUG_MASK_VARIABLE_NAME,
|
||||
&gEfiGenericVariableGuid,
|
||||
NULL,
|
||||
&Size,
|
||||
DEBUG_MASK_VARIABLE_NAME,
|
||||
&gEfiGenericVariableGuid,
|
||||
NULL,
|
||||
&Size,
|
||||
&GlobalErrorLevel
|
||||
);
|
||||
if (Status != EFI_NOT_AVAILABLE_YET) {
|
||||
@@ -270,9 +270,9 @@ GetDebugPrintErrorLevel (
|
||||
|
||||
/**
|
||||
Sets the global debug print error level mask fpr the entire platform.
|
||||
|
||||
|
||||
@param ErrorLevel Global debug print error level
|
||||
|
||||
|
||||
@retval TRUE The debug print error level mask was sucessfully set.
|
||||
@retval FALSE The debug print error level mask could not be set.
|
||||
|
||||
@@ -304,18 +304,18 @@ SetDebugPrintErrorLevel (
|
||||
GlobalErrorLevel = (UINTN)ErrorLevel;
|
||||
Size = sizeof (GlobalErrorLevel);
|
||||
Status = mSystemTable->RuntimeServices->SetVariable (
|
||||
DEBUG_MASK_VARIABLE_NAME,
|
||||
&gEfiGenericVariableGuid,
|
||||
DEBUG_MASK_VARIABLE_NAME,
|
||||
&gEfiGenericVariableGuid,
|
||||
(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS),
|
||||
Size,
|
||||
&GlobalErrorLevel
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
// If the EFI Variable was updated, then update the mask value for this
|
||||
// If the EFI Variable was updated, then update the mask value for this
|
||||
// module and return TRUE.
|
||||
//
|
||||
mGlobalErrorLevelInitialized = TRUE;
|
||||
mGlobalErrorLevelInitialized = TRUE;
|
||||
mDebugPrintErrorLevel = ErrorLevel;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ SetDebugPrintErrorLevel (
|
||||
it in CurrentDebugMask.
|
||||
|
||||
@param This The protocol instance pointer.
|
||||
@param CurrentDebugMask Pointer to the debug print error level mask that
|
||||
@param CurrentDebugMask Pointer to the debug print error level mask that
|
||||
is returned.
|
||||
|
||||
@retval EFI_SUCCESS The current debug print error level mask was
|
||||
@@ -345,14 +345,14 @@ SetDebugPrintErrorLevel (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetDebugMask (
|
||||
IN EFI_DEBUG_MASK_PROTOCOL *This,
|
||||
IN OUT UINTN *CurrentDebugMask
|
||||
IN EFI_DEBUG_MASK_PROTOCOL *This,
|
||||
IN OUT UINTN *CurrentDebugMask
|
||||
)
|
||||
{
|
||||
if (CurrentDebugMask == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Retrieve the current debug mask from mDebugPrintErrorLevel
|
||||
//
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# This includes support for the Debug Mask Protocol supports for global debug print error level mask
|
||||
# stored in an EFI Variable. This library instance only support DXE Phase modules.
|
||||
#
|
||||
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = 1D564EC9-9373-49a4-9E3F-E4D7B9974C84
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = DebugPrintErrorLevelLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
LIBRARY_CLASS = DebugPrintErrorLevelLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
CONSTRUCTOR = DxeDebugPrintErrorLevelLibConstructor
|
||||
DESTRUCTOR = DxeDebugPrintErrorLevelLibDestructor
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
[LibraryClasses]
|
||||
PcdLib
|
||||
HobLib
|
||||
|
||||
|
||||
[Protocols]
|
||||
gEfiDebugMaskProtocolGuid ## PRODUCES
|
||||
|
||||
|
||||
[Guids]
|
||||
## SOMETIMES_PRODUCES ## Variable:L"EFIDebug"
|
||||
## SOMETIMES_CONSUMES ## Variable:L"EFIDebug"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Help functions to access UDP service.
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides the DPC service by consuming EFI DPC Protocol.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
Instance of file explorer Library based on gEfiFileExplorerProtocolGuid.
|
||||
|
||||
Implement the file explorer library instance by wrap the interface
|
||||
Implement the file explorer library instance by wrap the interface
|
||||
provided in the file explorer protocol. This protocol is defined as the internal
|
||||
protocol related to this implementation, not in the public spec. So, this
|
||||
protocol related to this implementation, not in the public spec. So, this
|
||||
library instance is only for this code base.
|
||||
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,13 +30,13 @@ EFI_FILE_EXPLORER_PROTOCOL *mProtocol = NULL;
|
||||
|
||||
/**
|
||||
The constructor function caches the pointer to file explorer protocol.
|
||||
|
||||
|
||||
The constructor function locates Print2 protocol from protocol database.
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
|
||||
|
||||
**/
|
||||
@@ -61,7 +61,7 @@ FileExplorerConstructor (
|
||||
}
|
||||
|
||||
/**
|
||||
Choose a file in the specified directory.
|
||||
Choose a file in the specified directory.
|
||||
|
||||
If user input NULL for the RootDirectory, will choose file in the system.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Library instance that implements File explorer Library class based on protocol gEfiFileExplorerProtocolGuid.
|
||||
#
|
||||
# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -38,4 +38,4 @@
|
||||
gEfiFileExplorerProtocolGuid ## CONSUMES
|
||||
|
||||
[Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DXE_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER]
|
||||
gEfiFileExplorerProtocolGuid
|
||||
gEfiFileExplorerProtocolGuid
|
||||
|
@@ -2,7 +2,7 @@
|
||||
This library is used to share code between UEFI network stack modules.
|
||||
It provides the helper routines to parse the HTTP message byte stream.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -20,10 +20,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
Decode a percent-encoded URI component to the ASCII character.
|
||||
|
||||
Decode the input component in Buffer according to RFC 3986. The caller is responsible to make
|
||||
|
||||
Decode the input component in Buffer according to RFC 3986. The caller is responsible to make
|
||||
sure ResultBuffer points to a buffer with size equal or greater than ((AsciiStrSize (Buffer))
|
||||
in bytes.
|
||||
in bytes.
|
||||
|
||||
@param[in] Buffer The pointer to a percent-encoded URI component.
|
||||
@param[in] BufferLength Length of Buffer in bytes.
|
||||
@@ -32,7 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
@retval EFI_SUCCESS Successfully decoded the URI.
|
||||
@retval EFI_INVALID_PARAMETER Buffer is not a valid percent-encoded string.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -50,13 +50,13 @@ UriPercentDecode (
|
||||
if (Buffer == NULL || BufferLength == 0 || ResultBuffer == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
Index = 0;
|
||||
Offset = 0;
|
||||
HexStr[2] = '\0';
|
||||
while (Index < BufferLength) {
|
||||
if (Buffer[Index] == '%') {
|
||||
if (Index + 1 >= BufferLength || Index + 2 >= BufferLength ||
|
||||
if (Index + 1 >= BufferLength || Index + 2 >= BufferLength ||
|
||||
!NET_IS_HEX_CHAR (Buffer[Index+1]) || !NET_IS_HEX_CHAR (Buffer[Index+2])) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ UriPercentDecode (
|
||||
}
|
||||
|
||||
*ResultLength = (UINT32) Offset;
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ UriPercentDecode (
|
||||
|
||||
@param[in] Char Next character.
|
||||
@param[in] State Current value of the parser state machine.
|
||||
@param[in] IsRightBracket TRUE if there is an sign ']' in the authority component and
|
||||
indicates the next part is ':' before Port.
|
||||
@param[in] IsRightBracket TRUE if there is an sign ']' in the authority component and
|
||||
indicates the next part is ':' before Port.
|
||||
|
||||
@return Updated state value.
|
||||
**/
|
||||
@@ -116,27 +116,27 @@ NetHttpParseAuthorityChar (
|
||||
break;
|
||||
|
||||
case UrlParserHost:
|
||||
case UrlParserHostStart:
|
||||
case UrlParserHostStart:
|
||||
if (Char == '[') {
|
||||
return UrlParserHostIpv6;
|
||||
}
|
||||
|
||||
|
||||
if (Char == ':') {
|
||||
return UrlParserPortStart;
|
||||
}
|
||||
|
||||
|
||||
return UrlParserHost;
|
||||
|
||||
case UrlParserHostIpv6:
|
||||
|
||||
case UrlParserHostIpv6:
|
||||
if (Char == ']') {
|
||||
*IsRightBracket = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (Char == ':' && *IsRightBracket) {
|
||||
return UrlParserPortStart;
|
||||
}
|
||||
return UrlParserHostIpv6;
|
||||
|
||||
|
||||
case UrlParserPort:
|
||||
case UrlParserPortStart:
|
||||
return UrlParserPort;
|
||||
@@ -173,7 +173,7 @@ NetHttpParseAuthority (
|
||||
UINT32 Field;
|
||||
UINT32 OldField;
|
||||
BOOLEAN IsrightBracket;
|
||||
|
||||
|
||||
ASSERT ((UrlParser->FieldBitMap & BIT (HTTP_URI_FIELD_AUTHORITY)) != 0);
|
||||
|
||||
//
|
||||
@@ -203,7 +203,7 @@ NetHttpParseAuthority (
|
||||
case UrlParserUserInfo:
|
||||
Field = HTTP_URI_FIELD_USERINFO;
|
||||
break;
|
||||
|
||||
|
||||
case UrlParserHost:
|
||||
Field = HTTP_URI_FIELD_HOST;
|
||||
break;
|
||||
@@ -211,7 +211,7 @@ NetHttpParseAuthority (
|
||||
case UrlParserHostIpv6:
|
||||
Field = HTTP_URI_FIELD_HOST;
|
||||
break;
|
||||
|
||||
|
||||
case UrlParserPort:
|
||||
Field = HTTP_URI_FIELD_PORT;
|
||||
break;
|
||||
@@ -259,12 +259,12 @@ NetHttpParseUrlChar (
|
||||
if (Char == ' ' || Char == '\r' || Char == '\n') {
|
||||
return UrlParserStateMax;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
|
||||
//
|
||||
//
|
||||
// Request-URI = "*" | absolute-URI | path-absolute | authority
|
||||
//
|
||||
//
|
||||
// absolute-URI = scheme ":" hier-part [ "?" query ]
|
||||
// path-absolute = "/" [ segment-nz *( "/" segment ) ]
|
||||
// authority = [ userinfo "@" ] host [ ":" port ]
|
||||
@@ -333,7 +333,7 @@ NetHttpParseUrlChar (
|
||||
|
||||
case UrlParserFragmentStart:
|
||||
return UrlParserFragment;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -375,7 +375,7 @@ HttpParseUrl (
|
||||
HTTP_URL_PARSER *Parser;
|
||||
|
||||
Parser = NULL;
|
||||
|
||||
|
||||
if (Url == NULL || Length == 0 || UrlParser == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ HttpParseUrl (
|
||||
if (Parser == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
if (IsConnectMethod) {
|
||||
//
|
||||
// According to RFC 2616, the authority form is only used by the CONNECT method.
|
||||
@@ -407,7 +407,7 @@ HttpParseUrl (
|
||||
case UrlParserStateMax:
|
||||
FreePool (Parser);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
||||
|
||||
case UrlParserSchemeColon:
|
||||
case UrlParserSchemeColonSlash:
|
||||
case UrlParserSchemeColonSlashSlash:
|
||||
@@ -417,7 +417,7 @@ HttpParseUrl (
|
||||
// Skip all the delimiting char: "://" "?" "@"
|
||||
//
|
||||
continue;
|
||||
|
||||
|
||||
case UrlParserScheme:
|
||||
Field = HTTP_URI_FIELD_SCHEME;
|
||||
break;
|
||||
@@ -474,7 +474,7 @@ HttpParseUrl (
|
||||
}
|
||||
|
||||
*UrlParser = Parser;
|
||||
return EFI_SUCCESS;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -491,7 +491,7 @@ HttpParseUrl (
|
||||
@retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid.
|
||||
@retval EFI_NOT_FOUND No hostName component in the URL.
|
||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -520,7 +520,7 @@ HttpUrlGetHostName (
|
||||
if (Name == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Status = UriPercentDecode (
|
||||
Url + Parser->FieldData[HTTP_URI_FIELD_HOST].Offset,
|
||||
Parser->FieldData[HTTP_URI_FIELD_HOST].Length,
|
||||
@@ -551,7 +551,7 @@ HttpUrlGetHostName (
|
||||
@retval EFI_INVALID_PARAMETER Uri is NULL or Ip4Address is NULL or UrlParser is invalid.
|
||||
@retval EFI_NOT_FOUND No IPv4 address component in the URL.
|
||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -565,7 +565,7 @@ HttpUrlGetIp4 (
|
||||
EFI_STATUS Status;
|
||||
UINT32 ResultLength;
|
||||
HTTP_URL_PARSER *Parser;
|
||||
|
||||
|
||||
if (Url == NULL || UrlParser == NULL || Ip4Address == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -580,7 +580,7 @@ HttpUrlGetIp4 (
|
||||
if (Ip4String == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Status = UriPercentDecode (
|
||||
Url + Parser->FieldData[HTTP_URI_FIELD_HOST].Offset,
|
||||
Parser->FieldData[HTTP_URI_FIELD_HOST].Length,
|
||||
@@ -612,7 +612,7 @@ HttpUrlGetIp4 (
|
||||
@retval EFI_INVALID_PARAMETER Uri is NULL or Ip6Address is NULL or UrlParser is invalid.
|
||||
@retval EFI_NOT_FOUND No IPv6 address component in the URL.
|
||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -628,7 +628,7 @@ HttpUrlGetIp6 (
|
||||
EFI_STATUS Status;
|
||||
UINT32 ResultLength;
|
||||
HTTP_URL_PARSER *Parser;
|
||||
|
||||
|
||||
if (Url == NULL || UrlParser == NULL || Ip6Address == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -656,7 +656,7 @@ HttpUrlGetIp6 (
|
||||
if (Ip6String == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Status = UriPercentDecode (
|
||||
Ptr + 1,
|
||||
Length - 2,
|
||||
@@ -667,7 +667,7 @@ HttpUrlGetIp6 (
|
||||
FreePool (Ip6String);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Ip6String[ResultLength] = '\0';
|
||||
Status = NetLibAsciiStrToIp6 (Ip6String, Ip6Address);
|
||||
FreePool (Ip6String);
|
||||
@@ -688,7 +688,7 @@ HttpUrlGetIp6 (
|
||||
@retval EFI_INVALID_PARAMETER Uri is NULL or Port is NULL or UrlParser is invalid.
|
||||
@retval EFI_NOT_FOUND No port number in the URL.
|
||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -771,7 +771,7 @@ ON_EXIT:
|
||||
@retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid.
|
||||
@retval EFI_NOT_FOUND No hostName component in the URL.
|
||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -800,7 +800,7 @@ HttpUrlGetPath (
|
||||
if (PathStr == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Status = UriPercentDecode (
|
||||
Url + Parser->FieldData[HTTP_URI_FIELD_PATH].Offset,
|
||||
Parser->FieldData[HTTP_URI_FIELD_PATH].Length,
|
||||
@@ -821,7 +821,7 @@ HttpUrlGetPath (
|
||||
Release the resource of the URL parser.
|
||||
|
||||
@param[in] UrlParser Pointer to the parser.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -835,9 +835,9 @@ HttpUrlFreeParser (
|
||||
/**
|
||||
Find a specified header field according to the field name.
|
||||
|
||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||
@param[in] Headers Array containing list of HTTP headers.
|
||||
@param[in] FieldName Null terminated string which describes a field name.
|
||||
@param[in] FieldName Null terminated string which describes a field name.
|
||||
|
||||
@return Pointer to the found header or NULL.
|
||||
|
||||
@@ -975,7 +975,7 @@ HttpIoParseContentLengthHeader (
|
||||
@param[in] Headers Array containing list of HTTP headers.
|
||||
|
||||
@return The message is "chunked" transfer-coding (TRUE) or not (FALSE).
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
HttpIoIsChunked (
|
||||
@@ -1072,7 +1072,7 @@ HttpInitMsgParser (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
HTTP_BODY_PARSER *Parser;
|
||||
|
||||
|
||||
if (HeaderCount != 0 && Headers == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1087,7 +1087,7 @@ HttpInitMsgParser (
|
||||
}
|
||||
|
||||
Parser->State = BodyParserBodyStart;
|
||||
|
||||
|
||||
//
|
||||
// Determine the message length according to RFC 2616.
|
||||
// 1. Check whether the message "MUST NOT" have a message-body.
|
||||
@@ -1108,7 +1108,7 @@ HttpInitMsgParser (
|
||||
// 4. Range header is not supported now, so we won't meet media type "multipart/byteranges".
|
||||
// 5. By server closing the connection
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Set state to skip body parser if the message shouldn't have a message body.
|
||||
//
|
||||
@@ -1151,7 +1151,7 @@ HttpParseMessageBody (
|
||||
UINTN LengthForCallback;
|
||||
EFI_STATUS Status;
|
||||
HTTP_BODY_PARSER *Parser;
|
||||
|
||||
|
||||
if (BodyLength == 0 || Body == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1195,7 +1195,7 @@ HttpParseMessageBody (
|
||||
switch (Parser->State) {
|
||||
case BodyParserStateMax:
|
||||
return EFI_ABORTED;
|
||||
|
||||
|
||||
case BodyParserBodyIdentity:
|
||||
//
|
||||
// Identity transfer-coding, just notify user to save the body data.
|
||||
@@ -1265,7 +1265,7 @@ HttpParseMessageBody (
|
||||
}
|
||||
Char++;
|
||||
break;
|
||||
|
||||
|
||||
case BodyParserChunkSizeEndCR:
|
||||
if (*Char != '\n') {
|
||||
Parser->State = BodyParserStateMax;
|
||||
@@ -1274,7 +1274,7 @@ HttpParseMessageBody (
|
||||
Char++;
|
||||
if (Parser->CurrentChunkSize == 0) {
|
||||
//
|
||||
// The last chunk has been parsed and now assumed the state
|
||||
// The last chunk has been parsed and now assumed the state
|
||||
// of HttpBodyParse is ParserLastCRLF. So it need to decide
|
||||
// whether the rest message is trailer or last CRLF in the next round.
|
||||
//
|
||||
@@ -1285,10 +1285,10 @@ HttpParseMessageBody (
|
||||
Parser->State = BodyParserChunkDataStart;
|
||||
Parser->CurrentChunkParsedSize = 0;
|
||||
break;
|
||||
|
||||
|
||||
case BodyParserLastCRLF:
|
||||
//
|
||||
// Judge the byte is belong to the Last CRLF or trailer, and then
|
||||
// Judge the byte is belong to the Last CRLF or trailer, and then
|
||||
// configure the state of HttpBodyParse to corresponding state.
|
||||
//
|
||||
if (*Char == '\r') {
|
||||
@@ -1299,7 +1299,7 @@ HttpParseMessageBody (
|
||||
Parser->State = BodyParserTrailer;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case BodyParserLastCRLFEnd:
|
||||
if (*Char == '\n') {
|
||||
Parser->State = BodyParserComplete;
|
||||
@@ -1320,13 +1320,13 @@ HttpParseMessageBody (
|
||||
Parser->State = BodyParserStateMax;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case BodyParserTrailer:
|
||||
if (*Char == '\r') {
|
||||
Parser->State = BodyParserChunkSizeEndCR;
|
||||
}
|
||||
Char++;
|
||||
break;
|
||||
break;
|
||||
|
||||
case BodyParserChunkDataStart:
|
||||
//
|
||||
@@ -1350,7 +1350,7 @@ HttpParseMessageBody (
|
||||
Parser->CurrentChunkParsedSize += LengthForCallback;
|
||||
if (Parser->CurrentChunkParsedSize == Parser->CurrentChunkSize) {
|
||||
Parser->State = BodyParserChunkDataEnd;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BodyParserChunkDataEnd:
|
||||
@@ -1369,7 +1369,7 @@ HttpParseMessageBody (
|
||||
}
|
||||
Char++;
|
||||
Parser->State = BodyParserChunkSizeStart;
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -1424,7 +1424,7 @@ HttpIsMessageComplete (
|
||||
@retval EFI_SUCCESS Successfully to get the entity length.
|
||||
@retval EFI_NOT_READY Entity length is not valid yet.
|
||||
@retval EFI_INVALID_PARAMETER MsgParser is NULL or ContentLength is NULL.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1453,7 +1453,7 @@ HttpGetEntityLength (
|
||||
Release the resource of the message parser.
|
||||
|
||||
@param[in] MsgParser Pointer to the message parser.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -1619,19 +1619,19 @@ HttpGetFieldNameAndValue (
|
||||
while (TRUE) {
|
||||
if (*FieldValueStr == ' ' || *FieldValueStr == '\t') {
|
||||
//
|
||||
// Boundary condition check.
|
||||
// Boundary condition check.
|
||||
//
|
||||
if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 1) {
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
FieldValueStr ++;
|
||||
} else if (*FieldValueStr == '\r') {
|
||||
//
|
||||
// Boundary condition check.
|
||||
// Boundary condition check.
|
||||
//
|
||||
if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 3) {
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (*(FieldValueStr + 1) == '\n' && (*(FieldValueStr + 2) == ' ' || *(FieldValueStr + 2) == '\t')) {
|
||||
@@ -1755,7 +1755,7 @@ HttpGenRequestMessage (
|
||||
// 3. If we do not have a Request, HeaderCount should be zero
|
||||
// 4. If we do not have Request and Headers, we need at least a message-body
|
||||
//
|
||||
if ((Message == NULL || RequestMsg == NULL || RequestMsgSize == NULL) ||
|
||||
if ((Message == NULL || RequestMsg == NULL || RequestMsgSize == NULL) ||
|
||||
(Message->Data.Request != NULL && Url == NULL) ||
|
||||
(Message->Data.Request != NULL && Message->HeaderCount == 0) ||
|
||||
(Message->Data.Request == NULL && Message->HeaderCount != 0) ||
|
||||
@@ -2069,7 +2069,7 @@ HttpIsValidHttpHeader (
|
||||
if (DeleteList[Index] == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (AsciiStrCmp (FieldName, DeleteList[Index]) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# It provides the helper routines to parse the HTTP message byte stream.
|
||||
#
|
||||
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -45,4 +45,4 @@
|
||||
NetLib
|
||||
|
||||
[Protocols]
|
||||
gEfiHttpUtilitiesProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiHttpUtilitiesProtocolGuid ## SOMETIMES_CONSUMES
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides the helper routines to parse the HTTP message byte stream.
|
||||
//
|
||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -78,11 +78,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED ICMP_ERROR_INFO mIcmp6ErrMap[10] = {
|
||||
{FALSE, TRUE}, // ICMP6_ERR_UNREACH_NET
|
||||
{FALSE, TRUE}, // ICMP6_ERR_UNREACH_HOST
|
||||
{TRUE, TRUE}, // ICMP6_ERR_UNREACH_PROTOCOL
|
||||
{TRUE, TRUE}, // ICMP6_ERR_UNREACH_PORT
|
||||
{TRUE, TRUE}, // ICMP6_ERR_UNREACH_PORT
|
||||
{TRUE, TRUE}, // ICMP6_ERR_PACKAGE_TOOBIG
|
||||
{FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_HOPLIMIT
|
||||
{FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_REASS
|
||||
{FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER
|
||||
{FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER
|
||||
{FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_NEXHEADER
|
||||
{FALSE, TRUE} // ICMP6_ERR_PARAMPROB_IPV6OPTION
|
||||
};
|
||||
@@ -258,7 +258,7 @@ IpIoCloseProtocolDestroyIpChild (
|
||||
}
|
||||
|
||||
/**
|
||||
This function handles ICMPv4 packets. It is the worker function of
|
||||
This function handles ICMPv4 packets. It is the worker function of
|
||||
IpIoIcmpHandler.
|
||||
|
||||
@param[in] IpIo Pointer to the IP_IO instance.
|
||||
@@ -283,19 +283,19 @@ IpIoIcmpv4Handler (
|
||||
UINT8 Type;
|
||||
UINT8 Code;
|
||||
UINT32 TrimBytes;
|
||||
|
||||
|
||||
ASSERT (IpIo != NULL);
|
||||
ASSERT (Pkt != NULL);
|
||||
ASSERT (Session != NULL);
|
||||
ASSERT (IpIo->IpVersion == IP_VERSION_4);
|
||||
|
||||
|
||||
//
|
||||
// Check the ICMP packet length.
|
||||
//
|
||||
if (Pkt->TotalSize < sizeof (IP4_ICMP_ERROR_HEAD)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
|
||||
IcmpHdr = NET_PROTO_HDR (Pkt, IP4_ICMP_ERROR_HEAD);
|
||||
IpHdr = (EFI_IP4_HEADER *) (&IcmpHdr->IpHead);
|
||||
|
||||
@@ -387,20 +387,20 @@ IpIoIcmpv4Handler (
|
||||
TrimBytes = (UINT32) (PayLoadHdr - (UINT8 *) IcmpHdr);
|
||||
|
||||
NetbufTrim (Pkt, TrimBytes, TRUE);
|
||||
|
||||
|
||||
//
|
||||
// If the input packet has invalid format, and TrimBytes is larger than
|
||||
// If the input packet has invalid format, and TrimBytes is larger than
|
||||
// the packet size, the NetbufTrim might trim the packet to zero.
|
||||
//
|
||||
if (Pkt->TotalSize != 0) {
|
||||
IpIo->PktRcvdNotify (EFI_ICMP_ERROR, IcmpErr, Session, Pkt, IpIo->RcvdContext);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
This function handles ICMPv6 packets. It is the worker function of
|
||||
This function handles ICMPv6 packets. It is the worker function of
|
||||
IpIoIcmpHandler.
|
||||
|
||||
@param[in] IpIo Pointer to the IP_IO instance.
|
||||
@@ -447,7 +447,7 @@ IpIoIcmpv6Handler (
|
||||
|
||||
//
|
||||
// Analyze the ICMPv6 Error in this ICMPv6 packet
|
||||
//
|
||||
//
|
||||
switch (Type) {
|
||||
case ICMP_V6_DEST_UNREACHABLE:
|
||||
switch (Code) {
|
||||
@@ -506,7 +506,7 @@ IpIoIcmpv6Handler (
|
||||
default:
|
||||
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Notify user the ICMPv6 packet only containing payload except
|
||||
@@ -517,7 +517,7 @@ IpIoIcmpv6Handler (
|
||||
NextHeader = IpHdr->NextHeader;
|
||||
PayLoadHdr = (UINT8 *) ((UINT8 *) IcmpHdr + sizeof (IP6_ICMP_ERROR_HEAD));
|
||||
Flag = TRUE;
|
||||
|
||||
|
||||
do {
|
||||
switch (NextHeader) {
|
||||
case EFI_IP_PROTO_UDP:
|
||||
@@ -555,11 +555,11 @@ IpIoIcmpv6Handler (
|
||||
} while (Flag);
|
||||
|
||||
TrimBytes = (UINT32) (PayLoadHdr - (UINT8 *) IcmpHdr);
|
||||
|
||||
|
||||
NetbufTrim (Pkt, TrimBytes, TRUE);
|
||||
|
||||
//
|
||||
// If the input packet has invalid format, and TrimBytes is larger than
|
||||
// If the input packet has invalid format, and TrimBytes is larger than
|
||||
// the packet size, the NetbufTrim might trim the packet to zero.
|
||||
//
|
||||
if (Pkt->TotalSize != 0) {
|
||||
@@ -634,7 +634,7 @@ IpIoExtFree (
|
||||
@param[in] Dest Pointer to the destination IP address.
|
||||
@param[in] Override Pointer to the overriden IP_IO data.
|
||||
|
||||
@return Pointer to the data structure created to wrap the packet. If any error occurs,
|
||||
@return Pointer to the data structure created to wrap the packet. If any error occurs,
|
||||
then return NULL.
|
||||
|
||||
**/
|
||||
@@ -650,7 +650,7 @@ IpIoCreateSndEntry (
|
||||
)
|
||||
{
|
||||
IP_IO_SEND_ENTRY *SndEntry;
|
||||
EFI_EVENT Event;
|
||||
EFI_EVENT Event;
|
||||
EFI_STATUS Status;
|
||||
NET_FRAGMENT *ExtFragment;
|
||||
UINT32 FragmentCount;
|
||||
@@ -700,7 +700,7 @@ IpIoCreateSndEntry (
|
||||
}
|
||||
|
||||
//
|
||||
// Build a fragment table to contain the fragments in the packet.
|
||||
// Build a fragment table to contain the fragments in the packet.
|
||||
//
|
||||
if (IpIo->IpVersion == IP_VERSION_4) {
|
||||
ExtFragment = (NET_FRAGMENT *) TxData->Ip4TxData.FragmentTable;
|
||||
@@ -757,7 +757,7 @@ IpIoCreateSndEntry (
|
||||
Ip6TxData->FragmentCount = FragmentCount;
|
||||
Ip6TxData->ExtHdrsLength = 0;
|
||||
Ip6TxData->ExtHdrs = NULL;
|
||||
|
||||
|
||||
//
|
||||
// Set the fields of SndToken
|
||||
//
|
||||
@@ -804,7 +804,7 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Destroy the SndEntry.
|
||||
|
||||
|
||||
This function pairs with IpIoCreateSndEntry().
|
||||
|
||||
@param[in] SndEntry Pointer to the send entry to be destroyed.
|
||||
@@ -1120,19 +1120,19 @@ IpIoListenHandlerDpc (
|
||||
if (!NetIp6IsValidUnicast(&RxData->Ip6RxData.Header->SourceAddress)) {
|
||||
goto CleanUp;
|
||||
}
|
||||
|
||||
|
||||
if (RxData->Ip6RxData.DataLength == 0) {
|
||||
//
|
||||
// Discard zero length data payload packet.
|
||||
//
|
||||
goto CleanUp;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// The fragment should always be valid for non-zero length packet.
|
||||
//
|
||||
ASSERT (RxData->Ip6RxData.FragmentCount != 0);
|
||||
|
||||
|
||||
//
|
||||
// Create a netbuffer representing IPv6 packet
|
||||
//
|
||||
@@ -1152,19 +1152,19 @@ IpIoListenHandlerDpc (
|
||||
// Create a net session
|
||||
//
|
||||
CopyMem (
|
||||
&Session.Source,
|
||||
&Session.Source,
|
||||
&RxData->Ip6RxData.Header->SourceAddress,
|
||||
sizeof(EFI_IPv6_ADDRESS)
|
||||
);
|
||||
CopyMem (
|
||||
&Session.Dest,
|
||||
&RxData->Ip6RxData.Header->DestinationAddress,
|
||||
&Session.Dest,
|
||||
&RxData->Ip6RxData.Header->DestinationAddress,
|
||||
sizeof(EFI_IPv6_ADDRESS)
|
||||
);
|
||||
Session.IpHdr.Ip6Hdr = RxData->Ip6RxData.Header;
|
||||
Session.IpHdrLen = RxData->Ip6RxData.HeaderLength;
|
||||
Session.IpVersion = IP_VERSION_6;
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_SUCCESS == Status) {
|
||||
|
||||
@@ -1186,7 +1186,7 @@ CleanUp:
|
||||
if (IpIo->IpVersion == IP_VERSION_4){
|
||||
gBS->SignalEvent (RxData->Ip4RxData.RecycleSignal);
|
||||
} else {
|
||||
gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal);
|
||||
gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal);
|
||||
}
|
||||
|
||||
Resume:
|
||||
@@ -1223,7 +1223,7 @@ IpIoListenHandler (
|
||||
Create a new IP_IO instance.
|
||||
|
||||
If IpVersion is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
|
||||
|
||||
|
||||
This function uses IP4/IP6 service binding protocol in Controller to create
|
||||
an IP4/IP6 child (aka IP4/IP6 instance).
|
||||
|
||||
@@ -1232,7 +1232,7 @@ IpIoListenHandler (
|
||||
@param[in] Controller The controller handle that has IP4 or IP6 service
|
||||
binding protocol installed.
|
||||
@param[in] IpVersion The version of the IP protocol to use, either
|
||||
IPv4 or IPv6.
|
||||
IPv4 or IPv6.
|
||||
|
||||
@return Pointer to a newly created IP_IO instance, or NULL if failed.
|
||||
|
||||
@@ -1287,7 +1287,7 @@ IpIoCreate (
|
||||
Controller,
|
||||
Image,
|
||||
&IpIo->ChildHandle,
|
||||
IpVersion,
|
||||
IpVersion,
|
||||
(VOID **) & (IpIo->Ip)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -1324,7 +1324,7 @@ ReleaseIpIo:
|
||||
|
||||
@retval EFI_SUCCESS The IP_IO instance opened with OpenData
|
||||
successfully.
|
||||
@retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to
|
||||
@retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to
|
||||
reopen it.
|
||||
@retval EFI_UNSUPPORTED IPv4 RawData mode is no supported.
|
||||
@retval EFI_INVALID_PARAMETER Invalid input parameter.
|
||||
@@ -1369,7 +1369,7 @@ IpIoOpen (
|
||||
IpIo->StationIp = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.StationAddress);
|
||||
IpIo->SubnetMask = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.SubnetMask);
|
||||
}
|
||||
|
||||
|
||||
Status = IpIo->Ip.Ip4->Configure (
|
||||
IpIo->Ip.Ip4,
|
||||
&OpenData->IpConfigData.Ip4CfgData
|
||||
@@ -1377,7 +1377,7 @@ IpIoOpen (
|
||||
} else {
|
||||
|
||||
Status = IpIo->Ip.Ip6->Configure (
|
||||
IpIo->Ip.Ip6,
|
||||
IpIo->Ip.Ip6,
|
||||
&OpenData->IpConfigData.Ip6CfgData
|
||||
);
|
||||
}
|
||||
@@ -1450,7 +1450,7 @@ IpIoOpen (
|
||||
Stop an IP_IO instance.
|
||||
|
||||
If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
|
||||
|
||||
|
||||
This function is paired with IpIoOpen(). The IP_IO will be unconfigured and all
|
||||
the pending send/receive tokens will be canceled.
|
||||
|
||||
@@ -1532,7 +1532,7 @@ IpIoStop (
|
||||
|
||||
/**
|
||||
Destroy an IP_IO instance.
|
||||
|
||||
|
||||
This function is paired with IpIoCreate(). The IP_IO will be closed first.
|
||||
Resource will be freed afterwards. See IpIoCloseProtocolDestroyIpChild().
|
||||
|
||||
@@ -1550,7 +1550,7 @@ IpIoDestroy (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
//
|
||||
// Stop the IpIo.
|
||||
//
|
||||
@@ -1580,7 +1580,7 @@ IpIoDestroy (
|
||||
|
||||
/**
|
||||
Send out an IP packet.
|
||||
|
||||
|
||||
This function is called after IpIoOpen(). The data to be sent is wrapped in
|
||||
Pkt. The IP instance wrapped in IpIo is used for sending by default but can be
|
||||
overriden by Sender. Other sending configs, like source address and gateway
|
||||
@@ -1720,7 +1720,7 @@ IpIoCancelTxToken (
|
||||
|
||||
If IpIo is NULL, then ASSERT().
|
||||
If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
|
||||
|
||||
|
||||
The function is used to add the IP_IO to the IP_IO sending list. The caller
|
||||
can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send
|
||||
data.
|
||||
@@ -1883,9 +1883,9 @@ IpIoConfigIp (
|
||||
|
||||
if (((EFI_IP4_CONFIG_DATA *) IpConfigData)->UseDefaultAddress) {
|
||||
Status = Ip.Ip4->GetModeData (
|
||||
Ip.Ip4,
|
||||
&Ip4ModeData,
|
||||
NULL,
|
||||
Ip.Ip4,
|
||||
&Ip4ModeData,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -1898,12 +1898,12 @@ IpIoConfigIp (
|
||||
}
|
||||
|
||||
CopyMem (
|
||||
&IpInfo->Addr.Addr,
|
||||
&((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress,
|
||||
&IpInfo->Addr.Addr,
|
||||
&((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress,
|
||||
sizeof (IP4_ADDR)
|
||||
);
|
||||
CopyMem (
|
||||
&IpInfo->PreMask.SubnetMask,
|
||||
&IpInfo->PreMask.SubnetMask,
|
||||
&((EFI_IP4_CONFIG_DATA *) IpConfigData)->SubnetMask,
|
||||
sizeof (IP4_ADDR)
|
||||
);
|
||||
@@ -1961,11 +1961,11 @@ IpIoConfigIp (
|
||||
} else {
|
||||
Status = EFI_NO_MAPPING;
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
CopyMem (
|
||||
&IpInfo->Addr,
|
||||
&Ip6ModeData.ConfigData.StationAddress,
|
||||
&IpInfo->Addr,
|
||||
&Ip6ModeData.ConfigData.StationAddress,
|
||||
sizeof (EFI_IPv6_ADDRESS)
|
||||
);
|
||||
|
||||
@@ -1976,7 +1976,7 @@ IpIoConfigIp (
|
||||
if (EFI_ERROR (Status)) {
|
||||
Ip.Ip6->Configure (Ip.Ip6, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// The IP instance is reset, set the stored Addr and SubnetMask to zero.
|
||||
@@ -1994,7 +1994,7 @@ IpIoConfigIp (
|
||||
sending purpose.
|
||||
|
||||
If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
|
||||
|
||||
|
||||
This function pairs with IpIoAddIp(). The IpInfo is previously created by
|
||||
IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance
|
||||
will be dstroyed if the RefCnt is zero.
|
||||
@@ -2012,7 +2012,7 @@ IpIoRemoveIp (
|
||||
{
|
||||
|
||||
UINT8 IpVersion;
|
||||
|
||||
|
||||
if (IpIo == NULL || IpInfo == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -2070,7 +2070,7 @@ IpIoRemoveIp (
|
||||
/**
|
||||
Find the first IP protocol maintained in IpIo whose local
|
||||
address is the same as Src.
|
||||
|
||||
|
||||
This function is called when the caller needs the IpIo to send data to the
|
||||
specified Src. The IpIo was added previously by IpIoAddIp().
|
||||
|
||||
@@ -2124,7 +2124,7 @@ IpIoFindSender (
|
||||
|
||||
if (EFI_IP6_EQUAL (&IpInfo->Addr.v6, &Src->v6)) {
|
||||
*IpIo = IpIoPtr;
|
||||
return IpInfo;
|
||||
return IpInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2139,13 +2139,13 @@ IpIoFindSender (
|
||||
|
||||
/**
|
||||
Get the ICMP error map information.
|
||||
|
||||
|
||||
The ErrorStatus will be returned. The IsHard and Notify are optional. If they
|
||||
are not NULL, this routine will fill them.
|
||||
|
||||
@param[in] IcmpError IcmpError Type.
|
||||
@param[in] IpVersion The version of the IP protocol to use,
|
||||
either IPv4 or IPv6.
|
||||
either IPv4 or IPv6.
|
||||
@param[out] IsHard If TRUE, indicates that it is a hard error.
|
||||
@param[out] Notify If TRUE, SockError needs to be notified.
|
||||
|
||||
@@ -2217,12 +2217,12 @@ IpIoGetIcmpErrStatus (
|
||||
|
||||
case ICMP6_ERR_UNREACH_HOST:
|
||||
case ICMP6_ERR_TIMXCEED_HOPLIMIT:
|
||||
case ICMP6_ERR_TIMXCEED_REASS:
|
||||
case ICMP6_ERR_TIMXCEED_REASS:
|
||||
return EFI_HOST_UNREACHABLE;
|
||||
|
||||
case ICMP6_ERR_UNREACH_PROTOCOL:
|
||||
return EFI_PROTOCOL_UNREACHABLE;
|
||||
|
||||
|
||||
case ICMP6_ERR_UNREACH_PORT:
|
||||
return EFI_PORT_UNREACHABLE;
|
||||
|
||||
@@ -2251,23 +2251,23 @@ IpIoGetIcmpErrStatus (
|
||||
Refresh the remote peer's Neighbor Cache entries.
|
||||
|
||||
This function is called when the caller needs the IpIo to refresh the existing
|
||||
IPv6 neighbor cache entries since the neighbor is considered reachable by the
|
||||
node has recently received a confirmation that packets sent recently to the
|
||||
neighbor were received by its IP layer.
|
||||
IPv6 neighbor cache entries since the neighbor is considered reachable by the
|
||||
node has recently received a confirmation that packets sent recently to the
|
||||
neighbor were received by its IP layer.
|
||||
|
||||
@param[in] IpIo Pointer to an IP_IO instance
|
||||
@param[in] Neighbor The IP address of the neighbor
|
||||
@param[in] Timeout Time in 100-ns units that this entry will
|
||||
remain in the neighbor cache. A value of
|
||||
zero means that the entry is permanent.
|
||||
A value of non-zero means that the entry is
|
||||
remain in the neighbor cache. A value of
|
||||
zero means that the entry is permanent.
|
||||
A value of non-zero means that the entry is
|
||||
dynamic and will be deleted after Timeout.
|
||||
|
||||
@retval EFI_SUCCESS The operation is completed successfully.
|
||||
@retval EFI_NOT_STARTED The IpIo is not configured.
|
||||
@retval EFI_INVALID_PARAMETER Neighbor Address is invalid.
|
||||
@retval EFI_NOT_FOUND The neighbor cache entry is not in the
|
||||
neighbor table.
|
||||
@retval EFI_NOT_FOUND The neighbor cache entry is not in the
|
||||
neighbor table.
|
||||
@retval EFI_UNSUPPORTED IP version is IPv4, which doesn't support neighbor cache refresh.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed due to resource limit.
|
||||
|
||||
@@ -2277,7 +2277,7 @@ EFIAPI
|
||||
IpIoRefreshNeighbor (
|
||||
IN IP_IO *IpIo,
|
||||
IN EFI_IP_ADDRESS *Neighbor,
|
||||
IN UINT32 Timeout
|
||||
IN UINT32 Timeout
|
||||
)
|
||||
{
|
||||
EFI_IP6_PROTOCOL *Ip;
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides IP services upon EFI IPv4/IPv6 Protocols.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -648,10 +648,10 @@ NetGetIpClass (
|
||||
|
||||
/**
|
||||
Check whether the IP is a valid unicast address according to
|
||||
the netmask.
|
||||
the netmask.
|
||||
|
||||
ASSERT if NetMask is zero.
|
||||
|
||||
|
||||
If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address,
|
||||
except when the originator is one of the endpoints of a point-to-point link with a 31-bit
|
||||
mask (RFC3021).
|
||||
@@ -670,7 +670,7 @@ NetIp4IsUnicast (
|
||||
)
|
||||
{
|
||||
ASSERT (NetMask != 0);
|
||||
|
||||
|
||||
if (Ip == 0 || IP4_IS_LOCAL_BROADCAST (Ip)) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -895,7 +895,7 @@ Ip6Swap128 (
|
||||
/**
|
||||
Initialize a random seed using current time and monotonic count.
|
||||
|
||||
Get current time and monotonic count first. Then initialize a random seed
|
||||
Get current time and monotonic count first. Then initialize a random seed
|
||||
based on some basic mathematics operation on the hour, day, minute, second,
|
||||
nanosecond and year of the current time and the monotonic count value.
|
||||
|
||||
@@ -1132,7 +1132,7 @@ NetListInsertBefore (
|
||||
If it has been removed, then restart the traversal from the head.
|
||||
If it hasn't been removed, then continue with the next node directly.
|
||||
This function will end the iterate and return the CallBack's last return value if error happens,
|
||||
or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list.
|
||||
or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list.
|
||||
|
||||
@param[in] List The head of the list.
|
||||
@param[in] CallBack Pointer to the callback function to destroy one node in the list.
|
||||
@@ -1219,7 +1219,7 @@ NetIsInHandleBuffer (
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
|
||||
|
||||
if (NumberOfChildren == 0 || ChildHandleBuffer == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1810,7 +1810,7 @@ NetLibDefaultUnload (
|
||||
if (DriverBinding->ImageHandle != ImageHandle) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Disconnect the driver specified by ImageHandle from all
|
||||
// the devices in the handle database.
|
||||
@@ -1822,16 +1822,16 @@ NetLibDefaultUnload (
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Uninstall all the protocols installed in the driver entry point
|
||||
//
|
||||
//
|
||||
gBS->UninstallProtocolInterface (
|
||||
DriverBinding->DriverBindingHandle,
|
||||
&gEfiDriverBindingProtocolGuid,
|
||||
DriverBinding
|
||||
);
|
||||
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
DeviceHandleBuffer[Index],
|
||||
&gEfiComponentNameProtocolGuid,
|
||||
@@ -2576,13 +2576,13 @@ Exit:
|
||||
|
||||
/**
|
||||
|
||||
Detect media state for a network device. This routine will wait for a period of time at
|
||||
a specified checking interval when a certain network is under connecting until connection
|
||||
Detect media state for a network device. This routine will wait for a period of time at
|
||||
a specified checking interval when a certain network is under connecting until connection
|
||||
process finishs or timeout. If Aip protocol is supported by low layer drivers, three kinds
|
||||
of media states can be detected: EFI_SUCCESS, EFI_NOT_READY and EFI_NO_MEDIA, represents
|
||||
connected state, connecting state and no media state respectively. When function detects
|
||||
the current state is EFI_NOT_READY, it will loop to wait for next time's check until state
|
||||
turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will
|
||||
connected state, connecting state and no media state respectively. When function detects
|
||||
the current state is EFI_NOT_READY, it will loop to wait for next time's check until state
|
||||
turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will
|
||||
call NetLibDetectMedia() and return state directly.
|
||||
|
||||
@param[in] ServiceHandle The handle where network service binding protocols are
|
||||
@@ -2593,7 +2593,7 @@ Exit:
|
||||
@param[out] MediaState The pointer to the detected media state.
|
||||
|
||||
@retval EFI_SUCCESS Media detection success.
|
||||
@retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or
|
||||
@retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or
|
||||
MediaState pointer is NULL.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred.
|
||||
@retval EFI_TIMEOUT Network is connecting but timeout.
|
||||
@@ -2697,7 +2697,7 @@ NetLibDetectMediaWaitTimeout (
|
||||
}
|
||||
|
||||
//
|
||||
// Loop to check media state
|
||||
// Loop to check media state
|
||||
//
|
||||
|
||||
Timer = NULL;
|
||||
@@ -2758,10 +2758,10 @@ NetLibDetectMediaWaitTimeout (
|
||||
from DHCP).
|
||||
|
||||
If the controller handle does not have the EFI_IP4_CONFIG2_PROTOCOL installed, the
|
||||
default address is static. If failed to get the policy from Ip4 Config2 Protocol,
|
||||
default address is static. If failed to get the policy from Ip4 Config2 Protocol,
|
||||
the default address is static. Otherwise, get the result from Ip4 Config2 Protocol.
|
||||
|
||||
@param[in] Controller The controller handle which has the EFI_IP4_CONFIG2_PROTOCOL
|
||||
@param[in] Controller The controller handle which has the EFI_IP4_CONFIG2_PROTOCOL
|
||||
relative with the default address to judge.
|
||||
|
||||
@retval TRUE If the default address is static.
|
||||
@@ -2775,12 +2775,12 @@ NetLibDefaultAddressIsStatic (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
|
||||
UINTN DataSize;
|
||||
UINTN DataSize;
|
||||
EFI_IP4_CONFIG2_POLICY Policy;
|
||||
BOOLEAN IsStatic;
|
||||
|
||||
Ip4Config2 = NULL;
|
||||
|
||||
|
||||
DataSize = sizeof (EFI_IP4_CONFIG2_POLICY);
|
||||
|
||||
IsStatic = TRUE;
|
||||
@@ -2797,11 +2797,11 @@ NetLibDefaultAddressIsStatic (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
IsStatic = (BOOLEAN) (Policy == Ip4Config2PolicyStatic);
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
|
||||
return IsStatic;
|
||||
}
|
||||
|
||||
@@ -3132,14 +3132,14 @@ NetLibStrToIp6andPrefix (
|
||||
|
||||
Convert one EFI_IPv6_ADDRESS to Null-terminated Unicode string.
|
||||
The text representation of address is defined in RFC 4291.
|
||||
|
||||
|
||||
@param[in] Ip6Address The pointer to the IPv6 address.
|
||||
@param[out] String The buffer to return the converted string.
|
||||
@param[in] StringSize The length in bytes of the input String.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Convert to string successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
@retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been
|
||||
@retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been
|
||||
updated with the size needed to complete the request.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -3165,7 +3165,7 @@ NetLibIp6ToStr (
|
||||
|
||||
//
|
||||
// Convert the UINT8 array to an UINT16 array for easy handling.
|
||||
//
|
||||
//
|
||||
ZeroMem (Ip6Addr, sizeof (Ip6Addr));
|
||||
for (Index = 0; Index < 16; Index++) {
|
||||
Ip6Addr[Index / 2] |= (Ip6Address->Addr[Index] << ((1 - (Index % 2)) << 3));
|
||||
@@ -3197,7 +3197,7 @@ NetLibIp6ToStr (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (CurrentZerosStart != DEFAULT_ZERO_START && CurrentZerosLength > 2) {
|
||||
if (LongestZerosStart == DEFAULT_ZERO_START || LongestZerosLength < CurrentZerosLength) {
|
||||
LongestZerosStart = CurrentZerosStart;
|
||||
@@ -3218,7 +3218,7 @@ NetLibIp6ToStr (
|
||||
}
|
||||
Ptr += UnicodeSPrint(Ptr, 10, L"%x", Ip6Addr[Index]);
|
||||
}
|
||||
|
||||
|
||||
if (LongestZerosStart != DEFAULT_ZERO_START && LongestZerosStart + LongestZerosLength == 8) {
|
||||
*Ptr++ = L':';
|
||||
}
|
||||
@@ -3281,7 +3281,7 @@ NetLibGetSystemGuid (
|
||||
//
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SMBIOS tables are byte packed so we need to do a byte copy to
|
||||
// prevend alignment faults on Itanium-based platform.
|
||||
@@ -3295,12 +3295,12 @@ NetLibGetSystemGuid (
|
||||
// 1. Formatted section; 2. Unformatted string section. So, 2 steps are needed
|
||||
// to skip one SMBIOS structure.
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Step 1: Skip over formatted section.
|
||||
//
|
||||
String = (CHAR8 *) (Smbios.Raw + Smbios.Hdr->Length);
|
||||
|
||||
|
||||
//
|
||||
// Step 2: Skip over unformated string section.
|
||||
//
|
||||
@@ -3318,7 +3318,7 @@ NetLibGetSystemGuid (
|
||||
//
|
||||
Smbios.Raw = (UINT8 *)++String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (TRUE);
|
||||
} while (Smbios.Raw < SmbiosEnd.Raw);
|
||||
return EFI_NOT_FOUND;
|
||||
@@ -3328,19 +3328,19 @@ NetLibGetSystemGuid (
|
||||
Create Dns QName according the queried domain name.
|
||||
|
||||
If DomainName is NULL, then ASSERT().
|
||||
|
||||
QName is a domain name represented as a sequence of labels,
|
||||
where each label consists of a length octet followed by that
|
||||
number of octets. The QName terminates with the zero
|
||||
length octet for the null label of the root. Caller should
|
||||
|
||||
QName is a domain name represented as a sequence of labels,
|
||||
where each label consists of a length octet followed by that
|
||||
number of octets. The QName terminates with the zero
|
||||
length octet for the null label of the root. Caller should
|
||||
take responsibility to free the buffer in returned pointer.
|
||||
|
||||
@param DomainName The pointer to the queried domain name string.
|
||||
@param DomainName The pointer to the queried domain name string.
|
||||
|
||||
@retval NULL Failed to fill QName.
|
||||
@return QName filled successfully.
|
||||
|
||||
**/
|
||||
|
||||
**/
|
||||
CHAR8 *
|
||||
EFIAPI
|
||||
NetLibCreateDnsQName (
|
||||
@@ -3362,10 +3362,10 @@ NetLibCreateDnsQName (
|
||||
Tail = NULL;
|
||||
|
||||
//
|
||||
// One byte for first label length, one byte for terminated length zero.
|
||||
// One byte for first label length, one byte for terminated length zero.
|
||||
//
|
||||
QueryNameSize = StrLen (DomainName) + 2;
|
||||
|
||||
|
||||
if (QueryNameSize > DNS_MAX_NAME_SIZE) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -3374,7 +3374,7 @@ NetLibCreateDnsQName (
|
||||
if (QueryName == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Header = QueryName;
|
||||
Tail = Header + 1;
|
||||
Len = 0;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This library instance provides the basic network services.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -64,4 +64,4 @@
|
||||
gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiAdapterInformationProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiAdapterInformationProtocolGuid ## SOMETIMES_CONSUMES
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides the basic network services.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Network library functions providing net buffer operation support.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -1847,11 +1847,11 @@ NetIp6PseudoHeadChecksum (
|
||||
}
|
||||
|
||||
/**
|
||||
The function frees the net buffer which allocated by the IP protocol. It releases
|
||||
only the net buffer and doesn't call the external free function.
|
||||
The function frees the net buffer which allocated by the IP protocol. It releases
|
||||
only the net buffer and doesn't call the external free function.
|
||||
|
||||
This function should be called after finishing the process of mIpSec->ProcessExt()
|
||||
for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new
|
||||
This function should be called after finishing the process of mIpSec->ProcessExt()
|
||||
for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new
|
||||
buffer for the ESP, so there needs a function to free the old net buffer.
|
||||
|
||||
@param[in] Nbuf The network buffer to be freed.
|
||||
@@ -1868,7 +1868,7 @@ NetIpSecNetbufFree (
|
||||
Nbuf->RefCnt--;
|
||||
|
||||
if (Nbuf->RefCnt == 0) {
|
||||
|
||||
|
||||
//
|
||||
// Update Vector only when NBuf is to be released. That is,
|
||||
// all the sharing of Nbuf increse Vector's RefCnt by one
|
||||
@@ -1883,14 +1883,14 @@ NetIpSecNetbufFree (
|
||||
}
|
||||
|
||||
//
|
||||
// If NET_VECTOR_OWN_FIRST is set, release the first block since it is
|
||||
// If NET_VECTOR_OWN_FIRST is set, release the first block since it is
|
||||
// allocated by us
|
||||
//
|
||||
if ((Nbuf->Vector->Flag & NET_VECTOR_OWN_FIRST) != 0) {
|
||||
FreePool (Nbuf->Vector->Block[0].Bulk);
|
||||
}
|
||||
FreePool (Nbuf->Vector);
|
||||
FreePool (Nbuf);
|
||||
}
|
||||
FreePool (Nbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
to log performance data. If both PerformanceEx and Performance Protocol is not available, it does not log any
|
||||
performance information.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -226,7 +226,7 @@ EndPerformanceMeasurementEx (
|
||||
UINTN
|
||||
EFIAPI
|
||||
GetPerformanceMeasurementEx (
|
||||
IN UINTN LogEntryKey,
|
||||
IN UINTN LogEntryKey,
|
||||
OUT CONST VOID **Handle,
|
||||
OUT CONST CHAR8 **Token,
|
||||
OUT CONST CHAR8 **Module,
|
||||
|
@@ -1,20 +1,20 @@
|
||||
## @file
|
||||
# Performance library instance used in DXE phase.
|
||||
#
|
||||
#
|
||||
# This library instance provides infrastructure for DXE phase drivers to log performance
|
||||
# data. It consumes PerformanceEx or Performance Protocol published by DxeCorePerformanceLib
|
||||
# to log performance data. If both PerformanceEx and Performance Protocol are not available,
|
||||
# it does not log any performance information.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// to log performance data. If both PerformanceEx and Performance Protocol are not available,
|
||||
// it does not log any performance information.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
Instance of Print Library based on gEfiPrint2SProtocolGuid.
|
||||
|
||||
Implement the print library instance by wrap the interface
|
||||
Implement the print library instance by wrap the interface
|
||||
provided in the Print2S protocol. This protocol is defined as the internal
|
||||
protocol related to this implementation, not in the public spec. So, this
|
||||
protocol related to this implementation, not in the public spec. So, this
|
||||
library instance is only for this code base.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -47,13 +47,13 @@ EFI_PRINT2S_PROTOCOL *mPrint2SProtocol = NULL;
|
||||
|
||||
/**
|
||||
The constructor function caches the pointer to Print2S protocol.
|
||||
|
||||
|
||||
The constructor function locates Print2S protocol from protocol database.
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
|
||||
|
||||
**/
|
||||
@@ -79,7 +79,7 @@ PrintLibConstructor (
|
||||
|
||||
|
||||
/**
|
||||
Worker function that converts a VA_LIST to a BASE_LIST based on a Null-terminated
|
||||
Worker function that converts a VA_LIST to a BASE_LIST based on a Null-terminated
|
||||
format string.
|
||||
|
||||
@param AsciiFormat TRUE if Format is an ASCII string. FALSE if Format is a Unicode string.
|
||||
@@ -151,11 +151,11 @@ DxePrintLibPrint2ProtocolVaListToBaseList (
|
||||
FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask;
|
||||
|
||||
switch (FormatCharacter) {
|
||||
case '.':
|
||||
case '-':
|
||||
case '+':
|
||||
case ' ':
|
||||
case ',':
|
||||
case '.':
|
||||
case '-':
|
||||
case '+':
|
||||
case ' ':
|
||||
case ',':
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
@@ -168,7 +168,7 @@ DxePrintLibPrint2ProtocolVaListToBaseList (
|
||||
case '9':
|
||||
break;
|
||||
case 'L':
|
||||
case 'l':
|
||||
case 'l':
|
||||
Long = TRUE;
|
||||
break;
|
||||
case '*':
|
||||
@@ -177,7 +177,7 @@ DxePrintLibPrint2ProtocolVaListToBaseList (
|
||||
case '\0':
|
||||
//
|
||||
// Make no output if Format string terminates unexpectedly when
|
||||
// looking up for flag, width, precision and type.
|
||||
// looking up for flag, width, precision and type.
|
||||
//
|
||||
Format -= BytesPerFormatCharacter;
|
||||
//
|
||||
@@ -187,8 +187,8 @@ DxePrintLibPrint2ProtocolVaListToBaseList (
|
||||
Done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Handle each argument type
|
||||
//
|
||||
@@ -604,26 +604,26 @@ UnicodeSPrintAsciiFormat (
|
||||
[ATTENTION] This function is deprecated for security reason.
|
||||
|
||||
Converts a decimal value to a Null-terminated Unicode string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated Unicode
|
||||
string specified by Buffer containing at most Width characters. No padding of spaces
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated Unicode
|
||||
string specified by Buffer containing at most Width characters. No padding of spaces
|
||||
is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The number of Unicode characters in Buffer is returned not including the Null-terminator.
|
||||
If the conversion contains more than Width characters, then only the first
|
||||
Width characters are returned, and the total number of characters
|
||||
Width characters are returned, and the total number of characters
|
||||
required to perform the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
|
||||
Additional conversion parameters are specified in Flags.
|
||||
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
formatted in hexadecimal format.
|
||||
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
|
||||
@@ -639,7 +639,7 @@ UnicodeSPrintAsciiFormat (
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of Unicode characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
|
||||
|
||||
@return The number of Unicode characters in Buffer not including the Null-terminator.
|
||||
|
||||
**/
|
||||
@@ -1083,29 +1083,29 @@ AsciiSPrintUnicodeFormat (
|
||||
[ATTENTION] This function is deprecated for security reason.
|
||||
|
||||
Converts a decimal value to a Null-terminated ASCII string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated ASCII string
|
||||
specified by Buffer containing at most Width characters. No padding of spaces
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated ASCII string
|
||||
specified by Buffer containing at most Width characters. No padding of spaces
|
||||
is ever performed.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The number of ASCII characters in Buffer is returned not including the Null-terminator.
|
||||
If the conversion contains more than Width characters, then only the first Width
|
||||
characters are returned, and the total number of characters required to perform
|
||||
the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
formatted in hexadecimal format.
|
||||
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If unsupported bits are set in Flags, then ASSERT().
|
||||
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
|
||||
@@ -1117,7 +1117,7 @@ AsciiSPrintUnicodeFormat (
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of ASCII characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
|
||||
|
||||
@return The number of ASCII characters in Buffer not including the Null-terminator.
|
||||
|
||||
**/
|
||||
@@ -1256,8 +1256,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5','
|
||||
**/
|
||||
CHAR8 *
|
||||
InternalPrintLibValueToString (
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN UINTN Radix
|
||||
)
|
||||
{
|
||||
@@ -1279,21 +1279,21 @@ InternalPrintLibValueToString (
|
||||
}
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and a VA_LIST argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine.
|
||||
|
||||
If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
|
||||
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
parsing of Format into.
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
buffer.
|
||||
@param[in] Flags Initial flags value.
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
and COUNT_ONLY_NO_PRINT set.
|
||||
@param[in] Format A Null-terminated format string.
|
||||
@param[in] VaListMarker VA_LIST style variable argument list consumed by
|
||||
@@ -1317,11 +1317,11 @@ InternalPrintLibSPrintMarker (
|
||||
);
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and variable argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine
|
||||
|
||||
@param StartOfBuffer The character buffer to print the results of the parsing
|
||||
@@ -1407,7 +1407,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 * CONST mStatusString[] = {
|
||||
|
||||
@param Buffer The buffer to place the Unicode or ASCII string.
|
||||
@param EndBuffer The end of the input Buffer. No characters will be
|
||||
placed after that.
|
||||
placed after that.
|
||||
@param Length The count of character to be placed into Buffer.
|
||||
(Negative value indicates no buffer fill.)
|
||||
@param Character The character to be placed into Buffer.
|
||||
@@ -1426,7 +1426,7 @@ InternalPrintLibFillBuffer (
|
||||
)
|
||||
{
|
||||
INTN Index;
|
||||
|
||||
|
||||
for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) {
|
||||
*Buffer = (CHAR8) Character;
|
||||
if (Increment != 1) {
|
||||
@@ -1439,21 +1439,21 @@ InternalPrintLibFillBuffer (
|
||||
}
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and a VA_LIST argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine.
|
||||
|
||||
If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
|
||||
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
parsing of Format into.
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
buffer.
|
||||
@param[in] Flags Initial flags value.
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
and COUNT_ONLY_NO_PRINT set.
|
||||
@param[in] Format A Null-terminated format string.
|
||||
@param[in] VaListMarker VA_LIST style variable argument list consumed by
|
||||
@@ -1509,7 +1509,7 @@ InternalPrintLibSPrintMarker (
|
||||
|
||||
//
|
||||
// If you change this code be sure to match the 2 versions of this function.
|
||||
// Nearly identical logic is found in the BasePrintLib and
|
||||
// Nearly identical logic is found in the BasePrintLib and
|
||||
// DxePrintLibPrint2Protocol (both PrintLib instances).
|
||||
//
|
||||
|
||||
@@ -1630,24 +1630,24 @@ InternalPrintLibSPrintMarker (
|
||||
Format += BytesPerFormatCharacter;
|
||||
FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask;
|
||||
switch (FormatCharacter) {
|
||||
case '.':
|
||||
Flags |= PRECISION;
|
||||
case '.':
|
||||
Flags |= PRECISION;
|
||||
break;
|
||||
case '-':
|
||||
Flags |= LEFT_JUSTIFY;
|
||||
case '-':
|
||||
Flags |= LEFT_JUSTIFY;
|
||||
break;
|
||||
case '+':
|
||||
Flags |= PREFIX_SIGN;
|
||||
case '+':
|
||||
Flags |= PREFIX_SIGN;
|
||||
break;
|
||||
case ' ':
|
||||
Flags |= PREFIX_BLANK;
|
||||
case ' ':
|
||||
Flags |= PREFIX_BLANK;
|
||||
break;
|
||||
case ',':
|
||||
Flags |= COMMA_TYPE;
|
||||
case ',':
|
||||
Flags |= COMMA_TYPE;
|
||||
break;
|
||||
case 'L':
|
||||
case 'l':
|
||||
Flags |= LONG_TYPE;
|
||||
case 'l':
|
||||
Flags |= LONG_TYPE;
|
||||
break;
|
||||
case '*':
|
||||
if ((Flags & PRECISION) == 0) {
|
||||
@@ -1691,11 +1691,11 @@ InternalPrintLibSPrintMarker (
|
||||
Precision = Count;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case '\0':
|
||||
//
|
||||
// Make no output if Format string terminates unexpectedly when
|
||||
// looking up for flag, width, precision and type.
|
||||
// looking up for flag, width, precision and type.
|
||||
//
|
||||
Format -= BytesPerFormatCharacter;
|
||||
Precision = 0;
|
||||
@@ -1706,7 +1706,7 @@ InternalPrintLibSPrintMarker (
|
||||
Done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Handle each argument type
|
||||
@@ -1746,9 +1746,9 @@ InternalPrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "int" is used in this one case.
|
||||
//
|
||||
if (BaseListMarker == NULL) {
|
||||
@@ -1786,9 +1786,9 @@ InternalPrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "unsigned int" is used in this one case.
|
||||
//
|
||||
Value = (unsigned int)Value;
|
||||
@@ -1800,9 +1800,9 @@ InternalPrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "unsigned int" is used in this one case.
|
||||
//
|
||||
Value = (unsigned int)Value;
|
||||
@@ -1816,7 +1816,7 @@ InternalPrintLibSPrintMarker (
|
||||
Count = 0;
|
||||
}
|
||||
ArgumentString = (CHAR8 *)ValueBuffer + Count;
|
||||
|
||||
|
||||
Digits = Count % 3;
|
||||
if (Digits != 0) {
|
||||
Digits = 3 - Digits;
|
||||
@@ -1889,7 +1889,7 @@ InternalPrintLibSPrintMarker (
|
||||
GuidData3 = ReadUnaligned16 (&(TmpGuid->Data3));
|
||||
InternalPrintLibSPrint (
|
||||
ValueBuffer,
|
||||
MAXIMUM_VALUE_CHARACTERS,
|
||||
MAXIMUM_VALUE_CHARACTERS,
|
||||
0,
|
||||
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
GuidData1,
|
||||
@@ -1910,9 +1910,9 @@ InternalPrintLibSPrintMarker (
|
||||
|
||||
case 't':
|
||||
if (BaseListMarker == NULL) {
|
||||
TmpTime = VA_ARG (VaListMarker, TIME *);
|
||||
TmpTime = VA_ARG (VaListMarker, TIME *);
|
||||
} else {
|
||||
TmpTime = BASE_ARG (BaseListMarker, TIME *);
|
||||
TmpTime = BASE_ARG (BaseListMarker, TIME *);
|
||||
}
|
||||
if (TmpTime == NULL) {
|
||||
ArgumentString = "<null time>";
|
||||
@@ -1997,7 +1997,7 @@ InternalPrintLibSPrintMarker (
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case '\r':
|
||||
Format += BytesPerFormatCharacter;
|
||||
FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask;
|
||||
@@ -2173,7 +2173,7 @@ InternalPrintLibSPrintMarker (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
output were produced not including the Null-terminator.
|
||||
|
||||
If FormatString is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -2186,7 +2186,7 @@ InternalPrintLibSPrintMarker (
|
||||
@param[in] FormatString A Null-terminated Unicode format string.
|
||||
@param[in] Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return The number of characters that would be produced, not including the
|
||||
@return The number of characters that would be produced, not including the
|
||||
Null-terminator.
|
||||
**/
|
||||
UINTN
|
||||
@@ -2201,7 +2201,7 @@ SPrintLength (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
output were produced not including the Null-terminator.
|
||||
|
||||
If FormatString is NULL, then ASSERT() and 0 is returned.
|
||||
@@ -2212,7 +2212,7 @@ SPrintLength (
|
||||
@param[in] FormatString A Null-terminated ASCII format string.
|
||||
@param[in] Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return The number of characters that would be produced, not including the
|
||||
@return The number of characters that would be produced, not including the
|
||||
Null-terminator.
|
||||
**/
|
||||
UINTN
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Report Status Code Library for DXE Phase.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -109,7 +109,7 @@ InternalReportStatusCode (
|
||||
//
|
||||
return mReportStatusCodeLibStatusCodeProtocol->ReportStatusCode (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
|
||||
}
|
||||
|
||||
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ ReportStatusCodeEx (
|
||||
//
|
||||
Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||
gBS->RestoreTPL (Tpl);
|
||||
|
||||
|
||||
StatusCodeData = NULL;
|
||||
if (Tpl <= TPL_NOTIFY) {
|
||||
//
|
||||
|
@@ -18,11 +18,11 @@
|
||||
|
||||
/**
|
||||
This function causes a system-wide reset (cold reset), in which
|
||||
all circuitry within the system returns to its initial state. This type of reset
|
||||
all circuitry within the system returns to its initial state. This type of reset
|
||||
is asynchronous to system operation and operates without regard to
|
||||
cycle boundaries.
|
||||
|
||||
If this function returns, it means that the system does not support cold reset.
|
||||
If this function returns, it means that the system does not support cold reset.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -34,7 +34,7 @@ ResetCold (
|
||||
}
|
||||
|
||||
/**
|
||||
This function causes a system-wide initialization (warm reset), in which all processors
|
||||
This function causes a system-wide initialization (warm reset), in which all processors
|
||||
are set to their initial state. Pending cycles are not corrupted.
|
||||
|
||||
If this function returns, it means that the system does not support warm reset.
|
||||
@@ -49,7 +49,7 @@ ResetWarm (
|
||||
}
|
||||
|
||||
/**
|
||||
This function causes the system to enter a power state equivalent
|
||||
This function causes the system to enter a power state equivalent
|
||||
to the ACPI G2/S5 or G3 states.
|
||||
|
||||
If this function returns, it means that the system does not support shut down reset.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides generic security measurement functions for DXE module.
|
||||
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -68,8 +68,8 @@ ReallocateSecurityHandlerTable (
|
||||
// Reallocate memory for security info structure.
|
||||
//
|
||||
mSecurityTable = ReallocatePool (
|
||||
mMaxNumberOfSecurityHandler * sizeof (SECURITY_INFO),
|
||||
(mMaxNumberOfSecurityHandler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY_INFO),
|
||||
mMaxNumberOfSecurityHandler * sizeof (SECURITY_INFO),
|
||||
(mMaxNumberOfSecurityHandler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY_INFO),
|
||||
mSecurityTable
|
||||
);
|
||||
|
||||
@@ -88,7 +88,7 @@ ReallocateSecurityHandlerTable (
|
||||
}
|
||||
|
||||
/**
|
||||
Check whether an operation is valid according to the requirement of current operation,
|
||||
Check whether an operation is valid according to the requirement of current operation,
|
||||
which must make sure that the measure image operation is the last one.
|
||||
|
||||
@param CurrentAuthOperation Current operation.
|
||||
@@ -102,14 +102,14 @@ CheckAuthenticationOperation (
|
||||
IN UINT32 CurrentAuthOperation,
|
||||
IN UINT32 CheckAuthOperation
|
||||
)
|
||||
{
|
||||
{
|
||||
//
|
||||
// Make sure new auth operation can be recognized.
|
||||
//
|
||||
ASSERT ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK | EFI_AUTH_OPERATION_AUTHENTICATION_STATE | EFI_AUTH_OPERATION_IMAGE_REQUIRED)) == 0);
|
||||
|
||||
|
||||
//
|
||||
// When current operation includes measure image operation,
|
||||
// When current operation includes measure image operation,
|
||||
// only another measure image operation or none operation will be allowed.
|
||||
//
|
||||
if ((CurrentAuthOperation & EFI_AUTH_OPERATION_MEASURE_IMAGE) == EFI_AUTH_OPERATION_MEASURE_IMAGE) {
|
||||
@@ -120,9 +120,9 @@ CheckAuthenticationOperation (
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// When current operation doesn't include measure image operation,
|
||||
// When current operation doesn't include measure image operation,
|
||||
// any new operation will be allowed.
|
||||
//
|
||||
return TRUE;
|
||||
@@ -184,12 +184,12 @@ RegisterSecurityHandler (
|
||||
Execute registered handlers until one returns an error and that error is returned.
|
||||
If none of the handlers return an error, then EFI_SUCCESS is returned.
|
||||
|
||||
Before exectue handler, get the image buffer by file device path if a handler
|
||||
Before exectue handler, get the image buffer by file device path if a handler
|
||||
requires the image file. And return the image buffer to each handler when exectue handler.
|
||||
|
||||
The handlers are executed in same order to their registered order.
|
||||
|
||||
@param[in] AuthenticationStatus
|
||||
@param[in] AuthenticationStatus
|
||||
This is the authentication type returned from the Section
|
||||
Extraction protocol. See the Section Extraction Protocol
|
||||
Specification for details on this type.
|
||||
@@ -197,9 +197,9 @@ RegisterSecurityHandler (
|
||||
being dispatched. This will optionally be used for logging.
|
||||
|
||||
@retval EFI_SUCCESS The file specified by File did authenticate when more
|
||||
than one security handler services were registered,
|
||||
or the file did not authenticate when no security
|
||||
handler service was registered. And the platform policy
|
||||
than one security handler services were registered,
|
||||
or the file did not authenticate when no security
|
||||
handler service was registered. And the platform policy
|
||||
dictates that the DXE Core may use File.
|
||||
@retval EFI_INVALID_PARAMETER File is NULL.
|
||||
@retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and
|
||||
@@ -226,7 +226,7 @@ ExecuteSecurityHandlers (
|
||||
EFI_HANDLE Handle;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Node;
|
||||
EFI_DEVICE_PATH_PROTOCOL *FilePathToVerfiy;
|
||||
|
||||
|
||||
if (FilePath == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ ExecuteSecurityHandlers (
|
||||
if (mNumberOfSecurityHandler == 0) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
FileBuffer = NULL;
|
||||
FileSize = 0;
|
||||
@@ -309,8 +309,8 @@ ReallocateSecurity2HandlerTable (
|
||||
// Reallocate memory for security info structure.
|
||||
//
|
||||
mSecurity2Table = ReallocatePool (
|
||||
mMaxNumberOfSecurity2Handler * sizeof (SECURITY2_INFO),
|
||||
(mMaxNumberOfSecurity2Handler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY2_INFO),
|
||||
mMaxNumberOfSecurity2Handler * sizeof (SECURITY2_INFO),
|
||||
(mMaxNumberOfSecurity2Handler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY2_INFO),
|
||||
mSecurity2Table
|
||||
);
|
||||
|
||||
@@ -329,17 +329,17 @@ ReallocateSecurity2HandlerTable (
|
||||
}
|
||||
|
||||
/**
|
||||
Check whether an operation is valid according to the requirement of current operation,
|
||||
Check whether an operation is valid according to the requirement of current operation,
|
||||
which must make sure that the measure image operation is the last one.
|
||||
|
||||
|
||||
If AuthenticationOperation is not recongnized, return FALSE.
|
||||
If AuthenticationOperation is EFI_AUTH_OPERATION_NONE, return FALSE.
|
||||
If AuthenticationOperation includes security operation and authentication operation, return FALSE.
|
||||
If the previous register handler can't be executed before the later register handler, return FALSE.
|
||||
|
||||
|
||||
@param CurrentAuthOperation Current operation.
|
||||
@param CheckAuthOperation Operation to be checked.
|
||||
|
||||
|
||||
@retval TRUE Operation is valid for current operation.
|
||||
@retval FALSE Operation is invalid for current operation.
|
||||
**/
|
||||
@@ -348,21 +348,21 @@ CheckAuthentication2Operation (
|
||||
IN UINT32 CurrentAuthOperation,
|
||||
IN UINT32 CheckAuthOperation
|
||||
)
|
||||
{
|
||||
{
|
||||
//
|
||||
// Make sure new auth operation can be recognized.
|
||||
//
|
||||
if (CheckAuthOperation == EFI_AUTH_OPERATION_NONE) {
|
||||
return FALSE;
|
||||
}
|
||||
if ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK |
|
||||
EFI_AUTH_NONE_IMAGE_OPERATION_MASK |
|
||||
if ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK |
|
||||
EFI_AUTH_NONE_IMAGE_OPERATION_MASK |
|
||||
EFI_AUTH_OPERATION_IMAGE_REQUIRED)) != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// When current operation includes measure image operation,
|
||||
// When current operation includes measure image operation,
|
||||
// only another measure image or none image operation will be allowed.
|
||||
//
|
||||
if ((CurrentAuthOperation & EFI_AUTH_OPERATION_MEASURE_IMAGE) == EFI_AUTH_OPERATION_MEASURE_IMAGE) {
|
||||
@@ -373,7 +373,7 @@ CheckAuthentication2Operation (
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Any other operation will be allowed.
|
||||
//
|
||||
@@ -434,16 +434,16 @@ RegisterSecurity2Handler (
|
||||
}
|
||||
|
||||
/**
|
||||
Execute registered handlers based on input AuthenticationOperation until
|
||||
one returns an error and that error is returned.
|
||||
|
||||
Execute registered handlers based on input AuthenticationOperation until
|
||||
one returns an error and that error is returned.
|
||||
|
||||
If none of the handlers return an error, then EFI_SUCCESS is returned.
|
||||
The handlers those satisfy AuthenticationOperation will only be executed.
|
||||
The handlers are executed in same order to their registered order.
|
||||
|
||||
@param[in] AuthenticationOperation
|
||||
@param[in] AuthenticationOperation
|
||||
The operation type specifies which handlers will be executed.
|
||||
@param[in] AuthenticationStatus
|
||||
@param[in] AuthenticationStatus
|
||||
The authentication status for the input file.
|
||||
@param[in] File This is a pointer to the device path of the file that is
|
||||
being dispatched. This will optionally be used for logging.
|
||||
@@ -461,7 +461,7 @@ RegisterSecurity2Handler (
|
||||
@retval EFI_SUCCESS FileBuffer is NULL and current user has permission to start
|
||||
UEFI device drivers on the device path specified by DevicePath.
|
||||
@retval EFI_SECURITY_VIOLATION The file specified by File or FileBuffer did not
|
||||
authenticate, and the platform policy dictates that
|
||||
authenticate, and the platform policy dictates that
|
||||
the file should be placed in the untrusted state.
|
||||
@retval EFI_SECURITY_VIOLATION FileBuffer FileBuffer is NULL and the user has no
|
||||
permission to start UEFI device drivers on the device path specified
|
||||
@@ -472,7 +472,7 @@ RegisterSecurity2Handler (
|
||||
@retval EFI_ACCESS_DENIED The file specified by File did not authenticate, and
|
||||
the platform policy dictates that the DXE
|
||||
Foundation may not use File.
|
||||
@retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL.
|
||||
@retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This library provides generic security measurement functions for DXE module.
|
||||
#
|
||||
# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = 7F61122C-19DF-47c3-BA0D-6C1149E30FA1
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = SecurityManagementLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
LIBRARY_CLASS = SecurityManagementLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx()
|
||||
and EndPerformanceMeasurementEx() are not implemented.
|
||||
|
||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -313,7 +313,7 @@ EndPerformanceMeasurement (
|
||||
UINTN
|
||||
EFIAPI
|
||||
GetByPerformanceProtocol (
|
||||
IN UINTN LogEntryKey,
|
||||
IN UINTN LogEntryKey,
|
||||
OUT CONST VOID **Handle,
|
||||
OUT CONST CHAR8 **Token,
|
||||
OUT CONST CHAR8 **Module,
|
||||
@@ -450,12 +450,12 @@ GetAllSmmGaugeData (
|
||||
mSmmPerformanceBuffer = (UINT8 *) (UINTN) Entry->PhysicalStart;
|
||||
|
||||
//
|
||||
// Initialize communicate buffer
|
||||
// Initialize communicate buffer
|
||||
//
|
||||
SmmCommBufferHeader = (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuffer;
|
||||
SmmPerfCommData = (SMM_PERF_COMMUNICATE *)SmmCommBufferHeader->Data;
|
||||
ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE));
|
||||
|
||||
|
||||
CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceProtocolGuid);
|
||||
SmmCommBufferHeader->MessageLength = sizeof(SMM_PERF_COMMUNICATE);
|
||||
CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE;
|
||||
@@ -482,7 +482,7 @@ GetAllSmmGaugeData (
|
||||
|
||||
//
|
||||
// Get all SMM gauge data
|
||||
//
|
||||
//
|
||||
SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_DATA;
|
||||
SmmPerfCommData->GaugeData = (GAUGE_DATA_ENTRY *) Buffer;
|
||||
EntriesGot = 0;
|
||||
@@ -589,12 +589,12 @@ GetAllSmmGaugeDataEx (
|
||||
ASSERT (Index < PiSmmCommunicationRegionTable->NumberOfEntries);
|
||||
mSmmPerformanceBuffer = (UINT8 *) (UINTN) Entry->PhysicalStart;
|
||||
//
|
||||
// Initialize communicate buffer
|
||||
// Initialize communicate buffer
|
||||
//
|
||||
SmmCommBufferHeader = (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuffer;
|
||||
SmmPerfCommData = (SMM_PERF_COMMUNICATE_EX *)SmmCommBufferHeader->Data;
|
||||
ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE_EX));
|
||||
|
||||
|
||||
CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceExProtocolGuid);
|
||||
SmmCommBufferHeader->MessageLength = sizeof(SMM_PERF_COMMUNICATE_EX);
|
||||
CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE;
|
||||
@@ -621,7 +621,7 @@ GetAllSmmGaugeDataEx (
|
||||
|
||||
//
|
||||
// Get all SMM gauge data
|
||||
//
|
||||
//
|
||||
SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_DATA;
|
||||
SmmPerfCommData->GaugeDataEx = (GAUGE_DATA_ENTRY_EX *) Buffer;
|
||||
EntriesGot = 0;
|
||||
@@ -691,7 +691,7 @@ GetAllSmmGaugeDataEx (
|
||||
UINTN
|
||||
EFIAPI
|
||||
GetPerformanceMeasurementEx (
|
||||
IN UINTN LogEntryKey,
|
||||
IN UINTN LogEntryKey,
|
||||
OUT CONST VOID **Handle,
|
||||
OUT CONST CHAR8 **Token,
|
||||
OUT CONST CHAR8 **Module,
|
||||
|
@@ -1,19 +1,19 @@
|
||||
## @file
|
||||
# Performance library instance used in DXE phase to dump SMM performance data.
|
||||
#
|
||||
#
|
||||
# This library instance allows a DXE driver or UEFI application to dump both PEI/DXE and SMM performance data.
|
||||
# StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx()
|
||||
# and EndPerformanceMeasurementEx() are not implemented.
|
||||
#
|
||||
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx()
|
||||
// and EndPerformanceMeasurementEx() are not implemented.
|
||||
//
|
||||
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -2,7 +2,7 @@
|
||||
This library is used to share code between UEFI network stack modules.
|
||||
It provides the helper routines to access TCP service.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
/**
|
||||
The common notify function associated with various TcpIo events.
|
||||
The common notify function associated with various TcpIo events.
|
||||
|
||||
@param[in] Event The event signaled.
|
||||
@param[in] Context The context.
|
||||
@@ -111,14 +111,14 @@ ON_EXIT:
|
||||
}
|
||||
|
||||
/**
|
||||
Create a TCP socket with the specified configuration data.
|
||||
Create a TCP socket with the specified configuration data.
|
||||
|
||||
@param[in] Image The handle of the driver image.
|
||||
@param[in] Controller The handle of the controller.
|
||||
@param[in] TcpVersion The version of Tcp, TCP_VERSION_4 or TCP_VERSION_6.
|
||||
@param[in] ConfigData The Tcp configuration data.
|
||||
@param[out] TcpIo The TcpIo.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The TCP socket is created and configured.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED One or more of the control options are not
|
||||
@@ -176,7 +176,7 @@ TcpIoCreateSocket (
|
||||
|
||||
//
|
||||
// Create the TCP child instance and get the TCP protocol.
|
||||
//
|
||||
//
|
||||
Status = NetLibCreateServiceChild (
|
||||
Controller,
|
||||
Image,
|
||||
@@ -395,9 +395,9 @@ ON_ERROR:
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Destroy the socket.
|
||||
Destroy the socket.
|
||||
|
||||
@param[in] TcpIo The TcpIo which wraps the socket to be destroyed.
|
||||
|
||||
@@ -531,7 +531,7 @@ TcpIoDestroySocket (
|
||||
|
||||
@param[in, out] TcpIo The TcpIo wrapping the TCP socket.
|
||||
@param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket
|
||||
successfully.
|
||||
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the
|
||||
@@ -604,7 +604,7 @@ TcpIoConnect (
|
||||
@param[in, out] TcpIo The TcpIo wrapping the TCP socket.
|
||||
@param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket
|
||||
successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@@ -671,7 +671,7 @@ TcpIoAccept (
|
||||
}
|
||||
|
||||
//
|
||||
// The new TCP instance handle created for the established connection is
|
||||
// The new TCP instance handle created for the established connection is
|
||||
// in ListenToken.
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
@@ -680,7 +680,7 @@ TcpIoAccept (
|
||||
} else {
|
||||
ProtocolGuid = &gEfiTcp6ProtocolGuid;
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
TcpIo->ListenToken.Tcp4Token.NewChildHandle,
|
||||
ProtocolGuid,
|
||||
@@ -719,7 +719,7 @@ TcpIoReset (
|
||||
Tcp4 = NULL;
|
||||
Tcp6 = NULL;
|
||||
|
||||
if (TcpIo->TcpVersion == TCP_VERSION_4) {
|
||||
if (TcpIo->TcpVersion == TCP_VERSION_4) {
|
||||
TcpIo->CloseToken.Tcp4Token.AbortOnClose = TRUE;
|
||||
Tcp4 = TcpIo->Tcp.Tcp4;
|
||||
Status = Tcp4->Close (Tcp4, &TcpIo->CloseToken.Tcp4Token);
|
||||
@@ -744,13 +744,13 @@ TcpIoReset (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Transmit the Packet to the other endpoint of the socket.
|
||||
|
||||
@param[in] TcpIo The TcpIo wrapping the TCP socket.
|
||||
@param[in] Packet The packet to transmit.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The packet is trasmitted.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED One or more of the control options are not
|
||||
@@ -779,7 +779,7 @@ TcpIoTransmit (
|
||||
|
||||
if (TcpIo->TcpVersion == TCP_VERSION_4) {
|
||||
|
||||
Size = sizeof (EFI_TCP4_TRANSMIT_DATA) +
|
||||
Size = sizeof (EFI_TCP4_TRANSMIT_DATA) +
|
||||
(Packet->BlockOpNum - 1) * sizeof (EFI_TCP4_FRAGMENT_DATA);
|
||||
} else if (TcpIo->TcpVersion == TCP_VERSION_6) {
|
||||
Size = sizeof (EFI_TCP6_TRANSMIT_DATA) +
|
||||
@@ -825,7 +825,7 @@ TcpIoTransmit (
|
||||
if (Tcp4 == NULL) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
Status = Tcp4->Transmit (Tcp4, &TcpIo->TxToken.Tcp4Token);
|
||||
} else {
|
||||
TcpIo->TxToken.Tcp6Token.Packet.TxData = (EFI_TCP6_TRANSMIT_DATA *) Data;
|
||||
@@ -929,7 +929,7 @@ TcpIoReceive (
|
||||
}
|
||||
|
||||
if (Tcp6 == NULL) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -961,11 +961,11 @@ TcpIoReceive (
|
||||
} else {
|
||||
Status = Tcp6->Receive (Tcp6, &TcpIo->RxToken.Tcp6Token);
|
||||
}
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
while (!TcpIo->IsRxDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) {
|
||||
//
|
||||
// Poll until some data is received or an error occurs.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This library instance provides TCP services by EFI TCPv4/TCPv6 Protocols.
|
||||
#
|
||||
# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides TCP services by EFI TCPv4/TCPv6 Protocols.
|
||||
//
|
||||
// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This library instance provides UDP services by consuming EFI UDPv4/UDPv6 Protocols.
|
||||
#
|
||||
# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This library instance provides UDP services by consuming EFI UDPv4/UDPv6 Protocols.
|
||||
//
|
||||
// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
File explorer related functions.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
@@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH FeHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -554,7 +554,7 @@ LibFileInfo (
|
||||
|
||||
Buffer = NULL;
|
||||
BufferSize = 0;
|
||||
|
||||
|
||||
Status = FHand->GetInfo (
|
||||
FHand,
|
||||
InfoType,
|
||||
@@ -691,19 +691,19 @@ LibAppendFileName (
|
||||
|
||||
Size1 = StrSize (Str1);
|
||||
Size2 = StrSize (Str2);
|
||||
|
||||
|
||||
//
|
||||
// Check overflow
|
||||
//
|
||||
if (((MAX_UINTN - Size1) < Size2) || ((MAX_UINTN - Size1 - Size2) < sizeof(CHAR16))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
MaxLen = (Size1 + Size2 + sizeof (CHAR16))/ sizeof (CHAR16);
|
||||
Str = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16));
|
||||
ASSERT (Str != NULL);
|
||||
|
||||
TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16));
|
||||
TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16));
|
||||
ASSERT (TmpStr != NULL);
|
||||
|
||||
StrCpyS (Str, MaxLen, Str1);
|
||||
@@ -724,7 +724,7 @@ LibAppendFileName (
|
||||
//
|
||||
|
||||
//
|
||||
// Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings
|
||||
// Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings
|
||||
// that overlap.
|
||||
//
|
||||
StrCpyS (TmpStr, MaxLen, Ptr + 3);
|
||||
@@ -736,7 +736,7 @@ LibAppendFileName (
|
||||
//
|
||||
|
||||
//
|
||||
// Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings
|
||||
// Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings
|
||||
// that overlap.
|
||||
//
|
||||
StrCpyS (TmpStr, MaxLen, Ptr + 2);
|
||||
@@ -750,7 +750,7 @@ LibAppendFileName (
|
||||
}
|
||||
|
||||
FreePool (TmpStr);
|
||||
|
||||
|
||||
return Str;
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ LibFindFileSystem (
|
||||
VolumeLabel,
|
||||
MenuEntry->HelpString
|
||||
);
|
||||
MenuEntry->DisplayStringToken = HiiSetString (
|
||||
MenuEntry->DisplayStringToken = HiiSetString (
|
||||
gFileExplorerPrivate.FeHiiHandle,
|
||||
0,
|
||||
MenuEntry->DisplayString,
|
||||
@@ -871,16 +871,16 @@ LibFindFileSystem (
|
||||
|
||||
/**
|
||||
Find the file handle from the input menu info.
|
||||
|
||||
|
||||
@param MenuEntry Input Menu info.
|
||||
@param RetFileHandle Return the file handle for the input device path.
|
||||
|
||||
|
||||
@retval EFI_SUCESS Find the file handle success.
|
||||
@retval Other Find the file handle failure.
|
||||
**/
|
||||
EFI_STATUS
|
||||
LibGetFileHandleFromMenu (
|
||||
IN MENU_ENTRY *MenuEntry,
|
||||
IN MENU_ENTRY *MenuEntry,
|
||||
OUT EFI_FILE_HANDLE *RetFileHandle
|
||||
)
|
||||
{
|
||||
@@ -917,18 +917,18 @@ LibGetFileHandleFromMenu (
|
||||
|
||||
/**
|
||||
Find the file handle from the input device path info.
|
||||
|
||||
|
||||
@param RootDirectory Device path info.
|
||||
@param RetFileHandle Return the file handle for the input device path.
|
||||
@param ParentFileName Parent file name.
|
||||
@param DeviceHandle Driver handle for this partition.
|
||||
|
||||
|
||||
@retval EFI_SUCESS Find the file handle success.
|
||||
@retval Other Find the file handle failure.
|
||||
**/
|
||||
EFI_STATUS
|
||||
LibGetFileHandleFromDevicePath (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory,
|
||||
OUT EFI_FILE_HANDLE *RetFileHandle,
|
||||
OUT UINT16 **ParentFileName,
|
||||
OUT EFI_HANDLE *DeviceHandle
|
||||
@@ -953,12 +953,12 @@ LibGetFileHandleFromDevicePath (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID**)&Volume);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Open the Volume to get the File System handle
|
||||
//
|
||||
@@ -974,7 +974,7 @@ LibGetFileHandleFromDevicePath (
|
||||
*RetFileHandle = FileHandle;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Duplicate the device path to avoid the access to unaligned device path node.
|
||||
// Because the device path consists of one or more FILE PATH MEDIA DEVICE PATH
|
||||
@@ -990,7 +990,7 @@ LibGetFileHandleFromDevicePath (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Parse each MEDIA_FILEPATH_DP node. There may be more than one, since the
|
||||
// directory information and filename can be seperate. The goal is to inch
|
||||
@@ -1123,11 +1123,11 @@ LibCreateNewFile (
|
||||
|
||||
/**
|
||||
Find files under current directory.
|
||||
|
||||
|
||||
All files and sub-directories in current directory
|
||||
will be stored in DirectoryMenu for future use.
|
||||
|
||||
@param FileHandle Parent file handle.
|
||||
@param FileHandle Parent file handle.
|
||||
@param FileName Parent file name.
|
||||
@param DeviceHandle Driver handle for this partition.
|
||||
|
||||
@@ -1223,7 +1223,7 @@ LibFindFiles (
|
||||
} else {
|
||||
NewMenuEntry->DisplayString = LibStrDuplicate (DirInfo->FileName);
|
||||
}
|
||||
|
||||
|
||||
NewMenuEntry->DisplayStringToken = HiiSetString (
|
||||
gFileExplorerPrivate.FeHiiHandle,
|
||||
0,
|
||||
@@ -1459,7 +1459,7 @@ LibGetDevicePath (
|
||||
}
|
||||
|
||||
/**
|
||||
Choose a file in the specified directory.
|
||||
Choose a file in the specified directory.
|
||||
|
||||
If user input NULL for the RootDirectory, will choose file in the system.
|
||||
|
||||
@@ -1612,7 +1612,7 @@ FileExplorerLibConstructor (
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFileExplorerPrivate.FormBrowser2);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
InitializeListHead (&gFileExplorerPrivate.FsOptionMenu->Head);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -1647,7 +1647,7 @@ FileExplorerLibDestructor (
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
|
||||
}
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
File explorer lib.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
**/
|
||||
|
||||
#ifndef _FILE_EXPLORER_H_
|
||||
@@ -226,8 +226,8 @@ EFI_STATUS
|
||||
LibUpdateFileExplorer (
|
||||
IN UINT16 KeyValue
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Get the device path info saved in the menu structure.
|
||||
|
||||
@@ -239,4 +239,4 @@ LibGetDevicePath (
|
||||
IN UINT16 KeyValue
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -1,15 +1,15 @@
|
||||
## @file
|
||||
# library defines a set of interfaces for how to do file explorer.
|
||||
#
|
||||
# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are licensed and made available under
|
||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||
# The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php.
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
@@ -52,7 +52,7 @@
|
||||
[Guids]
|
||||
gEfiFileSystemVolumeLabelInfoIdGuid ## SOMETIMES_CONSUMES ## GUID (Indicate the information type is volume)
|
||||
gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID (Extended IFR Guid Opcode)
|
||||
|
||||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiHiiConfigAccessProtocolGuid ## PRODUCES
|
||||
@@ -60,4 +60,4 @@
|
||||
gEfiDevicePathToTextProtocolGuid ## PRODUCES
|
||||
|
||||
[Depex.common.DXE_DRIVER]
|
||||
gEfiFormBrowser2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid
|
||||
gEfiFormBrowser2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid
|
||||
|
@@ -1,24 +1,24 @@
|
||||
///** @file
|
||||
//
|
||||
// Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Module Name:
|
||||
//
|
||||
// FileExplorerString.uni
|
||||
//
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
//
|
||||
// String definitions for file exporer library.
|
||||
//
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
//
|
||||
// --*/
|
||||
/=#
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// File Explorer Formset
|
||||
//
|
||||
// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -82,4 +82,4 @@ formset
|
||||
key = KEY_VALUE_NO_CREATE_FOLDER_AND_EXIT;
|
||||
endform;
|
||||
|
||||
endformset;
|
||||
endformset;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -103,7 +103,7 @@ UpdateLockBox (
|
||||
|
||||
@retval RETURN_SUCCESS the information is restored successfully.
|
||||
@retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL.
|
||||
@retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no
|
||||
@retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no
|
||||
LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute.
|
||||
@retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information.
|
||||
@retval RETURN_NOT_FOUND the requested GUID not found.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# NULL LockBox library instance.
|
||||
#
|
||||
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions
|
||||
@@ -27,7 +27,7 @@
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64
|
||||
# VALID_ARCHITECTURES = IA32 X64
|
||||
#
|
||||
|
||||
[Sources]
|
||||
|
@@ -3,14 +3,14 @@
|
||||
//
|
||||
// NULL LockBox library instance.
|
||||
//
|
||||
// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
// of the BSD License which accompanies this distribution. The
|
||||
// full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom
|
||||
LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom
|
||||
decompression algorithm with the converter for the different arch code.
|
||||
It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces
|
||||
and registers them into GUIDed handler table.
|
||||
|
||||
Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -22,16 +22,16 @@
|
||||
Examines a GUIDed section and returns the size of the decoded buffer and the
|
||||
size of an scratch buffer required to actually decode the data in a GUIDed section.
|
||||
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports,
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
If the required information can not be retrieved from InputSection,
|
||||
then RETURN_INVALID_PARAMETER is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports,
|
||||
then the size required to hold the decoded buffer is returned in OututBufferSize,
|
||||
the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
|
||||
from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
|
||||
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBufferSize is NULL, then ASSERT().
|
||||
If ScratchBufferSize is NULL, then ASSERT().
|
||||
@@ -100,16 +100,16 @@ LzmaArchGuidedSectionGetInfo (
|
||||
|
||||
/**
|
||||
Decompress a LZAM compressed GUIDed section into a caller allocated output buffer.
|
||||
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
|
||||
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
|
||||
If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports, then InputSection
|
||||
is decoded into the buffer specified by OutputBuffer and the authentication status of this
|
||||
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the
|
||||
data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise,
|
||||
the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
|
||||
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBuffer is NULL, then ASSERT().
|
||||
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
|
||||
@@ -117,10 +117,10 @@ LzmaArchGuidedSectionGetInfo (
|
||||
|
||||
|
||||
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[out] ScratchBuffer A caller allocated buffer that may be required by this function
|
||||
as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
A pointer to the authentication status of the decoded output buffer.
|
||||
See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
|
||||
section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must
|
||||
@@ -147,7 +147,7 @@ LzmaArchGuidedSectionExtraction (
|
||||
UINT32 X86State;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 ScratchBufferSize;
|
||||
|
||||
|
||||
ASSERT (OutputBuffer != NULL);
|
||||
ASSERT (InputSection != NULL);
|
||||
|
||||
@@ -178,7 +178,7 @@ LzmaArchGuidedSectionExtraction (
|
||||
);
|
||||
|
||||
//
|
||||
// After decompress, the data need to be converted to the raw data.
|
||||
// After decompress, the data need to be converted to the raw data.
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = LzmaUefiDecompressGetInfo (
|
||||
@@ -187,13 +187,13 @@ LzmaArchGuidedSectionExtraction (
|
||||
&OutputBufferSize,
|
||||
&ScratchBufferSize
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
x86_Convert_Init(X86State);
|
||||
x86_Convert(*OutputBuffer, OutputBufferSize, 0, &X86State, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces
|
||||
and registers them into GUIDed handler table.
|
||||
|
||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -20,16 +20,16 @@
|
||||
Examines a GUIDed section and returns the size of the decoded buffer and the
|
||||
size of an scratch buffer required to actually decode the data in a GUIDed section.
|
||||
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports,
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
If the required information can not be retrieved from InputSection,
|
||||
then RETURN_INVALID_PARAMETER is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports,
|
||||
then the size required to hold the decoded buffer is returned in OututBufferSize,
|
||||
the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
|
||||
from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
|
||||
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBufferSize is NULL, then ASSERT().
|
||||
If ScratchBufferSize is NULL, then ASSERT().
|
||||
@@ -98,16 +98,16 @@ LzmaGuidedSectionGetInfo (
|
||||
|
||||
/**
|
||||
Decompress a LZAM compressed GUIDed section into a caller allocated output buffer.
|
||||
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
|
||||
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
|
||||
If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports, then InputSection
|
||||
is decoded into the buffer specified by OutputBuffer and the authentication status of this
|
||||
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the
|
||||
data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise,
|
||||
the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
|
||||
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBuffer is NULL, then ASSERT().
|
||||
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
|
||||
@@ -115,10 +115,10 @@ LzmaGuidedSectionGetInfo (
|
||||
|
||||
|
||||
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[out] ScratchBuffer A caller allocated buffer that may be required by this function
|
||||
as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
A pointer to the authentication status of the decoded output buffer.
|
||||
See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
|
||||
section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must
|
||||
@@ -197,6 +197,6 @@ LzmaDecompressLibConstructor (
|
||||
&gLzmaCustomDecompressGuid,
|
||||
LzmaGuidedSectionGetInfo,
|
||||
LzmaGuidedSectionExtraction
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
LzmaCustomDecompressLib is based on the LZMA SDK 16.04.
|
||||
LZMA SDK 16.04 was placed in the public domain on
|
||||
2016-10-04. It was released on the
|
||||
http://www.7-zip.org/sdk.html website.
|
||||
http://www.7-zip.org/sdk.html website.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
LZMA Decompress interfaces
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -105,15 +105,15 @@ GetDecodedSizeOfBuf(
|
||||
//
|
||||
|
||||
/**
|
||||
Given a Lzma compressed source buffer, this function retrieves the size of
|
||||
the uncompressed buffer and the size of the scratch buffer required
|
||||
Given a Lzma compressed source buffer, this function retrieves the size of
|
||||
the uncompressed buffer and the size of the scratch buffer required
|
||||
to decompress the compressed source buffer.
|
||||
|
||||
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
|
||||
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
|
||||
required to decompress the buffer specified by Source and SourceSize.
|
||||
The size of the uncompressed buffer is returned in DestinationSize,
|
||||
The size of the uncompressed buffer is returned in DestinationSize,
|
||||
the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned.
|
||||
This function does not have scratch buffer available to perform a thorough
|
||||
This function does not have scratch buffer available to perform a thorough
|
||||
checking of the validity of the source data. It just retrieves the "Original Size"
|
||||
field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
|
||||
And ScratchSize is specific to the decompression implementation.
|
||||
@@ -126,11 +126,11 @@ GetDecodedSizeOfBuf(
|
||||
that will be generated when the compressed buffer specified
|
||||
by Source and SourceSize is decompressed.
|
||||
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
|
||||
is required to decompress the compressed buffer specified
|
||||
is required to decompress the compressed buffer specified
|
||||
by Source and SourceSize.
|
||||
|
||||
@retval RETURN_SUCCESS The size of the uncompressed data was returned
|
||||
in DestinationSize and the size of the scratch
|
||||
@retval RETURN_SUCCESS The size of the uncompressed data was returned
|
||||
in DestinationSize and the size of the scratch
|
||||
buffer was returned in ScratchSize.
|
||||
|
||||
**/
|
||||
@@ -158,8 +158,8 @@ LzmaUefiDecompressGetInfo (
|
||||
Decompresses a Lzma compressed source buffer.
|
||||
|
||||
Extracts decompressed data to its original form.
|
||||
If the compressed source data specified by Source is successfully decompressed
|
||||
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
|
||||
If the compressed source data specified by Source is successfully decompressed
|
||||
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
|
||||
specified by Source is not in a valid compressed data format,
|
||||
then RETURN_INVALID_PARAMETER is returned.
|
||||
|
||||
@@ -167,13 +167,13 @@ LzmaUefiDecompressGetInfo (
|
||||
@param SourceSize The size of source buffer.
|
||||
@param Destination The destination buffer to store the decompressed data
|
||||
@param Scratch A temporary scratch buffer that is used to perform the decompression.
|
||||
This is an optional parameter that may be NULL if the
|
||||
This is an optional parameter that may be NULL if the
|
||||
required scratch buffer size is 0.
|
||||
|
||||
@retval RETURN_SUCCESS Decompression completed successfully, and
|
||||
|
||||
@retval RETURN_SUCCESS Decompression completed successfully, and
|
||||
the uncompressed buffer is returned in Destination.
|
||||
@retval RETURN_INVALID_PARAMETER
|
||||
The source buffer specified by Source is corrupted
|
||||
@retval RETURN_INVALID_PARAMETER
|
||||
The source buffer specified by Source is corrupted
|
||||
(not in a valid compressed format).
|
||||
**/
|
||||
RETURN_STATUS
|
||||
@@ -195,7 +195,7 @@ LzmaUefiDecompress (
|
||||
AllocFuncs.Functions.Free = SzFree;
|
||||
AllocFuncs.Buffer = Scratch;
|
||||
AllocFuncs.BufferSize = SCRATCH_BUFFER_REQUEST_SIZE;
|
||||
|
||||
|
||||
DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source);
|
||||
EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
LZMA Decompress Library internal header file declares Lzma decompress interfaces.
|
||||
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -23,15 +23,15 @@
|
||||
#include <Guid/LzmaDecompress.h>
|
||||
|
||||
/**
|
||||
Given a Lzma compressed source buffer, this function retrieves the size of
|
||||
the uncompressed buffer and the size of the scratch buffer required
|
||||
Given a Lzma compressed source buffer, this function retrieves the size of
|
||||
the uncompressed buffer and the size of the scratch buffer required
|
||||
to decompress the compressed source buffer.
|
||||
|
||||
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
|
||||
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
|
||||
required to decompress the buffer specified by Source and SourceSize.
|
||||
The size of the uncompressed buffer is returned in DestinationSize,
|
||||
The size of the uncompressed buffer is returned in DestinationSize,
|
||||
the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned.
|
||||
This function does not have scratch buffer available to perform a thorough
|
||||
This function does not have scratch buffer available to perform a thorough
|
||||
checking of the validity of the source data. It just retrieves the "Original Size"
|
||||
field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
|
||||
And ScratchSize is specific to the decompression implementation.
|
||||
@@ -44,11 +44,11 @@
|
||||
that will be generated when the compressed buffer specified
|
||||
by Source and SourceSize is decompressed.
|
||||
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
|
||||
is required to decompress the compressed buffer specified
|
||||
is required to decompress the compressed buffer specified
|
||||
by Source and SourceSize.
|
||||
|
||||
@retval RETURN_SUCCESS The size of the uncompressed data was returned
|
||||
in DestinationSize and the size of the scratch
|
||||
@retval RETURN_SUCCESS The size of the uncompressed data was returned
|
||||
in DestinationSize and the size of the scratch
|
||||
buffer was returned in ScratchSize.
|
||||
|
||||
**/
|
||||
@@ -65,8 +65,8 @@ LzmaUefiDecompressGetInfo (
|
||||
Decompresses a Lzma compressed source buffer.
|
||||
|
||||
Extracts decompressed data to its original form.
|
||||
If the compressed source data specified by Source is successfully decompressed
|
||||
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
|
||||
If the compressed source data specified by Source is successfully decompressed
|
||||
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
|
||||
specified by Source is not in a valid compressed data format,
|
||||
then RETURN_INVALID_PARAMETER is returned.
|
||||
|
||||
@@ -74,13 +74,13 @@ LzmaUefiDecompressGetInfo (
|
||||
@param SourceSize The size of source buffer.
|
||||
@param Destination The destination buffer to store the decompressed data
|
||||
@param Scratch A temporary scratch buffer that is used to perform the decompression.
|
||||
This is an optional parameter that may be NULL if the
|
||||
This is an optional parameter that may be NULL if the
|
||||
required scratch buffer size is 0.
|
||||
|
||||
@retval RETURN_SUCCESS Decompression completed successfully, and
|
||||
|
||||
@retval RETURN_SUCCESS Decompression completed successfully, and
|
||||
the uncompressed buffer is returned in Destination.
|
||||
@retval RETURN_INVALID_PARAMETER
|
||||
The source buffer specified by Source is corrupted
|
||||
@retval RETURN_INVALID_PARAMETER
|
||||
The source buffer specified by Source is corrupted
|
||||
(not in a valid compressed format).
|
||||
**/
|
||||
RETURN_STATUS
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Null instance of OEM Hook Status Code Library with empty functions.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,20 +30,20 @@ OemHookStatusCodeInitialize (
|
||||
|
||||
/**
|
||||
Report status code to OEM device.
|
||||
|
||||
|
||||
@param CodeType Indicates the type of status code being reported.
|
||||
@param Value Describes the current status of a hardware or software entity.
|
||||
This included information about the class and subclass that is used to classify the entity
|
||||
as well as an operation. For progress codes, the operation is the current activity.
|
||||
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||
@param Instance The enumeration of a hardware or software entity within the system.
|
||||
A system may contain multiple entities that match a class/subclass pairing.
|
||||
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||
@param Value Describes the current status of a hardware or software entity.
|
||||
This included information about the class and subclass that is used to classify the entity
|
||||
as well as an operation. For progress codes, the operation is the current activity.
|
||||
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||
@param Instance The enumeration of a hardware or software entity within the system.
|
||||
A system may contain multiple entities that match a class/subclass pairing.
|
||||
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||
@param CallerId This optional parameter may be used to identify the caller.
|
||||
This parameter allows the status code driver to apply different rules to different callers.
|
||||
@param CallerId This optional parameter may be used to identify the caller.
|
||||
This parameter allows the status code driver to apply different rules to different callers.
|
||||
@param Data This optional parameter may be used to pass additional data
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Always return EFI_SUCCESS.
|
||||
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Null instance of OEM Hook Status Code Library with empty functions.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -20,7 +20,7 @@
|
||||
FILE_GUID = 54D2878F-25CD-4a2b-8420-EBD18E609C76
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = OemHookStatusCodeLib
|
||||
LIBRARY_CLASS = OemHookStatusCodeLib
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
@@ -32,4 +32,4 @@
|
||||
OemHookStatusCodeLibNull.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdePkg/MdePkg.dec
|
||||
|
@@ -1,16 +1,16 @@
|
||||
/** @file
|
||||
|
||||
This library registers CRC32 guided section handler
|
||||
This library registers CRC32 guided section handler
|
||||
to parse CRC32 encapsulation section and extract raw data.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct {
|
||||
/**
|
||||
|
||||
GetInfo gets raw data size and attribute of the input guided section.
|
||||
It first checks whether the input guid section is supported.
|
||||
It first checks whether the input guid section is supported.
|
||||
If not, EFI_INVALID_PARAMETER will return.
|
||||
|
||||
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||
@@ -45,7 +45,7 @@ typedef struct {
|
||||
@param ScratchBufferSize The size of ScratchBuffer.
|
||||
@param SectionAttribute The attribute of the input guided section.
|
||||
|
||||
@retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and
|
||||
@retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and
|
||||
the attribute of the input section are successfully retrieved.
|
||||
@retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid.
|
||||
|
||||
@@ -98,7 +98,7 @@ Crc32GuidedSectionGetInfo (
|
||||
|
||||
Extraction handler tries to extract raw data from the input guided section.
|
||||
It also does authentication check for 32bit CRC value in the input guided section.
|
||||
It first checks whether the input guid section is supported.
|
||||
It first checks whether the input guid section is supported.
|
||||
If not, EFI_INVALID_PARAMETER will return.
|
||||
|
||||
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||
@@ -133,7 +133,7 @@ Crc32GuidedSectionHandler (
|
||||
&(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get section Crc32 checksum.
|
||||
//
|
||||
@@ -155,7 +155,7 @@ Crc32GuidedSectionHandler (
|
||||
&(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get section Crc32 checksum.
|
||||
//
|
||||
|
@@ -1,11 +1,11 @@
|
||||
## @file
|
||||
# Pei Crc32 Guided Section Extract library.
|
||||
#
|
||||
# This library doesn't produce any library class. The constructor function uses
|
||||
# This library doesn't produce any library class. The constructor function uses
|
||||
# ExtractGuidedSectionLib service to register CRC32 guided section handler
|
||||
# that parses CRC32 encapsulation section and extracts raw data.
|
||||
#
|
||||
# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
The constructor reads variable and sets HOB
|
||||
|
||||
|
||||
@param FileHandle The handle of FFS header the loaded driver.
|
||||
@param PeiServices The pointer to the PEI services.
|
||||
|
||||
@@ -44,7 +44,7 @@ PeiDebugPrintHobLibConstructor (
|
||||
UINTN Size;
|
||||
UINT64 GlobalErrorLevel;
|
||||
UINT32 HobErrorLevel;
|
||||
|
||||
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEfiPeiReadOnlyVariable2PpiGuid,
|
||||
0,
|
||||
@@ -53,8 +53,8 @@ PeiDebugPrintHobLibConstructor (
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Size = sizeof (GlobalErrorLevel);
|
||||
Status = Variable->GetVariable (
|
||||
Variable,
|
||||
Status = Variable->GetVariable (
|
||||
Variable,
|
||||
DEBUG_MASK_VARIABLE_NAME,
|
||||
&gEfiGenericVariableGuid,
|
||||
NULL,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# HOB that contains the debug mask.
|
||||
#
|
||||
# Copyright (c) 2011, Apple, Inc. All rights reserved.<BR>
|
||||
# Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -47,4 +47,4 @@
|
||||
gEfiGenericVariableGuid
|
||||
|
||||
[Depex]
|
||||
gEfiPeiReadOnlyVariable2PpiGuid
|
||||
gEfiPeiReadOnlyVariable2PpiGuid
|
||||
|
@@ -30,8 +30,8 @@
|
||||
/**
|
||||
Prints a debug message to the debug output device if the specified error level is enabled.
|
||||
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
associated variable argument list to the debug output device.
|
||||
|
||||
If Format is NULL, then ASSERT().
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
@param ErrorLevel The error level of the debug message.
|
||||
@param Format Format string for the debug message to print.
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
based on the format string specified by Format.
|
||||
|
||||
**/
|
||||
@@ -75,7 +75,7 @@ DebugPrint (
|
||||
|
||||
//
|
||||
// Compute the total size of the record.
|
||||
// Note that the passing-in format string and variable parameters will be constructed to
|
||||
// Note that the passing-in format string and variable parameters will be constructed to
|
||||
// the following layout:
|
||||
//
|
||||
// Buffer->|------------------------|
|
||||
@@ -173,7 +173,7 @@ DebugPrint (
|
||||
if (*Format == '\0') {
|
||||
//
|
||||
// Make no output if Format string terminates unexpectedly when
|
||||
// looking up for flag, width, precision and type.
|
||||
// looking up for flag, width, precision and type.
|
||||
//
|
||||
Format--;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ DebugPrint (
|
||||
//
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Pack variable arguments into the storage area following EFI_DEBUG_INFO.
|
||||
//
|
||||
@@ -206,7 +206,7 @@ DebugPrint (
|
||||
|
||||
//
|
||||
// If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then ASSERT()
|
||||
// This indicates that the DEBUG() macro is passing in more argument than can be handled by
|
||||
// This indicates that the DEBUG() macro is passing in more argument than can be handled by
|
||||
// the EFI_DEBUG_INFO record
|
||||
//
|
||||
ASSERT ((CHAR8 *)BaseListMarker <= FormatString);
|
||||
@@ -236,14 +236,14 @@ DebugPrint (
|
||||
}
|
||||
|
||||
/**
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
This may be followed by a breakpoint or a dead loop.
|
||||
|
||||
Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
returns immediately after the message is printed to the debug output device.
|
||||
DebugAssert() must actively prevent recursion. If DebugAssert() is called while
|
||||
processing another DebugAssert(), then DebugAssert() must return immediately.
|
||||
@@ -367,14 +367,14 @@ DebugAssert (
|
||||
/**
|
||||
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
PcdDebugClearMemoryValue, and returns Buffer.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
|
||||
@param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
@param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
|
||||
@return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue.
|
||||
|
||||
@@ -395,7 +395,7 @@ DebugClearMemory (
|
||||
/**
|
||||
Returns TRUE if ASSERT() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -412,10 +412,10 @@ DebugAssertEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -432,10 +432,10 @@ DebugPrintEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CODE() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -452,10 +452,10 @@ DebugCodeEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Debug Library based on report status code library
|
||||
#
|
||||
# Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -36,7 +36,7 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
PcdLib
|
||||
ReportStatusCodeLib
|
||||
|
@@ -4,7 +4,7 @@
|
||||
This file implements all APIs in Performance Library class in MdePkg. It creates
|
||||
performance logging GUIDed HOB on the first performance logging and then logs the
|
||||
performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum
|
||||
number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries or
|
||||
number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries or
|
||||
PcdMaxPeiPerformanceLogEntries16.
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
@@ -1,20 +1,20 @@
|
||||
## @file
|
||||
## @file
|
||||
# Performance library instance used in PEI phase.
|
||||
#
|
||||
#
|
||||
# This library provides the performance measurement interfaces in PEI phase, it creates
|
||||
# and consumes GUIDed HOB for performance logging. The GUIDed HOB is passed to DXE phase
|
||||
# so that it can be taken over by DxeCorePerformanceLib.
|
||||
#
|
||||
# so that it can be taken over by DxeCorePerformanceLib.
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// and consumes GUIDed HOB for performance logging. The GUIDed HOB is passed to DXE phase
|
||||
// so that it can be taken over by DxeCorePerformanceLib.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -3,9 +3,9 @@
|
||||
|
||||
This library instance is no longer used and module using this library
|
||||
class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
|
||||
in PI 1.2 specification.
|
||||
in PI 1.2 specification.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
Calling this function causes the system do recovery boot path.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED Recovery is not supported.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -1,18 +1,18 @@
|
||||
## @file
|
||||
## @file
|
||||
# Null Recovery library instance for PEIM module
|
||||
# This library instance is no longer used and module using this library
|
||||
# class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
|
||||
# in PI 1.2 specification.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# in PI 1.2 specification.
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user