From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.45]) by mx.groups.io with SMTP id smtpd.web10.18742.1684233935849642836 for ; Tue, 16 May 2023 03:45:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=IlHkAZFA; spf=pass (domain: arm.com, ip: 40.107.7.45, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/lRuGsBSwMR35whJT1nr1IiDMPRwhUBNxNiXOYHYXLA=; b=IlHkAZFAL/2mi0lr6OIDXt5OYQJsoUF8nUOVaIkahkQgKvhxxWQRKj3wYROT5ZxyuPYjCsu5nbd6z1i+MoCubUfIHd8Ax+A5fBsVBPlv79qbGUeSJlT/Airiwrwbz2Fb+sAdjMzxi0BE/VxQcKJULld7z6OImW8JW0RFNrzunq8= Received: from DB6PR0201CA0005.eurprd02.prod.outlook.com (2603:10a6:4:3f::15) by DU0PR08MB7881.eurprd08.prod.outlook.com (2603:10a6:10:3b3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Tue, 16 May 2023 10:45:32 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::7f) by DB6PR0201CA0005.outlook.office365.com (2603:10a6:4:3f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30 via Frontend Transport; Tue, 16 May 2023 10:45:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.15 via Frontend Transport; Tue, 16 May 2023 10:45:32 +0000 Received: ("Tessian outbound 5154e9d36775:v136"); Tue, 16 May 2023 10:45:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a5eeba74b04354f3 X-CR-MTA-TID: 64aa7808 Received: from 1e9b300d2073.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5F6DBE49-15AF-4E74-9C4C-F69CC047E7F1.1; Tue, 16 May 2023 10:45:25 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1e9b300d2073.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 16 May 2023 10:45:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFDz3lELGTQJlMtIjuMiPNr4yZQu34rRS4aU54wc/I3D48y8f9PUbsI7KwAWRVlHjwH+VmhORzShjcKvWaMQX9UM1/jiFDME+9Ou4teNP6q4Uj9B3uZGy14kdYruVtCoWAU4cuzK6lkPTx1+r9T6LooArusHRF6iHwuI8i7G7lMtyxpCX3kyAUjKADdi10GXQUBn7dAlnkgJM9fB0rTDKCAO6u47K1gK/GToOqlEJFCz3daQouNEnEP+r2xTHUNQ7rGSuTP4q4wdzR+k1JRZeBMgx5AsfKGUdxdoAoZ26yL7g8ObANSzhbKzjT9wjR5HNQqlOwAy4fIZ3vHk5r5DJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/lRuGsBSwMR35whJT1nr1IiDMPRwhUBNxNiXOYHYXLA=; b=VGobeOL9klA8A3nZxh1IFlNHivu3uyepBjjK/1Uxdqk3scdEPSOCB44RR3aSE0/Ayn+uDpPUUt0ayc3kO7cs6gIpI8vhgSY4v5T0wbqleHJ1OhEFK34kXWBJKGZfYdGXFWPrDZITu1DxRSZh37moWkbGgjbbbMFhL5+u6pBAjreASANxI5daPGv7/RffPv2UDGI8dWoFRUWxL7s5QBhrw45LvmB6DN33YDOR6A7NfTOJK8lvBImqL7aTvLCy3Ql+K3l8Jv8sfpTTVDKLk4O/bw1T8uCRSD+vJqiQZyrPtE6LsEc3OxX2Twlr1IXW7JLhnR4LIS4TCE7bDBmf3XBnTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/lRuGsBSwMR35whJT1nr1IiDMPRwhUBNxNiXOYHYXLA=; b=IlHkAZFAL/2mi0lr6OIDXt5OYQJsoUF8nUOVaIkahkQgKvhxxWQRKj3wYROT5ZxyuPYjCsu5nbd6z1i+MoCubUfIHd8Ax+A5fBsVBPlv79qbGUeSJlT/Airiwrwbz2Fb+sAdjMzxi0BE/VxQcKJULld7z6OImW8JW0RFNrzunq8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB6055.eurprd08.prod.outlook.com (2603:10a6:20b:293::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23; Tue, 16 May 2023 10:45:21 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::7afd:553d:71b8:4c8c]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::7afd:553d:71b8:4c8c%6]) with mapi id 15.20.6387.032; Tue, 16 May 2023 10:45:21 +0000 Message-ID: <75afd2c9-0ced-1508-f844-cf6d50d67868@arm.com> Date: Tue, 16 May 2023 11:45:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [edk2-devel] [PATCH edk2-platforms 2/2] Silicon/Qemu: use dynamic Pcds for SbsaQemu GIC addresses To: devel@edk2.groups.io, quic_llindhol@quicinc.com Cc: Ard Biesheuvel , Graeme Gregory , Radoslaw Biernacki , Marcin Juszkiewicz , "nd@arm.com" References: <20230512175753.13318-1-quic_llindhol@quicinc.com> <20230512175753.13318-3-quic_llindhol@quicinc.com> From: "Sami Mujawar" In-Reply-To: <20230512175753.13318-3-quic_llindhol@quicinc.com> X-ClientProxiedBy: LO4P123CA0471.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a8::8) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|AS8PR08MB6055:EE_|DBAEUR03FT007:EE_|DU0PR08MB7881:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d87fff1-d126-4d8b-3f54-08db55faac33 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Zvh34Pg0wRncl1CgtpysStqhCO2BojElaP9X7Bz15q6/DQrSAgEZsNs4gkOFLIkhJagP5PLTpm0LIXQth6yjgT0JaGU5McAzSqOGs6BuO3Tyom/r4sQm2jr0hcUyT8Gj7LwMeS+QONwBesPcJ4AVQxetbsdhfny65KFYuklGS9LMqdw9325kpuRJEyzMHFQm9Wh4ehT1JghMQ3sM3pTXJPPlltb9Vs1Jo59zRf7W8MnWgb7SoZErvaLuO6whcWI37gb+mdoytMf1z726mUn0xfsgY0StXP/72XqHL33OlqtdjkAUoDvNvPdvGJPFoyiICeMbu6+xc4dMTum5m6seravZFAoD+MAmTMJ8iY2D/KErdNtFXVo1em+724XF+jAfrsQYysyq0JfwJYqUJw/UkweVcN19XSsWaL8uoCIchOTr7ouFxLeXCSUfeToPZqW8oaHv9UVZvCJ3kYZ8x6AiV4eHZ4oFmAlvvG0lcecX0X6mG67XqhbpjhUXP4TFa1nyrsGOVWHw7vq5XqTwRZJ4yck+xBIZ0NbdHyWHMVJaEzsju0eKajvbrknNRkT6S57WGY6WiXuBhExBzuFv8l908Jl25U7uo2GUrG9d2UFcDspz3sGl8Mgjh+IF1t+qAxMrEyePsEmwZUEqLtrvcNqaDg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(346002)(376002)(136003)(396003)(451199021)(86362001)(6486002)(31696002)(36756003)(54906003)(316002)(66946007)(66556008)(478600001)(66476007)(4326008)(2906002)(44832011)(5660300002)(8936002)(8676002)(38100700002)(41300700001)(186003)(26005)(6506007)(6512007)(53546011)(83380400001)(2616005)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6055 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 79745bd5-375f-4567-e04b-08db55faa579 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +cb38BKvI7onTFG/4pNb8iv3RCPTQOJWnvhfj7H2C3K7ao7e5zzTGXZcumANZns6ZyFKNitbZWOdl0bRMsOUboSUV6V/Y5vSc/F0DGNbr4pIQkLO435jJ5YBBm5KlTRDnJZTM9TOQIEeyScy+94TsFXS1H+omU1cJMFqRyg78L/tQtqxhDrIF6W7jvCyK33uEBrs3oZLVVnY3Wr2HdYTgJbgHtsjuvuRYGlSC0ZcvQDUv2uqgus1l9N69YRuh4K/QkUj3i5qPEA1Qld88NXjqZ2DGM+NoOBJ9/Qqygk6YvMpc8IS/9pZ4wuUm8FBWFw5zeGSaf/9NacnwajfCgCJv96an4j6HP7mkJbNxmwBKYCmfNK85Ve7HHC+8fG94jx10dcLYasXiFQX4FmsuF0qe9wwm3KTAIfB5zprkd4cHdYQR8Uan6sp+2lQcWQYHOEtTY56uSGbbxtu4f/TWBK2RpwMXCKxoQ/sdIuTK0rgaBWRsnGqqjePWbr3EwPYSumG9G/nzpR6mPCQfSpkJFF20Z8fXLOiREGBKHF6gZg/KiMrN+PV2ALryrrqz2XB6UWgjgj2i33zTV9hn0IQqIxLWyp1r0z6E6bIS9fK/923ItLZtgsi5kpP3oB7jneFhywhUnBBGmDU4SgXRTlR24EZd9EQwase10Ur31YPnMpiLLvn2uWaDGej4K3A3mBFw3wrsym38xy3HzAhKWB89uWiQ1c++EptD8G/GegAKSfebUMo6ni49QRvrWPgHi+yZmL84iig1TtTO8tfKKi05/jc+w== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(346002)(376002)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(81166007)(54906003)(478600001)(356005)(40460700003)(83380400001)(36860700001)(86362001)(2616005)(47076005)(6506007)(186003)(336012)(53546011)(26005)(82740400003)(82310400005)(6512007)(31696002)(40480700001)(36756003)(6486002)(31686004)(70206006)(316002)(2906002)(8936002)(44832011)(5660300002)(8676002)(70586007)(41300700001)(4326008)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 10:45:32.2281 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d87fff1-d126-4d8b-3f54-08db55faac33 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7881 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Leif, Thank you for this patch. These changes look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 12/05/2023 06:57 pm, Leif Lindholm via groups.io wrote: > 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 */ > );