From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.85]) by mx.groups.io with SMTP id smtpd.web10.2798.1588658681379969887 for ; Mon, 04 May 2020 23:04:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=rJq30udl; spf=pass (domain: vmware.com, ip: 40.107.236.85, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJII13U3ieAoWb5/kp/vOtrKUsVTJx2MYi3zt1/YPa8Y2kRiOMjJh5MW5yuOLSsXDbTBbdca9OWDJ3rHCKz44TXZHihZLP6UvoiYJNcyIMJOYf4kuiWPmkqITX1bOHyghU58pYSmVQOu2T7Zc21CfIAHKEnkjeR2KWJmgrVbgNiBfghDv891G0TqVMYCef+xBK4P9473gtvCY9Se4ld7nK8UfU4U0OzMnZZb58EOzK4xZo6aHURmwLqnzdGts39pr2jQLiKjjFFAqvbBdQpaioSzqQQ0gWffSIZM89cE71tApepsgWEJ3HSZbLpc2uxtYl+Jr2IEwIKfH32ggSL1+Q== 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-SenderADCheck; bh=crsK6OEym8HxO6t+lzTrBAlNhvExH45O46IXUrI4slo=; b=b5/l1M79sMQ1uJDWZ3DiqqKaEmC3S71PD49NBxrVYCSir9OxnJZV0fuU71+6aPi4YrFLC03e+3M6FAdvGtDo9Ih3a6gbXgvb9pmtOJvboHpP50AlvZJnO/IgvHI+gewfzqdnWpMm70CaPNfX8l7vV5HNTNTRTmTMA0JcpIzDc1un3Ys63p1UNxp6DgVGbCC9dVK12qEo28tjzxdgrMIC98jeGd4m8BUYIRgDNofbQdMkAm3c/EmUqo+ZH2L78O2HNrtbnP2C+Cgi3E1OG88RbfdXIl7OzIghX0UUcm50e9ogtB5M4VFhTR/7orIN4Qcyy8c3AJuQDO5doE1ofAOLEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=crsK6OEym8HxO6t+lzTrBAlNhvExH45O46IXUrI4slo=; b=rJq30udl7MubhkZMb4Nh2BqocrXsnQKUhhHIRNllR7UqMskBYm7Q4VXILHOgXF0PggwSJaA5l+7ddrIJnVPTaWRQwEgDue1aTOAiYnBKUaAdbRVsfAfsraT0aM6EuGiM63SjI2o9WvGZCqx3o/48eTT1Lc5n/fIDMwxTkU21J4I= Received: from BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) by BN6PR05MB3649.namprd05.prod.outlook.com (2603:10b6:405:45::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.18; Tue, 5 May 2020 06:04:31 +0000 Received: from BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::f463:db64:43d8:5a0f]) by BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::f463:db64:43d8:5a0f%3]) with mapi id 15.20.2979.024; Tue, 5 May 2020 06:04:31 +0000 From: "Andrei Warkentin" To: Pete Batard , "devel@edk2.groups.io" CC: "ard.biesheuvel@arm.com" , "leif@nuviainc.com" Subject: Re: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init Thread-Topic: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init Thread-Index: AQHWIgVpb4BGe9fI5E63cYMnuWU39aiZAeGy Date: Tue, 5 May 2020 06:04:31 +0000 Message-ID: References: <20200504111548.11112-1-pete@akeo.ie>,<20200504111548.11112-4-pete@akeo.ie> In-Reply-To: <20200504111548.11112-4-pete@akeo.ie> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: akeo.ie; dkim=none (message not signed) header.d=none;akeo.ie; dmarc=none action=none header.from=vmware.com; x-originating-ip: [98.214.99.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4547a64c-4017-4883-43ae-08d7f0ba2dc2 x-ms-traffictypediagnostic: BN6PR05MB3649: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:849; x-forefront-prvs: 0394259C80 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NxM6yATg+8j42rzDGaXA+DzKGSXXRdmulG0bM8nOfCyrvPgeMpRZ40jGOKVPmI55+kKxB1p091Pdl5qeJY9SPPxTL/QJUzESklgFZXtVhwZ14ikHe9FV8i7T6BxmX9g74vASXtUhuyBKtQvuq8z1wPb6Nsllzj3qfNKewvQuwK8/GSdtNYzj1xrLWieirsYwoFWcv+TqKojQPSKsfcZP6SYxeQWF9+51WjIUXSpVtF+amshH/oEv4rVjiIhsyMabfEM7niOgpjTQU1IDa8/LMuaQ1w3/qSoecdGpILf5RODjPfDT5wF6Dh3wJGKVH983M6LQFYhr8NPVqearJ57E3lRmQRMRL8G9nPvaKTsXPu0acP4C+YW1frx9RuLRVL1MKs852PeCb88NS7PDbqAorQ250rPOtmmyBn702Y5qXQtqVqtBgRYHwsOhVFjea9xAGVpoxM+X2Ns1Wtf4rs6zYkRXqRiWUjTz2q5/hWhCIDqlMSLj4vrbzWcoqsAMQdBemFtpQbdZIflZqdcOMhKr9w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR05MB3411.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(39860400002)(396003)(346002)(136003)(376002)(33430700001)(186003)(26005)(316002)(4326008)(19627405001)(55016002)(478600001)(9686003)(33656002)(54906003)(86362001)(110136005)(5660300002)(52536014)(71200400001)(66476007)(66556008)(64756008)(66946007)(8936002)(53546011)(66446008)(8676002)(76116006)(33440700001)(6506007)(7696005)(2906002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: Exz6AXZVdxVsrQxNkcAy0JLu3HwD3u+r7sOtlGrdNIq90PgwsqWfAppLuy7AdF4ufBZKqVGrArrDrhVsldHPjtdEKqtW8m2nUkcU8ZQFz27SRS3biJ2qRf6S2Ic8TL/60hXgnTimdnqbEIWVsM9iR0TDGfZ//BeM/LwqZ5WoiR5MnVjn/gUx14b1Do5fUBponmQ2qwQ0dhnEniElO/HbBXMOkjltOZb9ID3M7ahz3nJTZbrfjdjS2TXsWJuuis66KuOD7RzhwcX0dmaNCBs2tiQfg1/bCh+4KrIYqwfDWuWzQRlINhhReZ6zBl5xrYjhHOVry5kKB6LtO7OdVEJUxR/dVpP8uAw0EFUeAxipcpMQxl9qMTzaqpR3XYl68RkqAWHVRMVWEmDCgseJFM0Qo6xTc4nD7hNXuKMChZ7yQEgIxmETtYludVa7wwhlohZbL8zBYD/NrFZqHDwfLQUeyyUG9ZG6XNoJPezh/Ymq8KPXkWqq2zzuPGu3X9XGWnROEv85Aa13iX2NCloPw4Tm4xaOO1XN0FNGkFJa4r4R19Ivra1xlxnnDyoLqNINZsRNjt4gJdYEGJ3fZv5kFHlTKzOY9PdyeC6MrmQ0TN5JuxCjCUWlfAC5s6i2JkiL0rn4n+CaJk35qv54HbUTJONAi4r91Xl9Fn2wBk2DfqOp96dmzDTj/8av2itC+1Tn0H5D8Xee3zoq/VT/cADdSdpUx3+OYzjsyuX2kYmEvomqLRCDFy8FsJUI7uu/eB+gGSdEQeYQm7LbIVczU0c2dCkisYYnQf49SrN/NHd/JrExNdI= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4547a64c-4017-4883-43ae-08d7f0ba2dc2 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2020 06:04:31.7524 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HQKv/+wxxoU0CY0c2eYeTHnatvJDFkxEhh1gIUAhpx59eANJ3NnBygNR2f/x9LOnaqATSuB0+ohTPmcmLjpUJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3649 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BN6PR05MB341108276395F6C32BA04016B9A70BN6PR05MB3411namp_" --_000_BN6PR05MB341108276395F6C32BA04016B9A70BN6PR05MB3411namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Andrei Warkentin A ________________________________ From: Pete Batard Sent: Monday, May 4, 2020 6:15 AM To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com ; leif@nuviainc.com ; Andrei Warkentin Subject: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock freque= ncy during early init The previous commit ensures that gSerialLibCoreClockFreq contains the VPU core frequency by the time we execute ArmPlatformGetVirtualMemoryMap (). This value can prove useful for troubleshooting, so report it. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c b/Pl= atform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c index aae189ec8136..015d3dccc27c 100644 --- a/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c +++ b/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c @@ -22,7 +22,12 @@ extern UINT64 mSystemMemoryEnd; UINT64 mVideoCoreBase; UINT64 mVideoCoreSize; UINT32 mBoardRevision; - +// +// gSerialLibCoreClockFreq, which resides in DualSerialLib is set +// to the VPU Core Clock frequency by ArmPlatformPeiBootAction (). +// We use it to report the core frequency during early boot. +// +extern UINT32 gSerialLibCoreClockFreq; // The total number of descriptors, including the final "end-of-table" des= criptor. #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 11 @@ -66,6 +71,7 @@ ArmPlatformGetVirtualMemoryMap ( DEBUG ((DEBUG_INFO, "Board Rev: 0x%lX\n", mBoardRevision)); DEBUG ((DEBUG_INFO, "Base RAM : 0x%ll08X (Size 0x%ll08X)\n", mSystemMemo= ryBase, mSystemMemoryEnd + 1)); DEBUG ((DEBUG_INFO, "VideoCore: 0x%ll08X (Size 0x%ll08X)\n", mVideoCoreB= ase, mVideoCoreSize)); + DEBUG ((DEBUG_INFO, "Core Freq: %d MHz\n", gSerialLibCoreClockFreq / 100= 0000)); ASSERT (mSystemMemoryBase =3D=3D 0); ASSERT (VirtualMemoryMap !=3D NULL); -- 2.21.0.windows.1 --_000_BN6PR05MB341108276395F6C32BA04016B9A70BN6PR05MB3411namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Andrei Wark= entin <andrey.warkentin@gmail.com>

A


From: Pete Batard <pete@= akeo.ie>
Sent: Monday, May 4, 2020 6:15 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuvi= ainc.com <leif@nuviainc.com>; Andrei Warkentin <awarkentin@vmware.= com>
Subject: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock= frequency during early init
 
The previous commit ensures that gSerialLibCoreClo= ckFreq contains the VPU
core frequency by the time we execute ArmPlatformGetVirtualMemoryMap ().
This value can prove useful for troubleshooting, so report it.

Signed-off-by: Pete Batard <pete@akeo.ie>
---
 Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c | 8 +&#= 43;+++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c b/Pl= atform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c
index aae189ec8136..015d3dccc27c 100644
--- a/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c
+++ b/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c=
@@ -22,7 +22,12 @@ extern UINT64 mSystemMemoryEnd;
 UINT64 mVideoCoreBase;
 UINT64 mVideoCoreSize;
 UINT32 mBoardRevision;
-
+//
+// gSerialLibCoreClockFreq, which resides in DualSerialLib is set
+// to the VPU Core Clock frequency by ArmPlatformPeiBootAction ().
+// We use it to report the core frequency during early boot.
+//
+extern UINT32 gSerialLibCoreClockFreq;
 
 // The total number of descriptors, including the final "end-of-= table" descriptor.
 #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 11
@@ -66,6 +71,7 @@ ArmPlatformGetVirtualMemoryMap (
   DEBUG ((DEBUG_INFO, "Board Rev: 0x%lX\n", mBoardRevi= sion));
   DEBUG ((DEBUG_INFO, "Base RAM : 0x%ll08X (Size 0x%ll08X)\= n", mSystemMemoryBase, mSystemMemoryEnd + 1));
   DEBUG ((DEBUG_INFO, "VideoCore: 0x%ll08X (Size 0x%ll08X)\= n", mVideoCoreBase, mVideoCoreSize));
+  DEBUG ((DEBUG_INFO, "Core Freq: %d MHz\n", gSerialLib= CoreClockFreq / 1000000));
 
   ASSERT (mSystemMemoryBase =3D=3D 0);
   ASSERT (VirtualMemoryMap !=3D NULL);
--
2.21.0.windows.1

--_000_BN6PR05MB341108276395F6C32BA04016B9A70BN6PR05MB3411namp_--