From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.31508.1683914288448563833 for ; Fri, 12 May 2023 10:58:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=E/tEc97j; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.180.131, mailfrom: quic_llindhol@quicinc.com) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CHcJ3O026032; Fri, 12 May 2023 17:58:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=rFpFeKIfvahDPaBq4yV8+WglyTmuIU0gCJl5rnsroIg=; b=E/tEc97jEVqWvBoXPrXPfiQMtUdAVPNBfcIPNYmxFvekzAvUlkXvwSb7qcXy6nxOlIB4 VE4MQz+0a68JXUQsMJiZpRIs3Ua7225IU5kwreEBnHilL/t4RVxwf8UV9rS3NqtQjGtZ SP+GY1MUBF0KTkylKrLuvmsshdvS3ebXNiaqYzPaCt+rO2bE327zJ38I+CEXtOV7JQj3 L+1t7RazlesOG9kD0JeLcCXfA95HG8hJZmERGbpJ1QsYECDzU6Pt976O9GHqS+UOi1AA b0OdqRgjve8UjUsWISm2wgMWeu0qN55tlY22icLJoIpubui89QLZxlySXVVLdCiT7GuN /w== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qhh391b3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 17:58:07 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34CHw6Pb008017 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 17:58:06 GMT Received: from qc-i7.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Fri, 12 May 2023 10:58:04 -0700 From: "Leif Lindholm" To: CC: Ard Biesheuvel , Graeme Gregory , Radoslaw Biernacki , Marcin Juszkiewicz Subject: [PATCH edk2-platforms 2/2] Silicon/Qemu: use dynamic Pcds for SbsaQemu GIC addresses Date: Fri, 12 May 2023 18:57:53 +0100 Message-ID: <20230512175753.13318-3-quic_llindhol@quicinc.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230512175753.13318-1-quic_llindhol@quicinc.com> References: <20230512175753.13318-1-quic_llindhol@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: erRzFdyv0uMDo3-fBQCmwkDfxgwybFyQ X-Proofpoint-ORIG-GUID: erRzFdyv0uMDo3-fBQCmwkDfxgwybFyQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-12_10,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 clxscore=1015 mlxscore=0 impostorscore=0 mlxlogscore=788 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120150 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 Cc: Ard Biesheuvel Cc: Graeme Gregory Cc: Radoslaw Biernacki Cc: Marcin Juszkiewicz --- 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