https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa2e4e953738eebc71ac7…
commit fa2e4e953738eebc71ac707ae7a0c8534e78cd93
Author:     Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Fri Aug 2 17:39:50 2019 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jan 1 21:43:28 2020 +0100
    [FREELDR] Update ACPI Extended Attributes support to 6.3 (#1782)
    Update BIOS_MEMORY_MAP and PcMemGetBiosMemoryMap() from ACPI 6.2-A to ACPI 6.3.
    Co-Authored-By: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
---
 boot/freeldr/freeldr/arch/i386/pcmem.c        | 11 ++++++++---
 boot/freeldr/freeldr/include/arch/pc/pcbios.h | 18 ++++++++++++------
 2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/boot/freeldr/freeldr/arch/i386/pcmem.c
b/boot/freeldr/freeldr/arch/i386/pcmem.c
index 3fcab1f6a07..54a88672448 100644
--- a/boot/freeldr/freeldr/arch/i386/pcmem.c
+++ b/boot/freeldr/freeldr/arch/i386/pcmem.c
@@ -302,7 +302,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
         if (Regs.x.ecx == 0)
         {
-            TRACE("Discard empty entry. (would-be-PcBiosMapCount = %lu)\n",
+            TRACE("Discarding empty entry. (would-be-PcBiosMapCount = %lu)\n",
                   PcBiosMapCount);
             goto nextRange;
         }
@@ -332,7 +332,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
         if (((PBIOS_MEMORY_MAP)BIOSCALLBUFFER)->ExtendedAttributes.Enabled_Reserved ==
0)
         {
-            WARN("Discard disabled/invalid entry. (would-be-PcBiosMapCount =
%lu)\n",
+            WARN("Discarding disabled/invalid entry. (would-be-PcBiosMapCount =
%lu)\n",
                  PcBiosMapCount);
             /* This unlikely case was correct between ACPI 3.0 and 4.0, so assume all is
fine.
              * Unless we would be ready to drop ACPI 3.0 compatibility.
@@ -340,6 +340,11 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
             goto nextRange;
         }
+        /*
+         * Other deprecated ExtendedAttributes flags such as
NonVolatile_Deprecated_Reserved
+         * or SlowAccess_Deprecated_Reserved are simply ignored.
+         */
+
         /* Copy data to global buffer */
         RtlCopyMemory(&PcBiosMemoryMap[PcBiosMapCount], (PVOID)BIOSCALLBUFFER,
sizeof(BIOS_MEMORY_MAP));
@@ -362,7 +367,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
         if (PcBiosMemoryMap[PcBiosMapCount].Length == 0)
         {
-            TRACE("Discard empty range. (would-be-PcBiosMapCount = %lu, BaseAddress
= 0x%llx, Length = 0)\n",
+            TRACE("Discarding empty range. (would-be-PcBiosMapCount = %lu,
BaseAddress = 0x%llx, Length = 0)\n",
                   PcBiosMapCount, PcBiosMemoryMap[PcBiosMapCount].BaseAddress);
             goto nextRange;
         }
diff --git a/boot/freeldr/freeldr/include/arch/pc/pcbios.h
b/boot/freeldr/freeldr/include/arch/pc/pcbios.h
index 804932de9ea..3b03a32dbc7 100644
--- a/boot/freeldr/freeldr/include/arch/pc/pcbios.h
+++ b/boot/freeldr/freeldr/include/arch/pc/pcbios.h
@@ -46,13 +46,19 @@ typedef struct
         struct
         {
-            // Bit 0. ACPI 3.0. As of ACPI 4.0, became "Reserved -> must be
1".
+            // Bit 0. ACPI 3.0.
+            // As of ACPI 4.0, became "Reserved -> must be 1".
             ULONG Enabled_Reserved : 1;
-            // Bit 1. ACPI 3.0. As of ACPI 6.1, became "Unimplemented ->
Deprecated".
-            ULONG NonVolatile_Deprecated : 1;
-            // Bit 2. ACPI 4.0. As of ACPI 6.1, became "Unimplemented ->
Deprecated".
-            ULONG SlowAccess_Deprecated : 1;
-            // Bit 3. ACPI 4.0. ACPI 5.0-A added "Used only on PC-AT BIOS" (not
UEFI).
+            // Bit 1. ACPI 3.0.
+            // As of ACPI 6.1, became "Unimplemented -> Deprecated".
+            // As of ACPI 6.3, became "Reserved -> must be 0".
+            ULONG NonVolatile_Deprecated_Reserved : 1;
+            // Bit 2. ACPI 4.0.
+            // As of ACPI 6.1, became "Unimplemented -> Deprecated".
+            // As of ACPI 6.3, became "Reserved -> must be 0".
+            ULONG SlowAccess_Deprecated_Reserved : 1;
+            // Bit 3. ACPI 4.0.
+            // ACPI 5.0-A added "Used only on PC-AT BIOS" (not UEFI).
             ULONG ErrorLog : 1;
             // Bits 4-31. ACPI 3.0.
             ULONG Reserved : 28;