From nobody Mon Feb 9 17:57:29 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+53029+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+53029+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1578502823; cv=none; d=zohomail.com; s=zohoarc; b=V4l78zwHMuHgqcZZoL8K1t3vUyrXnuY9li+H6BroX0zAmv4XbBcPxS25Oytq7qeKxVgggwczCIxxnnAvgVvAxUS/e9hLGXB6nW7S2UaTmpAbbDvzT7sXrEMjrCuWnyIBeSYwwbEX/YzZMWslMziLYm2kvkHA7qlJKmjeBi++Kio= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578502823; 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=+wDVLgDAzz22s8O1y46qKfQ+SSYnUy/FodjuKe/CC18=; b=LNHyJKCuRL1gHqqHIOimj4oF3BUWU0XruexHvkCLif8aNqQ+sg+ntLrqG6slxrLxvmM14CyzenV1uNkmE/rT8ahwxEjshraC53dXbTABae1wSGH/AwPN9FNwXLdX8J8DYAj4zItL3kE95anpFNwi3xSaoj5p71eCQGCAuRQR22g= 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+53029+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578502823464343.37053979872496; Wed, 8 Jan 2020 09:00:23 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fKvrYY1788612xMx9gDVQkkx; Wed, 08 Jan 2020 09:00:23 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web12.10911.1578502820446319941 for ; Wed, 08 Jan 2020 09:00:20 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id q6so4139677wro.9 for ; Wed, 08 Jan 2020 09:00:20 -0800 (PST) X-Gm-Message-State: 7kWSGg4UanaSIHUWlydcY3Kvx1787277AA= X-Google-Smtp-Source: APXvYqwM0rrPeuo2p734TWDdqEUYjmXJ7RhNlE8Y6IhIvpvbpc9fC5crvAFdaSkbRfElZC3WESGklQ== X-Received: by 2002:a05:6000:11c3:: with SMTP id i3mr5635049wrx.244.1578502818834; Wed, 08 Jan 2020 09:00:18 -0800 (PST) X-Received: from localhost.localdomain ([84.203.81.176]) by smtp.gmail.com with ESMTPSA id i16sm4786496wmb.36.2020.01.08.09.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2020 09:00:18 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 2/2] Platform/RPi/RPiFirmwareDxe: Fix serial number population for RPi4 Date: Wed, 8 Jan 2020 17:00:04 +0000 Message-Id: <20200108170004.6680-3-pete@akeo.ie> In-Reply-To: <20200108170004.6680-1-pete@akeo.ie> References: <20200108170004.6680-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=1578502823; bh=il5Zx/KiOKEyRSq+2kXNSkpP3HegkdDZvvS4zI2uN1Q=; h=Cc:Date:From:Reply-To:Subject:To; b=diyQ/2h5WljQxA++4IdahOWbLWskVByx58ogpMUP+dgOb0H1CjvOLk6d+61/M03Du8q QqDwe9suH9eJtwScWGZ+vlnZ45YiI0vdJCSMBo91gF/+32Ip2BCCMS1PgNw98DF60wEPd UnXKz2p2mVUp7V+C+lvTI2Ibd7kEGR8az78= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Some (all?) Raspbery Pi 4 platforms report 0x0000000010000000 as their board serial when queried through the VideoCore mailbox. Fix this by using the MAC address then. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c b= /Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c index dd61ef089ca7..75826fdc0e53 100644 --- a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c +++ b/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c @@ -394,8 +394,9 @@ RpiFirmwareGetSerial ( } =20 *Serial =3D Cmd->TagBody.Serial; - // Some platforms return 0 for serial. For those, try to use the MAC add= ress. - if (*Serial =3D=3D 0) { + // Some platforms return 0 or 0x0000000010000000 for serial. + // For those, try to use the MAC address. + if ((*Serial =3D=3D 0) || ((*Serial & 0xFFFFFFFF0FFFFFFFULL) =3D=3D 0)) { Status =3D RpiFirmwareGetMacAddress ((UINT8*) Serial); // Convert to a more user-friendly value *Serial =3D SwapBytes64 (*Serial << 16); --=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 (#53029): https://edk2.groups.io/g/devel/message/53029 Mute This Topic: https://groups.io/mt/69532224/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-