MdeModulePkg: Remove variables that are set, but not used
GCC 4.6 generates a warning when a variable is set, but never used. Signed-off-by: jljusten Reviewed-by: lgao4 Reviewed-by: erictian Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12617 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1389,7 +1389,6 @@ AhciReset (
|
|||||||
IN UINT64 Timeout
|
IN UINT64 Timeout
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
UINT32 Delay;
|
UINT32 Delay;
|
||||||
UINT32 Value;
|
UINT32 Value;
|
||||||
|
|
||||||
@ -1397,8 +1396,6 @@ AhciReset (
|
|||||||
|
|
||||||
AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_RESET);
|
AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_RESET);
|
||||||
|
|
||||||
Status = EFI_TIMEOUT;
|
|
||||||
|
|
||||||
Delay = (UINT32) (DivU64x32(Timeout, 1000) + 1);
|
Delay = (UINT32) (DivU64x32(Timeout, 1000) + 1);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -2137,8 +2134,6 @@ AhciModeInitialization (
|
|||||||
UINT32 Capability;
|
UINT32 Capability;
|
||||||
UINT8 MaxPortNumber;
|
UINT8 MaxPortNumber;
|
||||||
UINT32 PortImplementBitMap;
|
UINT32 PortImplementBitMap;
|
||||||
UINT8 MaxCommandSlotNumber;
|
|
||||||
BOOLEAN Support64Bit;
|
|
||||||
|
|
||||||
EFI_AHCI_REGISTERS *AhciRegisters;
|
EFI_AHCI_REGISTERS *AhciRegisters;
|
||||||
|
|
||||||
@ -2178,9 +2173,7 @@ AhciModeInitialization (
|
|||||||
//
|
//
|
||||||
// Get the number of command slots per port supported by this HBA.
|
// Get the number of command slots per port supported by this HBA.
|
||||||
//
|
//
|
||||||
MaxCommandSlotNumber = (UINT8) (((Capability & 0x1F00) >> 8) + 1);
|
|
||||||
MaxPortNumber = (UINT8) ((Capability & 0x1F) + 1);
|
MaxPortNumber = (UINT8) ((Capability & 0x1F) + 1);
|
||||||
Support64Bit = (BOOLEAN) (((Capability & EFI_AHCI_CAP_S64A) != 0) ? TRUE : FALSE);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the bit map of those ports exposed by this HBA.
|
// Get the bit map of those ports exposed by this HBA.
|
||||||
|
@ -658,13 +658,11 @@ AtaAtapiPassThruStart (
|
|||||||
ATA_ATAPI_PASS_THRU_INSTANCE *Instance;
|
ATA_ATAPI_PASS_THRU_INSTANCE *Instance;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
UINT64 Supports;
|
UINT64 Supports;
|
||||||
BOOLEAN PciAttributesSaved;
|
|
||||||
UINT64 OriginalPciAttributes;
|
UINT64 OriginalPciAttributes;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
IdeControllerInit = NULL;
|
IdeControllerInit = NULL;
|
||||||
Instance = NULL;
|
Instance = NULL;
|
||||||
PciAttributesSaved = FALSE;
|
|
||||||
OriginalPciAttributes = 0;
|
OriginalPciAttributes = 0;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "==AtaAtapiPassThru Start== Controller = %x\n", Controller));
|
DEBUG ((EFI_D_INFO, "==AtaAtapiPassThru Start== Controller = %x\n", Controller));
|
||||||
@ -706,7 +704,6 @@ AtaAtapiPassThruStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ErrorExit;
|
goto ErrorExit;
|
||||||
}
|
}
|
||||||
PciAttributesSaved = TRUE;
|
|
||||||
|
|
||||||
Status = PciIo->Attributes (
|
Status = PciIo->Attributes (
|
||||||
PciIo,
|
PciIo,
|
||||||
|
@ -1482,7 +1482,6 @@ AtaUdmaInOut (
|
|||||||
EFI_PCI_IO_PROTOCOL_OPERATION PciIoOperation;
|
EFI_PCI_IO_PROTOCOL_OPERATION PciIoOperation;
|
||||||
|
|
||||||
UINT8 DeviceHead;
|
UINT8 DeviceHead;
|
||||||
UINT8 AtaCommand;
|
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
@ -1639,7 +1638,6 @@ AtaUdmaInOut (
|
|||||||
// Start to enable the DMA operation
|
// Start to enable the DMA operation
|
||||||
//
|
//
|
||||||
DeviceHead = AtaCommandBlock->AtaDeviceHead;
|
DeviceHead = AtaCommandBlock->AtaDeviceHead;
|
||||||
AtaCommand = AtaCommandBlock->AtaCommand;
|
|
||||||
|
|
||||||
IdeWritePortB (PciIo, IdeRegisters->Head, (UINT8)(0xe0 | DeviceHead));
|
IdeWritePortB (PciIo, IdeRegisters->Head, (UINT8)(0xe0 | DeviceHead));
|
||||||
|
|
||||||
@ -2797,7 +2795,6 @@ IdeModeInitialization (
|
|||||||
IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance
|
IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BOOLEAN EnumAll;
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit;
|
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
@ -2808,7 +2805,6 @@ IdeModeInitialization (
|
|||||||
|
|
||||||
IdeInit = Instance->IdeControllerInit;
|
IdeInit = Instance->IdeControllerInit;
|
||||||
PciIo = Instance->PciIo;
|
PciIo = Instance->PciIo;
|
||||||
EnumAll = IdeInit->EnumAll;
|
|
||||||
Channel = IdeInit->ChannelCount;
|
Channel = IdeInit->ChannelCount;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid
|
PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid
|
||||||
which is used to enable recovery function from USB Drivers.
|
which is used to enable recovery function from USB Drivers.
|
||||||
|
|
||||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -264,7 +264,6 @@ EhcUnlinkQhFromAsync (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
PEI_EHC_QH *Head;
|
PEI_EHC_QH *Head;
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
ASSERT (Ehc->ReclaimHead->NextQh == Qh);
|
ASSERT (Ehc->ReclaimHead->NextQh == Qh);
|
||||||
|
|
||||||
@ -283,7 +282,7 @@ EhcUnlinkQhFromAsync (
|
|||||||
//
|
//
|
||||||
// Set and wait the door bell to synchronize with the hardware
|
// Set and wait the door bell to synchronize with the hardware
|
||||||
//
|
//
|
||||||
Status = EhcSetAndWaitDoorBell (Ehc, EHC_GENERIC_TIMEOUT);
|
EhcSetAndWaitDoorBell (Ehc, EHC_GENERIC_TIMEOUT);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -804,8 +803,7 @@ EhcMoniteAsyncRequests (
|
|||||||
BOOLEAN Finished;
|
BOOLEAN Finished;
|
||||||
UINT8 *ProcBuf;
|
UINT8 *ProcBuf;
|
||||||
PEI_URB *Urb;
|
PEI_URB *Urb;
|
||||||
EFI_STATUS Status;
|
UINTN PageNumber;
|
||||||
UINTN PageNumber;
|
|
||||||
|
|
||||||
Ehc = (PEI_USB2_HC_DEV *) Context;
|
Ehc = (PEI_USB2_HC_DEV *) Context;
|
||||||
|
|
||||||
@ -826,7 +824,7 @@ EhcMoniteAsyncRequests (
|
|||||||
// Flush any PCI posted write transactions from a PCI host
|
// Flush any PCI posted write transactions from a PCI host
|
||||||
// bridge to system memory.
|
// bridge to system memory.
|
||||||
//
|
//
|
||||||
Status = EhcFlushAsyncIntMap (Ehc, Urb);
|
EhcFlushAsyncIntMap (Ehc, Urb);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate a buffer then copy the transferred data for user.
|
// Allocate a buffer then copy the transferred data for user.
|
||||||
@ -838,11 +836,11 @@ EhcMoniteAsyncRequests (
|
|||||||
if (Urb->Result == EFI_USB_NOERROR) {
|
if (Urb->Result == EFI_USB_NOERROR) {
|
||||||
ASSERT (Urb->Completed <= Urb->DataLen);
|
ASSERT (Urb->Completed <= Urb->DataLen);
|
||||||
PageNumber = Urb->Completed/PAGESIZE +1;
|
PageNumber = Urb->Completed/PAGESIZE +1;
|
||||||
Status = PeiServicesAllocatePages (
|
PeiServicesAllocatePages (
|
||||||
EfiBootServicesCode,
|
EfiBootServicesCode,
|
||||||
PageNumber,
|
PageNumber,
|
||||||
(EFI_PHYSICAL_ADDRESS *)ProcBuf
|
(EFI_PHYSICAL_ADDRESS *)ProcBuf
|
||||||
);
|
);
|
||||||
if (ProcBuf == NULL) {
|
if (ProcBuf == NULL) {
|
||||||
EhcUpdateAsyncRequest (Urb);
|
EhcUpdateAsyncRequest (Urb);
|
||||||
continue;
|
continue;
|
||||||
|
@ -973,16 +973,16 @@ XhcControlTransfer (
|
|||||||
//
|
//
|
||||||
// For super speed hub, its bit10~12 presents the attached device speed.
|
// For super speed hub, its bit10~12 presents the attached device speed.
|
||||||
//
|
//
|
||||||
if ((*(UINT32 *)Data & XHC_PORTSC_PS) >> 10 == 0) {
|
if ((State & XHC_PORTSC_PS) >> 10 == 0) {
|
||||||
PortStatus.PortStatus |= USB_PORT_STAT_SUPER_SPEED;
|
PortStatus.PortStatus |= USB_PORT_STAT_SUPER_SPEED;
|
||||||
}
|
}
|
||||||
} else if (DeviceSpeed == EFI_USB_SPEED_HIGH) {
|
} else if (DeviceSpeed == EFI_USB_SPEED_HIGH) {
|
||||||
//
|
//
|
||||||
// For high speed hub, its bit9~10 presents the attached device speed.
|
// For high speed hub, its bit9~10 presents the attached device speed.
|
||||||
//
|
//
|
||||||
if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT9)) {
|
if (XHC_BIT_IS_SET (State, BIT9)) {
|
||||||
PortStatus.PortStatus |= USB_PORT_STAT_LOW_SPEED;
|
PortStatus.PortStatus |= USB_PORT_STAT_LOW_SPEED;
|
||||||
} else if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT10)) {
|
} else if (XHC_BIT_IS_SET (State, BIT10)) {
|
||||||
PortStatus.PortStatus |= USB_PORT_STAT_HIGH_SPEED;
|
PortStatus.PortStatus |= USB_PORT_STAT_HIGH_SPEED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -994,14 +994,14 @@ XhcControlTransfer (
|
|||||||
//
|
//
|
||||||
MapSize = sizeof (mUsbPortStateMap) / sizeof (USB_PORT_STATE_MAP);
|
MapSize = sizeof (mUsbPortStateMap) / sizeof (USB_PORT_STATE_MAP);
|
||||||
for (Index = 0; Index < MapSize; Index++) {
|
for (Index = 0; Index < MapSize; Index++) {
|
||||||
if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortStateMap[Index].HwState)) {
|
if (XHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {
|
||||||
PortStatus.PortStatus = (UINT16) (PortStatus.PortStatus | mUsbPortStateMap[Index].UefiState);
|
PortStatus.PortStatus = (UINT16) (PortStatus.PortStatus | mUsbPortStateMap[Index].UefiState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MapSize = sizeof (mUsbPortChangeMap) / sizeof (USB_PORT_STATE_MAP);
|
MapSize = sizeof (mUsbPortChangeMap) / sizeof (USB_PORT_STATE_MAP);
|
||||||
|
|
||||||
for (Index = 0; Index < MapSize; Index++) {
|
for (Index = 0; Index < MapSize; Index++) {
|
||||||
if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortChangeMap[Index].HwState)) {
|
if (XHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {
|
||||||
PortStatus.PortChangeStatus = (UINT16) (PortStatus.PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
|
PortStatus.PortChangeStatus = (UINT16) (PortStatus.PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,7 @@ XhcCreateUrb (
|
|||||||
Urb->Context = Context;
|
Urb->Context = Context;
|
||||||
|
|
||||||
Status = XhcCreateTransferTrb (Xhc, Urb);
|
Status = XhcCreateTransferTrb (Xhc, Urb);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return Urb;
|
return Urb;
|
||||||
}
|
}
|
||||||
@ -740,13 +741,11 @@ XhcFreeEventRing (
|
|||||||
EVENT_RING_SEG_TABLE_ENTRY *TablePtr;
|
EVENT_RING_SEG_TABLE_ENTRY *TablePtr;
|
||||||
VOID *RingBuf;
|
VOID *RingBuf;
|
||||||
EVENT_RING_SEG_TABLE_ENTRY *EventRingPtr;
|
EVENT_RING_SEG_TABLE_ENTRY *EventRingPtr;
|
||||||
UINTN InterrupterTarget;
|
|
||||||
|
|
||||||
if(EventRing->EventRingSeg0 == NULL) {
|
if(EventRing->EventRingSeg0 == NULL) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
InterrupterTarget = EventRing->EventInterrupter;
|
|
||||||
//
|
//
|
||||||
// Get the Event Ring Segment Table base address
|
// Get the Event Ring Segment Table base address
|
||||||
//
|
//
|
||||||
@ -1048,12 +1047,10 @@ XhciDelAsyncIntTransfer (
|
|||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
URB *Urb;
|
URB *Urb;
|
||||||
EFI_USB_DATA_DIRECTION Direction;
|
EFI_USB_DATA_DIRECTION Direction;
|
||||||
BOOLEAN Found;
|
|
||||||
|
|
||||||
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;
|
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;
|
||||||
EpNum &= 0x0F;
|
EpNum &= 0x0F;
|
||||||
|
|
||||||
Found = FALSE;
|
|
||||||
Urb = NULL;
|
Urb = NULL;
|
||||||
|
|
||||||
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {
|
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {
|
||||||
|
@ -534,10 +534,8 @@ UsbBootGetParams (
|
|||||||
{
|
{
|
||||||
EFI_BLOCK_IO_MEDIA *Media;
|
EFI_BLOCK_IO_MEDIA *Media;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT8 CmdSet;
|
|
||||||
|
|
||||||
Media = &(UsbMass->BlockIoMedia);
|
Media = &(UsbMass->BlockIoMedia);
|
||||||
CmdSet = ((EFI_USB_INTERFACE_DESCRIPTOR *) (UsbMass->Context))->InterfaceSubClass;
|
|
||||||
|
|
||||||
Status = UsbBootInquiry (UsbMass);
|
Status = UsbBootInquiry (UsbMass);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
@ -265,8 +265,6 @@ PeiLoadFixAddressHook(
|
|||||||
EFI_PEI_HOB_POINTERS CurrentHob;
|
EFI_PEI_HOB_POINTERS CurrentHob;
|
||||||
EFI_PEI_HOB_POINTERS Hob;
|
EFI_PEI_HOB_POINTERS Hob;
|
||||||
EFI_PEI_HOB_POINTERS NextHob;
|
EFI_PEI_HOB_POINTERS NextHob;
|
||||||
EFI_PHYSICAL_ADDRESS MaxMemoryBaseAddress;
|
|
||||||
UINT64 MaxMemoryLength;
|
|
||||||
EFI_HOB_MEMORY_ALLOCATION *MemoryHob;
|
EFI_HOB_MEMORY_ALLOCATION *MemoryHob;
|
||||||
//
|
//
|
||||||
// Initialize Local Variables
|
// Initialize Local Variables
|
||||||
@ -274,8 +272,6 @@ PeiLoadFixAddressHook(
|
|||||||
CurrentResourceHob = NULL;
|
CurrentResourceHob = NULL;
|
||||||
ResourceHob = NULL;
|
ResourceHob = NULL;
|
||||||
NextResourceHob = NULL;
|
NextResourceHob = NULL;
|
||||||
MaxMemoryBaseAddress = 0;
|
|
||||||
MaxMemoryLength = 0;
|
|
||||||
HighAddress = 0;
|
HighAddress = 0;
|
||||||
TopLoadingAddress = 0;
|
TopLoadingAddress = 0;
|
||||||
MemoryRangeEnd = 0;
|
MemoryRangeEnd = 0;
|
||||||
|
@ -1134,7 +1134,6 @@ InternalPrintLibSPrintMarker (
|
|||||||
IN BASE_LIST BaseListMarker OPTIONAL
|
IN BASE_LIST BaseListMarker OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
CHAR8 *OriginalBuffer;
|
|
||||||
CHAR8 *EndBuffer;
|
CHAR8 *EndBuffer;
|
||||||
CHAR8 ValueBuffer[MAXIMUM_VALUE_CHARACTERS];
|
CHAR8 ValueBuffer[MAXIMUM_VALUE_CHARACTERS];
|
||||||
UINT32 BytesPerOutputCharacter;
|
UINT32 BytesPerOutputCharacter;
|
||||||
@ -1185,7 +1184,6 @@ InternalPrintLibSPrintMarker (
|
|||||||
// Reserve space for the Null terminator.
|
// Reserve space for the Null terminator.
|
||||||
//
|
//
|
||||||
BufferSize--;
|
BufferSize--;
|
||||||
OriginalBuffer = Buffer;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the tag for the end of the input Buffer.
|
// Set the tag for the end of the input Buffer.
|
||||||
|
@ -1630,12 +1630,11 @@ InternalHiiIfrValueAction (
|
|||||||
EFI_GUID *VarGuid;
|
EFI_GUID *VarGuid;
|
||||||
EFI_STRING VarName;
|
EFI_STRING VarName;
|
||||||
|
|
||||||
UINT8 *PackageData;
|
|
||||||
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
|
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
|
||||||
UINTN PackageListLength;
|
UINTN PackageListLength;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
|
||||||
|
|
||||||
ConfigAltResp = NULL;
|
ConfigAltResp = NULL;
|
||||||
ConfigResp = NULL;
|
ConfigResp = NULL;
|
||||||
VarGuid = NULL;
|
VarGuid = NULL;
|
||||||
@ -1646,7 +1645,6 @@ InternalHiiIfrValueAction (
|
|||||||
Index = 0;
|
Index = 0;
|
||||||
TempDriverHandle = NULL;
|
TempDriverHandle = NULL;
|
||||||
HiiHandle = NULL;
|
HiiHandle = NULL;
|
||||||
PackageData = NULL;
|
|
||||||
HiiPackageList = NULL;
|
HiiPackageList = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
ACPI Sdt Protocol Driver
|
ACPI Sdt Protocol Driver
|
||||||
|
|
||||||
Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -117,9 +117,7 @@ AmlGetNameStringSize (
|
|||||||
UINTN SegCount;
|
UINTN SegCount;
|
||||||
UINTN Length;
|
UINTN Length;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINT8 *Name;
|
|
||||||
|
|
||||||
Name = Buffer;
|
|
||||||
Length = 0;
|
Length = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -493,9 +491,7 @@ AmlPrintNameString (
|
|||||||
{
|
{
|
||||||
UINT8 SegCount;
|
UINT8 SegCount;
|
||||||
UINT8 Index;
|
UINT8 Index;
|
||||||
UINT8 *Name;
|
|
||||||
|
|
||||||
Name = Buffer;
|
|
||||||
if (*Buffer == AML_ROOT_CHAR) {
|
if (*Buffer == AML_ROOT_CHAR) {
|
||||||
//
|
//
|
||||||
// RootChar
|
// RootChar
|
||||||
|
@ -662,7 +662,6 @@ AppendAltCfgString (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STRING StringPtr;
|
EFI_STRING StringPtr;
|
||||||
EFI_STRING TmpPtr;
|
|
||||||
UINTN Length;
|
UINTN Length;
|
||||||
UINT8 *TmpBuffer;
|
UINT8 *TmpBuffer;
|
||||||
UINTN Offset;
|
UINTN Offset;
|
||||||
@ -683,11 +682,6 @@ AppendAltCfgString (
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (*StringPtr != 0 && StrnCmp (StringPtr, L"OFFSET=", StrLen (L"OFFSET=")) == 0) {
|
while (*StringPtr != 0 && StrnCmp (StringPtr, L"OFFSET=", StrLen (L"OFFSET=")) == 0) {
|
||||||
//
|
|
||||||
// Back up the header of one <BlockName>
|
|
||||||
//
|
|
||||||
TmpPtr = StringPtr;
|
|
||||||
|
|
||||||
StringPtr += StrLen (L"OFFSET=");
|
StringPtr += StrLen (L"OFFSET=");
|
||||||
//
|
//
|
||||||
// Get Offset
|
// Get Offset
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
IP4 option support functions.
|
IP4 option support functions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,8 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Validate the IP4 option format for both the packets we received
|
Validate the IP4 option format for both the packets we received
|
||||||
and will transmit. It will compute the ICMP error message fields
|
and will transmit.
|
||||||
if the option is mal-formated. But this information isn't used.
|
|
||||||
|
|
||||||
@param[in] Option The first byte of the option
|
@param[in] Option The first byte of the option
|
||||||
@param[in] OptionLen The length of the whole option
|
@param[in] OptionLen The length of the whole option
|
||||||
@ -39,13 +38,6 @@ Ip4OptionIsValid (
|
|||||||
UINT32 Cur;
|
UINT32 Cur;
|
||||||
UINT32 Len;
|
UINT32 Len;
|
||||||
UINT32 Point;
|
UINT32 Point;
|
||||||
volatile UINT8 IcmpType;
|
|
||||||
volatile UINT8 IcmpCode;
|
|
||||||
volatile UINT32 IcmpPoint;
|
|
||||||
|
|
||||||
IcmpType = ICMP_PARAMETER_PROBLEM;
|
|
||||||
IcmpCode = 0;
|
|
||||||
IcmpPoint = 0;
|
|
||||||
|
|
||||||
Cur = 0;
|
Cur = 0;
|
||||||
|
|
||||||
@ -69,12 +61,10 @@ Ip4OptionIsValid (
|
|||||||
// SRR/RR options are formatted as |Type|Len|Point|Ip1|Ip2|...
|
// SRR/RR options are formatted as |Type|Len|Point|Ip1|Ip2|...
|
||||||
//
|
//
|
||||||
if ((OptionLen - Cur < Len) || (Len < 3) || ((Len - 3) % 4 != 0)) {
|
if ((OptionLen - Cur < Len) || (Len < 3) || ((Len - 3) % 4 != 0)) {
|
||||||
IcmpPoint = Cur + 1;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Point > Len + 1) || (Point % 4 != 0)) {
|
if ((Point > Len + 1) || (Point % 4 != 0)) {
|
||||||
IcmpPoint = Cur + 2;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,8 +76,6 @@ Ip4OptionIsValid (
|
|||||||
if ((Option[Cur] != IP4_OPTION_RR) &&
|
if ((Option[Cur] != IP4_OPTION_RR) &&
|
||||||
((Rcvd && (Point != Len + 1)) || (!Rcvd && (Point != 4)))) {
|
((Rcvd && (Point != Len + 1)) || (!Rcvd && (Point != 4)))) {
|
||||||
|
|
||||||
IcmpType = ICMP_DEST_UNREACHABLE;
|
|
||||||
IcmpCode = ICMP_SOURCEROUTE_FAILED;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +86,6 @@ Ip4OptionIsValid (
|
|||||||
Len = Option[Cur + 1];
|
Len = Option[Cur + 1];
|
||||||
|
|
||||||
if ((OptionLen - Cur < Len) || (Len < 2)) {
|
if ((OptionLen - Cur < Len) || (Len < 2)) {
|
||||||
IcmpPoint = Cur + 1;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,7 +1005,6 @@ FindNextMenu (
|
|||||||
CHAR16 YesResponse;
|
CHAR16 YesResponse;
|
||||||
CHAR16 NoResponse;
|
CHAR16 NoResponse;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
EFI_STATUS Status;
|
|
||||||
BROWSER_SETTING_SCOPE Scope;
|
BROWSER_SETTING_SCOPE Scope;
|
||||||
|
|
||||||
CurrentMenu = Selection->CurrentMenu;
|
CurrentMenu = Selection->CurrentMenu;
|
||||||
@ -1032,7 +1031,7 @@ FindNextMenu (
|
|||||||
//
|
//
|
||||||
if ((gBrowserSettingScope == FormLevel && Selection->Form->NvUpdateRequired) ||
|
if ((gBrowserSettingScope == FormLevel && Selection->Form->NvUpdateRequired) ||
|
||||||
(gBrowserSettingScope == FormSetLevel && IsNvUpdateRequired(Selection->FormSet) && Scope == FormSetLevel)) {
|
(gBrowserSettingScope == FormSetLevel && IsNvUpdateRequired(Selection->FormSet) && Scope == FormSetLevel)) {
|
||||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
|
|
||||||
YesResponse = gYesResponse[0];
|
YesResponse = gYesResponse[0];
|
||||||
NoResponse = gNoResponse[0];
|
NoResponse = gNoResponse[0];
|
||||||
@ -1068,12 +1067,12 @@ FindNextMenu (
|
|||||||
//
|
//
|
||||||
// If the user hits the YesResponse key
|
// If the user hits the YesResponse key
|
||||||
//
|
//
|
||||||
Status = SubmitForm (Selection->FormSet, Selection->Form, Scope);
|
SubmitForm (Selection->FormSet, Selection->Form, Scope);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// If the user hits the NoResponse key
|
// If the user hits the NoResponse key
|
||||||
//
|
//
|
||||||
Status = DiscardForm (Selection->FormSet, Selection->Form, Scope);
|
DiscardForm (Selection->FormSet, Selection->Form, Scope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1101,7 +1100,7 @@ FindNextMenu (
|
|||||||
// We are going to leave current FormSet, so check uncommited data in this FormSet
|
// We are going to leave current FormSet, so check uncommited data in this FormSet
|
||||||
//
|
//
|
||||||
if (gBrowserSettingScope != SystemLevel && IsNvUpdateRequired(Selection->FormSet)) {
|
if (gBrowserSettingScope != SystemLevel && IsNvUpdateRequired(Selection->FormSet)) {
|
||||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
|
|
||||||
YesResponse = gYesResponse[0];
|
YesResponse = gYesResponse[0];
|
||||||
NoResponse = gNoResponse[0];
|
NoResponse = gNoResponse[0];
|
||||||
@ -1138,12 +1137,12 @@ FindNextMenu (
|
|||||||
//
|
//
|
||||||
// If the user hits the YesResponse key
|
// If the user hits the YesResponse key
|
||||||
//
|
//
|
||||||
Status = SubmitForm (Selection->FormSet, Selection->Form, FormSetLevel);
|
SubmitForm (Selection->FormSet, Selection->Form, FormSetLevel);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// If the user hits the NoResponse key
|
// If the user hits the NoResponse key
|
||||||
//
|
//
|
||||||
Status = DiscardForm (Selection->FormSet, Selection->Form, FormSetLevel);
|
DiscardForm (Selection->FormSet, Selection->Form, FormSetLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4128,7 +4128,6 @@ SaveReminder (
|
|||||||
CHAR16 *ChangeReminderString;
|
CHAR16 *ChangeReminderString;
|
||||||
CHAR16 *SaveConfirmString;
|
CHAR16 *SaveConfirmString;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
DataSavedAction = BROWSER_NO_CHANGES;
|
DataSavedAction = BROWSER_NO_CHANGES;
|
||||||
IsDataChanged = FALSE;
|
IsDataChanged = FALSE;
|
||||||
@ -4152,7 +4151,7 @@ SaveReminder (
|
|||||||
//
|
//
|
||||||
// If data is changed, prompt user
|
// If data is changed, prompt user
|
||||||
//
|
//
|
||||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
|
|
||||||
YesResponse = GetToken (STRING_TOKEN (ARE_YOU_SURE_YES), gHiiHandle);
|
YesResponse = GetToken (STRING_TOKEN (ARE_YOU_SURE_YES), gHiiHandle);
|
||||||
ASSERT (YesResponse != NULL);
|
ASSERT (YesResponse != NULL);
|
||||||
|
Reference in New Issue
Block a user