Hi Yi,
        Thanks for reporting this issue.
        Your fix looks good to SMBIOS module and no problem for UEFI boot, but 
LegacyBiosDxe module in IntelFrameworkModulePkg assumes smbios table in 
reserved memory currently and passes the SMBIOS pointer to CSM16, if we change 
to runtime attribute in SMBIOS module only, CSM may have problem to access 
SMBIOS table after legacy boot. Could you suspend this check in for a while? I 
will provide CSM/SMBIOS fix together to you.

Thanks
Elvin
-----Original Message-----
From: Yi Li [mailto:yi...@linaro.org] 
Sent: Monday, November 25, 2013 10:32 PM
To: edk2-devel@lists.sourceforge.net
Cc: yi...@linaro.org; ard.biesheu...@linaro.org
Subject: [edk2] [PATCH] SMBIOS: Change SMBIOS from reserve to runtime type

Following the UEFI spec 2.4, SMBIOS data should be set as Runtime
Services data type(previously Reserved type), or dmidecode on arm64
will not work properly.

Signed-off-by: Yi Li <yi...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
---

In Charter 2.3.2 spec 2.4, it descripts SMBIOS tables should be 
Runtime Service Type:
"In general, UEFI Configuration Tables loaded at boot time (
e.g.,SMBIOS table) can be contained in memory of type EfiRuntimeServicesData 
(recommended and the system firmware must
not request a virtual mapping), EfiBootServicesData,EfiACPIReclaimMemory or 
EfiACPIMemoryNVS. Tables loaded at runtime 
must be contained in memory of type EfiRuntimeServicesData 
(recommended) or EfiACPIMemoryNVS."

 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c 
b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
index 8bf5d44..329bdbf 100644
--- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
+++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
@@ -981,7 +981,7 @@ SmbiosCreateTable (
     PhysicalAddress = 0xffffffff;
     Status = gBS->AllocatePages (
                     AllocateMaxAddress,
-                    EfiReservedMemoryType,
+                    EfiRuntimeServicesData,
                     EFI_SIZE_TO_PAGES (EntryPointStructure->TableLength),
                     &PhysicalAddress
                     );
@@ -1093,7 +1093,7 @@ SmbiosDriverEntryPoint (
   PhysicalAddress = 0xffffffff;
   Status = gBS->AllocatePages (
                   AllocateMaxAddress,
-                  EfiReservedMemoryType,
+                  EfiRuntimeServicesData,
                   EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
                   &PhysicalAddress
                   );
@@ -1101,7 +1101,7 @@ SmbiosDriverEntryPoint (
     DEBUG ((EFI_D_ERROR, "SmbiosDriverEntryPoint() could not allocate 
EntryPointStructure < 4GB\n"));
     Status = gBS->AllocatePages (
                     AllocateAnyPages,
-                    EfiReservedMemoryType,
+                    EfiRuntimeServicesData,
                     EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
                     &PhysicalAddress
                     );
@@ -1127,7 +1127,7 @@ SmbiosDriverEntryPoint (
   PhysicalAddress = 0xffffffff;
   Status = gBS->AllocatePages (
                   AllocateMaxAddress,
-                  EfiReservedMemoryType,
+                  EfiRuntimeServicesData,
                   1,
                   &PhysicalAddress
                   );
-- 
1.7.9.5


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to