:p
atchew
Login
Qemu has versioning for sbsa-ref platform. TF-A reads it from provided DeviceTree and provides as SMC. Version 0.0 (QEMU 8.0) provides platform version information. Version 0.1 (in review) provides GIC information. Next versions will bring more changes to make use of development done during last years. Requires "SbsaQemu: make GIC base address Pcds dynamic" by Leif Lindholm to be able to change values with those from QEMU. QEMU part: https://lists.gnu.org/archive/html/qemu-arm/2023-05/msg00517.html TF-A part: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/20871 Marcin Juszkiewicz (2): Platform/SbsaQemu: read platform version Platform/SbsaQemu: read GIC base from TF-A Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 + .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 57 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 9 +++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 + 4 files changed, 72 insertions(+) -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104861): https://edk2.groups.io/g/devel/message/104861 Mute This Topic: https://groups.io/mt/98900380/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Qemu has versioning for sbsa-ref platform. TF-A reads it from provided DeviceTree and provides as SMC. This change adds reading platform version into EDK2. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 +++ .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 27 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 5 ++++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 +++ 4 files changed, 38 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc index XXXXXXX..XXXXXXX 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -XXX,XX +XXX,XX @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L"AT0000" gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L"SK0000" + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0 + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c @@ -XXX,XX +XXX,XX @@ * **/ +#include <Library/ArmSmcLib.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <Library/NonDiscoverableDeviceRegistrationLib.h> #include <Library/PcdLib.h> #include <Library/UefiBootServicesTableLib.h> #include <Library/UefiDriverEntryPoint.h> +#include <IndustryStandard/ArmStdSmc.h> #include <Protocol/FdtClient.h> +/* those probably should go into IndustryStandard/ArmStdSmc.h */ +#define SMC_FASTCALL 0x80000000 +#define SMC64_FUNCTION (SMC_FASTCALL | 0x40000000) +#define SIP_FUNCTION (SMC64_FUNCTION | 0x02000000) +#define SIP_FUNCTION_ID(n) (SIP_FUNCTION | (n)) + +#define SIP_SVC_VERSION SIP_FUNCTION_ID(1) + EFI_STATUS EFIAPI InitializeSbsaQemuPlatformDxe ( @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( EFI_STATUS Status; UINTN Size; VOID* Base; + UINTN Arg0; + UINTN Arg1; + UINTN Result; DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNCTION__)); @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( return Status; } + Result = ArmCallSmc0 (SIP_SVC_VERSION, &Arg0, &Arg1, NULL); + if (Result == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet32S (PcdPlatformVersionMajor, Arg0); + ASSERT_EFI_ERROR (Result); + Result = PcdSet32S (PcdPlatformVersionMinor, Arg1); + ASSERT_EFI_ERROR (Result); + } + + Arg0 = PcdGet32 (PcdPlatformVersionMajor); + Arg1 = PcdGet32 (PcdPlatformVersionMinor); + + DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1)); + return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ SbsaQemuPlatformDxe.c [Packages] + ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec @@ -XXX,XX +XXX,XX @@ Silicon/Qemu/SbsaQemu/SbsaQemu.dec [LibraryClasses] + ArmSmcLib PcdLib DebugLib NonDiscoverableDeviceRegistrationLib @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor + [Depex] TRUE diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisManufacturer|L""|VOID*|0x0000011B gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L""|VOID*|0x0000011C gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D + + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0|UINT32|0x0000011E + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0|UINT32|0x0000011F -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104860): https://edk2.groups.io/g/devel/message/104860 Mute This Topic: https://groups.io/mt/98900379/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Qemu has versioning for sbsa-ref platform. TF-A reads data from provided DeviceTree and provides as SMC. This change adds reading GIC base addresses into EDK2. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> --- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 30 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 4 +++ 2 files changed, 34 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c @@ -XXX,XX +XXX,XX @@ #define SIP_FUNCTION_ID(n) (SIP_FUNCTION | (n)) #define SIP_SVC_VERSION SIP_FUNCTION_ID(1) +#define SIP_SVC_GET_GICD SIP_FUNCTION_ID(2) +#define SIP_SVC_GET_GICR SIP_FUNCTION_ID(3) EFI_STATUS EFIAPI @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1)); + /* If we are on platform version 0.0 then there is no more data for us in DeviceTree */ + if ((Arg0 == 0) & (Arg1 == 0)) + { + return EFI_SUCCESS; + } + + Result = ArmCallSmc0 (SIP_SVC_GET_GICD, &Arg0, NULL, NULL); + if (Result == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet64S (PcdGicDistributorBase, Arg0); + ASSERT_EFI_ERROR (Result); + } + + Arg0 = PcdGet64 (PcdGicDistributorBase); + + DEBUG ((DEBUG_INFO, "GICD base: 0x%x\n", Arg0)); + + Result = ArmCallSmc0 (SIP_SVC_GET_GICR, &Arg0, NULL, NULL); + if (Result == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet64S (PcdGicRedistributorsBase, Arg0); + ASSERT_EFI_ERROR (Result); + } + + Arg0 = PcdGet64 (PcdGicRedistributorsBase); + + DEBUG ((DEBUG_INFO, "GICR base: 0x%x\n", Arg0)); + return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + + [Depex] TRUE -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104862): https://edk2.groups.io/g/devel/message/104862 Mute This Topic: https://groups.io/mt/98900381/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Qemu has versioning for sbsa-ref platform. TF-A reads it from provided DeviceTree and provides as SMC. Version 0.0 (QEMU 8.0) provides platform version information. Version 0.1 (in review) provides GIC information. Next versions will bring more changes to make use of development done during last years. Requires "SbsaQemu: make GIC base address Pcds dynamic" by Leif Lindholm to be able to change values with those from QEMU. QEMU part: https://lists.gnu.org/archive/html/qemu-arm/2023-05/msg00517.html TF-A part: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/20871 Changes since v4: - SMC calls use SmcResult variable (UINTN) - PcdSet* calls use Result var (RETURN_STATUS) - fixed "are we on 0.0" check Marcin Juszkiewicz (2): Platform/SbsaQemu: read platform version Platform/SbsaQemu: read GIC base from TF-A Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 + .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 58 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 9 +++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 + 4 files changed, 73 insertions(+) -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104874): https://edk2.groups.io/g/devel/message/104874 Mute This Topic: https://groups.io/mt/98903526/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Qemu has versioning for sbsa-ref platform. TF-A reads it from provided DeviceTree and provides as SMC. This change adds reading platform version into EDK2. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 ++ .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 28 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 5 ++++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 ++ 4 files changed, 39 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc index XXXXXXX..XXXXXXX 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -XXX,XX +XXX,XX @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L"AT0000" gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L"SK0000" + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0 + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c @@ -XXX,XX +XXX,XX @@ * **/ +#include <Library/ArmSmcLib.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <Library/NonDiscoverableDeviceRegistrationLib.h> #include <Library/PcdLib.h> #include <Library/UefiBootServicesTableLib.h> #include <Library/UefiDriverEntryPoint.h> +#include <IndustryStandard/ArmStdSmc.h> #include <Protocol/FdtClient.h> +/* those probably should go into IndustryStandard/ArmStdSmc.h */ +#define SMC_FASTCALL 0x80000000 +#define SMC64_FUNCTION (SMC_FASTCALL | 0x40000000) +#define SIP_FUNCTION (SMC64_FUNCTION | 0x02000000) +#define SIP_FUNCTION_ID(n) (SIP_FUNCTION | (n)) + +#define SIP_SVC_VERSION SIP_FUNCTION_ID(1) + EFI_STATUS EFIAPI InitializeSbsaQemuPlatformDxe ( @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( EFI_STATUS Status; UINTN Size; VOID* Base; + UINTN Arg0; + UINTN Arg1; + UINTN SmcResult; + RETURN_STATUS Result; DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNCTION__)); @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( return Status; } + SmcResult = ArmCallSmc0 (SIP_SVC_VERSION, &Arg0, &Arg1, NULL); + if (SmcResult == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet32S (PcdPlatformVersionMajor, Arg0); + ASSERT_RETURN_ERROR (Result); + Result = PcdSet32S (PcdPlatformVersionMinor, Arg1); + ASSERT_RETURN_ERROR (Result); + } + + Arg0 = PcdGet32 (PcdPlatformVersionMajor); + Arg1 = PcdGet32 (PcdPlatformVersionMinor); + + DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1)); + return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ SbsaQemuPlatformDxe.c [Packages] + ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec @@ -XXX,XX +XXX,XX @@ Silicon/Qemu/SbsaQemu/SbsaQemu.dec [LibraryClasses] + ArmSmcLib PcdLib DebugLib NonDiscoverableDeviceRegistrationLib @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor + [Depex] TRUE diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisManufacturer|L""|VOID*|0x0000011B gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L""|VOID*|0x0000011C gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D + + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0|UINT32|0x0000011E + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0|UINT32|0x0000011F -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104873): https://edk2.groups.io/g/devel/message/104873 Mute This Topic: https://groups.io/mt/98903525/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Qemu has versioning for sbsa-ref platform. TF-A reads data from provided DeviceTree and provides as SMC. This change adds reading GIC base addresses into EDK2. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> --- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 30 +++++++++++++++++++ .../SbsaQemuPlatformDxe.inf | 4 +++ 2 files changed, 34 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c @@ -XXX,XX +XXX,XX @@ #define SIP_FUNCTION_ID(n) (SIP_FUNCTION | (n)) #define SIP_SVC_VERSION SIP_FUNCTION_ID(1) +#define SIP_SVC_GET_GICD SIP_FUNCTION_ID(2) +#define SIP_SVC_GET_GICR SIP_FUNCTION_ID(3) EFI_STATUS EFIAPI @@ -XXX,XX +XXX,XX @@ InitializeSbsaQemuPlatformDxe ( DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1)); + /* If we are on platform version 0.0 then there is no more data for us in DeviceTree */ + if ((Arg0 == 0) && (Arg1 == 0)) + { + return EFI_SUCCESS; + } + + SmcResult = ArmCallSmc0 (SIP_SVC_GET_GICD, &Arg0, NULL, NULL); + if (SmcResult == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet64S (PcdGicDistributorBase, Arg0); + ASSERT_RETURN_ERROR (Result); + } + + Arg0 = PcdGet64 (PcdGicDistributorBase); + + DEBUG ((DEBUG_INFO, "GICD base: 0x%x\n", Arg0)); + + SmcResult = ArmCallSmc0 (SIP_SVC_GET_GICR, &Arg0, NULL, NULL); + if (SmcResult == SMC_ARCH_CALL_SUCCESS) + { + Result = PcdSet64S (PcdGicRedistributorsBase, Arg0); + ASSERT_RETURN_ERROR (Result); + } + + Arg0 = PcdGet64 (PcdGicRedistributorsBase); + + DEBUG ((DEBUG_INFO, "GICR base: 0x%x\n", Arg0)); + return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + + [Depex] TRUE -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104875): https://edk2.groups.io/g/devel/message/104875 Mute This Topic: https://groups.io/mt/98903528/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-