From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web09.46.1583361072530522744 for ; Wed, 04 Mar 2020 14:31:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=obyLB+V6; spf=fail (domain: vmware.com, ip: , mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zu3KS+//WMCr4q1TyMtTYa3kx/d1arSnO82Nusad7SBne0XKVnNQBTmUx8rL04QN24WfP1rjxbjoLSSlyBpRDjulVoUMd3GpNKbP7mBpE38/8PaYGiU3+18wo03OOxjgahzDENBkf8y64NfglSqi+wvWAgiteISB49ghMDVoWF5wS3zJ0UE+8KJF8ceu6q9M7TyLjObM3y3+RpSML6eKxZVvBEzhP/fohBGrOgqApMiizYJe9WeaQgbgZAhKPFsi+zdcz2EdnGivt2+1+si1I7zDsZyxwPCZxnL72L9Fk9tRgKrayNCELTrDk5ceUNW4pjD2+qL3wlWiBOeXR4Z/+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=tXy2SFm5Fd7eJ+AGmcMCmyJBvqD+2w31Dv59ER+IOks=; b=UoXotEDnXwTMYG+V2tB2/GFnJEDy4cPMMz94ghcv3B+KrFTqOmg0R6f7x78Ndz8XCng0Pq9nPt/tZYNIo0pcCbPtNvBAMMvTjFi+WAmsmXjk+wIzPFguVYQASNLfgWGnq+G/GCgzyz585PO0e2dMvJfNyIDVAIcxMlfhXbTV5SH0Do+crJyOaThHFzjy6L4WKg0wtNBKK/4QF1FO59AT0oEbWDX7a3Dvle7h/22ZeA5JJvLVXVKJMnculQE66Xr0m3fwn4GOxy8aPa5mC090Lm3OGLEytQGnLjcG4yy8qIW+soNvEd4bgDto/FIv6gu8QncEzRdY2HA6jy8wtmqUAg== 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=tXy2SFm5Fd7eJ+AGmcMCmyJBvqD+2w31Dv59ER+IOks=; b=obyLB+V6/TPXJ5CKHf6SWIYB7etqddd5ndB+Cn5SRvRQJck/hhLu0FkA78E8mT9Y3aLhIWqzm3lEXY6EJ9qiYkQwrGf99iD7BgB6NmU8eFIfsiU5ixUhr5ebmIA829cSDgMeOKutkO0pCQ2n/ZvycS7Fxfg2U/CbynwXUfbJX3g= Received: from BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) by BN6PR05MB3316.namprd05.prod.outlook.com (2603:10b6:405:3f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11; Wed, 4 Mar 2020 22:31:11 +0000 Received: from BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::5df3:40e3:521a:7f84]) by BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::5df3:40e3:521a:7f84%5]) with mapi id 15.20.2793.013; Wed, 4 Mar 2020 22:31:11 +0000 Received: from ubuntu.localdomain (24.147.160.127) by SN4PR0501CA0038.namprd05.prod.outlook.com (2603:10b6:803:41::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.5 via Frontend Transport; Wed, 4 Mar 2020 22:31:10 +0000 From: "Andrei Warkentin" To: "devel@edk2.groups.io" CC: "ard.biesheuvel@linaro.org" , "leif@nuviainc.com" , "pete@akeo.ie" , "philmd@redhat.com" Subject: [edk2-platforms][PATCH 2/2] Platform/RaspberryPi/Drivers/PlatformSmbiosDxe: improve UX with 3GB limit Thread-Topic: [edk2-platforms][PATCH 2/2] Platform/RaspberryPi/Drivers/PlatformSmbiosDxe: improve UX with 3GB limit Thread-Index: AQHV8nSbHkGrmDkar02+j19V8/D4Ag== Date: Wed, 4 Mar 2020 22:31:11 +0000 Message-ID: <20200304223056.116868-3-awarkentin@vmware.com> References: <20200304223056.116868-1-awarkentin@vmware.com> In-Reply-To: <20200304223056.116868-1-awarkentin@vmware.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.147.160.127] x-clientproxiedby: SN4PR0501CA0038.namprd05.prod.outlook.com (2603:10b6:803:41::15) To BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=awarkentin@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bfd32bfa-e957-4015-aac3-08d7c08bbdbf x-ms-traffictypediagnostic: BN6PR05MB3316: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 0332AACBC3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(376002)(396003)(39860400002)(366004)(199004)(189003)(86362001)(66946007)(66446008)(66556008)(66476007)(52116002)(1076003)(316002)(71200400001)(64756008)(81156014)(5660300002)(8676002)(8936002)(81166006)(54906003)(6486002)(956004)(186003)(19627235002)(4326008)(36756003)(16526019)(26005)(6916009)(6512007)(2906002)(478600001)(2616005)(6506007);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR05MB3316;H:BN6PR05MB3411.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qqHmFHQWowrNXJZxO6f5Dy/JxSManVyjz0ZFZ4qOUP/ohrB3C3iXs4IhXVTg0ICX5qSr8/EexFL/uBeMYP0E8vsggMI+ZjPfaKr9KnmHUcLRP54p6LaR/iQD91ekacmDUV6ja8an3R52UIAx5Xde7pVqCDUd95fquhr/m4d6juxAO9oaBXo25m4Pcm9wJxrbICyux7cLN3sqLvj8rtz+u7OcBHPXbrqh46iY6DIu6auEMMN/UrWMBb0yjR+o/dluFkmOuUIfn/9GUMrGBW6NMbtAzg5IcTES7QbsBj1aDMk50Yc/rlubqBnSrW1jDUsAN10Tvr+0a4DU4QeyVEyf9XwbVCH1wHpHXh+iGaW7sDD2/T/C6FLnmj0HT7ID8DM6kR8lQq0aV5X8kq8mT/RTi3cN4SEi0OO8C8L23SnZ/RYANrF8i9K1XVkHO/I8HpBd x-ms-exchange-antispam-messagedata: CmZ/QnwopxpcHebGzQAPIRBJJq3cMnVspjUgX2/jYvynwMw23OLzkAc+Ezpc0nzJiTBE7OVlvv0W36v66mItXLslgZSswo9UoAeaBGBkwSRbtz0iczILUaFm4uiroCdTQDpc9BwDVHs/9o76OiZEjg== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfd32bfa-e957-4015-aac3-08d7c08bbdbf X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2020 22:31:11.6544 (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: LC6NLCSwSAs/wxkUonu7eEdcDMvFvbClF8Qo/yumiyYQ0XZ3l+/JTp50V1R/2l8t63HKMlmbq6oIHKXbnzzSiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3316 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Right now there was no way to tell you're booting with RAM limited to 3GB, since the setup front page still listed 4096 MB. Fix this by honoring PcdRamLimitTo3GB in PlatformSmbiosDxe. Tested on 2GB and 4GB boards (with limiting and without) Signed-off-by: Andrei Warkentin --- Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 7 += +++++- Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf | 2 += + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosD= xe.c b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c index 5585cb84..3351fea2 100644 --- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c +++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c @@ -882,7 +882,12 @@ MemArrMapInfoUpdateSmbiosType19 ( if (Status !=3D EFI_SUCCESS) { DEBUG ((DEBUG_WARN, "Couldn't get the board memory size - defaulting t= o 256 MB: %r\n", Status)); } else { - mMemArrMapInfoType19.EndingAddress =3D InstalledMB * 1024; + if (PcdGet32 (PcdRamMoreThan3GB) && PcdGet32 (PcdRamLimitTo3GB)) { + ASSERT (InstalledMB > 3 * 1024); + mMemArrMapInfoType19.EndingAddress =3D 3 * 1024 * 1024; + } else { + mMemArrMapInfoType19.EndingAddress =3D InstalledMB * 1024; + } } mMemArrMapInfoType19.EndingAddress -=3D 1; =20 diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosD= xe.inf b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.i= nf index 9554c2e9..1ed6338c 100644 --- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf +++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf @@ -52,3 +52,5 @@ gArmTokenSpaceGuid.PcdSystemMemorySize gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB + gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB --=20 2.17.1