From nobody Tue Feb 10 01:31:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55322+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55322+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1583240913; cv=none; d=zohomail.com; s=zohoarc; b=lPKgBqrviy5xFnik/CdQpAqrgtB/elwMv3J5IYMlwui8UYv1YQuJyVqdyMZIqCwIBuRjx+K8VEut/FAj2y/IsFrWaFZHKw9jrVRdzd1A4uAdGZlCa5dkRgjso533Cef/rHVUeDj4n971/sy/Bo9qFV0FksXcdBsn05StxXaBlwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583240913; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=VrIxMgw+Hi6XAKop7pk6g9EIZdNDXmwYqUTTY8615XI=; b=CCNTexNmnojwjQdAGN94dLlOY9HpGqIkCvddkKRnnEN0BFW0Z2KCOmToCKY3d6E9Qc4MMm0R4i+66WGXmcg1On+T2efwi0cDcCvq8qzu/ILliN1nfaSRuHJeiO8/vPWpjGSfJPc/UsGBSif0hzXOWKJOItC9L4Lkfxn3MJ5U3EA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55322+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583240913753148.7447775607693; Tue, 3 Mar 2020 05:08:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id A8c2YY1788612xY7sQ5Q5mIY; Tue, 03 Mar 2020 05:08:32 -0800 X-Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web12.3385.1583240911694790036 for ; Tue, 03 Mar 2020 05:08:32 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id j16so4283299wrt.3 for ; Tue, 03 Mar 2020 05:08:31 -0800 (PST) X-Gm-Message-State: 2GGTW9qY9owLrE4KOHn7HgVnx1787277AA= X-Google-Smtp-Source: ADFU+vuc59VV6BfDCnKJZeCzk2COJ7MU/4KZt2YM+4rhIOxiQeavOWr/0IDgE6ZEpf3HdZ34XLfs7w== X-Received: by 2002:adf:f407:: with SMTP id g7mr5768672wro.178.1583240910025; Tue, 03 Mar 2020 05:08:30 -0800 (PST) X-Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id j5sm3907620wmi.33.2020.03.03.05.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2020 05:08:29 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, awarkentin@vmware.com Subject: [edk2-devel][PATCH v2 2/6] Platform/RPi: Use GetModelInstalledMB () to read RAM size Date: Tue, 3 Mar 2020 13:08:10 +0000 Message-Id: <20200303130814.3092-3-pete@akeo.ie> In-Reply-To: <20200303130814.3092-1-pete@akeo.ie> References: <20200303130814.3092-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583240912; bh=xva51ET4Ij+USccmyidxdqKOpjZeVMAFG1bfpRE3XVA=; h=Cc:Date:From:Reply-To:Subject:To; b=HAUrwBzt9TyO27+58Zwbn5IarFdwd6eSoH9gB7Pqa1jHc5lamwEGmSDhKhhf9OYGWNV vccijPbVsDhqtCVbyXn8MPrlk3VoH0Ogfb8lYHrIrPBwkaz3tQvlHcd0OqZ3G/vDQgIXy USeM08ybojacBh2FV+Y+GLqv+TorZypOKgE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin Use the call introduced in the previous commit to read the platform's installed memory. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 10 ++= ++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosD= xe.c b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c index f25c439f89c8..5585cb846f41 100644 --- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c +++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c @@ -870,21 +870,19 @@ MemArrMapInfoUpdateSmbiosType19 ( ) { EFI_STATUS Status; - UINT32 BoardRevision =3D 0; + UINT32 InstalledMB =3D 0; =20 // Note: Type 19 addresses are expressed in KB, not bytes // The memory layout used in all known Pi SoC's starts at 0 mMemArrMapInfoType19.StartingAddress =3D 0; + // The minimum RAM size used on any Raspberry Pi model is 256 MB mMemArrMapInfoType19.EndingAddress =3D 256 * 1024; - Status =3D mFwProtocol->GetModelRevision (&BoardRevision); + Status =3D mFwProtocol->GetModelInstalledMB (&InstalledMB); if (Status !=3D EFI_SUCCESS) { DEBUG ((DEBUG_WARN, "Couldn't get the board memory size - defaulting t= o 256 MB: %r\n", Status)); } else { - // www.raspberrypi.org/documentation/hardware/raspberrypi/revision-cod= es/README.md - // Bits [20-22] indicate the amount of memory starting with 256MB (000= b) - // and doubling in size for each value (001b =3D 512 MB, 010b =3D 1GB,= etc.) - mMemArrMapInfoType19.EndingAddress <<=3D (BoardRevision >> 20) & 0x07; + mMemArrMapInfoType19.EndingAddress =3D InstalledMB * 1024; } mMemArrMapInfoType19.EndingAddress -=3D 1; =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55322): https://edk2.groups.io/g/devel/message/55322 Mute This Topic: https://groups.io/mt/71699473/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-