IN UINT64 Timeout\r
) \r
{\r
- EFI_STATUS Status;\r
UINT32 Delay;\r
UINT32 Value;\r
\r
\r
AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_RESET);\r
\r
- Status = EFI_TIMEOUT;\r
-\r
Delay = (UINT32) (DivU64x32(Timeout, 1000) + 1);\r
\r
do {\r
UINT32 Capability;\r
UINT8 MaxPortNumber;\r
UINT32 PortImplementBitMap;\r
- UINT8 MaxCommandSlotNumber;\r
- BOOLEAN Support64Bit;\r
\r
EFI_AHCI_REGISTERS *AhciRegisters;\r
\r
//\r
// Get the number of command slots per port supported by this HBA.\r
//\r
- MaxCommandSlotNumber = (UINT8) (((Capability & 0x1F00) >> 8) + 1);\r
MaxPortNumber = (UINT8) ((Capability & 0x1F) + 1);\r
- Support64Bit = (BOOLEAN) (((Capability & EFI_AHCI_CAP_S64A) != 0) ? TRUE : FALSE);\r
\r
//\r
// Get the bit map of those ports exposed by this HBA.\r
ATA_ATAPI_PASS_THRU_INSTANCE *Instance;\r
EFI_PCI_IO_PROTOCOL *PciIo;\r
UINT64 Supports;\r
- BOOLEAN PciAttributesSaved;\r
UINT64 OriginalPciAttributes;\r
\r
Status = EFI_SUCCESS;\r
IdeControllerInit = NULL;\r
Instance = NULL;\r
- PciAttributesSaved = FALSE;\r
OriginalPciAttributes = 0;\r
\r
DEBUG ((EFI_D_INFO, "==AtaAtapiPassThru Start== Controller = %x\n", Controller));\r
if (EFI_ERROR (Status)) {\r
goto ErrorExit;\r
}\r
- PciAttributesSaved = TRUE;\r
\r
Status = PciIo->Attributes (\r
PciIo,\r
EFI_PCI_IO_PROTOCOL_OPERATION PciIoOperation;\r
\r
UINT8 DeviceHead;\r
- UINT8 AtaCommand;\r
EFI_PCI_IO_PROTOCOL *PciIo;\r
EFI_TPL OldTpl;\r
\r
// Start to enable the DMA operation\r
//\r
DeviceHead = AtaCommandBlock->AtaDeviceHead;\r
- AtaCommand = AtaCommandBlock->AtaCommand;\r
\r
IdeWritePortB (PciIo, IdeRegisters->Head, (UINT8)(0xe0 | DeviceHead));\r
\r
IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance\r
)\r
{\r
- BOOLEAN EnumAll;\r
EFI_STATUS Status;\r
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit;\r
EFI_PCI_IO_PROTOCOL *PciIo;\r
\r
IdeInit = Instance->IdeControllerInit;\r
PciIo = Instance->PciIo;\r
- EnumAll = IdeInit->EnumAll;\r
Channel = IdeInit->ChannelCount;\r
\r
//\r
PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
which is used to enable recovery function from USB Drivers.\r
\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
)\r
{\r
PEI_EHC_QH *Head;\r
- EFI_STATUS Status;\r
\r
ASSERT (Ehc->ReclaimHead->NextQh == Qh);\r
\r
//\r
// Set and wait the door bell to synchronize with the hardware\r
//\r
- Status = EhcSetAndWaitDoorBell (Ehc, EHC_GENERIC_TIMEOUT);\r
+ EhcSetAndWaitDoorBell (Ehc, EHC_GENERIC_TIMEOUT);\r
\r
return;\r
}\r
BOOLEAN Finished;\r
UINT8 *ProcBuf;\r
PEI_URB *Urb;\r
- EFI_STATUS Status;\r
- UINTN PageNumber;\r
+ UINTN PageNumber;\r
\r
Ehc = (PEI_USB2_HC_DEV *) Context;\r
\r
// Flush any PCI posted write transactions from a PCI host \r
// bridge to system memory.\r
//\r
- Status = EhcFlushAsyncIntMap (Ehc, Urb);\r
+ EhcFlushAsyncIntMap (Ehc, Urb);\r
\r
//\r
// Allocate a buffer then copy the transferred data for user.\r
if (Urb->Result == EFI_USB_NOERROR) {\r
ASSERT (Urb->Completed <= Urb->DataLen);\r
PageNumber = Urb->Completed/PAGESIZE +1;\r
- Status = PeiServicesAllocatePages (\r
- EfiBootServicesCode,\r
- PageNumber,\r
- (EFI_PHYSICAL_ADDRESS *)ProcBuf\r
- );\r
+ PeiServicesAllocatePages (\r
+ EfiBootServicesCode,\r
+ PageNumber,\r
+ (EFI_PHYSICAL_ADDRESS *)ProcBuf\r
+ );\r
if (ProcBuf == NULL) {\r
EhcUpdateAsyncRequest (Urb);\r
continue;\r
//\r
// For super speed hub, its bit10~12 presents the attached device speed.\r
//\r
- if ((*(UINT32 *)Data & XHC_PORTSC_PS) >> 10 == 0) {\r
+ if ((State & XHC_PORTSC_PS) >> 10 == 0) {\r
PortStatus.PortStatus |= USB_PORT_STAT_SUPER_SPEED;\r
}\r
} else if (DeviceSpeed == EFI_USB_SPEED_HIGH) {\r
//\r
// For high speed hub, its bit9~10 presents the attached device speed.\r
//\r
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT9)) {\r
+ if (XHC_BIT_IS_SET (State, BIT9)) {\r
PortStatus.PortStatus |= USB_PORT_STAT_LOW_SPEED;\r
- } else if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT10)) {\r
+ } else if (XHC_BIT_IS_SET (State, BIT10)) {\r
PortStatus.PortStatus |= USB_PORT_STAT_HIGH_SPEED;\r
}\r
} else {\r
//\r
MapSize = sizeof (mUsbPortStateMap) / sizeof (USB_PORT_STATE_MAP);\r
for (Index = 0; Index < MapSize; Index++) {\r
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortStateMap[Index].HwState)) {\r
+ if (XHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {\r
PortStatus.PortStatus = (UINT16) (PortStatus.PortStatus | mUsbPortStateMap[Index].UefiState);\r
}\r
}\r
MapSize = sizeof (mUsbPortChangeMap) / sizeof (USB_PORT_STATE_MAP);\r
\r
for (Index = 0; Index < MapSize; Index++) {\r
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortChangeMap[Index].HwState)) {\r
+ if (XHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {\r
PortStatus.PortChangeStatus = (UINT16) (PortStatus.PortChangeStatus | mUsbPortChangeMap[Index].UefiState);\r
}\r
}\r
Urb->Context = Context;\r
\r
Status = XhcCreateTransferTrb (Xhc, Urb);\r
+ ASSERT_EFI_ERROR (Status);\r
\r
return Urb;\r
}\r
EVENT_RING_SEG_TABLE_ENTRY *TablePtr;\r
VOID *RingBuf;\r
EVENT_RING_SEG_TABLE_ENTRY *EventRingPtr;\r
- UINTN InterrupterTarget;\r
\r
if(EventRing->EventRingSeg0 == NULL) {\r
return EFI_SUCCESS;\r
}\r
\r
- InterrupterTarget = EventRing->EventInterrupter;\r
//\r
// Get the Event Ring Segment Table base address\r
//\r
LIST_ENTRY *Next;\r
URB *Urb;\r
EFI_USB_DATA_DIRECTION Direction;\r
- BOOLEAN Found;\r
\r
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;\r
EpNum &= 0x0F;\r
\r
- Found = FALSE;\r
Urb = NULL;\r
\r
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {\r
{\r
EFI_BLOCK_IO_MEDIA *Media;\r
EFI_STATUS Status;\r
- UINT8 CmdSet;\r
\r
Media = &(UsbMass->BlockIoMedia);\r
- CmdSet = ((EFI_USB_INTERFACE_DESCRIPTOR *) (UsbMass->Context))->InterfaceSubClass;\r
\r
Status = UsbBootInquiry (UsbMass);\r
if (EFI_ERROR (Status)) {\r
EFI_PEI_HOB_POINTERS CurrentHob;\r
EFI_PEI_HOB_POINTERS Hob;\r
EFI_PEI_HOB_POINTERS NextHob;\r
- EFI_PHYSICAL_ADDRESS MaxMemoryBaseAddress;\r
- UINT64 MaxMemoryLength;\r
EFI_HOB_MEMORY_ALLOCATION *MemoryHob;\r
//\r
// Initialize Local Variables\r
CurrentResourceHob = NULL;\r
ResourceHob = NULL;\r
NextResourceHob = NULL;\r
- MaxMemoryBaseAddress = 0;\r
- MaxMemoryLength = 0;\r
HighAddress = 0;\r
TopLoadingAddress = 0;\r
MemoryRangeEnd = 0;\r
IN BASE_LIST BaseListMarker OPTIONAL\r
)\r
{\r
- CHAR8 *OriginalBuffer;\r
CHAR8 *EndBuffer;\r
CHAR8 ValueBuffer[MAXIMUM_VALUE_CHARACTERS];\r
UINT32 BytesPerOutputCharacter;\r
// Reserve space for the Null terminator.\r
//\r
BufferSize--;\r
- OriginalBuffer = Buffer;\r
\r
//\r
// Set the tag for the end of the input Buffer.\r
EFI_GUID *VarGuid;\r
EFI_STRING VarName;\r
\r
- UINT8 *PackageData;\r
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;\r
UINTN PackageListLength;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;\r
- \r
+\r
ConfigAltResp = NULL;\r
ConfigResp = NULL;\r
VarGuid = NULL;\r
Index = 0;\r
TempDriverHandle = NULL;\r
HiiHandle = NULL;\r
- PackageData = NULL;\r
HiiPackageList = NULL;\r
\r
//\r
/** @file\r
ACPI Sdt Protocol Driver\r
\r
- Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>\r
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
UINTN SegCount;\r
UINTN Length;\r
UINTN Index;\r
- UINT8 *Name;\r
\r
- Name = Buffer;\r
Length = 0;\r
\r
//\r
{\r
UINT8 SegCount;\r
UINT8 Index;\r
- UINT8 *Name;\r
- \r
- Name = Buffer;\r
+\r
if (*Buffer == AML_ROOT_CHAR) {\r
//\r
// RootChar\r
)\r
{\r
EFI_STRING StringPtr;\r
- EFI_STRING TmpPtr;\r
UINTN Length;\r
UINT8 *TmpBuffer;\r
UINTN Offset;\r
}\r
\r
while (*StringPtr != 0 && StrnCmp (StringPtr, L"OFFSET=", StrLen (L"OFFSET=")) == 0) {\r
- //\r
- // Back up the header of one <BlockName>\r
- //\r
- TmpPtr = StringPtr;\r
-\r
StringPtr += StrLen (L"OFFSET=");\r
//\r
// Get Offset\r
/** @file\r
IP4 option support functions.\r
\r
-Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
/**\r
Validate the IP4 option format for both the packets we received\r
- and will transmit. It will compute the ICMP error message fields\r
- if the option is mal-formated. But this information isn't used.\r
+ and will transmit.\r
\r
@param[in] Option The first byte of the option\r
@param[in] OptionLen The length of the whole option\r
UINT32 Cur;\r
UINT32 Len;\r
UINT32 Point;\r
- volatile UINT8 IcmpType;\r
- volatile UINT8 IcmpCode;\r
- volatile UINT32 IcmpPoint;\r
-\r
- IcmpType = ICMP_PARAMETER_PROBLEM;\r
- IcmpCode = 0;\r
- IcmpPoint = 0;\r
\r
Cur = 0;\r
\r
// SRR/RR options are formatted as |Type|Len|Point|Ip1|Ip2|...\r
//\r
if ((OptionLen - Cur < Len) || (Len < 3) || ((Len - 3) % 4 != 0)) {\r
- IcmpPoint = Cur + 1;\r
return FALSE;\r
}\r
\r
if ((Point > Len + 1) || (Point % 4 != 0)) {\r
- IcmpPoint = Cur + 2;\r
return FALSE;\r
}\r
\r
if ((Option[Cur] != IP4_OPTION_RR) &&\r
((Rcvd && (Point != Len + 1)) || (!Rcvd && (Point != 4)))) {\r
\r
- IcmpType = ICMP_DEST_UNREACHABLE;\r
- IcmpCode = ICMP_SOURCEROUTE_FAILED;\r
return FALSE;\r
}\r
\r
Len = Option[Cur + 1];\r
\r
if ((OptionLen - Cur < Len) || (Len < 2)) {\r
- IcmpPoint = Cur + 1;\r
return FALSE;\r
}\r
\r
CHAR16 YesResponse;\r
CHAR16 NoResponse;\r
EFI_INPUT_KEY Key;\r
- EFI_STATUS Status;\r
BROWSER_SETTING_SCOPE Scope;\r
\r
CurrentMenu = Selection->CurrentMenu;\r
//\r
if ((gBrowserSettingScope == FormLevel && Selection->Form->NvUpdateRequired) ||\r
(gBrowserSettingScope == FormSetLevel && IsNvUpdateRequired(Selection->FormSet) && Scope == FormSetLevel)) {\r
- Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
+ gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
\r
YesResponse = gYesResponse[0];\r
NoResponse = gNoResponse[0];\r
//\r
// If the user hits the YesResponse key\r
//\r
- Status = SubmitForm (Selection->FormSet, Selection->Form, Scope);\r
+ SubmitForm (Selection->FormSet, Selection->Form, Scope);\r
} else {\r
//\r
// If the user hits the NoResponse key\r
//\r
- Status = DiscardForm (Selection->FormSet, Selection->Form, Scope);\r
+ DiscardForm (Selection->FormSet, Selection->Form, Scope);\r
}\r
}\r
\r
// We are going to leave current FormSet, so check uncommited data in this FormSet\r
//\r
if (gBrowserSettingScope != SystemLevel && IsNvUpdateRequired(Selection->FormSet)) {\r
- Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
+ gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
\r
YesResponse = gYesResponse[0];\r
NoResponse = gNoResponse[0];\r
//\r
// If the user hits the YesResponse key\r
//\r
- Status = SubmitForm (Selection->FormSet, Selection->Form, FormSetLevel);\r
+ SubmitForm (Selection->FormSet, Selection->Form, FormSetLevel);\r
} else {\r
//\r
// If the user hits the NoResponse key\r
//\r
- Status = DiscardForm (Selection->FormSet, Selection->Form, FormSetLevel);\r
+ DiscardForm (Selection->FormSet, Selection->Form, FormSetLevel);\r
}\r
}\r
\r
CHAR16 *ChangeReminderString;\r
CHAR16 *SaveConfirmString;\r
EFI_INPUT_KEY Key;\r
- EFI_STATUS Status;\r
\r
DataSavedAction = BROWSER_NO_CHANGES;\r
IsDataChanged = FALSE;\r
//\r
// If data is changed, prompt user\r
//\r
- Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
+ gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
\r
YesResponse = GetToken (STRING_TOKEN (ARE_YOU_SURE_YES), gHiiHandle);\r
ASSERT (YesResponse != NULL);\r