mirror of https://github.com/acidanthera/audk.git
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2313 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
582510249f
commit
1cc8ee7861
|
@ -12,6 +12,7 @@
|
|||
|
||||
**/
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
Print (
|
||||
IN CONST CHAR16 *Format,
|
||||
|
@ -27,6 +28,13 @@ Print (
|
|||
return;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UefiMain (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UefiMain (
|
||||
|
|
|
@ -45,7 +45,7 @@ static IDE_BASE_REGISTERS gAtapiIoPortRegisters[2] = {
|
|||
{ 0x170, { 0x171 }, 0x172, 0x173, 0x174, 0x175, 0x176, { 0x177 }, { 0x376 }, 0x377, 0 }
|
||||
};
|
||||
|
||||
static SCSI_COMMAND_SET gEndTable = { 0xff, 0xff };
|
||||
static SCSI_COMMAND_SET gEndTable = { 0xff, (DATA_DIRECTION) 0xff };
|
||||
|
||||
///
|
||||
/// This table contains all the supported ATAPI commands.
|
||||
|
@ -83,7 +83,7 @@ static SCSI_COMMAND_SET gSupportedATAPICommands[] = {
|
|||
{ OP_WRITE_10, DataOut },
|
||||
{ OP_WRITE_12, DataOut },
|
||||
{ OP_WRITE_AND_VERIFY, DataOut },
|
||||
{ 0xff, 0xff }
|
||||
{ 0xff, (DATA_DIRECTION) 0xff }
|
||||
};
|
||||
|
||||
static CHAR16 *gControllerNameString = (CHAR16 *) L"ATAPI Controller";
|
||||
|
@ -595,14 +595,8 @@ AtapiScsiPassThruBuildDevicePath (
|
|||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
)
|
||||
{
|
||||
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
|
||||
EFI_DEV_PATH *Node;
|
||||
|
||||
//
|
||||
// Retrieve Device Private Data Structure.
|
||||
//
|
||||
AtapiScsiPrivate = ATAPI_SCSI_PASS_THRU_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// Validate parameters passed in.
|
||||
//
|
||||
|
@ -995,7 +989,7 @@ SubmitBlockingIoCommand (
|
|||
PacketCommand,
|
||||
Packet->DataBuffer,
|
||||
&(Packet->TransferLength),
|
||||
Packet->DataDirection,
|
||||
(DATA_DIRECTION) Packet->DataDirection,
|
||||
TimeoutInMicroSeconds
|
||||
);
|
||||
if (!EFI_ERROR (PacketCommandStatus) || (Packet->SenseData == NULL)) {
|
||||
|
@ -1319,11 +1313,9 @@ AtapiPassThruPioReadWriteData (
|
|||
//
|
||||
// get current data transfer size from Cylinder Registers.
|
||||
//
|
||||
WordCount =
|
||||
(
|
||||
(ReadPortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->CylinderMsb) << 8) |
|
||||
ReadPortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->CylinderLsb)
|
||||
) & 0xffff;
|
||||
WordCount = ReadPortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->CylinderMsb) << 8;
|
||||
WordCount = WordCount | ReadPortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->CylinderLsb);
|
||||
WordCount = WordCount & 0xffff;
|
||||
WordCount /= 2;
|
||||
|
||||
//
|
||||
|
|
|
@ -176,6 +176,7 @@ inw (
|
|||
@retval EFI_SUCCESS TODO: Add description for return value
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CirrusLogic5430UgaDrawGetMode (
|
||||
|
@ -223,6 +224,7 @@ CirrusLogic5430UgaDrawGetMode (
|
|||
@retval EFI_NOT_FOUND TODO: Add description for return value
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CirrusLogic5430UgaDrawSetMode (
|
||||
|
@ -301,6 +303,7 @@ CirrusLogic5430UgaDrawSetMode (
|
|||
@retval EFI_SUCCESS TODO: Add description for return value
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CirrusLogic5430UgaDrawBlt (
|
||||
|
|
|
@ -142,7 +142,6 @@ CirrusLogic5430ComponentNameGetControllerName (
|
|||
{
|
||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_STATUS Status;
|
||||
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private;
|
||||
EFI_PCI_IO_PROTOCOL *PciIoProtocol;
|
||||
|
||||
//
|
||||
|
@ -196,8 +195,6 @@ CirrusLogic5430ComponentNameGetControllerName (
|
|||
//
|
||||
// Get the Cirrus Logic 5430's Device structure
|
||||
//
|
||||
Private = CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (UgaDraw);
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gCirrusLogic5430ComponentName.SupportedLanguages,
|
||||
|
|
|
@ -1281,9 +1281,9 @@ EhciGetRootHubPortStatus (
|
|||
// Not Low Speed Device Attached
|
||||
//
|
||||
if ((PORTSC_CCS & PortStatusControlReg) && (PORTSC_CSC & PortStatusControlReg)) {
|
||||
HcDev->DeviceSpeed[PortNumber] = IsHighSpeedDevice (This, PortNumber) ? USB_PORT_STAT_HIGH_SPEED : 0;
|
||||
HcDev->DeviceSpeed[PortNumber] = (UINT16) (IsHighSpeedDevice (This, PortNumber) ? USB_PORT_STAT_HIGH_SPEED : 0);
|
||||
}
|
||||
PortStatus->PortStatus |= HcDev->DeviceSpeed[PortNumber];
|
||||
PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | HcDev->DeviceSpeed[PortNumber]);
|
||||
}
|
||||
//
|
||||
// Fill Port Status Change bits
|
||||
|
|
|
@ -380,7 +380,7 @@ Returns:
|
|||
// reset associated bits in bit arry
|
||||
//
|
||||
for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / 32); Count++) {
|
||||
TempHeaderPtr->BitArrayPtr[Index] ^= (UINT8) (bit (Index2));
|
||||
TempHeaderPtr->BitArrayPtr[Index] = (UINT8) (TempHeaderPtr->BitArrayPtr[Index] ^ (bit (Index2)));
|
||||
Index2++;
|
||||
if (Index2 == 8) {
|
||||
Index += 1;
|
||||
|
@ -595,7 +595,7 @@ Returns:
|
|||
//
|
||||
for (TempBytePos = FoundBytePos, Index = FoundBitPos, Count = 0; Count < NumberOfMemoryUnit; Count++) {
|
||||
|
||||
MemoryHeader->BitArrayPtr[TempBytePos] |= bit (Index);
|
||||
MemoryHeader->BitArrayPtr[TempBytePos] = (UINT8) (MemoryHeader->BitArrayPtr[TempBytePos] | (bit (Index)));
|
||||
Index++;
|
||||
if (Index == 8) {
|
||||
TempBytePos += 1;
|
||||
|
|
|
@ -1136,7 +1136,7 @@ Returns:
|
|||
&PortStatusControlReg
|
||||
);
|
||||
|
||||
return ((PortStatusControlReg & PORTSC_PED) ? TRUE : FALSE);
|
||||
return ((BOOLEAN) ((PortStatusControlReg & PORTSC_PED) ? TRUE : FALSE));
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
@ -1347,7 +1347,7 @@ Returns:
|
|||
//
|
||||
gBS->Stall (EHCI_CLEAR_PORT_RESET_RECOVERY_TIME);
|
||||
|
||||
return (IsEhcPortEnabled (HcDev, PortNum) ? TRUE : FALSE);
|
||||
return ((BOOLEAN) (IsEhcPortEnabled (HcDev, PortNum) ? TRUE : FALSE));
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
|
|
@ -2547,7 +2547,7 @@ Returns:
|
|||
|
||||
MatchPtr = NULL;
|
||||
QhHwPtr = NULL;
|
||||
EndPointNum = EndPointAddress & 0x0f;
|
||||
EndPointNum = (UINT8) (EndPointAddress & 0x0f);
|
||||
AsyncRequestPtr = HcDev->AsyncRequestList;
|
||||
|
||||
//
|
||||
|
@ -2916,13 +2916,11 @@ Returns:
|
|||
EFI_STATUS Status;
|
||||
UINTN ErrQtdPos;
|
||||
UINTN Delay;
|
||||
UINTN RequireLen;
|
||||
BOOLEAN Finished;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
ErrQtdPos = 0;
|
||||
*TransferResult = EFI_USB_NOERROR;
|
||||
RequireLen = *ActualLen;
|
||||
*ActualLen = 0;
|
||||
Finished = FALSE;
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ EFI_DRIVER_CONFIGURATION_PROTOCOL gIDEBusDriverConfiguration = {
|
|||
@retval EFI_NOT_FOUND TODO: Add description for return value
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetResponse (
|
||||
VOID
|
||||
|
@ -190,7 +191,7 @@ IDEBusDriverConfigurationSetOptions (
|
|||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
NewValue |= (UINT8) (1 << Index);
|
||||
NewValue = (UINT8) (NewValue | (1 << Index));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2073,7 +2073,7 @@ AtaCommandIssue (
|
|||
Lba1 = (UINT8) RShiftU64 (LbaAddress, 8);
|
||||
Lba2 = (UINT8) RShiftU64 (LbaAddress, 16);
|
||||
Lba3 = (UINT8) RShiftU64 (LbaAddress, 24);
|
||||
Device |= Lba3;
|
||||
Device = (UINT8) (Device | Lba3);
|
||||
|
||||
//
|
||||
// Pass parameter into device register block
|
||||
|
|
|
@ -713,11 +713,6 @@ PioReadWriteData (
|
|||
EFI_STATUS Status;
|
||||
UINT16 *PtrBuffer;
|
||||
|
||||
//
|
||||
// containing status byte read from Status Register.
|
||||
//
|
||||
UINT8 StatusRegister;
|
||||
|
||||
//
|
||||
// No data transfer is premitted.
|
||||
//
|
||||
|
@ -750,16 +745,14 @@ PioReadWriteData (
|
|||
//
|
||||
// read Status Register will clear interrupt
|
||||
//
|
||||
StatusRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
|
||||
IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
|
||||
|
||||
//
|
||||
// get current data transfer size from Cylinder Registers.
|
||||
//
|
||||
WordCount =
|
||||
(
|
||||
(IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8) |
|
||||
IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb)
|
||||
) & 0xffff;
|
||||
WordCount = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8;
|
||||
WordCount = WordCount | IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb);
|
||||
WordCount = WordCount & 0xffff;
|
||||
WordCount /= 2;
|
||||
|
||||
WordCount = EFI_MIN (WordCount, (RequiredWordCount - ActualWordCount));
|
||||
|
|
|
@ -236,6 +236,7 @@ IDEWritePortWMultiple (
|
|||
TODO: add return values
|
||||
|
||||
**/
|
||||
STATIC
|
||||
BOOLEAN
|
||||
BadIdeDeviceCheck (
|
||||
IN IDE_BLK_IO_DEV *IdeDev
|
||||
|
|
|
@ -189,7 +189,6 @@ IDEBusDriverBindingStart (
|
|||
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit;
|
||||
BOOLEAN EnumAll;
|
||||
BOOLEAN ChannelEnabled;
|
||||
UINT8 ChannelCount;
|
||||
UINT8 MaxDevices;
|
||||
EFI_IDENTIFY_DATA IdentifyData;
|
||||
EFI_ATA_COLLECTIVE_MODE *SupportedModes;
|
||||
|
@ -239,10 +238,9 @@ IDEBusDriverBindingStart (
|
|||
}
|
||||
|
||||
//
|
||||
// Save Enumall and ChannelCount. Step7.2
|
||||
// Save Enumall. Step7.2
|
||||
//
|
||||
EnumAll = IdeInit->EnumAll;
|
||||
ChannelCount = IdeInit->ChannelCount;
|
||||
|
||||
//
|
||||
// Consume PCI I/O protocol. Note that the OpenProtocol with _GET_PROTOCOL
|
||||
|
@ -453,8 +451,8 @@ IDEBusDriverBindingStart (
|
|||
ZeroMem (IdeBlkIoDevicePtr, sizeof (IDE_BLK_IO_DEV));
|
||||
|
||||
IdeBlkIoDevicePtr->Signature = IDE_BLK_IO_DEV_SIGNATURE;
|
||||
IdeBlkIoDevicePtr->Channel = IdeChannel;
|
||||
IdeBlkIoDevicePtr->Device = IdeDevice;
|
||||
IdeBlkIoDevicePtr->Channel = (EFI_IDE_CHANNEL) IdeChannel;
|
||||
IdeBlkIoDevicePtr->Device = (EFI_IDE_DEVICE) IdeDevice;
|
||||
|
||||
//
|
||||
// initialize Block IO interface's Media pointer
|
||||
|
@ -666,7 +664,7 @@ IDEBusDriverBindingStart (
|
|||
//
|
||||
// Record PIO mode used in private data
|
||||
//
|
||||
IdeBlkIoDevicePtr->PioMode = SupportedModes->PioMode.Mode;
|
||||
IdeBlkIoDevicePtr->PioMode = (ATA_PIO_MODE) SupportedModes->PioMode.Mode;
|
||||
|
||||
//
|
||||
// Set IDE controller Timing Blocks in the PCI Configuration Space
|
||||
|
|
|
@ -71,9 +71,9 @@ Returns:
|
|||
}
|
||||
|
||||
if (Operation == EFI_ENABLE_REGISTER) {
|
||||
OldCommand |= Command;
|
||||
OldCommand = (UINT16) (OldCommand | Command);
|
||||
} else if (Operation == EFI_DISABLE_REGISTER) {
|
||||
OldCommand &= ~(Command);
|
||||
OldCommand = (UINT16) (OldCommand & ~(Command));
|
||||
} else {
|
||||
OldCommand = Command;
|
||||
}
|
||||
|
|
|
@ -969,6 +969,7 @@ Returns:
|
|||
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ProcessOptionRomLight (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
|
@ -1432,7 +1433,6 @@ Returns:
|
|||
// TODO: BarIndex - add argument and description to function comment
|
||||
{
|
||||
UINT32 Value;
|
||||
UINT64 BarValue64;
|
||||
UINT32 OriginalValue;
|
||||
UINT32 Mask;
|
||||
UINT32 Data;
|
||||
|
@ -1441,7 +1441,6 @@ Returns:
|
|||
|
||||
OriginalValue = 0;
|
||||
Value = 0;
|
||||
BarValue64 = 0;
|
||||
|
||||
Status = BarExisted (
|
||||
PciIoDevice,
|
||||
|
@ -1491,7 +1490,7 @@ Returns:
|
|||
// Need to treat it as no-bar
|
||||
//
|
||||
if (PciIoDevice->PciBar[BarIndex].Length == 0) {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = 0;
|
||||
PciIoDevice->PciBar[BarIndex].BarType = (PCI_BAR_TYPE) 0;
|
||||
}
|
||||
|
||||
PciIoDevice->PciBar[BarIndex].Prefetchable = FALSE;
|
||||
|
|
|
@ -184,7 +184,7 @@ Returns:
|
|||
Count = 1;
|
||||
}
|
||||
|
||||
Width &= 0x03;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||
|
||||
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
@ -233,7 +233,7 @@ Returns:
|
|||
//
|
||||
// If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX
|
||||
//
|
||||
Width &= 0x03;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||
|
||||
if (PciIoDevice->IsPciExp) {
|
||||
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {
|
||||
|
@ -876,7 +876,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
|
||||
Operation = Operation + EfiPciOperationBusMasterRead64;
|
||||
Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);
|
||||
}
|
||||
|
||||
Status = PciIoDevice->PciRootBridgeIo->Map (
|
||||
|
@ -1966,10 +1966,15 @@ Returns:
|
|||
// TODO: PciDevice1 - add argument and description to function comment
|
||||
// TODO: PciDevice2 - add argument and description to function comment
|
||||
{
|
||||
BOOLEAN Existed1;
|
||||
BOOLEAN Existed2;
|
||||
|
||||
if (PciDevice1->Parent == PciDevice2->Parent) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return (PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1));
|
||||
Existed1 = PciDeviceExisted (PciDevice1->Parent, PciDevice2);
|
||||
Existed2 = PciDeviceExisted (PciDevice2->Parent, PciDevice1);
|
||||
|
||||
return (BOOLEAN) (Existed1 || Existed2);
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ Returns:
|
|||
EFI_NATIVE_INTERFACE,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1446,7 +1447,7 @@ Returns:
|
|||
SecondBus = 0;
|
||||
Register = 0;
|
||||
State = 0;
|
||||
Attributes = 0;
|
||||
Attributes = (EFI_HPC_PADDING_ATTRIBUTES) 0;
|
||||
BusRange = 0;
|
||||
|
||||
ResetAllPpbBusReg (Bridge, StartBusNumber);
|
||||
|
|
|
@ -151,7 +151,6 @@ Returns:
|
|||
UINT16 OffsetPcir;
|
||||
UINT32 RomBarOffset;
|
||||
UINT32 RomBar;
|
||||
UINT64 Temp;
|
||||
EFI_STATUS retStatus;
|
||||
BOOLEAN FirstCheck;
|
||||
UINT8 *Image;
|
||||
|
@ -167,7 +166,6 @@ Returns:
|
|||
Indicator = 0;
|
||||
RomImageSize = 0;
|
||||
RomInMemory = NULL;
|
||||
Temp = 0;
|
||||
CodeType = 0xFF;
|
||||
|
||||
//
|
||||
|
|
|
@ -647,10 +647,8 @@ Returns:
|
|||
// TODO: ResType - add argument and description to function comment
|
||||
// TODO: ResUsage - add argument and description to function comment
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
PCI_RESOURCE_NODE *Node;
|
||||
|
||||
Status = 0;
|
||||
Node = NULL;
|
||||
|
||||
Node = AllocatePool (sizeof (PCI_RESOURCE_NODE));
|
||||
|
@ -704,7 +702,6 @@ Returns:
|
|||
// TODO: EFI_SUCCESS - add return value to function comment
|
||||
{
|
||||
PCI_IO_DEVICE *Temp;
|
||||
EFI_STATUS Status;
|
||||
PCI_RESOURCE_NODE *IoBridge;
|
||||
PCI_RESOURCE_NODE *Mem32Bridge;
|
||||
PCI_RESOURCE_NODE *PMem32Bridge;
|
||||
|
@ -789,14 +786,14 @@ Returns:
|
|||
//
|
||||
// Recursively create resouce map on this bridge
|
||||
//
|
||||
Status = CreateResourceMap (
|
||||
Temp,
|
||||
IoBridge,
|
||||
Mem32Bridge,
|
||||
PMem32Bridge,
|
||||
Mem64Bridge,
|
||||
PMem64Bridge
|
||||
);
|
||||
CreateResourceMap (
|
||||
Temp,
|
||||
IoBridge,
|
||||
Mem32Bridge,
|
||||
PMem32Bridge,
|
||||
Mem64Bridge,
|
||||
PMem64Bridge
|
||||
);
|
||||
|
||||
if (ResourceRequestExisted (IoBridge)) {
|
||||
InsertResourceNode (
|
||||
|
@ -895,14 +892,14 @@ Returns:
|
|||
//
|
||||
// To do some platform specific resource padding ...
|
||||
//
|
||||
Status = ResourcePaddingPolicy (
|
||||
Bridge,
|
||||
IoNode,
|
||||
Mem32Node,
|
||||
PMem32Node,
|
||||
Mem64Node,
|
||||
PMem64Node
|
||||
);
|
||||
ResourcePaddingPolicy (
|
||||
Bridge,
|
||||
IoNode,
|
||||
Mem32Node,
|
||||
PMem32Node,
|
||||
Mem64Node,
|
||||
PMem64Node
|
||||
);
|
||||
|
||||
//
|
||||
// Degrade resource if necessary
|
||||
|
|
|
@ -101,6 +101,7 @@ Returns:
|
|||
mNumberOfPciRomImages++;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
HexToString (
|
||||
CHAR16 *String,
|
||||
|
@ -134,6 +135,8 @@ Returns:
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
PciRomLoadEfiDriversFromRomImage (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
|
@ -307,6 +310,7 @@ Returns:
|
|||
return retStatus;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
PciRomLoadEfiDriversFromOptionRomTable (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
|
|
|
@ -21,6 +21,7 @@ Revision History
|
|||
|
||||
#include "uhci.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
USBReadPortW (
|
||||
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
||||
|
@ -58,6 +59,7 @@ Returns:
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
USBReadPortDW (
|
||||
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
||||
|
@ -95,6 +97,7 @@ Returns:
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
USBWritePortW (
|
||||
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
||||
|
@ -132,6 +135,7 @@ Returns:
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
USBWritePortDW (
|
||||
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
||||
|
@ -654,13 +658,12 @@ Returns:
|
|||
--*/
|
||||
{
|
||||
UINT16 CommandContent;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = ReadUHCCommandReg (
|
||||
HcDev->PciIo,
|
||||
(UINT32) (USBCMD),
|
||||
&CommandContent
|
||||
);
|
||||
ReadUHCCommandReg (
|
||||
HcDev->PciIo,
|
||||
(UINT32) (USBCMD),
|
||||
&CommandContent
|
||||
);
|
||||
|
||||
if ((CommandContent & USBCMD_MAXP) != USBCMD_MAXP) {
|
||||
CommandContent |= USBCMD_MAXP;
|
||||
|
@ -835,6 +838,7 @@ Returns:
|
|||
//
|
||||
// functions for QH
|
||||
//
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
AllocateQHStruct (
|
||||
IN USB_HC_DEV *HcDev,
|
||||
|
@ -1196,6 +1200,7 @@ Returns:
|
|||
return (BOOLEAN) (!(PtrQH->QH.QHVerticalTerminate));
|
||||
}
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
GetQHHorizontalValidorInvalid (
|
||||
IN QH_STRUCT *PtrQH
|
||||
|
@ -1769,6 +1774,7 @@ Returns:
|
|||
return (VOID *) ((UINTN) (ptrTDStruct->TDData.TDLinkPtr << 4));
|
||||
}
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
IsTDLinkPtrQHOrTD (
|
||||
IN TD_STRUCT *ptrTDStruct
|
||||
|
@ -2325,6 +2331,7 @@ SetCurFrameListQHorTD (
|
|||
pCurEntry->FrameListPtrQSelect = (IsQH ? 1 : 0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
IsCurFrameListQHorTD (
|
||||
IN FRAMELIST_ENTRY *pCurEntry
|
||||
|
@ -3854,7 +3861,7 @@ Returns:
|
|||
//
|
||||
for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / 32); Count++) {
|
||||
|
||||
TempHeaderPtr->BitArrayPtr[Index] ^= (UINT8) (bit (Index2));
|
||||
TempHeaderPtr->BitArrayPtr[Index] = (UINT8) (TempHeaderPtr->BitArrayPtr[Index] ^ bit (Index2));
|
||||
Index2++;
|
||||
if (Index2 == 8) {
|
||||
Index += 1;
|
||||
|
@ -4067,7 +4074,7 @@ Returns:
|
|||
for (TempBytePos = FoundBytePos, Index = FoundBitPos,Count = 0;
|
||||
Count < NumberOfMemoryUnit; Count ++) {
|
||||
|
||||
MemoryHeader->BitArrayPtr[TempBytePos] |= bit (Index);
|
||||
MemoryHeader->BitArrayPtr[TempBytePos] = (UINT8) (MemoryHeader->BitArrayPtr[TempBytePos] | bit (Index));
|
||||
Index++;
|
||||
if (Index == 8) {
|
||||
TempBytePos += 1;
|
||||
|
|
|
@ -759,7 +759,7 @@ UHCIDriverBindingStart (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
UnInstallUHCInterface (
|
||||
IN EFI_HANDLE Controller,
|
||||
|
@ -3845,7 +3845,7 @@ UHCI2ControlTransfer (
|
|||
--*/
|
||||
{
|
||||
USB_HC_DEV *HcDev;
|
||||
BOOLEAN IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
|
||||
BOOLEAN IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
|
||||
|
||||
HcDev = USB2_HC_DEV_FROM_THIS (This);
|
||||
|
||||
|
@ -4056,7 +4056,7 @@ UHCI2AsyncInterruptTransfer (
|
|||
--*/
|
||||
{
|
||||
USB_HC_DEV *HcDev;
|
||||
BOOLEAN IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
|
||||
BOOLEAN IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
|
||||
|
||||
HcDev = USB2_HC_DEV_FROM_THIS (This);
|
||||
return UHCIAsyncInterruptTransfer(
|
||||
|
@ -4155,7 +4155,7 @@ UHCI2SyncInterruptTransfer (
|
|||
if(DeviceSpeed==EFI_USB_SPEED_HIGH)
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
||||
IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
|
||||
IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
|
||||
HcDev = USB2_HC_DEV_FROM_THIS (This);
|
||||
|
||||
return UHCISyncInterruptTransfer(
|
||||
|
@ -4437,11 +4437,9 @@ MonitorInterruptTrans (
|
|||
UINTN DataLen;
|
||||
UINTN ActualLen;
|
||||
UINTN ErrTDPos;
|
||||
UINT32 StatusAddr;
|
||||
LIST_ENTRY *NextLink;
|
||||
|
||||
HcDev = (USB_HC_DEV *) Context;
|
||||
StatusAddr = (UINT32) (USBSTS);
|
||||
|
||||
//
|
||||
// interrupt transfer list is empty, means that no interrupt transfer
|
||||
|
|
|
@ -362,6 +362,7 @@ ScsiGetDeviceType (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ScsiGetDeviceLocation (
|
||||
|
|
|
@ -1614,11 +1614,9 @@ Returns:
|
|||
UINT8 MaxRetry;
|
||||
BOOLEAN NeedRetry;
|
||||
EFI_SCSI_SENSE_DATA *SenseData;
|
||||
UINT8 SenseDataLength;
|
||||
UINTN NumberOfSenseKeys;
|
||||
|
||||
SenseData = NULL;
|
||||
SenseDataLength = 0;
|
||||
NumberOfSenseKeys = 0;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
@ -1728,11 +1726,9 @@ Returns:
|
|||
UINT8 MaxRetry;
|
||||
BOOLEAN NeedRetry;
|
||||
EFI_SCSI_SENSE_DATA *SenseData;
|
||||
UINT8 SenseDataLength;
|
||||
UINTN NumberOfSenseKeys;
|
||||
|
||||
SenseData = NULL;
|
||||
SenseDataLength = 0;
|
||||
NumberOfSenseKeys = 0;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
|
|
@ -457,7 +457,6 @@ Cbi0DriverBindingStop (
|
|||
EFI_STATUS Status;
|
||||
EFI_USB_ATAPI_PROTOCOL *Cbi0AtapiProtocol;
|
||||
USB_CBI_DEVICE *UsbCbiDev;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
//
|
||||
// Get our context back.
|
||||
|
@ -476,8 +475,6 @@ Cbi0DriverBindingStop (
|
|||
|
||||
UsbCbiDev = USB_CBI_DEVICE_FROM_THIS (Cbi0AtapiProtocol);
|
||||
|
||||
UsbIo = UsbCbiDev->UsbIo;
|
||||
|
||||
Cbi0ReportStatusCode (
|
||||
UsbCbiDev->DevicePath,
|
||||
EFI_PROGRESS_CODE,
|
||||
|
@ -850,11 +847,9 @@ Cbi0MassStorageReset (
|
|||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
USB_CBI_DEVICE *UsbCbiDev;
|
||||
|
||||
UsbCbiDev = USB_CBI_DEVICE_FROM_THIS (This);
|
||||
UsbIo = UsbCbiDev->UsbIo;
|
||||
|
||||
if (ExtendedVerification) {
|
||||
//
|
||||
|
|
|
@ -400,7 +400,6 @@ CBI1DriverBindingStop (
|
|||
EFI_STATUS Status;
|
||||
EFI_USB_ATAPI_PROTOCOL *CBI1AtapiProtocol;
|
||||
USB_CBI_DEVICE *UsbCbiDev;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
//
|
||||
// Get our context back.
|
||||
|
@ -419,8 +418,6 @@ CBI1DriverBindingStop (
|
|||
|
||||
UsbCbiDev = USB_CBI_DEVICE_FROM_THIS (CBI1AtapiProtocol);
|
||||
|
||||
UsbIo = UsbCbiDev->UsbIo;
|
||||
|
||||
Cbi1ReportStatusCode (
|
||||
UsbCbiDev->DevicePath,
|
||||
EFI_PROGRESS_CODE,
|
||||
|
@ -644,7 +641,6 @@ CBI1MassStorageReset (
|
|||
--*/
|
||||
{
|
||||
UINT8 ResetCommand[12];
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
USB_CBI_DEVICE *UsbCbiDev;
|
||||
UINT8 EndpointAddr;
|
||||
|
@ -669,12 +665,12 @@ CBI1MassStorageReset (
|
|||
ResetCommand[0] = 0x1d;
|
||||
ResetCommand[1] = 0x04;
|
||||
|
||||
Status = CBI1CommandPhase (
|
||||
UsbCbiDev,
|
||||
ResetCommand,
|
||||
12,
|
||||
&Result
|
||||
);
|
||||
CBI1CommandPhase (
|
||||
UsbCbiDev,
|
||||
ResetCommand,
|
||||
12,
|
||||
&Result
|
||||
);
|
||||
|
||||
//
|
||||
// clear bulk in endpoint stall feature
|
||||
|
|
|
@ -467,7 +467,6 @@ USBKeyboardDriverBindingStop (
|
|||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;
|
||||
USB_KB_DEV *UsbKeyboardDevice;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
|
@ -493,7 +492,6 @@ USBKeyboardDriverBindingStop (
|
|||
Controller
|
||||
);
|
||||
|
||||
UsbIo = UsbKeyboardDevice->UsbIo;
|
||||
//
|
||||
// Uninstall the Asyn Interrupt Transfer from this device
|
||||
// will disable the key data input from this device
|
||||
|
@ -574,12 +572,9 @@ USBKeyboardReset (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
USB_KB_DEV *UsbKeyboardDevice;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This);
|
||||
|
||||
UsbIo = UsbKeyboardDevice->UsbIo;
|
||||
|
||||
KbdReportStatusCode (
|
||||
UsbKeyboardDevice->DevicePath,
|
||||
EFI_PROGRESS_CODE,
|
||||
|
|
|
@ -210,9 +210,6 @@ InitUSBKeyboard (
|
|||
UINT8 Duration;
|
||||
EFI_STATUS Status;
|
||||
UINT32 TransferResult;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
UsbIo = UsbKeyboardDevice->UsbIo;
|
||||
|
||||
KbdReportStatusCode (
|
||||
UsbKeyboardDevice->DevicePath,
|
||||
|
@ -360,19 +357,16 @@ KeyboardHandler (
|
|||
UINT8 Index;
|
||||
UINT8 Index2;
|
||||
BOOLEAN Down;
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN KeyRelease;
|
||||
BOOLEAN KeyPress;
|
||||
UINT8 SavedTail;
|
||||
USB_KEY UsbKey;
|
||||
UINT8 NewRepeatKey;
|
||||
UINT32 UsbStatus;
|
||||
UINT8 *DataPtr;
|
||||
|
||||
ASSERT (Context);
|
||||
|
||||
NewRepeatKey = 0;
|
||||
DataPtr = (UINT8 *) Data;
|
||||
UsbKeyboardDevice = (USB_KB_DEV *) Context;
|
||||
UsbIo = UsbKeyboardDevice->UsbIo;
|
||||
|
||||
|
@ -412,15 +406,15 @@ KeyboardHandler (
|
|||
// Delete & Submit this interrupt again
|
||||
//
|
||||
|
||||
Status = UsbIo->UsbAsyncInterruptTransfer (
|
||||
UsbIo,
|
||||
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
UsbIo->UsbAsyncInterruptTransfer (
|
||||
UsbIo,
|
||||
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
gBS->SetTimer (
|
||||
UsbKeyboardDevice->DelayedRecoveryEvent,
|
||||
|
|
|
@ -443,12 +443,10 @@ USBFloppyReadBlocks (
|
|||
UINTN NumberOfBlocks;
|
||||
BOOLEAN MediaChange;
|
||||
EFI_TPL OldTpl;
|
||||
UINT32 Retry;
|
||||
|
||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
||||
Status = EFI_SUCCESS;
|
||||
MediaChange = FALSE;
|
||||
Retry = 0;
|
||||
|
||||
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
|
||||
|
||||
|
@ -594,12 +592,10 @@ USBFloppyWriteBlocks (
|
|||
UINTN NumberOfBlocks;
|
||||
BOOLEAN MediaChange;
|
||||
EFI_TPL OldTpl;
|
||||
UINT32 Retry;
|
||||
|
||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
||||
Status = EFI_SUCCESS;
|
||||
MediaChange = FALSE;
|
||||
Retry = 0;
|
||||
|
||||
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
|
||||
|
||||
|
|
|
@ -906,12 +906,9 @@ UsbMouseReset (
|
|||
--*/
|
||||
{
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
UsbMouseDevice = USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This);
|
||||
|
||||
UsbIo = UsbMouseDevice->UsbIo;
|
||||
|
||||
MouseReportStatusCode (
|
||||
UsbMouseDevice->DevicePath,
|
||||
EFI_PROGRESS_CODE,
|
||||
|
|
|
@ -136,7 +136,7 @@ CoreProcessFvImageFile (
|
|||
IN EFI_GUID *DriverName
|
||||
);
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreAcquireDispatcherLock (
|
||||
VOID
|
||||
|
@ -161,6 +161,7 @@ Returns:
|
|||
CoreAcquireLock (&mDispatcherLock);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreReleaseDispatcherLock (
|
||||
VOID
|
||||
|
@ -184,7 +185,7 @@ Returns:
|
|||
CoreReleaseLock (&mDispatcherLock);
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreGetDepexSectionAndPreProccess (
|
||||
IN EFI_CORE_DRIVER_ENTRY *DriverEntry
|
||||
|
@ -593,7 +594,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
FvHasBeenProcessed (
|
||||
IN EFI_HANDLE FvHandle
|
||||
|
@ -628,7 +629,7 @@ Returns:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
FvIsBeingProcesssed (
|
||||
IN EFI_HANDLE FvHandle
|
||||
|
|
|
@ -432,7 +432,7 @@ Returns:
|
|||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -445,6 +445,8 @@ Returns:
|
|||
//
|
||||
Iterator++;
|
||||
}
|
||||
|
||||
Done:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
GenericArchProtocolNotify (
|
||||
|
|
|
@ -87,7 +87,7 @@ UINT32 mEventTable[] = {
|
|||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
|
||||
};
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreAcquireEventLock (
|
||||
VOID
|
||||
|
@ -111,7 +111,7 @@ Returns:
|
|||
CoreAcquireLock (&gEventQueueLock);
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreReleaseEventLock (
|
||||
VOID
|
||||
|
@ -232,8 +232,8 @@ Returns:
|
|||
}
|
||||
|
||||
|
||||
VOID
|
||||
STATIC
|
||||
VOID
|
||||
CoreNotifyEvent (
|
||||
IN IEVENT *Event
|
||||
)
|
||||
|
|
|
@ -143,7 +143,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
VerifyHeaderChecksum (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader
|
||||
|
@ -172,7 +172,7 @@ Returns:
|
|||
HeaderChecksum = (UINT8)(HeaderChecksum + ptr[Index]);
|
||||
}
|
||||
|
||||
HeaderChecksum = HeaderChecksum - FfsHeader->State - FfsHeader->IntegrityCheck.Checksum.File;
|
||||
HeaderChecksum = (UINT8) (HeaderChecksum - FfsHeader->State - FfsHeader->IntegrityCheck.Checksum.File);
|
||||
|
||||
if (HeaderChecksum == 0) {
|
||||
return TRUE;
|
||||
|
|
|
@ -61,7 +61,7 @@ EFI_GCD_MAP_ENTRY mGcdMemorySpaceMapEntryTemplate = {
|
|||
0,
|
||||
0,
|
||||
EfiGcdMemoryTypeNonExistent,
|
||||
0,
|
||||
(EFI_GCD_IO_TYPE) 0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ EFI_GCD_MAP_ENTRY mGcdIoSpaceMapEntryTemplate = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(EFI_GCD_MEMORY_TYPE) 0,
|
||||
EfiGcdIoTypeNonExistent,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -136,7 +136,7 @@ Returns:
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreAcquireGcdIoLock (
|
||||
VOID
|
||||
|
@ -157,7 +157,7 @@ Returns:
|
|||
CoreAcquireLock (&mGcdIoSpaceLock);
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
CoreReleaseGcdIoLock (
|
||||
VOID
|
||||
|
@ -183,6 +183,7 @@ Returns:
|
|||
//
|
||||
// GCD Initialization Worker Functions
|
||||
//
|
||||
STATIC
|
||||
UINT64
|
||||
AlignValue (
|
||||
IN UINT64 Value,
|
||||
|
@ -217,6 +218,7 @@ Returns:
|
|||
return Value & (~AlignmentMask);
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT64
|
||||
PageAlignAddress (
|
||||
IN UINT64 Value
|
||||
|
@ -240,6 +242,7 @@ Returns:
|
|||
return AlignValue (Value, EFI_PAGE_SHIFT, TRUE);
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT64
|
||||
PageAlignLength (
|
||||
IN UINT64 Value
|
||||
|
@ -266,6 +269,7 @@ Returns:
|
|||
//
|
||||
// GCD Memory Space Worker Functions
|
||||
//
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreAllocateGcdMapEntry (
|
||||
IN OUT EFI_GCD_MAP_ENTRY **TopEntry,
|
||||
|
@ -303,6 +307,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreInsertGcdMapEntry (
|
||||
IN LIST_ENTRY *Link,
|
||||
|
@ -359,6 +364,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreMergeGcdMapEntry (
|
||||
IN LIST_ENTRY *Link,
|
||||
|
@ -440,6 +446,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreCleanupGcdMapEntry (
|
||||
IN EFI_GCD_MAP_ENTRY *TopEntry,
|
||||
|
@ -491,6 +498,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreSearchGcdMapEntry (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
|
@ -551,6 +559,7 @@ Returns:
|
|||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
CoreCountGcdMapEntry (
|
||||
IN LIST_ENTRY *Map
|
||||
|
@ -584,7 +593,7 @@ Returns:
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
UINT64
|
||||
ConverToCpuArchAttributes (
|
||||
UINT64 Attributes
|
||||
|
@ -629,7 +638,7 @@ Returns:
|
|||
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreConvertSpace (
|
||||
IN UINTN Operation,
|
||||
|
@ -897,6 +906,7 @@ Done:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreAllocateSpaceCheckEntry (
|
||||
IN UINTN Operation,
|
||||
|
@ -950,6 +960,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreAllocateSpace (
|
||||
IN UINTN Operation,
|
||||
|
@ -1218,7 +1229,7 @@ Done:
|
|||
return Status;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreInternalAddMemorySpace (
|
||||
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
||||
|
@ -1257,7 +1268,7 @@ Returns:
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
return CoreConvertSpace (GCD_ADD_MEMORY_OPERATION, GcdMemoryType, 0, BaseAddress, Length, Capabilities, 0);
|
||||
return CoreConvertSpace (GCD_ADD_MEMORY_OPERATION, GcdMemoryType, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, Capabilities, 0);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1310,7 +1321,7 @@ Returns:
|
|||
GCD_ALLOCATE_MEMORY_OPERATION,
|
||||
GcdAllocateType,
|
||||
GcdMemoryType,
|
||||
0,
|
||||
(EFI_GCD_IO_TYPE) 0,
|
||||
Alignment,
|
||||
Length,
|
||||
BaseAddress,
|
||||
|
@ -1427,7 +1438,7 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
return CoreConvertSpace (GCD_FREE_MEMORY_OPERATION, 0, 0, BaseAddress, Length, 0, 0);
|
||||
return CoreConvertSpace (GCD_FREE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -1454,9 +1465,10 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
return CoreConvertSpace (GCD_REMOVE_MEMORY_OPERATION, 0, 0, BaseAddress, Length, 0, 0);
|
||||
return CoreConvertSpace (GCD_REMOVE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
BuildMemoryDescriptor (
|
||||
IN OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor,
|
||||
|
@ -1574,7 +1586,7 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
return CoreConvertSpace (GCD_SET_ATTRIBUTES_MEMORY_OPERATION, 0, 0, BaseAddress, Length, 0, Attributes);
|
||||
return CoreConvertSpace (GCD_SET_ATTRIBUTES_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, Attributes);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -1687,7 +1699,7 @@ Returns:
|
|||
if (GcdIoType <= EfiGcdIoTypeNonExistent || GcdIoType >= EfiGcdIoTypeMaximum) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
return CoreConvertSpace (GCD_ADD_IO_OPERATION, 0, GcdIoType, BaseAddress, Length, 0, 0);
|
||||
return CoreConvertSpace (GCD_ADD_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, GcdIoType, BaseAddress, Length, 0, 0);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -1736,7 +1748,7 @@ Returns:
|
|||
return CoreAllocateSpace (
|
||||
GCD_ALLOCATE_IO_OPERATION,
|
||||
GcdAllocateType,
|
||||
0,
|
||||
(EFI_GCD_MEMORY_TYPE) 0,
|
||||
GcdIoType,
|
||||
Alignment,
|
||||
Length,
|
||||
|
@ -1770,7 +1782,7 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
return CoreConvertSpace (GCD_FREE_IO_OPERATION, 0, 0, BaseAddress, Length, 0, 0);
|
||||
return CoreConvertSpace (GCD_FREE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -1797,9 +1809,10 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
return CoreConvertSpace (GCD_REMOVE_IO_OPERATION, 0, 0, BaseAddress, Length, 0, 0);
|
||||
return CoreConvertSpace (GCD_REMOVE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
BuildIoDescriptor (
|
||||
IN EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor,
|
||||
|
@ -1964,6 +1977,7 @@ Done:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT64
|
||||
CoreConvertResourceDescriptorHobAttributesToCapabilities (
|
||||
EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
||||
|
|
|
@ -149,6 +149,7 @@ Returns:
|
|||
return ReturnStatus;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
AddSortedDriverBindingProtocol (
|
||||
IN EFI_HANDLE DriverBindingHandle,
|
||||
|
@ -265,8 +266,6 @@ Returns:
|
|||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_HANDLE DriverImageHandle;
|
||||
UINTN PlatformDriverOverrideHandleCount;
|
||||
EFI_HANDLE *PlatformDriverOverrideHandleBuffer;
|
||||
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *PlatformDriverOverride;
|
||||
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *BusSpecificDriverOverride;
|
||||
UINTN DriverBindingHandleCount;
|
||||
|
@ -290,8 +289,6 @@ Returns:
|
|||
//
|
||||
DriverBindingHandleCount = 0;
|
||||
DriverBindingHandleBuffer = NULL;
|
||||
PlatformDriverOverrideHandleCount = 0;
|
||||
PlatformDriverOverrideHandleBuffer = NULL;
|
||||
NumberOfSortedDriverBindingProtocols = 0;
|
||||
SortedDriverBindingProtocols = NULL;
|
||||
|
||||
|
|
|
@ -978,6 +978,7 @@ Returns:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
PROTOCOL_INTERFACE *
|
||||
CoreGetProtocolInterface (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
|
|
|
@ -254,7 +254,7 @@ Returns:
|
|||
if (Image->ImageContext.ImageAddress >= 0x100000 || Image->ImageContext.RelocationsStripped) {
|
||||
Status = CoreAllocatePages (
|
||||
AllocateAddress,
|
||||
Image->ImageContext.ImageCodeMemoryType,
|
||||
(EFI_MEMORY_TYPE) (Image->ImageContext.ImageCodeMemoryType),
|
||||
Image->NumberOfPages,
|
||||
&Image->ImageContext.ImageAddress
|
||||
);
|
||||
|
@ -262,7 +262,7 @@ Returns:
|
|||
if (EFI_ERROR (Status) && !Image->ImageContext.RelocationsStripped) {
|
||||
Status = CoreAllocatePages (
|
||||
AllocateAnyPages,
|
||||
Image->ImageContext.ImageCodeMemoryType,
|
||||
(EFI_MEMORY_TYPE) (Image->ImageContext.ImageCodeMemoryType),
|
||||
Image->NumberOfPages,
|
||||
&Image->ImageContext.ImageAddress
|
||||
);
|
||||
|
@ -389,8 +389,8 @@ Returns:
|
|||
Image->Type = Image->ImageContext.ImageType;
|
||||
Image->Info.ImageBase = (VOID *)(UINTN)Image->ImageContext.ImageAddress;
|
||||
Image->Info.ImageSize = Image->ImageContext.ImageSize;
|
||||
Image->Info.ImageCodeType = Image->ImageContext.ImageCodeMemoryType;
|
||||
Image->Info.ImageDataType = Image->ImageContext.ImageDataMemoryType;
|
||||
Image->Info.ImageCodeType = (EFI_MEMORY_TYPE) (Image->ImageContext.ImageCodeMemoryType);
|
||||
Image->Info.ImageDataType = (EFI_MEMORY_TYPE) (Image->ImageContext.ImageDataMemoryType);
|
||||
if (Attribute & EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION) {
|
||||
if (Image->ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {
|
||||
//
|
||||
|
@ -514,7 +514,7 @@ Returns:
|
|||
return Image;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CoreLoadImageCommon (
|
||||
IN BOOLEAN BootPolicy,
|
||||
|
|
|
@ -308,7 +308,7 @@ Returns:
|
|||
//
|
||||
// Make sure the memory type in the gMemoryTypeInformation[] array is valid
|
||||
//
|
||||
Type = gMemoryTypeInformation[Index].Type;
|
||||
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);
|
||||
if (Type < 0 || Type > EfiMaxMemoryType) {
|
||||
continue;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ Returns:
|
|||
//
|
||||
// Make sure the memory type in the gMemoryTypeInformation[] array is valid
|
||||
//
|
||||
Type = gMemoryTypeInformation[FreeIndex].Type;
|
||||
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[FreeIndex].Type);
|
||||
if (Type < 0 || Type > EfiMaxMemoryType) {
|
||||
continue;
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ Returns:
|
|||
//
|
||||
// Make sure the memory type in the gMemoryTypeInformation[] array is valid
|
||||
//
|
||||
Type = gMemoryTypeInformation[Index].Type;
|
||||
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);
|
||||
if (Type < 0 || Type > EfiMaxMemoryType) {
|
||||
continue;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ Returns:
|
|||
// If the number of pages reserved for a memory type is 0, then all allocations for that type
|
||||
// should be in the default range.
|
||||
//
|
||||
for (Type = 0; Type < EfiMaxMemoryType; Type++) {
|
||||
for (Type = (EFI_MEMORY_TYPE) 0; Type < EfiMaxMemoryType; Type++) {
|
||||
for (Index = 0; gMemoryTypeInformation[Index].Type != EfiMaxMemoryType; Index++) {
|
||||
if (Type == (EFI_MEMORY_TYPE)gMemoryTypeInformation[Index].Type) {
|
||||
mMemoryTypeStatistics[Type].InformationIndex = Index;
|
||||
|
@ -1457,7 +1457,6 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT64 Start;
|
||||
|
||||
//
|
||||
|
@ -1471,7 +1470,7 @@ Returns:
|
|||
if (Start == 0) {
|
||||
DEBUG ((EFI_D_ERROR | EFI_D_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", NumberOfPages));
|
||||
} else {
|
||||
Status = CoreConvertPages (Start, NumberOfPages, PoolType);
|
||||
CoreConvertPages (Start, NumberOfPages, PoolType);
|
||||
}
|
||||
|
||||
return (VOID *)(UINTN)Start;
|
||||
|
|
|
@ -111,7 +111,7 @@ Returns:
|
|||
for (Type=0; Type < EfiMaxMemoryType; Type++) {
|
||||
PoolHead[Type].Signature = 0;
|
||||
PoolHead[Type].Used = 0;
|
||||
PoolHead[Type].MemoryType = Type;
|
||||
PoolHead[Type].MemoryType = (EFI_MEMORY_TYPE) Type;
|
||||
for (Index=0; Index < MAX_POOL_LIST; Index++) {
|
||||
InitializeListHead (&PoolHead[Type].FreeList[Index]);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ Returns:
|
|||
InitializeListHead (&PoolHeadList);
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
POOL *
|
||||
LookupPoolHead (
|
||||
IN EFI_MEMORY_TYPE MemoryType
|
||||
|
|
|
@ -355,14 +355,12 @@ Returns:
|
|||
{
|
||||
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
|
||||
EFI_FFS_FILE_HEADER *FfsFileHeader;
|
||||
VOID *SectionData;
|
||||
EFI_STATUS Status;
|
||||
EFI_PEI_HOB_POINTERS Hob;
|
||||
|
||||
|
||||
FwVolHeader = NULL;
|
||||
FfsFileHeader = NULL;
|
||||
SectionData = NULL;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
//
|
||||
|
@ -654,7 +652,6 @@ Returns:
|
|||
UINTN SectionLength;
|
||||
UINTN OccupiedSectionLength;
|
||||
UINT64 FileSize;
|
||||
EFI_GUID_DEFINED_SECTION *GuidedSectionHeader;
|
||||
UINT32 AuthenticationStatus;
|
||||
EFI_PEI_SECTION_EXTRACTION_PPI *SectionExtract;
|
||||
UINT32 BufferSize;
|
||||
|
@ -697,10 +694,6 @@ Returns:
|
|||
// Was the DXE Core file encapsulated in a GUID'd section?
|
||||
//
|
||||
if (Section->Type == EFI_SECTION_GUID_DEFINED) {
|
||||
//
|
||||
// Locate the GUID'd Section Extractor
|
||||
//
|
||||
GuidedSectionHeader = (VOID *) (Section + 1);
|
||||
|
||||
//
|
||||
// This following code constitutes the addition of the security model
|
||||
|
|
|
@ -65,7 +65,7 @@ Returns:
|
|||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -103,4 +103,4 @@ Returns:
|
|||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -125,12 +125,10 @@ Returns:
|
|||
well-formed Grammar.
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
DEPENDENCY_EXPRESSION_OPERAND *Iterator;
|
||||
EVAL_STACK_ENTRY *StackPtr;
|
||||
EVAL_STACK_ENTRY EvalStack[MAX_GRAMMAR_SIZE];
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
Iterator = DependencyExpression;
|
||||
*Runnable = FALSE;
|
||||
|
||||
|
|
|
@ -73,4 +73,4 @@ Returns:
|
|||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,59 +19,7 @@ Abstract:
|
|||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Decompression algorithm begins here
|
||||
//
|
||||
#define BITBUFSIZ 32
|
||||
#define MAXMATCH 256
|
||||
#define THRESHOLD 3
|
||||
#define CODE_BIT 16
|
||||
#define BAD_TABLE - 1
|
||||
|
||||
//
|
||||
// C: Char&Len Set; P: Position Set; T: exTra Set
|
||||
//
|
||||
#define NC (0xff + MAXMATCH + 2 - THRESHOLD)
|
||||
#define CBIT 9
|
||||
#define MAXPBIT 5
|
||||
#define TBIT 5
|
||||
#define MAXNP ((1U << MAXPBIT) - 1)
|
||||
#define NT (CODE_BIT + 3)
|
||||
#if NT > MAXNP
|
||||
#define NPT NT
|
||||
#else
|
||||
#define NPT MAXNP
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT8 *mSrcBase; // Starting address of compressed data
|
||||
UINT8 *mDstBase; // Starting address of decompressed data
|
||||
UINT32 mOutBuf;
|
||||
UINT32 mInBuf;
|
||||
|
||||
UINT16 mBitCount;
|
||||
UINT32 mBitBuf;
|
||||
UINT32 mSubBitBuf;
|
||||
UINT16 mBlockSize;
|
||||
UINT32 mCompSize;
|
||||
UINT32 mOrigSize;
|
||||
|
||||
UINT16 mBadTableFlag;
|
||||
|
||||
UINT16 mLeft[2 * NC - 1];
|
||||
UINT16 mRight[2 * NC - 1];
|
||||
UINT8 mCLen[NC];
|
||||
UINT8 mPTLen[NPT];
|
||||
UINT16 mCTable[4096];
|
||||
UINT16 mPTTable[256];
|
||||
|
||||
//
|
||||
// The length of the field 'Position Set Code Length Array Size' in Block Header.
|
||||
// For EFI 1.1 de/compression algorithm, mPBit = 4
|
||||
// For Tiano de/compression algorithm, mPBit = 5
|
||||
//
|
||||
UINT8 mPBit;
|
||||
} SCRATCH_DATA;
|
||||
#include "BaseUefiTianoDecompressLibInternals.h"
|
||||
|
||||
VOID
|
||||
FillBuf (
|
||||
|
@ -196,6 +144,8 @@ Returns:
|
|||
UINT16 Avail;
|
||||
UINT16 NextCode;
|
||||
UINT16 Mask;
|
||||
UINT16 WordOfStart;
|
||||
UINT16 WordOfCount;
|
||||
|
||||
for (Index = 1; Index <= 16; Index++) {
|
||||
Count[Index] = 0;
|
||||
|
@ -208,7 +158,9 @@ Returns:
|
|||
Start[1] = 0;
|
||||
|
||||
for (Index = 1; Index <= 16; Index++) {
|
||||
Start[Index + 1] = (UINT16) (Start[Index] + (Count[Index] << (16 - Index)));
|
||||
WordOfStart = Start[Index];
|
||||
WordOfCount = Count[Index];
|
||||
Start[Index + 1] = (UINT16) (WordOfStart + (WordOfCount << (16 - Index)));
|
||||
}
|
||||
|
||||
if (Start[17] != 0) {
|
||||
|
@ -610,7 +562,7 @@ Returns: (VOID)
|
|||
for (;;) {
|
||||
CharC = DecodeC (Sd);
|
||||
if (Sd->mBadTableFlag != 0) {
|
||||
return ;
|
||||
goto Done ;
|
||||
}
|
||||
|
||||
if (CharC < 256) {
|
||||
|
@ -618,7 +570,7 @@ Returns: (VOID)
|
|||
// Process an Original character
|
||||
//
|
||||
if (Sd->mOutBuf >= Sd->mOrigSize) {
|
||||
return ;
|
||||
goto Done ;
|
||||
} else {
|
||||
Sd->mDstBase[Sd->mOutBuf++] = (UINT8) CharC;
|
||||
}
|
||||
|
@ -637,7 +589,7 @@ Returns: (VOID)
|
|||
while ((INT16) (BytesRemain) >= 0) {
|
||||
Sd->mDstBase[Sd->mOutBuf++] = Sd->mDstBase[DataIdx++];
|
||||
if (Sd->mOutBuf >= Sd->mOrigSize) {
|
||||
return ;
|
||||
goto Done ;
|
||||
}
|
||||
|
||||
BytesRemain--;
|
||||
|
@ -645,6 +597,7 @@ Returns: (VOID)
|
|||
}
|
||||
}
|
||||
|
||||
Done:
|
||||
return ;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>BaseUefiTianoDecompressLib.c</Filename>
|
||||
<Filename>BaseUefiTianoDecompressLibInternals.h</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
|
|
|
@ -0,0 +1,224 @@
|
|||
/** @file
|
||||
Internal include file for Base UEFI Decompress Libary.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. 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: BaseUefiDecompressLibInternals.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BASE_UEFI_TIANO_DECOMPRESS_LIB_INTERNALS_H__
|
||||
#define __BASE_UEFI_TIANO_DECOMPRESS_LIB_INTERNALS_H__
|
||||
|
||||
//
|
||||
// Decompression algorithm begins here
|
||||
//
|
||||
#define BITBUFSIZ 32
|
||||
#define MAXMATCH 256
|
||||
#define THRESHOLD 3
|
||||
#define CODE_BIT 16
|
||||
#define BAD_TABLE - 1
|
||||
|
||||
//
|
||||
// C: Char&Len Set; P: Position Set; T: exTra Set
|
||||
//
|
||||
#define NC (0xff + MAXMATCH + 2 - THRESHOLD)
|
||||
#define CBIT 9
|
||||
#define MAXPBIT 5
|
||||
#define TBIT 5
|
||||
#define MAXNP ((1U << MAXPBIT) - 1)
|
||||
#define NT (CODE_BIT + 3)
|
||||
#if NT > MAXNP
|
||||
#define NPT NT
|
||||
#else
|
||||
#define NPT MAXNP
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT8 *mSrcBase; // Starting address of compressed data
|
||||
UINT8 *mDstBase; // Starting address of decompressed data
|
||||
UINT32 mOutBuf;
|
||||
UINT32 mInBuf;
|
||||
|
||||
UINT16 mBitCount;
|
||||
UINT32 mBitBuf;
|
||||
UINT32 mSubBitBuf;
|
||||
UINT16 mBlockSize;
|
||||
UINT32 mCompSize;
|
||||
UINT32 mOrigSize;
|
||||
|
||||
UINT16 mBadTableFlag;
|
||||
|
||||
UINT16 mLeft[2 * NC - 1];
|
||||
UINT16 mRight[2 * NC - 1];
|
||||
UINT8 mCLen[NC];
|
||||
UINT8 mPTLen[NPT];
|
||||
UINT16 mCTable[4096];
|
||||
UINT16 mPTTable[256];
|
||||
|
||||
//
|
||||
// The length of the field 'Position Set Code Length Array Size' in Block Header.
|
||||
// For EFI 1.1 de/compression algorithm, mPBit = 4
|
||||
// For Tiano de/compression algorithm, mPBit = 5
|
||||
//
|
||||
UINT8 mPBit;
|
||||
} SCRATCH_DATA;
|
||||
|
||||
/**
|
||||
Read NumOfBit of bits from source into mBitBuf
|
||||
|
||||
Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
|
||||
|
||||
@param Sd The global scratch data
|
||||
@param NumOfBits The number of bits to shift and read.
|
||||
|
||||
**/
|
||||
VOID
|
||||
FillBuf (
|
||||
IN SCRATCH_DATA *Sd,
|
||||
IN UINT16 NumOfBits
|
||||
);
|
||||
|
||||
/**
|
||||
Get NumOfBits of bits out from mBitBuf
|
||||
|
||||
Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
|
||||
NumOfBits of bits from source. Returns NumOfBits of bits that are
|
||||
popped out.
|
||||
|
||||
@param Sd The global scratch data.
|
||||
@param NumOfBits The number of bits to pop and read.
|
||||
|
||||
@return The bits that are popped out.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
GetBits (
|
||||
IN SCRATCH_DATA *Sd,
|
||||
IN UINT16 NumOfBits
|
||||
);
|
||||
|
||||
/**
|
||||
Creates Huffman Code mapping table according to code length array.
|
||||
|
||||
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
||||
and Position Set according to code length array.
|
||||
|
||||
@param Sd The global scratch data
|
||||
@param NumOfChar Number of symbols in the symbol set
|
||||
@param BitLen Code length array
|
||||
@param TableBits The width of the mapping table
|
||||
@param Table The table
|
||||
|
||||
@retval 0 OK.
|
||||
@retval BAD_TABLE The table is corrupted.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
MakeTable (
|
||||
IN SCRATCH_DATA *Sd,
|
||||
IN UINT16 NumOfChar,
|
||||
IN UINT8 *BitLen,
|
||||
IN UINT16 TableBits,
|
||||
OUT UINT16 *Table
|
||||
);
|
||||
|
||||
/**
|
||||
Decodes a position value.
|
||||
|
||||
Get a position value according to Position Huffman Table.
|
||||
|
||||
@param Sd the global scratch data
|
||||
|
||||
@return The position value decoded.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
DecodeP (
|
||||
IN SCRATCH_DATA *Sd
|
||||
);
|
||||
|
||||
/**
|
||||
Reads code lengths for the Extra Set or the Position Set.
|
||||
|
||||
Read in the Extra Set or Pointion Set Length Arrary, then
|
||||
generate the Huffman code mapping for them.
|
||||
|
||||
@param Sd The global scratch data.
|
||||
@param nn Number of symbols.
|
||||
@param nbit Number of bits needed to represent nn.
|
||||
@param Special The special symbol that needs to be taken care of.
|
||||
|
||||
@retval 0 OK.
|
||||
@retval BAD_TABLE Table is corrupted.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
ReadPTLen (
|
||||
IN SCRATCH_DATA *Sd,
|
||||
IN UINT16 nn,
|
||||
IN UINT16 nbit,
|
||||
IN UINT16 Special
|
||||
);
|
||||
|
||||
/**
|
||||
Reads code lengths for Char&Len Set.
|
||||
|
||||
Read in and decode the Char&Len Set Code Length Array, then
|
||||
generate the Huffman Code mapping table for the Char&Len Set.
|
||||
|
||||
@param Sd the global scratch data
|
||||
|
||||
**/
|
||||
VOID
|
||||
ReadCLen (
|
||||
SCRATCH_DATA *Sd
|
||||
);
|
||||
|
||||
/**
|
||||
Decode a character/length value.
|
||||
|
||||
Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
|
||||
Huffman code mapping table for Extra Set, Code&Len Set and
|
||||
Position Set.
|
||||
|
||||
@param Sd The global scratch data.
|
||||
|
||||
@return The value decoded.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
DecodeC (
|
||||
SCRATCH_DATA *Sd
|
||||
);
|
||||
|
||||
/**
|
||||
Decode the source data and put the resulting data into the destination buffer.
|
||||
|
||||
Decode the source data and put the resulting data into the destination buffer.
|
||||
|
||||
@param Sd The global scratch data
|
||||
|
||||
**/
|
||||
VOID
|
||||
Decode (
|
||||
SCRATCH_DATA *Sd
|
||||
);
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
UefiTianoDecompress (
|
||||
IN CONST VOID *Source,
|
||||
IN OUT VOID *Destination,
|
||||
IN OUT VOID *Scratch,
|
||||
IN UINT32 Version
|
||||
);
|
||||
|
||||
#endif
|
|
@ -22,6 +22,7 @@ Abstract:
|
|||
EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService = NULL;
|
||||
EFI_PLABEL mPlabel;
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DxeSalLibInitialize (
|
||||
|
@ -43,7 +44,7 @@ DxeSalLibInitialize (
|
|||
// virtual). So lets grap the physical PLABEL for the EsalEntryPoint and store it
|
||||
// away. We cache it in a module global, so we can register the vitrual version.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, &mEsalBootService);
|
||||
Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, (VOID **) &mEsalBootService);
|
||||
if (EFI_ERROR (Status)) {
|
||||
mEsalBootService = NULL;
|
||||
return EFI_SUCCESS;
|
||||
|
|
|
@ -105,7 +105,7 @@ Returns:
|
|||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConvertBmpToGopBlt (
|
||||
IN VOID *BmpImage,
|
||||
|
@ -664,6 +664,7 @@ Returns:
|
|||
UINT32 VerticalResolution;
|
||||
UINT32 ColorDepth;
|
||||
UINT32 RefreshRate;
|
||||
UINTN BufferGlyphWidth;
|
||||
|
||||
GlyphStatus = 0;
|
||||
|
||||
|
@ -743,6 +744,7 @@ Returns:
|
|||
//
|
||||
// Blt a character to the screen
|
||||
//
|
||||
BufferGlyphWidth = GLYPH_WIDTH * StrLen (Buffer);
|
||||
if (GraphicsOutput != NULL) {
|
||||
Status = GraphicsOutput->Blt (
|
||||
GraphicsOutput,
|
||||
|
@ -752,9 +754,9 @@ Returns:
|
|||
0,
|
||||
X,
|
||||
Y,
|
||||
GLYPH_WIDTH * StrLen (Buffer),
|
||||
BufferGlyphWidth,
|
||||
GLYPH_HEIGHT,
|
||||
GLYPH_WIDTH * StrLen (Buffer) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||
BufferGlyphWidth * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||
);
|
||||
} else {
|
||||
Status = UgaDraw->Blt (
|
||||
|
@ -765,9 +767,9 @@ Returns:
|
|||
0,
|
||||
X,
|
||||
Y,
|
||||
GLYPH_WIDTH * StrLen (Buffer),
|
||||
BufferGlyphWidth,
|
||||
GLYPH_HEIGHT,
|
||||
GLYPH_WIDTH * StrLen (Buffer) * sizeof (EFI_UGA_PIXEL)
|
||||
BufferGlyphWidth * sizeof (EFI_UGA_PIXEL)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,6 +128,8 @@ Returns:
|
|||
UINT8 *Destination;
|
||||
UINTN Index;
|
||||
BOOLEAN Finished;
|
||||
UINTN SizeofLanguage;
|
||||
UINTN SizeofString;
|
||||
|
||||
StringPack = (EFI_HII_STRING_PACK *) StringBuffer;
|
||||
Finished = FALSE;
|
||||
|
@ -248,14 +250,16 @@ Returns:
|
|||
//
|
||||
// Pointing to a new string pack location
|
||||
//
|
||||
SizeofLanguage = StrSize (Language);
|
||||
SizeofString = StrSize (String);
|
||||
StringPackBuffer->Header.Length = (UINT32)
|
||||
(
|
||||
sizeof (EFI_HII_STRING_PACK) -
|
||||
sizeof (EFI_STRING) +
|
||||
sizeof (RELOFST) +
|
||||
sizeof (RELOFST) +
|
||||
StrSize (Language) +
|
||||
StrSize (String)
|
||||
SizeofLanguage +
|
||||
SizeofString
|
||||
);
|
||||
StringPackBuffer->Header.Type = EFI_HII_STRING;
|
||||
StringPackBuffer->LanguageNameString = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
|
||||
|
@ -423,7 +427,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetHiiInterface (
|
||||
OUT EFI_HII_PROTOCOL **Hii
|
||||
|
|
|
@ -467,11 +467,15 @@ Returns:
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *NameSuffixed;
|
||||
UINTN NameLength;
|
||||
UINTN SuffixLength;
|
||||
|
||||
//
|
||||
// enough to concatenate both strings.
|
||||
//
|
||||
NameSuffixed = AllocateZeroPool ((StrLen (Name) + StrLen (Suffix) + 1) * sizeof (CHAR16));
|
||||
NameLength = StrLen (Name);
|
||||
SuffixLength = StrLen (Suffix);
|
||||
NameSuffixed = AllocateZeroPool ((NameLength + SuffixLength + 1) * sizeof (CHAR16));
|
||||
|
||||
StrCpy (NameSuffixed, Name);
|
||||
StrCat (NameSuffixed, Suffix);
|
||||
|
|
|
@ -20,7 +20,7 @@ Abstract:
|
|||
|
||||
--*/
|
||||
|
||||
|
||||
#include "EdkPeCoffLoaderLibInternals.h"
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>EdkPeCoffLoader.c</Filename>
|
||||
<Filename>EdkPeCoffLoaderLibInternals.h</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/** @file
|
||||
Declaration of internal functions in PE/COFF Lib.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
All rights reserved. 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: BasePeCoffLibInternals.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PECOFF_LOADER_LIB_INTERNALS__
|
||||
#define __PECOFF_LOADER_LIB_INTERNALS__
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TianoPeCoffLoaderLibGetImageInfo (
|
||||
IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TianoPeCoffLoaderLibLoadImage (
|
||||
IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TianoPeCoffLoaderLibRelocateImage (
|
||||
IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TianoPeCoffLoaderLibUnloadimage (
|
||||
IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
|
||||
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
#endif
|
|
@ -52,6 +52,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
RuntimeLibVirtualNotifyEvent (
|
||||
|
|
|
@ -531,6 +531,7 @@ ConSplitterTextOutConstructor (
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConSplitterSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
|
@ -717,6 +718,7 @@ Returns:
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStart (
|
||||
|
@ -1026,6 +1028,7 @@ Returns:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStop (
|
||||
|
@ -1499,6 +1502,7 @@ Returns:
|
|||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConSplitterGrowMapTable (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
|
@ -1575,6 +1579,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConSplitterAddOutputMode (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
|
@ -1642,6 +1647,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
ConSplitterGetIntersection (
|
||||
IN INT32 *TextOutModeMap,
|
||||
|
@ -1694,6 +1700,7 @@ ConSplitterGetIntersection (
|
|||
return ;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
ConSplitterSyncOutputMode (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
|
@ -1712,7 +1719,6 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
INT32 CurrentMode;
|
||||
INT32 CurrentMaxMode;
|
||||
INT32 Mode;
|
||||
INT32 Index;
|
||||
|
@ -1726,7 +1732,6 @@ Returns:
|
|||
//
|
||||
// Must make sure that current mode won't change even if mode number changes
|
||||
//
|
||||
CurrentMode = Private->TextOutMode.Mode;
|
||||
CurrentMaxMode = Private->TextOutMode.MaxMode;
|
||||
TextOutModeMap = Private->TextOutModeMap;
|
||||
StepSize = Private->TextOutListCount;
|
||||
|
@ -1771,6 +1776,7 @@ Returns:
|
|||
return ;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConSplitterGetIntersectionBetweenConOutAndStrErr (
|
||||
VOID
|
||||
|
@ -1796,8 +1802,6 @@ Returns:
|
|||
UINTN Indexj;
|
||||
UINTN Rows;
|
||||
UINTN Columns;
|
||||
INT32 ConOutCurrentMode;
|
||||
INT32 StdErrCurrentMode;
|
||||
INT32 ConOutMaxMode;
|
||||
INT32 StdErrMaxMode;
|
||||
INT32 Mode;
|
||||
|
@ -1808,8 +1812,6 @@ Returns:
|
|||
INT32 *StdErrMapTable;
|
||||
TEXT_OUT_SPLITTER_QUERY_DATA *ConOutQueryData;
|
||||
TEXT_OUT_SPLITTER_QUERY_DATA *StdErrQueryData;
|
||||
UINTN ConOutStepSize;
|
||||
UINTN StdErrStepSize;
|
||||
BOOLEAN FoundTheSameTextOut;
|
||||
UINTN ConOutMapTableSize;
|
||||
UINTN StdErrMapTableSize;
|
||||
|
@ -1843,16 +1845,12 @@ Returns:
|
|||
//
|
||||
// Must make sure that current mode won't change even if mode number changes
|
||||
//
|
||||
ConOutCurrentMode = mConOut.TextOutMode.Mode;
|
||||
ConOutMaxMode = mConOut.TextOutMode.MaxMode;
|
||||
ConOutModeMap = mConOut.TextOutModeMap;
|
||||
ConOutStepSize = mConOut.TextOutListCount;
|
||||
ConOutQueryData = mConOut.TextOutQueryData;
|
||||
|
||||
StdErrCurrentMode = mStdErr.TextOutMode.Mode;
|
||||
StdErrMaxMode = mStdErr.TextOutMode.MaxMode;
|
||||
StdErrModeMap = mStdErr.TextOutModeMap;
|
||||
StdErrStepSize = mStdErr.TextOutListCount;
|
||||
StdErrQueryData = mStdErr.TextOutQueryData;
|
||||
|
||||
//
|
||||
|
@ -1933,6 +1931,7 @@ Returns:
|
|||
}
|
||||
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ConSplitterAddGraphicsOutputMode (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
|
@ -2726,6 +2725,7 @@ ConSplitterSimplePointerReset (
|
|||
return ReturnStatus;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerPrivateGetState (
|
||||
|
|
|
@ -578,7 +578,7 @@ DevNullGopSync (
|
|||
)
|
||||
;
|
||||
|
||||
#if (EFI_SPECIFICATION < 0x00020000)
|
||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterUgaDrawGetMode (
|
||||
|
|
|
@ -355,6 +355,7 @@ Routine Description:
|
|||
return ReturnStatus;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
DevNullGraphicsOutputBlt (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
|
|
|
@ -1032,10 +1032,8 @@ GraphicsConsoleConOutTestString (
|
|||
UINT16 GlyphWidth;
|
||||
UINT32 GlyphStatus;
|
||||
UINT16 Count;
|
||||
GRAPHICS_CONSOLE_DEV *Private;
|
||||
GLYPH_UNION *Glyph;
|
||||
|
||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||
GlyphStatus = 0;
|
||||
Count = 0;
|
||||
|
||||
|
|
|
@ -402,9 +402,9 @@ TerminalDriverBindingStart (
|
|||
Mode->BaudRate,
|
||||
Mode->ReceiveFifoDepth,
|
||||
(UINT32) SerialInTimeOut,
|
||||
Mode->Parity,
|
||||
(EFI_PARITY_TYPE) (Mode->Parity),
|
||||
(UINT8) Mode->DataBits,
|
||||
Mode->StopBits
|
||||
(EFI_STOP_BITS_TYPE) (Mode->StopBits)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
|
@ -897,6 +897,7 @@ TerminalUpdateConsoleDevVariable (
|
|||
VariableSize,
|
||||
Variable
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
gBS->FreePool (Variable);
|
||||
|
||||
return ;
|
||||
|
@ -1015,6 +1016,7 @@ TerminalRemoveConsoleDevVariable (
|
|||
VariableSize,
|
||||
NewVariable
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
if (NewVariable != NULL) {
|
||||
|
|
|
@ -268,9 +268,9 @@ TerminalConInCheckForKey (
|
|||
Mode->BaudRate,
|
||||
Mode->ReceiveFifoDepth,
|
||||
(UINT32) SerialInTimeOut,
|
||||
Mode->Parity,
|
||||
(EFI_PARITY_TYPE) (Mode->Parity),
|
||||
(UINT8) Mode->DataBits,
|
||||
Mode->StopBits
|
||||
(EFI_STOP_BITS_TYPE) (Mode->StopBits)
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
@ -681,6 +681,7 @@ UnicodeFiFoGetKeyCount (
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
UnicodeToEfiKeyFlushState (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
|
@ -1162,6 +1163,7 @@ ESC R ESC r ESC R = Reset System
|
|||
TimerRelative,
|
||||
(UINT64)20000000
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ GetNextDataRecord (
|
|||
IN OUT UINT64 *PtrCurrentMTC
|
||||
);
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DataHubLogData (
|
||||
|
@ -177,6 +178,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DataHubGetNextRecord (
|
||||
|
@ -306,6 +308,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DataHubRegisterFilterDriver (
|
||||
|
@ -404,6 +407,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DataHubUnregisterFilterDriver (
|
||||
|
|
|
@ -294,4 +294,26 @@ Returns:
|
|||
--*/
|
||||
;
|
||||
|
||||
VOID
|
||||
CommonHandler (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EFI_SYSTEM_CONTEXT Context
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
C routine that is called for all registered exceptions. This is the main
|
||||
exception dispatcher. Must be public because it's referenced from AsmFuncs.s.
|
||||
|
||||
Arguments:
|
||||
ExceptionType - Exception Type
|
||||
Context - System Context
|
||||
|
||||
Returns:
|
||||
|
||||
Nothing
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,19 +29,91 @@ Revision History
|
|||
#include "DebugPort.h"
|
||||
|
||||
//
|
||||
// Misc. functions local to this module
|
||||
// Misc. functions local to this module..
|
||||
//
|
||||
STATIC
|
||||
VOID
|
||||
GetDebugPortVariable (
|
||||
DEBUGPORT_DEVICE *DebugPortDevice
|
||||
);
|
||||
DEBUGPORT_DEVICE *DebugPortDevice
|
||||
)
|
||||
/*++
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ImageUnloadHandler (
|
||||
EFI_HANDLE ImageHandle
|
||||
);
|
||||
Routine Description:
|
||||
Local worker function to obtain device path information from DebugPort variable.
|
||||
Records requested settings in DebugPort device structure.
|
||||
|
||||
Arguments:
|
||||
DEBUGPORT_DEVICE *DebugPortDevice,
|
||||
|
||||
Returns:
|
||||
|
||||
Nothing
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN DataSize;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = 0;
|
||||
|
||||
Status = gRT->GetVariable (
|
||||
(CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
|
||||
&gEfiDebugPortVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
DebugPortDevice->DebugPortVariable
|
||||
);
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
if (gDebugPortDevice->DebugPortVariable != NULL) {
|
||||
gBS->FreePool (gDebugPortDevice->DebugPortVariable);
|
||||
}
|
||||
|
||||
DebugPortDevice->DebugPortVariable = AllocatePool (DataSize);
|
||||
if (DebugPortDevice->DebugPortVariable != NULL) {
|
||||
gRT->GetVariable (
|
||||
(CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
|
||||
&gEfiDebugPortVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
DebugPortDevice->DebugPortVariable
|
||||
);
|
||||
DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DebugPortDevice->DebugPortVariable;
|
||||
while (!EfiIsDevicePathEnd (DevicePath) && !EfiIsUartDevicePath (DevicePath)) {
|
||||
DevicePath = EfiNextDevicePathNode (DevicePath);
|
||||
}
|
||||
|
||||
if (EfiIsDevicePathEnd (DevicePath)) {
|
||||
gBS->FreePool (gDebugPortDevice->DebugPortVariable);
|
||||
DebugPortDevice->DebugPortVariable = NULL;
|
||||
} else {
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->BaudRate,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->BaudRate,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
|
||||
);
|
||||
DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
|
||||
DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->Parity,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->Parity,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
|
||||
);
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->DataBits,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->DataBits,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
|
||||
);
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->StopBits,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->StopBits,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Globals
|
||||
|
@ -57,8 +129,6 @@ EFI_DRIVER_BINDING_PROTOCOL gDebugPortDriverBinding = {
|
|||
};
|
||||
|
||||
DEBUGPORT_DEVICE *gDebugPortDevice;
|
||||
static UINT32 mHid16550;
|
||||
static UINT32 mHidStdPcComPort;
|
||||
|
||||
//
|
||||
// implementation code
|
||||
|
@ -90,9 +160,6 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
mHid16550 = EFI_ACPI_16550UART_HID;
|
||||
mHidStdPcComPort = EFI_ACPI_PC_COMPORT_HID;
|
||||
|
||||
//
|
||||
// Allocate and Initialize dev structure
|
||||
//
|
||||
|
@ -113,9 +180,9 @@ Returns:
|
|||
gDebugPortDevice->BaudRate = DEBUGPORT_UART_DEFAULT_BAUDRATE;
|
||||
gDebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
|
||||
gDebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
|
||||
gDebugPortDevice->Parity = DEBUGPORT_UART_DEFAULT_PARITY;
|
||||
gDebugPortDevice->Parity = (EFI_PARITY_TYPE) DEBUGPORT_UART_DEFAULT_PARITY;
|
||||
gDebugPortDevice->DataBits = DEBUGPORT_UART_DEFAULT_DATA_BITS;
|
||||
gDebugPortDevice->StopBits = DEBUGPORT_UART_DEFAULT_STOP_BITS;
|
||||
gDebugPortDevice->StopBits = (EFI_STOP_BITS_TYPE) DEBUGPORT_UART_DEFAULT_STOP_BITS;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -521,11 +588,9 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
DEBUGPORT_DEVICE *DebugPortDevice;
|
||||
UINTN BufferSize;
|
||||
UINTN BitBucket;
|
||||
|
||||
DebugPortDevice = DEBUGPORT_DEVICE_FROM_THIS (This);
|
||||
while (This->Poll (This) == EFI_SUCCESS) {
|
||||
BufferSize = 1;
|
||||
This->Read (This, 0, &BufferSize, &BitBucket);
|
||||
|
@ -694,92 +759,6 @@ Returns:
|
|||
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Misc. functions local to this module..
|
||||
//
|
||||
STATIC
|
||||
VOID
|
||||
GetDebugPortVariable (
|
||||
DEBUGPORT_DEVICE *DebugPortDevice
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Local worker function to obtain device path information from DebugPort variable.
|
||||
Records requested settings in DebugPort device structure.
|
||||
|
||||
Arguments:
|
||||
DEBUGPORT_DEVICE *DebugPortDevice,
|
||||
|
||||
Returns:
|
||||
|
||||
Nothing
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN DataSize;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = 0;
|
||||
|
||||
Status = gRT->GetVariable (
|
||||
(CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
|
||||
&gEfiDebugPortVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
DebugPortDevice->DebugPortVariable
|
||||
);
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
if (gDebugPortDevice->DebugPortVariable != NULL) {
|
||||
gBS->FreePool (gDebugPortDevice->DebugPortVariable);
|
||||
}
|
||||
|
||||
DebugPortDevice->DebugPortVariable = AllocatePool (DataSize);
|
||||
if (DebugPortDevice->DebugPortVariable != NULL) {
|
||||
gRT->GetVariable (
|
||||
(CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
|
||||
&gEfiDebugPortVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
DebugPortDevice->DebugPortVariable
|
||||
);
|
||||
DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DebugPortDevice->DebugPortVariable;
|
||||
while (!EfiIsDevicePathEnd (DevicePath) && !EfiIsUartDevicePath (DevicePath)) {
|
||||
DevicePath = EfiNextDevicePathNode (DevicePath);
|
||||
}
|
||||
|
||||
if (EfiIsDevicePathEnd (DevicePath)) {
|
||||
gBS->FreePool (gDebugPortDevice->DebugPortVariable);
|
||||
DebugPortDevice->DebugPortVariable = NULL;
|
||||
} else {
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->BaudRate,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->BaudRate,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
|
||||
);
|
||||
DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
|
||||
DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->Parity,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->Parity,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
|
||||
);
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->DataBits,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->DataBits,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
|
||||
);
|
||||
gBS->CopyMem (
|
||||
&DebugPortDevice->StopBits,
|
||||
&((UART_DEVICE_PATH *) DevicePath)->StopBits,
|
||||
sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
|
|
@ -21,6 +21,7 @@ Abstract:
|
|||
|
||||
#include "DevicePath.h"
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
StrDuplicate (
|
||||
IN CONST CHAR16 *Src
|
||||
|
@ -48,6 +49,7 @@ StrDuplicate (
|
|||
return ReturnStr;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
GetParamByNodeName (
|
||||
IN CHAR16 *Str,
|
||||
|
@ -118,6 +120,7 @@ GetParamByNodeName (
|
|||
return ParamStr;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
SplitStr (
|
||||
IN OUT CHAR16 **List,
|
||||
|
@ -176,6 +179,7 @@ SplitStr (
|
|||
return ReturnStr;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
GetNextParamStr (
|
||||
IN OUT CHAR16 **List
|
||||
|
@ -187,6 +191,7 @@ GetNextParamStr (
|
|||
return SplitStr (List, L',');
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
GetNextDeviceNodeStr (
|
||||
IN OUT CHAR16 **DevicePath,
|
||||
|
@ -273,6 +278,7 @@ GetNextDeviceNodeStr (
|
|||
return ReturnStr;
|
||||
}
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
IsHexDigit (
|
||||
OUT UINT8 *Digit,
|
||||
|
@ -312,6 +318,7 @@ IsHexDigit (
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16
|
||||
NibbleToHexChar (
|
||||
IN UINT8 Nibble
|
||||
|
@ -337,6 +344,7 @@ NibbleToHexChar (
|
|||
return (CHAR16)(Nibble - 0xA + L'A');
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
HexStringToBuf (
|
||||
IN OUT UINT8 *Buf,
|
||||
|
@ -410,7 +418,7 @@ HexStringToBuf (
|
|||
} else {
|
||||
Byte = Buf[Idx / 2];
|
||||
Byte &= 0x0F;
|
||||
Byte |= Digit << 4;
|
||||
Byte = (UINT8) (Byte | Digit << 4);
|
||||
}
|
||||
|
||||
Buf[Idx / 2] = Byte;
|
||||
|
@ -423,6 +431,7 @@ HexStringToBuf (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
BufToHexString (
|
||||
IN OUT CHAR16 *Str,
|
||||
|
@ -481,6 +490,7 @@ BufToHexString (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
TrimHexStr (
|
||||
IN CHAR16 *Str
|
||||
|
@ -519,6 +529,7 @@ TrimHexStr (
|
|||
return Str;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
Xtoi (
|
||||
IN CHAR16 *Str
|
||||
|
@ -552,6 +563,7 @@ Returns:
|
|||
return Rvalue;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
Xtoi64 (
|
||||
IN CHAR16 *Str,
|
||||
|
@ -578,6 +590,7 @@ Returns:
|
|||
HexStringToBuf ((UINT8 *) Data, &Length, TrimHexStr (Str), NULL);
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
Atoi (
|
||||
IN CHAR16 *str
|
||||
|
@ -633,6 +646,7 @@ Returns:
|
|||
return Rvalue;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
StrToBuf (
|
||||
OUT UINT8 *Buf,
|
||||
|
@ -659,11 +673,11 @@ StrToBuf (
|
|||
// and for even characters, the lower nibble.
|
||||
//
|
||||
if ((Index & 1) == 0) {
|
||||
Byte = Digit << 4;
|
||||
Byte = (UINT8) (Digit << 4);
|
||||
} else {
|
||||
Byte = Buf[Index / 2];
|
||||
Byte &= 0xF0;
|
||||
Byte |= Digit;
|
||||
Byte = (UINT8) (Byte | Digit);
|
||||
}
|
||||
|
||||
Buf[Index / 2] = Byte;
|
||||
|
@ -672,6 +686,7 @@ StrToBuf (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
StrToGuid (
|
||||
IN CHAR16 *Str,
|
||||
|
@ -734,6 +749,7 @@ StrToGuid (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
StrToIPv4Addr (
|
||||
IN OUT CHAR16 **Str,
|
||||
|
@ -747,6 +763,7 @@ StrToIPv4Addr (
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
StrToIPv6Addr (
|
||||
IN OUT CHAR16 **Str,
|
||||
|
@ -763,6 +780,7 @@ StrToIPv6Addr (
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
StrToAscii (
|
||||
IN CHAR16 *Str,
|
||||
|
@ -783,6 +801,7 @@ StrToAscii (
|
|||
*AsciiStr = Dest + 1;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextPci (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -806,6 +825,7 @@ DevPathFromTextPci (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Pci;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextPcCard (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -826,6 +846,7 @@ DevPathFromTextPcCard (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Pccard;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextMemoryMapped (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -851,6 +872,7 @@ DevPathFromTextMemoryMapped (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) MemMap;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
ConvertFromTextVendor (
|
||||
IN CHAR16 *TextDeviceNode,
|
||||
|
@ -884,6 +906,7 @@ ConvertFromTextVendor (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenHw (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -896,6 +919,7 @@ DevPathFromTextVenHw (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextCtrl (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -915,6 +939,7 @@ DevPathFromTextCtrl (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Controller;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextAcpi (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -942,6 +967,7 @@ DevPathFromTextAcpi (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Acpi;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
ConvertFromTextAcpi (
|
||||
IN CHAR16 *TextDeviceNode,
|
||||
|
@ -964,6 +990,7 @@ ConvertFromTextAcpi (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Acpi;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextPciRoot (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -972,6 +999,7 @@ DevPathFromTextPciRoot (
|
|||
return ConvertFromTextAcpi (TextDeviceNode, 0x0a0341d0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextFloppy (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -980,6 +1008,7 @@ DevPathFromTextFloppy (
|
|||
return ConvertFromTextAcpi (TextDeviceNode, 0x060441d0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextKeyboard (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -988,6 +1017,7 @@ DevPathFromTextKeyboard (
|
|||
return ConvertFromTextAcpi (TextDeviceNode, 0x030141d0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextSerial (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -996,6 +1026,7 @@ DevPathFromTextSerial (
|
|||
return ConvertFromTextAcpi (TextDeviceNode, 0x050141d0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextParallelPort (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1004,6 +1035,7 @@ DevPathFromTextParallelPort (
|
|||
return ConvertFromTextAcpi (TextDeviceNode, 0x040141d0);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextAcpiEx (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1025,10 +1057,10 @@ DevPathFromTextAcpiEx (
|
|||
HIDSTRStr = GetNextParamStr (&TextDeviceNode);
|
||||
CIDSTRStr = GetNextParamStr (&TextDeviceNode);
|
||||
UIDSTRStr = GetNextParamStr (&TextDeviceNode);
|
||||
Length = sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) +
|
||||
(UINT16) StrLen (HIDSTRStr) + 1 +
|
||||
(UINT16) StrLen (UIDSTRStr) + 1 +
|
||||
(UINT16) StrLen (CIDSTRStr) + 1;
|
||||
|
||||
Length = (UINT16) (sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (HIDSTRStr) + 1);
|
||||
Length = (UINT16) (Length + StrLen (UIDSTRStr) + 1);
|
||||
Length = (UINT16) (Length + StrLen (CIDSTRStr) + 1);
|
||||
AcpiExt = (ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *) CreateDeviceNode (
|
||||
ACPI_DEVICE_PATH,
|
||||
ACPI_EXTENDED_DP,
|
||||
|
@ -1053,6 +1085,7 @@ DevPathFromTextAcpiEx (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) AcpiExt;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextAcpiExp (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1103,6 +1136,7 @@ DevPathFromTextAcpiExp (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) AcpiExt;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextAta (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1123,13 +1157,14 @@ DevPathFromTextAta (
|
|||
SlaveMasterStr = GetNextParamStr (&TextDeviceNode);
|
||||
LunStr = GetNextParamStr (&TextDeviceNode);
|
||||
|
||||
Atapi->PrimarySecondary = (StrCmp (PrimarySecondaryStr, L"Primary") == 0) ? (UINT8) 0 : (UINT8) 1;
|
||||
Atapi->SlaveMaster = (StrCmp (SlaveMasterStr, L"Master") == 0) ? (UINT8) 0 : (UINT8) 1;
|
||||
Atapi->PrimarySecondary = (UINT8) ((StrCmp (PrimarySecondaryStr, L"Primary") == 0) ? 0 : 1);
|
||||
Atapi->SlaveMaster = (UINT8) ((StrCmp (SlaveMasterStr, L"Master") == 0) ? 0 : 1);
|
||||
Atapi->Lun = (UINT16) Xtoi (LunStr);
|
||||
|
||||
return (EFI_DEVICE_PATH_PROTOCOL *) Atapi;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextScsi (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1153,6 +1188,7 @@ DevPathFromTextScsi (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Scsi;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextFibre (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1177,6 +1213,7 @@ DevPathFromTextFibre (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Fibre;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromText1394 (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1198,6 +1235,7 @@ DevPathFromText1394 (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) F1394;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsb (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1221,6 +1259,7 @@ DevPathFromTextUsb (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Usb;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextI2O (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1241,6 +1280,7 @@ DevPathFromTextI2O (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) I2O;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextInfiniband (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1275,6 +1315,7 @@ DevPathFromTextInfiniband (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) InfiniBand;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenMsg (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1287,6 +1328,7 @@ DevPathFromTextVenMsg (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenPcAnsi (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1303,6 +1345,7 @@ DevPathFromTextVenPcAnsi (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenVt100 (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1319,6 +1362,7 @@ DevPathFromTextVenVt100 (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenVt100Plus (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1335,6 +1379,7 @@ DevPathFromTextVenVt100Plus (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenUtf8 (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1351,6 +1396,7 @@ DevPathFromTextVenUtf8 (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUartFlowCtrl (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1378,6 +1424,7 @@ DevPathFromTextUartFlowCtrl (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) UartFlowControl;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextSAS (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1442,6 +1489,7 @@ DevPathFromTextSAS (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Sas;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextDebugPort (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1460,6 +1508,7 @@ DevPathFromTextDebugPort (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextMAC (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1486,6 +1535,7 @@ DevPathFromTextMAC (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) MAC;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextIPv4 (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1508,7 +1558,7 @@ DevPathFromTextIPv4 (
|
|||
);
|
||||
|
||||
StrToIPv4Addr (&RemoteIPStr, &IPv4->RemoteIpAddress);
|
||||
IPv4->Protocol = (StrCmp (ProtocolStr, L"UDP") == 0) ? (UINT16) 0 : (UINT16) 1;
|
||||
IPv4->Protocol = (UINT16) ((StrCmp (ProtocolStr, L"UDP") == 0) ? 0 : 1);
|
||||
if (StrCmp (TypeStr, L"Static") == 0) {
|
||||
IPv4->StaticIpAddress = TRUE;
|
||||
} else {
|
||||
|
@ -1523,6 +1573,7 @@ DevPathFromTextIPv4 (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) IPv4;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextIPv6 (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1545,7 +1596,7 @@ DevPathFromTextIPv6 (
|
|||
);
|
||||
|
||||
StrToIPv6Addr (&RemoteIPStr, &IPv6->RemoteIpAddress);
|
||||
IPv6->Protocol = (StrCmp (ProtocolStr, L"UDP") == 0) ? (UINT16) 0 : (UINT16) 1;
|
||||
IPv6->Protocol = (UINT16) ((StrCmp (ProtocolStr, L"UDP") == 0) ? 0 : 1);
|
||||
if (StrCmp (TypeStr, L"Static") == 0) {
|
||||
IPv6->StaticIpAddress = TRUE;
|
||||
} else {
|
||||
|
@ -1560,6 +1611,7 @@ DevPathFromTextIPv6 (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) IPv6;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUart (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1582,7 +1634,7 @@ DevPathFromTextUart (
|
|||
);
|
||||
|
||||
Uart->BaudRate = (StrCmp (BaudStr, L"DEFAULT") == 0) ? 115200 : Atoi (BaudStr);
|
||||
Uart->DataBits = (StrCmp (DataBitsStr, L"DEFAULT") == 0) ? (UINT8) 8 : (UINT8) Atoi (DataBitsStr);
|
||||
Uart->DataBits = (UINT8) ((StrCmp (DataBitsStr, L"DEFAULT") == 0) ? 8 : Atoi (DataBitsStr));
|
||||
switch (*ParityStr) {
|
||||
case L'D':
|
||||
Uart->Parity = 0;
|
||||
|
@ -1626,6 +1678,7 @@ DevPathFromTextUart (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Uart;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
ConvertFromTextUsbClass (
|
||||
IN CHAR16 *TextDeviceNode,
|
||||
|
@ -1670,6 +1723,7 @@ ConvertFromTextUsbClass (
|
|||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbClass (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1683,6 +1737,7 @@ DevPathFromTextUsbClass (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbAudio (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1697,6 +1752,7 @@ DevPathFromTextUsbAudio (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbCDCControl (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1711,6 +1767,7 @@ DevPathFromTextUsbCDCControl (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbHID (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1725,6 +1782,7 @@ DevPathFromTextUsbHID (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbImage (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1739,6 +1797,7 @@ DevPathFromTextUsbImage (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbPrinter (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1753,6 +1812,7 @@ DevPathFromTextUsbPrinter (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbMassStorage (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1767,6 +1827,7 @@ DevPathFromTextUsbMassStorage (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbHub (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1781,6 +1842,7 @@ DevPathFromTextUsbHub (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbCDCData (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1795,6 +1857,7 @@ DevPathFromTextUsbCDCData (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbSmartCard (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1809,6 +1872,7 @@ DevPathFromTextUsbSmartCard (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbVideo (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1823,6 +1887,7 @@ DevPathFromTextUsbVideo (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbDiagnostic (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1837,6 +1902,7 @@ DevPathFromTextUsbDiagnostic (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbWireless (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1851,6 +1917,7 @@ DevPathFromTextUsbWireless (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbDeviceFirmwareUpdate (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1866,6 +1933,7 @@ DevPathFromTextUsbDeviceFirmwareUpdate (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbIrdaBridge (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1881,6 +1949,7 @@ DevPathFromTextUsbIrdaBridge (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbTestAndMeasurement (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1896,6 +1965,7 @@ DevPathFromTextUsbTestAndMeasurement (
|
|||
return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUsbWwid (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1922,6 +1992,7 @@ DevPathFromTextUsbWwid (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) UsbWwid;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextUnit (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1942,6 +2013,7 @@ DevPathFromTextUnit (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) LogicalUnit;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextiSCSI (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -1999,6 +2071,7 @@ DevPathFromTextiSCSI (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) iSCSI;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextHD (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -2054,6 +2127,7 @@ DevPathFromTextHD (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Hd;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextCDROM (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -2080,6 +2154,7 @@ DevPathFromTextCDROM (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) CDROM;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextVenMEDIA (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -2092,6 +2167,7 @@ DevPathFromTextVenMEDIA (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextFilePath (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -2110,6 +2186,7 @@ DevPathFromTextFilePath (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) File;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextMedia (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
@ -2130,6 +2207,7 @@ DevPathFromTextMedia (
|
|||
return (EFI_DEVICE_PATH_PROTOCOL *) Media;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DevPathFromTextBBS (
|
||||
IN CHAR16 *TextDeviceNode
|
||||
|
|
|
@ -21,6 +21,7 @@ Abstract:
|
|||
|
||||
#include "DevicePath.h"
|
||||
|
||||
STATIC
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
UnpackDevicePath (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
|
||||
|
@ -95,6 +96,7 @@ UnpackDevicePath (
|
|||
return NewPath;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID *
|
||||
ReallocatePool (
|
||||
IN VOID *OldPool,
|
||||
|
@ -136,6 +138,7 @@ ReallocatePool (
|
|||
return NewPool;
|
||||
}
|
||||
|
||||
STATIC
|
||||
CHAR16 *
|
||||
CatPrint (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -177,7 +180,8 @@ CatPrint (
|
|||
Str->Str = AllocateZeroPool (Size);
|
||||
ASSERT (Str->Str != NULL);
|
||||
} else {
|
||||
Size = StrSize (AppendStr) + StrSize (Str->Str) - sizeof (UINT16);
|
||||
Size = StrSize (AppendStr) - sizeof (UINT16);
|
||||
Size = Size + StrSize (Str->Str);
|
||||
Str->Str = ReallocatePool (
|
||||
Str->Str,
|
||||
StrSize (Str->Str),
|
||||
|
@ -196,6 +200,7 @@ CatPrint (
|
|||
return Str->Str;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextPci (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -210,6 +215,7 @@ DevPathToTextPci (
|
|||
CatPrint (Str, L"Pci(%x,%x)", Pci->Function, Pci->Device);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextPccard (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -224,6 +230,7 @@ DevPathToTextPccard (
|
|||
CatPrint (Str, L"PcCard(%x)", Pccard->FunctionNumber);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextMemMap (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -243,6 +250,7 @@ DevPathToTextMemMap (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextVendor (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -357,6 +365,7 @@ DevPathToTextVendor (
|
|||
CatPrint (Str, L")");
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextController (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -375,6 +384,7 @@ DevPathToTextController (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextAcpi (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -424,6 +434,7 @@ DevPathToTextAcpi (
|
|||
|
||||
#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + AsciiStrLen ((CHAR8 *) (a)) + 1))
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextExtAcpi (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -433,12 +444,14 @@ DevPathToTextExtAcpi (
|
|||
)
|
||||
{
|
||||
ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *AcpiExt;
|
||||
UINT8 *NextString;
|
||||
|
||||
AcpiExt = DevPath;
|
||||
|
||||
if (AllowShortcuts) {
|
||||
NextString = NextStrA (AcpiExt->HidUidCidStr);
|
||||
if ((*(AcpiExt->HidUidCidStr) == '\0') &&
|
||||
(*(NextStrA (NextStrA (AcpiExt->HidUidCidStr))) == '\0') &&
|
||||
(*(NextStrA (NextString)) == '\0') &&
|
||||
(AcpiExt->UID == 0)
|
||||
) {
|
||||
if ((AcpiExt->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
|
||||
|
@ -462,6 +475,8 @@ DevPathToTextExtAcpi (
|
|||
return ;
|
||||
}
|
||||
|
||||
NextString = NextStrA (AcpiExt->HidUidCidStr);
|
||||
NextString = NextStrA (NextString);
|
||||
if ((AcpiExt->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
|
||||
CatPrint (
|
||||
Str,
|
||||
|
@ -470,7 +485,7 @@ DevPathToTextExtAcpi (
|
|||
AcpiExt->CID,
|
||||
AcpiExt->UID,
|
||||
AcpiExt->HidUidCidStr,
|
||||
NextStrA (NextStrA (AcpiExt->HidUidCidStr)),
|
||||
NextString,
|
||||
NextStrA (AcpiExt->HidUidCidStr)
|
||||
);
|
||||
} else {
|
||||
|
@ -481,12 +496,13 @@ DevPathToTextExtAcpi (
|
|||
AcpiExt->CID,
|
||||
AcpiExt->UID,
|
||||
AcpiExt->HidUidCidStr,
|
||||
NextStrA (NextStrA (AcpiExt->HidUidCidStr)),
|
||||
NextString,
|
||||
NextStrA (AcpiExt->HidUidCidStr)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextAtapi (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -512,6 +528,7 @@ DevPathToTextAtapi (
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextScsi (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -526,6 +543,7 @@ DevPathToTextScsi (
|
|||
CatPrint (Str, L"Scsi(%x,%x)", Scsi->Pun, Scsi->Lun);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextFibre (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -540,6 +558,7 @@ DevPathToTextFibre (
|
|||
CatPrint (Str, L"Fibre(%lx,%lx)", Fibre->WWN, Fibre->Lun);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToText1394 (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -554,6 +573,7 @@ DevPathToText1394 (
|
|||
CatPrint (Str, L"I1394(%lx)", F1394->Guid);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextUsb (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -568,6 +588,7 @@ DevPathToTextUsb (
|
|||
CatPrint (Str, L"USB(%x,%x)", Usb->ParentPortNumber, Usb->InterfaceNumber);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextUsbWWID (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -588,6 +609,7 @@ DevPathToTextUsbWWID (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextLogicalUnit (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -602,6 +624,7 @@ DevPathToTextLogicalUnit (
|
|||
CatPrint (Str, L"Unit(%x)", LogicalUnit->Lun);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextUsbClass (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -794,6 +817,7 @@ DevPathToTextUsbClass (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextI2O (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -808,6 +832,7 @@ DevPathToTextI2O (
|
|||
CatPrint (Str, L"I2O(%x)", I2O->Tid);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextMacAddr (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -836,6 +861,7 @@ DevPathToTextMacAddr (
|
|||
CatPrint (Str, L",%x)", MAC->IfType);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextIPv4 (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -875,6 +901,7 @@ DevPathToTextIPv4 (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextIPv6 (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -950,6 +977,7 @@ DevPathToTextIPv6 (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextInfiniBand (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -972,6 +1000,7 @@ DevPathToTextInfiniBand (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextUart (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1051,6 +1080,7 @@ DevPathToTextUart (
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextiSCSI (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1086,6 +1116,7 @@ DevPathToTextiSCSI (
|
|||
CatPrint (Str, L"%s)", (iSCSI->NetworkProtocol == 0) ? L"TCP" : L"reserved");
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextHardDrive (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1134,6 +1165,7 @@ DevPathToTextHardDrive (
|
|||
CatPrint (Str, L"%lx,%lx)", Hd->PartitionStart, Hd->PartitionSize);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextCDROM (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1153,6 +1185,7 @@ DevPathToTextCDROM (
|
|||
CatPrint (Str, L"CDROM(%x,%lx,%lx)", Cd->BootEntry, Cd->PartitionStart, Cd->PartitionSize);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextFilePath (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1167,6 +1200,7 @@ DevPathToTextFilePath (
|
|||
CatPrint (Str, L"%s", Fp->PathName);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextMediaProtocol (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1181,6 +1215,7 @@ DevPathToTextMediaProtocol (
|
|||
CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextBBS (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1233,6 +1268,7 @@ DevPathToTextBBS (
|
|||
CatPrint (Str, L",%x)", Bbs->StatusFlag);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextEndInstance (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
@ -1244,6 +1280,7 @@ DevPathToTextEndInstance (
|
|||
CatPrint (Str, L",");
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
DevPathToTextNodeUnknown (
|
||||
IN OUT POOL_PRINT *Str,
|
||||
|
|
|
@ -31,6 +31,7 @@ Abstract:
|
|||
|
||||
#include "Partition.h"
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
PartitionValidMbr (
|
||||
IN MASTER_BOOT_RECORD *Mbr,
|
||||
|
|
|
@ -437,6 +437,7 @@ PartitionDriverBindingStop (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PartitionReset (
|
||||
|
@ -469,6 +470,7 @@ PartitionReset (
|
|||
);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PartitionReadBlocks (
|
||||
|
@ -524,6 +526,7 @@ PartitionReadBlocks (
|
|||
return Private->DiskIo->ReadDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PartitionWriteBlocks (
|
||||
|
@ -580,6 +583,7 @@ PartitionWriteBlocks (
|
|||
return Private->DiskIo->WriteDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PartitionFlushBlocks (
|
||||
|
|
|
@ -1098,7 +1098,6 @@ Returns:
|
|||
UINT8 Operands;
|
||||
VOID *EbcEntryPoint;
|
||||
VOID *Thunk;
|
||||
EFI_STATUS Status;
|
||||
UINT64 U64EbcEntryPoint;
|
||||
INT32 Offset;
|
||||
|
||||
|
@ -1162,7 +1161,7 @@ Returns:
|
|||
//
|
||||
// Now create a new thunk
|
||||
//
|
||||
Status = EbcCreateThunks (VmPtr->ImageHandle, EbcEntryPoint, &Thunk, 0);
|
||||
EbcCreateThunks (VmPtr->ImageHandle, EbcEntryPoint, &Thunk, 0);
|
||||
|
||||
//
|
||||
// Finally replace the EBC entry point memory with the thunk address
|
||||
|
|
|
@ -76,6 +76,7 @@ PushU64 (
|
|||
*(UINT64 *) VmPtr->R[0] = Arg;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT64
|
||||
EbcInterpret (
|
||||
UINT64 Arg1,
|
||||
|
@ -468,14 +469,14 @@ Returns:
|
|||
//
|
||||
// Next is jumbled data, including opcode and rest of address
|
||||
//
|
||||
Code[2] = LShiftU64 (Imm7b, 13)
|
||||
| LShiftU64 (0x00, 20) // vc
|
||||
| LShiftU64 (Ic, 21)
|
||||
| LShiftU64 (Imm5c, 22)
|
||||
| LShiftU64 (Imm9d, 27)
|
||||
| LShiftU64 (I, 36)
|
||||
| LShiftU64 ((UINT64)MOVL_OPCODE, 37)
|
||||
| LShiftU64 ((RegNum & 0x7F), 6);
|
||||
Code[2] = LShiftU64 (Imm7b, 13);
|
||||
Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
|
||||
Code[2] = Code[2] | LShiftU64 (Ic, 21);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
|
||||
Code[2] = Code[2] | LShiftU64 (I, 36);
|
||||
Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
|
||||
Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
|
||||
|
||||
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
|
||||
|
||||
|
@ -533,14 +534,14 @@ Returns:
|
|||
//
|
||||
// Next is jumbled data, including opcode and rest of address
|
||||
//
|
||||
Code[2] = LShiftU64 (Imm7b, 13)
|
||||
| LShiftU64 (0x00, 20) // vc
|
||||
| LShiftU64 (Ic, 21)
|
||||
| LShiftU64 (Imm5c, 22)
|
||||
| LShiftU64 (Imm9d, 27)
|
||||
| LShiftU64 (I, 36)
|
||||
| LShiftU64 ((UINT64)MOVL_OPCODE, 37)
|
||||
| LShiftU64 ((RegNum & 0x7F), 6);
|
||||
Code[2] = LShiftU64 (Imm7b, 13);
|
||||
Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
|
||||
Code[2] = Code[2] | LShiftU64 (Ic, 21);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
|
||||
Code[2] = Code[2] | LShiftU64 (I, 36);
|
||||
Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
|
||||
Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
|
||||
|
||||
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
|
||||
|
||||
|
@ -604,14 +605,14 @@ Returns:
|
|||
//
|
||||
// Next is jumbled data, including opcode and rest of address
|
||||
//
|
||||
Code[2] = LShiftU64(Imm7b, 13)
|
||||
| LShiftU64 (0x00, 20) // vc
|
||||
| LShiftU64 (Ic, 21)
|
||||
| LShiftU64 (Imm5c, 22)
|
||||
| LShiftU64 (Imm9d, 27)
|
||||
| LShiftU64 (I, 36)
|
||||
| LShiftU64 ((UINT64)MOVL_OPCODE, 37)
|
||||
| LShiftU64 ((RegNum & 0x7F), 6);
|
||||
Code[2] = LShiftU64(Imm7b, 13);
|
||||
Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
|
||||
Code[2] = Code[2] | LShiftU64 (Ic, 21);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
|
||||
Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
|
||||
Code[2] = Code[2] | LShiftU64 (I, 36);
|
||||
Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
|
||||
Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
|
||||
|
||||
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
|
||||
|
||||
|
@ -722,8 +723,11 @@ Returns:
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Low64 = LShiftU64 (Slot1, 46) | LShiftU64 (Slot0, 5) | Template;
|
||||
High64 = RShiftU64 (Slot1, 18) | LShiftU64 (Slot2, 23);
|
||||
Low64 = LShiftU64 (Slot1, 46);
|
||||
Low64 = Low64 | LShiftU64 (Slot0, 5) | Template;
|
||||
|
||||
High64 = RShiftU64 (Slot1, 18);
|
||||
High64 = High64 | LShiftU64 (Slot2, 23);
|
||||
|
||||
//
|
||||
// Now write it all out
|
||||
|
@ -816,14 +820,13 @@ Returns:
|
|||
CodeTwo5c = RShiftU64 (*((UINT64 *)CalleeAddr + 3), 45) & 0x1F;
|
||||
CodeTwo9d = RShiftU64 (*((UINT64 *)CalleeAddr + 3), 50) & 0x1FF;
|
||||
|
||||
TargetEbcAddr = CodeTwo7b
|
||||
| LShiftU64 (CodeTwo9d, 7)
|
||||
| LShiftU64 (CodeTwo5c, 16)
|
||||
| LShiftU64 (CodeTwoIc, 21)
|
||||
| LShiftU64 (CodeOne18, 22)
|
||||
| LShiftU64 (CodeOne23, 40)
|
||||
| LShiftU64 (CodeTwoI, 63)
|
||||
;
|
||||
TargetEbcAddr = CodeTwo7b;
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwo9d, 7);
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwo5c, 16);
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwoIc, 21);
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeOne18, 22);
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeOne23, 40);
|
||||
TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwoI, 63);
|
||||
|
||||
Action:
|
||||
if (IsThunk == 1){
|
||||
|
|
|
@ -26,6 +26,7 @@ Revision History
|
|||
//
|
||||
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
||||
|
||||
STATIC
|
||||
UINT32
|
||||
EFIAPI
|
||||
ArrayLength (
|
||||
|
@ -62,6 +63,7 @@ Returns:
|
|||
return (Count * 2) + 2;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VARIABLE_STORE_STATUS
|
||||
EFIAPI
|
||||
GetVariableStoreStatus (
|
||||
|
@ -103,6 +105,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT8 *
|
||||
EFIAPI
|
||||
GetVariableDataPtr (
|
||||
|
@ -133,6 +136,7 @@ Returns:
|
|||
return (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (Variable) + Variable->NameSize + GET_PAD_SIZE (Variable->NameSize));
|
||||
}
|
||||
|
||||
STATIC
|
||||
VARIABLE_HEADER *
|
||||
EFIAPI
|
||||
GetNextVariablePtr (
|
||||
|
@ -173,6 +177,7 @@ Returns:
|
|||
return VarHeader;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VARIABLE_HEADER *
|
||||
EFIAPI
|
||||
GetEndPointer (
|
||||
|
@ -200,6 +205,7 @@ Returns:
|
|||
return (VARIABLE_HEADER *) ((UINTN) VolHeader + VolHeader->Size);
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FindVariable (
|
||||
|
@ -413,7 +419,7 @@ Returns:
|
|||
Variable.StartPtr = (VARIABLE_HEADER *) ((UINTN) (Global->VolatileVariableBase + sizeof (VARIABLE_STORE_HEADER)));
|
||||
Variable.EndPtr = (VARIABLE_HEADER *) GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) Global->VolatileVariableBase));
|
||||
} else {
|
||||
return EFI_NOT_FOUND;
|
||||
goto Error;
|
||||
}
|
||||
|
||||
Variable.CurrPtr = Variable.StartPtr;
|
||||
|
@ -449,6 +455,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
Error:
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
@ -755,6 +762,7 @@ Returns:
|
|||
}
|
||||
#endif
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeVariableStore (
|
||||
|
|
|
@ -26,6 +26,7 @@ Revision History
|
|||
//
|
||||
extern ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
||||
|
||||
STATIC
|
||||
SAL_RETURN_REGS
|
||||
EsalVariableCommonEntry (
|
||||
IN UINT64 FunctionId,
|
||||
|
|
|
@ -193,7 +193,7 @@ Notes:
|
|||
}
|
||||
|
||||
State ^= FTW_POLARITY_REVERT;
|
||||
State |= NewBit;
|
||||
State = (UINT8) (State | NewBit);
|
||||
State ^= FTW_POLARITY_REVERT;
|
||||
|
||||
//
|
||||
|
|
|
@ -91,7 +91,6 @@ Returns:
|
|||
--*/
|
||||
{
|
||||
UINT32 TestPattern;
|
||||
UINT32 TestMask;
|
||||
EFI_PHYSICAL_ADDRESS TempAddress;
|
||||
UINT32 SpanSize;
|
||||
|
||||
|
@ -101,7 +100,6 @@ Returns:
|
|||
);
|
||||
|
||||
TestPattern = TEST_PATTERN;
|
||||
TestMask = 0;
|
||||
SpanSize = 0;
|
||||
|
||||
//
|
||||
|
|
|
@ -51,6 +51,7 @@ EFI_GUID mEfiMtcGuid = { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0,
|
|||
//
|
||||
// Worker functions
|
||||
//
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MonotonicCounterDriverGetNextMonotonicCount (
|
||||
|
@ -132,6 +133,7 @@ Returns:
|
|||
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MonotonicCounterDriverGetNextHighMonotonicCount (
|
||||
|
@ -181,6 +183,7 @@ Returns:
|
|||
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
EfiMtcEventHandler (
|
||||
|
|
|
@ -494,6 +494,23 @@ typedef union {
|
|||
#include "dhcp.h"
|
||||
#include "tftp.h"
|
||||
|
||||
VOID
|
||||
InitArpHeader (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
Routine description:
|
||||
Initialize ARP packet header.
|
||||
|
||||
Parameters:
|
||||
none
|
||||
|
||||
Returns:
|
||||
none
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#endif /* _BC_H */
|
||||
|
||||
/* EOF - bc.h */
|
||||
|
|
|
@ -45,17 +45,6 @@ PxeBcDriverStop (
|
|||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
extern
|
||||
VOID
|
||||
InitArpHeader (
|
||||
VOID
|
||||
);
|
||||
extern
|
||||
VOID
|
||||
OptionsStrucInit (
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// helper routines
|
||||
//
|
||||
|
@ -310,8 +299,8 @@ IpChecksum2 (
|
|||
{
|
||||
UINT32 Sum;
|
||||
|
||||
Sum = (UINT16)~IpChecksum (Header, HeaderLen) + (UINT16)~IpChecksum (Message, MessageLen);
|
||||
|
||||
Sum = (UINT16)~IpChecksum (Header, HeaderLen);
|
||||
Sum = Sum + (UINT16)~IpChecksum (Message, MessageLen);
|
||||
//
|
||||
// in case above carried
|
||||
//
|
||||
|
@ -1597,7 +1586,6 @@ BcStop (
|
|||
//
|
||||
// Lock the instance data
|
||||
//
|
||||
EFI_PXE_BASE_CODE_MODE *PxebcMode;
|
||||
EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr;
|
||||
EFI_SIMPLE_NETWORK_MODE *SnpModePtr;
|
||||
EFI_STATUS StatCode;
|
||||
|
@ -1619,7 +1607,6 @@ BcStop (
|
|||
|
||||
EfiAcquireLock (&Private->Lock);
|
||||
|
||||
PxebcMode = Private->EfiBc.Mode;
|
||||
SnpPtr = Private->SimpleNetwork;
|
||||
SnpModePtr = SnpPtr->Mode;
|
||||
|
||||
|
@ -2069,13 +2056,11 @@ BcSetStationIP (
|
|||
--*/
|
||||
{
|
||||
EFI_PXE_BASE_CODE_MODE *PxebcMode;
|
||||
EFI_STATUS StatCode;
|
||||
PXE_BASECODE_DEVICE *Private;
|
||||
|
||||
//
|
||||
// Lock the instance data and make sure started
|
||||
//
|
||||
StatCode = EFI_SUCCESS;
|
||||
|
||||
if (This == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "BC *This pointer == NULL"));
|
||||
|
|
|
@ -622,6 +622,11 @@ typedef struct DhcpReceiveBufferStruct {
|
|||
#define CREDENTIALS_TYPE (1 << 3)
|
||||
#define USE_THREE_BYTE (1 << 4)
|
||||
|
||||
VOID
|
||||
OptionsStrucInit (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // _DHCP_H
|
||||
|
||||
/* EOF - dhcp.h */
|
||||
|
|
|
@ -211,7 +211,7 @@ OptionsStrucInit (
|
|||
CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMajor, "yyy", sizeof ("yyy"));
|
||||
CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMinor, "xxx", sizeof ("xxx"));
|
||||
DHCPOpStart.End[0] = OP_END;
|
||||
};
|
||||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
@ -399,6 +399,7 @@ STATIC UINT8 OurDhcpOptions[MAX_OUR_OPT] = {
|
|||
#pragma pack()
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
CHAR8 *
|
||||
PxeBcLibGetSmbiosString (
|
||||
IN SMBIOS_STRUCTURE_POINTER *Smbios,
|
||||
|
@ -855,6 +856,7 @@ DecodeOptions (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
VOID
|
||||
Parse (
|
||||
DHCP_RECEIVE_BUFFER *RxBufPtr,
|
||||
|
@ -958,6 +960,7 @@ CopyParse (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
BOOLEAN
|
||||
AckEdit (
|
||||
DHCP_RECEIVE_BUFFER *DhcpRxBuf
|
||||
|
@ -984,6 +987,7 @@ AckEdit (
|
|||
//
|
||||
// if a discover type packet, make sure all required fields are present
|
||||
//
|
||||
STATIC
|
||||
BOOLEAN
|
||||
DHCPOfferAckEdit (
|
||||
DHCP_RECEIVE_BUFFER *DhcpRxBuf
|
||||
|
@ -1126,6 +1130,7 @@ DHCPOfferAckEdit (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
BOOLEAN
|
||||
DHCPAckEdit (
|
||||
DHCP_RECEIVE_BUFFER *RxBufPtr
|
||||
|
@ -1139,6 +1144,7 @@ DHCPAckEdit (
|
|||
//
|
||||
// get an offer/ack
|
||||
//
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetOfferAck (
|
||||
PXE_BASECODE_DEVICE *Private,
|
||||
|
@ -1249,6 +1255,7 @@ Returns:
|
|||
//
|
||||
// get DHCPOFFER's
|
||||
//
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetOffers (
|
||||
PXE_BASECODE_DEVICE *Private
|
||||
|
@ -2146,6 +2153,7 @@ DoDhcpDora (
|
|||
//
|
||||
// determine if the server ip is in the ip list
|
||||
//
|
||||
STATIC
|
||||
BOOLEAN
|
||||
InServerList (
|
||||
EFI_IP_ADDRESS *ServerIpPtr,
|
||||
|
@ -2172,6 +2180,7 @@ InServerList (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
BOOLEAN
|
||||
ExtractBootServerList (
|
||||
UINT16 Type,
|
||||
|
@ -2209,6 +2218,7 @@ ExtractBootServerList (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
VOID
|
||||
FreeMem (
|
||||
PXE_BASECODE_DEVICE *Private
|
||||
|
@ -2226,6 +2236,7 @@ FreeMem (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
BOOLEAN
|
||||
GetMem (
|
||||
PXE_BASECODE_DEVICE *Private
|
||||
|
@ -2443,6 +2454,7 @@ VerifyCredentialOption (
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
DoDiscover (
|
||||
PXE_BASECODE_DEVICE *Private,
|
||||
|
@ -3210,13 +3222,11 @@ Returns:
|
|||
{
|
||||
EFI_PXE_BASE_CODE_MODE *PxebcMode;
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS StatCode;
|
||||
PXE_BASECODE_DEVICE *Private;
|
||||
|
||||
//
|
||||
// Lock the instance data and make sure started
|
||||
//
|
||||
StatCode = EFI_SUCCESS;
|
||||
|
||||
if (This == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "BC *This pointer == NULL"));
|
||||
|
|
|
@ -36,6 +36,7 @@ Revision History
|
|||
#include "Bc.h"
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
UINT64
|
||||
Swap64 (
|
||||
UINT64 n
|
||||
|
@ -1182,6 +1183,7 @@ Returns:
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
MtftpDownload (
|
||||
PXE_BASECODE_DEVICE *Private,
|
||||
|
@ -1930,6 +1932,7 @@ Returns:
|
|||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
PxeBcMtftp (
|
||||
PXE_BASECODE_DEVICE *Private,
|
||||
|
|
|
@ -393,24 +393,23 @@ Returns:
|
|||
if (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key) == EFI_NOT_READY) {
|
||||
UINT8 Buffer[512];
|
||||
UINTN BufferSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
BufferSize = sizeof Buffer;
|
||||
|
||||
Status = Private->EfiBc.UdpRead (
|
||||
&Private->EfiBc,
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP |
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT |
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT,
|
||||
NULL, /* dest ip */
|
||||
NULL, /* dest port */
|
||||
NULL, /* src ip */
|
||||
NULL, /* src port */
|
||||
NULL, /* hdr size */
|
||||
NULL, /* hdr ptr */
|
||||
&BufferSize,
|
||||
Buffer
|
||||
);
|
||||
Private->EfiBc.UdpRead (
|
||||
&Private->EfiBc,
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP |
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT |
|
||||
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT,
|
||||
NULL, /* dest ip */
|
||||
NULL, /* dest port */
|
||||
NULL, /* src ip */
|
||||
NULL, /* src port */
|
||||
NULL, /* hdr size */
|
||||
NULL, /* hdr ptr */
|
||||
&BufferSize,
|
||||
Buffer
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -870,6 +869,7 @@ Returns:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT8 *
|
||||
PxeBcFindDhcpOpt (
|
||||
EFI_PXE_BASE_CODE_PACKET *PacketPtr,
|
||||
|
@ -1088,7 +1088,6 @@ Returns:
|
|||
|
||||
if (Private->EfiBc.Mode->BisSupported && Private->EfiBc.Mode->BisDetected && Private->EfiBc.Mode->PxeBisReplyReceived) {
|
||||
UINT64 CredentialLen;
|
||||
UINTN BlockSize;
|
||||
UINT8 CredentialFilename[256];
|
||||
UINT8 *op;
|
||||
VOID *CredentialBuffer;
|
||||
|
@ -1398,11 +1397,6 @@ Returns:
|
|||
|
||||
AsciiPrint ("Running LoadFile()\n");
|
||||
|
||||
//
|
||||
// Resolve Warning 4 unreferenced parameter problem
|
||||
//
|
||||
FilePath = NULL;
|
||||
|
||||
//
|
||||
// If either if these parameters are NULL, we cannot continue.
|
||||
//
|
||||
|
|
|
@ -385,11 +385,45 @@ snp_undi32_receive (
|
|||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
SnpWaitForPacketNotify (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *SnpPtr
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_start (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_stop (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_init (
|
||||
SNP_DRIVER *snp,
|
||||
UINT16 OpFlags
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_shutdown (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_get_stn_addr (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*issue_undi32_command) (
|
||||
UINT64 cdb
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*ptr) (
|
||||
|
|
|
@ -182,19 +182,19 @@ Returns:
|
|||
|
||||
switch (NumBytes) {
|
||||
case 2:
|
||||
Width = 1;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Width = 2;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
Width = 3;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
Width = 0;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
|
||||
}
|
||||
|
||||
switch (ReadOrWrite) {
|
||||
|
@ -344,18 +344,18 @@ Returns:
|
|||
|
||||
snp = (SNP_DRIVER *) (UINTN) UniqueId;
|
||||
|
||||
Width = 0;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
|
||||
switch (NumBytes) {
|
||||
case 2:
|
||||
Width = 1;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Width = 2;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
Width = 3;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_getstatus (
|
||||
SNP_DRIVER *snp,
|
||||
|
|
|
@ -20,13 +20,6 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
SnpWaitForPacketNotify (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *SnpPtr
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
pxe_init (
|
||||
SNP_DRIVER *snp,
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_ip2mac (
|
||||
IN SNP_DRIVER *snp,
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_nvdata_read (
|
||||
IN SNP_DRIVER *snp,
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_receive (
|
||||
SNP_DRIVER *snp,
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_rcvfilter_enable (
|
||||
SNP_DRIVER *snp,
|
||||
|
@ -112,6 +113,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_rcvfilter_disable (
|
||||
SNP_DRIVER *snp,
|
||||
|
@ -191,6 +193,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_rcvfilter_read (
|
||||
SNP_DRIVER *snp
|
||||
|
|
|
@ -20,6 +20,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_reset (
|
||||
SNP_DRIVER *snp
|
||||
|
@ -96,11 +97,6 @@ Returns:
|
|||
{
|
||||
SNP_DRIVER *snp;
|
||||
|
||||
//
|
||||
// Resolve Warning 4 unreferenced parameter problem
|
||||
//
|
||||
ExtendedVerification = 0;
|
||||
|
||||
if (this == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
|
|
@ -18,72 +18,6 @@ Abstract:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
EFI_STATUS
|
||||
pxe_start (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
EFI_STATUS
|
||||
pxe_stop (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
EFI_STATUS
|
||||
pxe_init (
|
||||
SNP_DRIVER *snp,
|
||||
UINT16 OpFlags
|
||||
);
|
||||
EFI_STATUS
|
||||
pxe_shutdown (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
EFI_STATUS
|
||||
pxe_get_stn_addr (
|
||||
SNP_DRIVER *snp
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeSnpNiiDriver (
|
||||
IN EFI_HANDLE image_handle,
|
||||
IN EFI_SYSTEM_TABLE *system_table
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
//
|
||||
// Simple Network Protocol Driver Global Variables
|
||||
//
|
||||
EFI_DRIVER_BINDING_PROTOCOL mSimpleNetworkDriverBinding = {
|
||||
SimpleNetworkDriverSupported,
|
||||
SimpleNetworkDriverStart,
|
||||
SimpleNetworkDriverStop,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
//
|
||||
// Module global variables needed to support undi 3.0 interface
|
||||
//
|
||||
|
@ -91,202 +25,6 @@ EFI_PCI_IO_PROTOCOL *mPciIoFncs;
|
|||
struct s_v2p *_v2p = NULL; // undi3.0 map_list head
|
||||
// End Global variables
|
||||
//
|
||||
EFI_STATUS
|
||||
add_v2p (
|
||||
IN OUT struct s_v2p **v2p,
|
||||
EFI_PCI_IO_PROTOCOL_OPERATION type,
|
||||
VOID *vaddr,
|
||||
UINTN bsize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine maps the given CPU address to a Device address. It creates a
|
||||
an entry in the map list with the virtual and physical addresses and the
|
||||
un map cookie.
|
||||
|
||||
Arguments:
|
||||
v2p - pointer to return a map list node pointer.
|
||||
type - the direction in which the data flows from the given virtual address
|
||||
device->cpu or cpu->device or both ways.
|
||||
vaddr - virtual address (or CPU address) to be mapped
|
||||
bsize - size of the buffer to be mapped.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCEESS - routine has completed the mapping
|
||||
other - error as indicated.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
if ((v2p == NULL) || (vaddr == NULL) || (bsize == 0)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (struct s_v2p),
|
||||
(VOID **) v2p
|
||||
);
|
||||
|
||||
if (Status != EFI_SUCCESS) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = mPciIoFncs->Map (
|
||||
mPciIoFncs,
|
||||
type,
|
||||
vaddr,
|
||||
&bsize,
|
||||
&(*v2p)->paddr,
|
||||
&(*v2p)->unmap
|
||||
);
|
||||
if (Status != EFI_SUCCESS) {
|
||||
gBS->FreePool (*v2p);
|
||||
return Status;
|
||||
}
|
||||
(*v2p)->vaddr = vaddr;
|
||||
(*v2p)->bsize = bsize;
|
||||
(*v2p)->next = _v2p;
|
||||
_v2p = *v2p;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
find_v2p (
|
||||
struct s_v2p **v2p,
|
||||
VOID *vaddr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine searches the linked list of mapped address nodes (for undi3.0
|
||||
interface) to find the node that corresponds to the given virtual address and
|
||||
returns a pointer to that node.
|
||||
|
||||
Arguments:
|
||||
v2p - pointer to return a map list node pointer.
|
||||
vaddr - virtual address (or CPU address) to be searched in the map list
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCEESS - if a match found!
|
||||
Other - match not found
|
||||
|
||||
--*/
|
||||
{
|
||||
struct s_v2p *v;
|
||||
|
||||
if (v2p == NULL || vaddr == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
for (v = _v2p; v != NULL; v = v->next) {
|
||||
if (v->vaddr == vaddr) {
|
||||
*v2p = v;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
del_v2p (
|
||||
VOID *vaddr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine unmaps the given virtual address and frees the memory allocated
|
||||
for the map list node corresponding to that address.
|
||||
|
||||
Arguments:
|
||||
vaddr - virtual address (or CPU address) to be unmapped
|
||||
|
||||
Returns:
|
||||
EFI_SUCEESS - if successfully unmapped
|
||||
Other - as indicated by the error
|
||||
|
||||
|
||||
--*/
|
||||
{
|
||||
struct s_v2p *v;
|
||||
struct s_v2p *t;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (vaddr == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (_v2p == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
//
|
||||
// Is our node at the head of the list??
|
||||
//
|
||||
if ((v = _v2p)->vaddr == vaddr) {
|
||||
_v2p = _v2p->next;
|
||||
|
||||
Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);
|
||||
|
||||
gBS->FreePool (v);
|
||||
|
||||
#if SNP_DEBUG
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
|
||||
for (; v->next != NULL; v = t) {
|
||||
if ((t = v->next)->vaddr == vaddr) {
|
||||
v->next = t->next;
|
||||
Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
|
||||
gBS->FreePool (t);
|
||||
#if SNP_DEBUG
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
#if SNP_DEBUG
|
||||
VOID
|
||||
snp_wait_for_key (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Wait for a key stroke, used for debugging purposes
|
||||
|
||||
Arguments:
|
||||
none
|
||||
|
||||
Returns:
|
||||
none
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_INPUT_KEY key;
|
||||
|
||||
Aprint ("\nPress any key to continue\n");
|
||||
|
||||
while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {
|
||||
;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
|
@ -355,6 +93,7 @@ Returns:
|
|||
return cksum;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverSupported (
|
||||
|
@ -531,6 +270,7 @@ Done:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverStart (
|
||||
|
@ -1190,6 +930,7 @@ NiiError:
|
|||
return Status;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SimpleNetworkDriverStop (
|
||||
|
@ -1313,3 +1054,211 @@ Returns:
|
|||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Simple Network Protocol Driver Global Variables
|
||||
//
|
||||
EFI_DRIVER_BINDING_PROTOCOL mSimpleNetworkDriverBinding = {
|
||||
SimpleNetworkDriverSupported,
|
||||
SimpleNetworkDriverStart,
|
||||
SimpleNetworkDriverStop,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
add_v2p (
|
||||
IN OUT struct s_v2p **v2p,
|
||||
EFI_PCI_IO_PROTOCOL_OPERATION type,
|
||||
VOID *vaddr,
|
||||
UINTN bsize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine maps the given CPU address to a Device address. It creates a
|
||||
an entry in the map list with the virtual and physical addresses and the
|
||||
un map cookie.
|
||||
|
||||
Arguments:
|
||||
v2p - pointer to return a map list node pointer.
|
||||
type - the direction in which the data flows from the given virtual address
|
||||
device->cpu or cpu->device or both ways.
|
||||
vaddr - virtual address (or CPU address) to be mapped
|
||||
bsize - size of the buffer to be mapped.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCEESS - routine has completed the mapping
|
||||
other - error as indicated.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
if ((v2p == NULL) || (vaddr == NULL) || (bsize == 0)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof (struct s_v2p),
|
||||
(VOID **) v2p
|
||||
);
|
||||
|
||||
if (Status != EFI_SUCCESS) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = mPciIoFncs->Map (
|
||||
mPciIoFncs,
|
||||
type,
|
||||
vaddr,
|
||||
&bsize,
|
||||
&(*v2p)->paddr,
|
||||
&(*v2p)->unmap
|
||||
);
|
||||
if (Status != EFI_SUCCESS) {
|
||||
gBS->FreePool (*v2p);
|
||||
return Status;
|
||||
}
|
||||
(*v2p)->vaddr = vaddr;
|
||||
(*v2p)->bsize = bsize;
|
||||
(*v2p)->next = _v2p;
|
||||
_v2p = *v2p;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
find_v2p (
|
||||
struct s_v2p **v2p,
|
||||
VOID *vaddr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine searches the linked list of mapped address nodes (for undi3.0
|
||||
interface) to find the node that corresponds to the given virtual address and
|
||||
returns a pointer to that node.
|
||||
|
||||
Arguments:
|
||||
v2p - pointer to return a map list node pointer.
|
||||
vaddr - virtual address (or CPU address) to be searched in the map list
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCEESS - if a match found!
|
||||
Other - match not found
|
||||
|
||||
--*/
|
||||
{
|
||||
struct s_v2p *v;
|
||||
|
||||
if (v2p == NULL || vaddr == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
for (v = _v2p; v != NULL; v = v->next) {
|
||||
if (v->vaddr == vaddr) {
|
||||
*v2p = v;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
del_v2p (
|
||||
VOID *vaddr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine unmaps the given virtual address and frees the memory allocated
|
||||
for the map list node corresponding to that address.
|
||||
|
||||
Arguments:
|
||||
vaddr - virtual address (or CPU address) to be unmapped
|
||||
|
||||
Returns:
|
||||
EFI_SUCEESS - if successfully unmapped
|
||||
Other - as indicated by the error
|
||||
|
||||
|
||||
--*/
|
||||
{
|
||||
struct s_v2p *v;
|
||||
struct s_v2p *t;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (vaddr == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (_v2p == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
//
|
||||
// Is our node at the head of the list??
|
||||
//
|
||||
if ((v = _v2p)->vaddr == vaddr) {
|
||||
_v2p = _v2p->next;
|
||||
|
||||
Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);
|
||||
|
||||
gBS->FreePool (v);
|
||||
|
||||
#if SNP_DEBUG
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
|
||||
for (; v->next != NULL; v = t) {
|
||||
if ((t = v->next)->vaddr == vaddr) {
|
||||
v->next = t->next;
|
||||
Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
|
||||
gBS->FreePool (t);
|
||||
#if SNP_DEBUG
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
#if SNP_DEBUG
|
||||
VOID
|
||||
snp_wait_for_key (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Wait for a key stroke, used for debugging purposes
|
||||
|
||||
Arguments:
|
||||
none
|
||||
|
||||
Returns:
|
||||
none
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_INPUT_KEY key;
|
||||
|
||||
Aprint ("\nPress any key to continue\n");
|
||||
|
||||
while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {
|
||||
;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -95,6 +95,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_set_stn_addr (
|
||||
SNP_DRIVER *snp,
|
||||
|
|
|
@ -21,6 +21,7 @@ Revision history:
|
|||
|
||||
#include "Snp.h"
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_fillheader (
|
||||
SNP_DRIVER *snp,
|
||||
|
@ -191,6 +192,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
pxe_transmit (
|
||||
SNP_DRIVER *snp,
|
||||
|
|
|
@ -525,12 +525,17 @@ DxePcdGetNextToken (
|
|||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN PeiExMapTableEmpty;
|
||||
BOOLEAN DxeExMapTableEmpty;
|
||||
|
||||
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
|
||||
DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
|
||||
|
||||
//
|
||||
// Scan the local token space
|
||||
//
|
||||
|
@ -557,12 +562,12 @@ DxePcdGetNextToken (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
|
||||
if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
|
||||
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!PEI_EXMAP_TABLE_EMPTY) {
|
||||
if (!PeiExMapTableEmpty) {
|
||||
Status = ExGetNextTokeNumber (
|
||||
Guid,
|
||||
TokenNumber,
|
||||
|
@ -577,7 +582,7 @@ DxePcdGetNextToken (
|
|||
return Status;
|
||||
}
|
||||
|
||||
if (!DXE_EXMAP_TABLE_EMPTY) {
|
||||
if (!DxeExMapTableEmpty) {
|
||||
Status = ExGetNextTokeNumber (
|
||||
Guid,
|
||||
TokenNumber,
|
||||
|
@ -591,7 +596,7 @@ DxePcdGetNextToken (
|
|||
return Status;
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
EFI_GUID **
|
||||
GetDistinctTokenSpace (
|
||||
IN OUT UINTN *ExMapTableSize,
|
||||
|
@ -649,6 +654,8 @@ DxePcdGetNextTokenSpace (
|
|||
EFI_GUID **PeiTokenSpaceTable;
|
||||
EFI_GUID **DxeTokenSpaceTable;
|
||||
BOOLEAN Match;
|
||||
BOOLEAN PeiExMapTableEmpty;
|
||||
BOOLEAN DxeExMapTableEmpty;
|
||||
|
||||
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
|
@ -656,7 +663,10 @@ DxePcdGetNextTokenSpace (
|
|||
|
||||
ASSERT (Guid != NULL);
|
||||
|
||||
if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
|
||||
PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
|
||||
DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
|
||||
|
||||
if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
|
||||
if (*Guid != NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
} else {
|
||||
|
@ -668,7 +678,7 @@ DxePcdGetNextTokenSpace (
|
|||
if (TmpTokenSpaceBuffer[0] == NULL) {
|
||||
PeiTokenSpaceTableSize = 0;
|
||||
|
||||
if (!PEI_EXMAP_TABLE_EMPTY) {
|
||||
if (!PeiExMapTableEmpty) {
|
||||
PeiTokenSpaceTableSize = PEI_EXMAPPING_TABLE_SIZE;
|
||||
PeiTokenSpaceTable = GetDistinctTokenSpace (&PeiTokenSpaceTableSize,
|
||||
mPcdDatabase->PeiDb.Init.ExMapTable,
|
||||
|
@ -677,7 +687,7 @@ DxePcdGetNextTokenSpace (
|
|||
CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
|
||||
}
|
||||
|
||||
if (!DXE_EXMAP_TABLE_EMPTY) {
|
||||
if (!DxeExMapTableEmpty) {
|
||||
DxeTokenSpaceTableSize = DXE_EXMAPPING_TABLE_SIZE;
|
||||
DxeTokenSpaceTable = GetDistinctTokenSpace (&DxeTokenSpaceTableSize,
|
||||
mPcdDatabase->DxeDb.Init.ExMapTable,
|
||||
|
|
|
@ -28,7 +28,6 @@ GetWorker (
|
|||
)
|
||||
{
|
||||
UINT32 *LocalTokenNumberTable;
|
||||
UINT16 *SizeTable;
|
||||
EFI_GUID *GuidTable;
|
||||
UINT16 *StringTable;
|
||||
EFI_GUID *Guid;
|
||||
|
@ -76,14 +75,11 @@ GetWorker (
|
|||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
|
||||
IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
|
||||
|
||||
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
|
||||
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
|
||||
|
||||
SizeTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.SizeTable:
|
||||
mPcdDatabase->DxeDb.Init.SizeTable;
|
||||
|
||||
TokenNumber = IsPeiDb ? TokenNumber :
|
||||
TokenNumber - PEI_LOCAL_TOKEN_NUMBER;
|
||||
|
||||
|
@ -496,7 +492,7 @@ GetSkuEnabledTokenNumber (
|
|||
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
InvokeCallbackOnSet (
|
||||
UINT32 ExTokenNumber,
|
||||
|
@ -597,7 +593,7 @@ SetWorker (
|
|||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
|
||||
IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
|
||||
|
||||
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
|
||||
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
|
||||
|
@ -895,7 +891,7 @@ GetExPcdTokenNumber (
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
SKU_ID *
|
||||
GetSkuIdArray (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
|
@ -923,7 +919,7 @@ GetSkuIdArray (
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
GetSizeTableIndexA (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
|
@ -980,7 +976,7 @@ GetSizeTableIndexA (
|
|||
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
GetSizeTableIndex (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
|
|
|
@ -502,11 +502,14 @@ PeiPcdGetNextToken (
|
|||
DYNAMICEX_MAPPING *ExMapTable;
|
||||
UINTN i;
|
||||
BOOLEAN Found;
|
||||
|
||||
BOOLEAN PeiExMapTableEmpty;
|
||||
|
||||
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
|
||||
|
||||
if (Guid == NULL) {
|
||||
if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {
|
||||
return EFI_NOT_FOUND;
|
||||
|
@ -517,7 +520,7 @@ PeiPcdGetNextToken (
|
|||
}
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
if (PEI_EXMAP_TABLE_EMPTY) {
|
||||
if (PeiExMapTableEmpty) {
|
||||
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -597,6 +600,7 @@ PeiPcdGetNextTokenSpace (
|
|||
DYNAMICEX_MAPPING *ExMapTable;
|
||||
UINTN i;
|
||||
BOOLEAN Found;
|
||||
BOOLEAN PeiExMapTableEmpty;
|
||||
|
||||
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
|
@ -604,7 +608,9 @@ PeiPcdGetNextTokenSpace (
|
|||
|
||||
ASSERT (Guid != NULL);
|
||||
|
||||
if (PEI_EXMAP_TABLE_EMPTY) {
|
||||
PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
|
||||
|
||||
if (PeiExMapTableEmpty) {
|
||||
if (*Guid != NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
} else {
|
||||
|
|
|
@ -154,6 +154,7 @@ BuildPcdDatabase (
|
|||
@retval EFI_SUCCESS Operation successful.
|
||||
@retval EFI_NOT_FOUND Variablel not found.
|
||||
--*/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetHiiVariable (
|
||||
IN CONST EFI_GUID *VariableGuid,
|
||||
|
@ -205,7 +206,7 @@ GetHiiVariable (
|
|||
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
UINT32
|
||||
GetSkuEnabledTokenNumber (
|
||||
UINT32 LocalTokenNumber,
|
||||
|
@ -261,7 +262,7 @@ GetSkuEnabledTokenNumber (
|
|||
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
InvokeCallbackOnSet (
|
||||
UINTN ExTokenNumber,
|
||||
|
@ -651,7 +652,7 @@ GetPcdDatabase (
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
SKU_ID *
|
||||
GetSkuIdArray (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
|
@ -672,7 +673,7 @@ GetSkuIdArray (
|
|||
}
|
||||
|
||||
|
||||
|
||||
STATIC
|
||||
UINTN
|
||||
GetSizeTableIndex (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
|
|
|
@ -74,6 +74,7 @@ Returns:
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC
|
||||
UINT32
|
||||
ReverseBits (
|
||||
UINT32 Value
|
||||
|
|
|
@ -91,6 +91,7 @@ EFI_RUNTIME_ARCH_PROTOCOL mRuntime = {
|
|||
//
|
||||
// Worker Functions
|
||||
//
|
||||
STATIC
|
||||
VOID
|
||||
RuntimeDriverCalculateEfiHdrCrc (
|
||||
IN OUT EFI_TABLE_HEADER *Hdr
|
||||
|
@ -224,6 +225,7 @@ Returns:
|
|||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
RuntimeDriverConvertInternalPointer (
|
||||
IN OUT VOID **ConvertAddress
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue