From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: <devel@edk2.groups.io>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Graeme Gregory <graeme@xora.org.uk>,
Radoslaw Biernacki <rad@semihalf.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: [PATCH edk2-platforms 2/2] Silicon/Qemu: use dynamic Pcds for SbsaQemu GIC addresses
Date: Fri, 12 May 2023 18:57:53 +0100 [thread overview]
Message-ID: <20230512175753.13318-3-quic_llindhol@quicinc.com> (raw)
In-Reply-To: <20230512175753.13318-1-quic_llindhol@quicinc.com>
The GIC addresses as currently declared as FixedPcd for SbsaQemu.
Change them to dynamic, to enable future patches to support these
being determined at runtime.
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Graeme Gregory <graeme@xora.org.uk>
Cc: Radoslaw Biernacki <rad@semihalf.com>
Cc: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 12 ++++++------
Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 7 ++++---
.../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 5 +++--
.../SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h | 2 +-
.../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 2 +-
5 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index 9ca030cfe9a7..0bd0df4f0239 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -406,12 +406,6 @@ [PcdsFixedAtBuild.common]
# Size of the region used by UEFI in permanent memory (Reserved 64MB)
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
- #
- # ARM General Interrupt Controller
- #
- gArmTokenSpaceGuid.PcdGicDistributorBase|0x40060000
- gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x40080000
-
## Default Terminal Type
## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
@@ -523,6 +517,12 @@ [PcdsDynamicDefault.common]
# TODO as no DT will be used we should pass this by some other method
gArmTokenSpaceGuid.PcdSystemMemorySize|0x08000000
+ #
+ # ARM General Interrupt Controller
+ #
+ gArmTokenSpaceGuid.PcdGicDistributorBase|0x40060000
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x40080000
+
#
# Set video resolution for boot options
# PlatformDxe can set the former at runtime.
diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
index 176d8fab835b..0501c670d565 100644
--- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
+++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
@@ -32,9 +32,6 @@ [Packages]
Silicon/Qemu/SbsaQemu/SbsaQemu.dec
[FixedPcd]
- gArmTokenSpaceGuid.PcdGicDistributorBase
- gArmTokenSpaceGuid.PcdGicRedistributorsBase
-
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
@@ -74,3 +71,7 @@ [FixedPcd]
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize
+
+[Pcd]
+ gArmTokenSpaceGuid.PcdGicDistributorBase
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase
diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
index c6de685bd2c4..c1c33788567d 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
@@ -46,6 +46,9 @@ [Pcd]
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdClusterCount
+ gArmTokenSpaceGuid.PcdGicDistributorBase
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase
+
[Depex]
gEfiAcpiTableProtocolGuid ## CONSUMES
@@ -57,8 +60,6 @@ [Protocols]
[FixedPcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision
- gArmTokenSpaceGuid.PcdGicDistributorBase
- gArmTokenSpaceGuid.PcdGicRedistributorsBase
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision
diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
index dcafcbca5a48..853b81b34df5 100644
--- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
+++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
@@ -33,7 +33,7 @@
EFI_ACPI_6_0_GICR, /* Type */ \
sizeof (EFI_ACPI_6_0_GICR_STRUCTURE), /* Length */ \
EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- FixedPcdGet64 (PcdGicRedistributorsBase), /* DiscoveryRangeBaseAddress */ \
+ PcdGet64 (PcdGicRedistributorsBase), /* DiscoveryRangeBaseAddress */ \
SBSAQEMU_MADT_GICR_SIZE /* DiscoveryRangeLength */ \
}
diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c
index 58330a3e7005..ae5397bab768 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c
@@ -83,7 +83,7 @@ AddMadtTable (
EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE Gicd =
EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT (
0,
- FixedPcdGet64 (PcdGicDistributorBase),
+ PcdGet64 (PcdGicDistributorBase),
0,
3 /* GicVersion */
);
--
2.30.2
next prev parent reply other threads:[~2023-05-12 17:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 17:57 [PATCH edk2-platforms 0/2] SbsaQemu: make GIC base address Pcds dynamic Leif Lindholm
2023-05-12 17:57 ` [PATCH edk2-platforms 1/2] Silicon/Qemu: use 64-bit Pcds for SbsaQemu GIC addresses Leif Lindholm
2023-05-16 10:45 ` [edk2-devel] " Sami Mujawar
2023-05-12 17:57 ` Leif Lindholm [this message]
2023-05-16 10:45 ` [edk2-devel] [PATCH edk2-platforms 2/2] Silicon/Qemu: use dynamic " Sami Mujawar
2023-05-16 10:18 ` [edk2-devel] [PATCH edk2-platforms 0/2] SbsaQemu: make GIC base address Pcds dynamic Graeme Gregory
2023-06-01 18:34 ` Leif Lindholm
2023-05-30 16:43 ` Marcin Juszkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230512175753.13318-3-quic_llindhol@quicinc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox