[edk2-devel] [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init

Andrei Warkentin awarkentin at vmware.com
Tue May 5 06:04:31 UTC 2020


Reviewed-by: Andrei Warkentin <andrey.warkentin at gmail.com>

A

________________________________
From: Pete Batard <pete at akeo.ie>
Sent: Monday, May 4, 2020 6:15 AM
To: devel at edk2.groups.io <devel at edk2.groups.io>
Cc: ard.biesheuvel at arm.com <ard.biesheuvel at arm.com>; leif at nuviainc.com <leif at nuviainc.com>; Andrei Warkentin <awarkentin at vmware.com>
Subject: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency 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 <pete at akeo.ie>
---
 Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c b/Platform/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", mBoardRevision));
   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", gSerialLibCoreClockFreq / 1000000));

   ASSERT (mSystemMemoryBase == 0);
   ASSERT (VirtualMemoryMap != NULL);
--
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58600): https://edk2.groups.io/g/devel/message/58600
Mute This Topic: https://groups.io/mt/73972542/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20200505/01647ccc/attachment.htm>


More information about the edk2-devel-archive mailing list