#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/UefiLib.h>\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/FdtParserLib.h>\r
#include <Protocol/Smbios.h>\r
\r
/***********************************************************************\r
0, // MemoryArrayHandle; // Should match SMBIOS_TABLE_TYPE16.Handle,\r
// initialized at runtime, refer to PhyMemArrayInfoUpdateSmbiosType16()\r
1, // PartitionWidth;\r
- 0x080000000, // ExtendedStartingAddress; // not used\r
- 0x100000000, // ExtendedEndingAddress; // not used\r
+ 0, // ExtendedStartingAddress; // not used\r
+ 0, // ExtendedEndingAddress; // not used\r
};\r
CHAR8 *mMemArrMapInfoType19Strings[] = {NULL};\r
\r
IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)\r
{\r
EFI_SMBIOS_HANDLE SmbiosHandle;\r
+ UINTN Node = 0;\r
+ UINTN MemoryBase = 0;\r
+ UINTN MemorySize = 0;\r
+ VOID *Fdt;\r
+ CHAR8 *Serial;\r
+\r
+ Fdt = GetFdt ();\r
+ ASSERT(Fdt != NULL);\r
\r
// TYPE0 BIOS Information\r
AsciiSPrint(\r
AsciiStrCpyS(\r
mSysInfoVersionName, sizeof(mSysInfoVersionName),\r
(CHAR8 *)PcdGetPtr(PcdDeviceCodeName));\r
+ Serial = param_get_android_serial_number (fdt_get_cmdline_items (Fdt, NULL));\r
+ if (Serial != NULL) {\r
+ DEBUG((EFI_D_INFO, "Android Serial Number: %a\n", Serial));\r
+ ZeroMem(mSysInfoSerial, sizeof(mSysInfoSerial));\r
+ AsciiStrCpyS(\r
+ mSysInfoSerial, sizeof(mSysInfoSerial),\r
+ Serial);\r
+ }\r
LogSmbiosData(\r
(EFI_SMBIOS_TABLE_HEADER *)&mSysInfoType1, mSysInfoType1Strings, NULL);\r
\r
NULL);\r
\r
// TYPE19 Memory Array Map Information\r
- mMemArrMapInfoType19.ExtendedStartingAddress = PcdGet64(PcdSystemMemoryBase);\r
- mMemArrMapInfoType19.ExtendedEndingAddress =\r
- PcdGet64(PcdSystemMemoryBase) + PcdGet64(PcdSystemMemorySize);\r
- LogSmbiosData(\r
- (EFI_SMBIOS_TABLE_HEADER *)&mMemArrMapInfoType19,\r
- mMemArrMapInfoType19Strings, NULL);\r
+\r
+ while (fdt_get_memory(Fdt, (int)Node, (uint64_t*)&MemoryBase, (uint64_t*)&MemorySize)) {\r
+ mMemArrMapInfoType19.StartingAddress = MemoryBase;\r
+ mMemArrMapInfoType19.EndingAddress = MemorySize;\r
+ LogSmbiosData(\r
+ (EFI_SMBIOS_TABLE_HEADER *)&mMemArrMapInfoType19,\r
+ mMemArrMapInfoType19Strings, NULL);\r
+ Node++;\r
+ }\r
\r
// TYPE32 Boot Information\r
LogSmbiosData(\r
ArmPkg/ArmPkg.dec\r
EmbeddedPkg/EmbeddedPkg.dec\r
sdm845Pkg/sdm845Pkg.dec\r
+ SimpleInit.dec\r
\r
[LibraryClasses]\r
ArmLib\r
DebugLib\r
PrintLib\r
TimeBaseLib\r
+ SimpleInitLib\r
\r
[Guids]\r
gEfiGlobalVariableGuid\r
\r
[FixedPcd]\r
gArmTokenSpaceGuid.PcdSystemMemoryBase\r
- gArmTokenSpaceGuid.PcdSystemMemorySize\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString\r
gsdm845PkgTokenSpaceGuid.PcdDeviceVendor\r
gsdm845PkgTokenSpaceGuid.PcdDeviceProduct\r
gsdm845PkgTokenSpaceGuid.PcdDeviceCodeName\r
+ gsdm845PkgTokenSpaceGuid.DeviceTreeStore\r
\r
[Protocols]\r
gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r