-Subproject commit c775d7fe1713b041219c7dfafc6265219c901d6d
+Subproject commit a1954c67cb3feb0ed937844ef0bd7be02642b71d
#
!include MdePkg/MdeLibs.dsc.inc
-!include sdm845Pkg/Library/SimpleInit/SimpleInit.inc
+!include SimpleInit.inc
[LibraryClasses.common]
!if $(TARGET) == RELEASE
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|32
[PcdsDynamicHii.common.DEFAULT]
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|3 # Variable: L"Timeout"
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|0 # Variable: L"Timeout"
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
INF MdeModulePkg/Application/UiApp/UiApp.inf
INF sdm845Pkg/Drivers/LogoDxe/LogoDxe.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
[FV.FVMAIN_COMPACT]
FvAlignment = 8
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
#INF sdm845Pkg/Drivers/Op6tSlotDxe/Op6tSlotDxe.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
#
INF src/main/SimpleInitMain.inf
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
SECTION UI = "PlatformInfoDxeDriver"\r
}\r
\r
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {\r
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi\r
+ SECTION UI = "DDRInfoDxe"\r
+ }\r
+\r
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {\r
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex\r
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi\r
#\r
INF src/main/SimpleInitMain.inf\r
\r
+ INF src/kernelfdt/KernelFdtDxe.inf\r
+\r
[FV.FVMAIN_COMPACT]\r
FvAlignment = 8\r
ERASE_POLARITY = 1\r
SECTION UI = "PlatformInfoDxeDriver"
}
+ FILE DRIVER = 7DB0793A-4402-4BE1-906E-D0FABAD2707E {
+ SECTION PE32 = sdm845Pkg/Binary/845/DDRInfoDxe/DDRInfoDxe.efi
+ SECTION UI = "DDRInfoDxe"
+ }
+
FILE DRIVER = 9A00771F-36D4-4DD5-8916-C48ED9B16B86 {
SECTION DXE_DEPEX = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.depex
SECTION PE32 = sdm845Pkg/Binary/845/HALIOMMU/HALIOMMU.efi
# INF sdm845Pkg/Drivers/Op6tSlotDxe/Op6tSlotDxe.inf
# !endif #$(AB_SLOTS_SUPPORT)
+ INF src/kernelfdt/KernelFdtDxe.inf
+
[FV.FVMAIN_COMPACT]
FvAlignment = 8
ERASE_POLARITY = 1
gsdm845PkgTokenSpaceGuid.PcdDeviceVendor\r
gsdm845PkgTokenSpaceGuid.PcdDeviceProduct\r
gsdm845PkgTokenSpaceGuid.PcdDeviceCodeName\r
- gsdm845PkgTokenSpaceGuid.DeviceTreeStore\r
\r
[Protocols]\r
gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
+ gKernelFdtProtocolGuid\r
\r
[Guids]\r
\r
[Depex]\r
- gEfiSmbiosProtocolGuid\r
+ gEfiSmbiosProtocolGuid AND\r
+ gKernelFdtProtocolGuid\r
+\r
#include <Library/DebugLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseMemoryLib.h>
+#include <KernelFdt.h>
#include <fdtparser.h>
#include <param.h>
#include <keyval.h>
EFIAPI
GetFdt(VOID)
{
- EFI_PHYSICAL_ADDRESS FdtStore = (EFI_PHYSICAL_ADDRESS)FixedPcdGet64(DeviceTreeStore);
- EFI_PHYSICAL_ADDRESS FdtAddress = *(EFI_PHYSICAL_ADDRESS*)FdtStore;
+ EFI_PHYSICAL_ADDRESS FdtAddress;
+ #ifndef FDT_DIRECT
+ EFI_STATUS Status;
+ KERNEL_FDT_PROTOCOL *Fdt;
- DEBUG((EFI_D_INFO, "Device Tree Address: 0x%016lx\n",FdtAddress));
+ Status = gBS->LocateProtocol (
+ &gKernelFdtProtocolGuid,
+ NULL,
+ (VOID**)&Fdt
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG((EFI_D_ERROR, "Locate Kernel Fdt Protocol failed: %r\n", Status));
+ return NULL;
+ }
+ if (Fdt == NULL || Fdt->Fdt == NULL) {
+ DEBUG((EFI_D_ERROR, "Invalid Device Tree\n"));
+ return NULL;
+ }
+ FdtAddress = (EFI_PHYSICAL_ADDRESS)Fdt->Fdt;
+ #else
+ FdtAddress = *(EFI_PHYSICAL_ADDRESS*)FixedPcdGet64 (PcdDeviceTreeStore);
if (FdtAddress < PcdGet64(PcdSystemMemoryBase)){
DEBUG((EFI_D_INFO, "Invalid Device Tree Address\n"));
return NULL;
}
+ #endif
+ DEBUG((EFI_D_INFO, "Device Tree Address: 0x%016lx\n", FdtAddress));
return get_fdt_from_pointer ((VOID*)FdtAddress);
}
*
**/
+#define FDT_DIRECT
#include <PiPei.h>
#include <Library/ArmMmuLib.h>
[FixedPcd]
gArmTokenSpaceGuid.PcdSystemMemoryBase
gArmTokenSpaceGuid.PcdSystemMemorySize
- gsdm845PkgTokenSpaceGuid.DeviceTreeStore
+ gSimpleInitTokenSpaceGuid.PcdDeviceTreeStore
[Depex]
TRUE
Status = EfiBootManagerGetBootManagerMenu(&BootOption);
ASSERT_EFI_ERROR(Status);
#ifdef ENABLE_SIMPLE_INIT
- //
- // Search all boot options
- //
- EfiBootManagerRefreshAllBootOption();
//
// Register Simple Init GUI APP
NULL, (UINT16)BootOption.OptionNumber, 0, &UP, NULL);
#endif
ASSERT(Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);
- Status = EfiBootManagerAddKeyOptionVariable(
- NULL, (UINT16)BootOption.OptionNumber, 0, &Esc, NULL);
- ASSERT(Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);
}
//
-Subproject commit 4cc02c44f289cad0bbf18cfc7f9f97655f5946f4
+Subproject commit 0556e34886c92513a4ec7ac909a082c7afb06fd2
bne docopy
ret
docopy:
- mov x10, FixedPcdGet64 (DeviceTreeStore)
+ mov x10, FixedPcdGet64 (PcdDeviceTreeStore)
str x0, [x10] // oh my fdt
// find our start address by getting our expected offset, then subtracting it from our actual address
ldr x6, =FixedPcdGet64 (PcdFdBaseAddress)
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
sdm845Pkg/sdm845Pkg.dec
+ SimpleInit.dec
[LibraryClasses]
ArmLib
gArmTokenSpaceGuid.PcdSystemMemorySize
gArmTokenSpaceGuid.PcdFdBaseAddress
gArmTokenSpaceGuid.PcdFdSize
- gsdm845PkgTokenSpaceGuid.DeviceTreeStore
+ gSimpleInitTokenSpaceGuid.PcdDeviceTreeStore
gsdm845PkgTokenSpaceGuid.PcdDeviceVendor|"Qualcomm"|VOID*|0x0000a301
gsdm845PkgTokenSpaceGuid.PcdDeviceProduct|"Snapdragon 845 Device"|VOID*|0x0000a302
gsdm845PkgTokenSpaceGuid.PcdDeviceCodeName|"sdm845"|VOID*|0x0000a303
-
- gsdm845PkgTokenSpaceGuid.DeviceTreeStore|0x83300000|UINT64|0x0000a501
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
gArmTokenSpaceGuid.PcdSystemMemorySize|0xC0000000
+ gSimpleInitTokenSpaceGuid.PcdDeviceTreeStore|0x83300000
+
# We bring up eight cores here!
gArmPlatformTokenSpaceGuid.PcdCoreCount|8
gArmPlatformTokenSpaceGuid.PcdClusterCount|2
# GUID of the UI app
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|5
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE