From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web10.4171.1588592225751292761 for ; Mon, 04 May 2020 04:37:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mjn83XJE; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588592224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qxgaIkjnD0tPg8C8Jmk41h49pAjA9OSGqdkxVEljWkM=; b=Mjn83XJEplhWp//fJY16XZ07FmQufkhQ+pcYLcQG+f4AcR1Q3ISjlvXf59kkLw+L+BPVfs 8Pb5wgO95drbhqeA/0PJ7EFyF+XI7cFAqGWmb11yWoy3i70x/KL5sUVJwsWZIeNj1Eo4fm CUcwX8aP5iWiiWJ1fCOuI3QIodbX1GE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-87-Oda6bw_GMa-3Mxq52q6bVw-1; Mon, 04 May 2020 07:37:03 -0400 X-MC-Unique: Oda6bw_GMa-3Mxq52q6bVw-1 Received: by mail-wm1-f71.google.com with SMTP id w2so4721831wmc.3 for ; Mon, 04 May 2020 04:37:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sbQGBn3I1RK4km2oQaymzMBGjzACREqLEvs2NlfOCNI=; b=rg2AJIbSYlIztWkXIk373SfgD2wIK3lckzbpeEkYI2ES9177yFuNXIdO6GB5/j/JjE ablSTciSAyoWTfNVuNKWk3wXOTdHRZThrSqVkcCiRNq5YnPlgWCJUNOu/c6tdpqxVS6E Jr9v+Ou6KGcdMaEK8ZLneCiM1IZWllMh73y3T13iaBEfIqBY4YgfYOdzKXa197oq5hH5 tXQ13gS24u4ZO2cBtVnm1Nm9ZcvHjBKsumE9/Uj6tQaLQEPZUAde3sFdcrbu5Msu6c3+ CaWD1nRgxLECiKFLa3ztx7CXH//+FqOHupmglN9ZLnjfDOMtUv4zI5AEI4JXyc+6ZgaI jrPA== X-Gm-Message-State: AGi0PuanfR2j53vpO2JF2dWMcfi7NNNhZLUcszbLhmiU5u0x1RrqtJjr R0w45pVnwaNjVQUHDa2vnl+J8oM2/ippS93L6vEOLz3BMQurwKnGgMYjoIM4yW++H9d+M+7Mo4z mLY3XcwTv5GCfLA== X-Received: by 2002:a1c:990d:: with SMTP id b13mr13774506wme.179.1588592222347; Mon, 04 May 2020 04:37:02 -0700 (PDT) X-Google-Smtp-Source: APiQypI9C1LwViXjNW+f5o01UKlgtCoHAOBiezG/9fbU6km83yjLX52qdNjPgUgrFliehJYyJg/meA== X-Received: by 2002:a1c:990d:: with SMTP id b13mr13774477wme.179.1588592222093; Mon, 04 May 2020 04:37:02 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id z18sm17823449wrw.41.2020.05.04.04.37.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2020 04:37:01 -0700 (PDT) Subject: Re: [edk2-devel] [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init To: devel@edk2.groups.io, pete@akeo.ie Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, awarkentin@vmware.com References: <20200504111548.11112-1-pete@akeo.ie> <20200504111548.11112-4-pete@akeo.ie> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <8320a558-8271-71fb-3651-42fe23244c00@redhat.com> Date: Mon, 4 May 2020 13:37:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200504111548.11112-4-pete@akeo.ie> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 5/4/20 1:15 PM, Pete Batard wrote: > The previous commit ensures that gSerialLibCoreClockFreq contains the VPU > core frequency by the time we execute ArmPlatformGetVirtualMemoryMap (). >=20 > This value can prove useful for troubleshooting, so report it. >=20 > Signed-off-by: Pete Batard > --- > Platform/RaspberryPi/Library/PlatformLib/RaspberryPiMem.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > 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; > =20 > // 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", mSystemM= emoryBase, mSystemMemoryEnd + 1)); > DEBUG ((DEBUG_INFO, "VideoCore: 0x%ll08X (Size 0x%ll08X)\n", mVideoCo= reBase, mVideoCoreSize)); > + DEBUG ((DEBUG_INFO, "Core Freq: %d MHz\n", gSerialLibCoreClockFreq / 1= 000000)); > =20 > ASSERT (mSystemMemoryBase =3D=3D 0); > ASSERT (VirtualMemoryMap !=3D NULL); >=20 Reviewed-by: Philippe Mathieu-Daud=E9