28 for (AcpiPtr = (UINT8 *)StartAddress;
29 AcpiPtr < (UINT8 *)EndAddress;
35 if (!
AsciiStrnCmp ((CHAR8 *)&RsdpStructurePtr->Signature,
"RSD PTR ", 8)) {
41 (
CONST UINT8 *)RsdpStructurePtr,
48 if (RsdpStructurePtr->Revision >= 2) {
53 (
CONST UINT8 *)RsdpStructurePtr,
61 *RsdpPtr = RsdpStructurePtr;
81 VOID *CurrentTableEntry;
82 UINTN CurrentTablePointer;
85 UINTN NumberOfTableEntries;
98 NumberOfTableEntries = 0;
104 if (Rsdp->XsdtAddress) {
110 NumberOfTableEntries =
116 for (Index = 0; Index < NumberOfTableEntries; Index++) {
122 Index *
sizeof (UINT64));
123 CurrentTablePointer = (
UINTN)*(UINT64 *)CurrentTableEntry;
129 Status = AcpiProtocol->InstallAcpiTable (
132 CurrentTable->Length,
136 if (EFI_ERROR (Status)) {
143 if (!
AsciiStrnCmp ((CHAR8 *)&CurrentTable->Signature,
"FACP", 4)) {
147 Fadt2Table->FirmwareCtrl;
151 }
else if (Rsdp->RsdtAddress) {
157 NumberOfTableEntries =
163 for (Index = 0; Index < NumberOfTableEntries; Index++) {
169 Index *
sizeof (UINT32));
170 CurrentTablePointer = *(UINT32 *)CurrentTableEntry;
176 Status = AcpiProtocol->InstallAcpiTable (
179 CurrentTable->Length,
183 if (EFI_ERROR (Status)) {
190 if (!
AsciiStrnCmp ((CHAR8 *)&CurrentTable->Signature,
"FACP", 4)) {
194 Fadt1Table->FirmwareCtrl;
207 Status = AcpiProtocol->InstallAcpiTable (
213 if (EFI_ERROR (Status)) {
216 }
else if (Fadt1Table) {
220 Status = AcpiProtocol->InstallAcpiTable (
226 if (EFI_ERROR (Status)) {
235 if (DsdtTable ==
NULL) {
236 DEBUG ((DEBUG_ERROR,
"%a: no DSDT found\n", __func__));
241 Status = AcpiProtocol->InstallAcpiTable (
247 if (EFI_ERROR (Status)) {
VOID EFIAPI CpuDeadLoop(VOID)
UINT8 EFIAPI CalculateSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
#define DEBUG(Expression)