SHARE
TWEET

Untitled

a guest Jul 24th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: rEFIt_UEFI/Platform/AcpiPatcher.c
  2. ===================================================================
  3. --- rEFIt_UEFI/Platform/AcpiPatcher.c   (revision 5027)
  4. +++ rEFIt_UEFI/Platform/AcpiPatcher.c   (working copy)
  5. @@ -2174,17 +2174,20 @@
  6.          CopyMem(&ApicTable->CreatorId, creatorID, 4);
  7.  
  8.          SubTable = (UINT8*)((UINTN)BufferPtr + sizeof(EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER));
  9. -        Index = CPUBase;
  10. +        Index = 0;
  11.          while (*SubTable != EFI_ACPI_4_0_LOCAL_APIC_NMI) {
  12.            DBG("Found subtable in MADT: type=%d\n", *SubTable);
  13. -          //xxx - OSX paniced
  14. -          /*
  15. -           if (*SubTable == EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC) {
  16. -           ProcLocalApic = (EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE *)SubTable;
  17. -           ProcLocalApic->AcpiProcessorId = Index;
  18. -           Index++;
  19. -           }
  20. -           */
  21. +          if (*SubTable == EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC) {
  22. +            ProcLocalApic = (EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE *)SubTable;
  23. +            if (Index == 0) {
  24. +              DBG("ProcLocalApic: old=%d\n", ProcLocalApic->AcpiProcessorId);
  25. +              ProcLocalApic->AcpiProcessorId = 0;
  26. +              DBG("ProcLocalApic: new=%d\n", ProcLocalApic->AcpiProcessorId);
  27. +            } else {
  28. +              DBG("ProcLocalApic: %d\n", ProcLocalApic->AcpiProcessorId);
  29. +            }
  30. +            Index++;
  31. +          }
  32.            bufferLen = (UINTN)SubTable[1];
  33.            SubTable += bufferLen;
  34.            if (((UINTN)SubTable - (UINTN)BufferPtr) >= ApicTable->Length) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top