From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by mx.groups.io with SMTP id smtpd.web10.3921.1588590967178886414 for ; Mon, 04 May 2020 04:16:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=apVhtWp5; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.208.65, mailfrom: pete@akeo.ie) Received: by mail-ed1-f65.google.com with SMTP id s10so13149213edy.9 for ; Mon, 04 May 2020 04:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cS8IY2smKZUm3oqriUb8ki/M4TuIc0qlGZ2Jh2pHQII=; b=apVhtWp5hq7HinQgeFvg1nnbAe9oEBPxygoUVaVfE9UbEl6WVXRydNfyq0I04cM7Ai X05pqc6idBAPFC/9CR8/3VYjb3OzT4BrioboZls2FZ7uoFSQ47cYgecLkbkM10KqguEB iJoABHrIQLyjw+3OOPBIxea5kS4V8ppn57CwpQOUa7JYmExaSLOutA30l9Zth0ZZlyYn Y7JfnYmrwJlcUKh2m1oB5L9zEseOBGrLNhCJNE0yxPvNrnolwASvDNMUZt/kf49tg4L+ 2SimV1wW6HjcA14B+NUIWkuU9Zh0Pp3g2nFeDBJAWo4L+GSvxEJBoVhNnSAxyEjIi6dF 3cXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cS8IY2smKZUm3oqriUb8ki/M4TuIc0qlGZ2Jh2pHQII=; b=Ld7Mgs6LSokmknlfb0zXJIKkZqvPEceJWNMWX0Fy0eHZKyeCdj1pfQDMuxGG5HTv/K D6jlwwCHf2snp6uQcQ3GYdqb5mKnRYDd0W+lolyyICm9nT72sd6G9Y9FWwO7ZcDHjzB0 HvW7M23FP/1t1/GuU5Blx2sopgnPKoEtnAEA4qsNR4Oik0A3PZWUGXtRLB2v3QHcr1dM PaDwuzy9A7m06a6IbJooR/w/xusKgaQj9f0bLc8G7T7Dkl9++vZVlLZTU2/b/UZIppXZ 2w5sl/VCBPK3L+/xergrzC8SbsEQKazZwOFcRYOvxtmEyk1O3TtRBQnrR1QQunYD6J2p QkFA== X-Gm-Message-State: AGi0PuYllAVgdFEJ6TpnQgPYBGvefM7yFZRQatcud5L77RRZ4wMFwsAm ycVQ7rAUk6xtAkQayl5D7YdddJ9KPuE= X-Google-Smtp-Source: APiQypIDGNyFxwISe9qNVinFitYwAjxnygUvGNVvBE/5K9rjM7gJbBnsKal6yuy/HAoygJ8BjkGX+w== X-Received: by 2002:a50:8e4b:: with SMTP id 11mr13791213edx.329.1588590965278; Mon, 04 May 2020 04:16:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.75.87]) by smtp.gmail.com with ESMTPSA id gf12sm1470894ejb.62.2020.05.04.04.16.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 04:16:04 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, awarkentin@vmware.com Subject: [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init Date: Mon, 4 May 2020 12:15:48 +0100 Message-Id: <20200504111548.11112-4-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200504111548.11112-1-pete@akeo.ie> References: <20200504111548.11112-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/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