From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490795331251106.24620473922653; Wed, 29 Mar 2017 06:48:51 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 796012041D9EC; Wed, 29 Mar 2017 06:48:48 -0700 (PDT) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C26202041D9DF for ; Wed, 29 Mar 2017 06:48:46 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id k6so9917586wre.2 for ; Wed, 29 Mar 2017 06:48:46 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:44 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4s311jhtym8bb98tuC45BLRAA+m4z4gh2crPlv28eEM=; b=VPnxZVtt/T5s49XZrUKn5bB0x+0FRh7zPxHlvz2/koNXrFCv7qKQnmWt+yl66+zs6n 3rkAdN77j3O5LdJVnEJRZaqKD3KMBgGJjZpFuiHlNX4fDgG0stvbL9zIjPEWlhWL9ax5 fli483Gp6oZDT4ttaHhJa1u2909JCjHU+3ufk= 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; bh=4s311jhtym8bb98tuC45BLRAA+m4z4gh2crPlv28eEM=; b=CWjoqhpRpPX40Qrf+1VIDPMq5aZ7teYwj2LpCUtoVvJFlige9Jxfz26WYRHbMY2zlQ 9PLB0gSTyYFEfNhVzkTYaRZg8Bc064ZI6eTz3UyI7P/Ed4CT2PJ3GbZf//GUk6IUsaXM Nk7KTMKE8x+iHLAZ6ZXvZxJ1ofnl8D6+xA2JIksXhPk6E3AAekXReBIGOhfHr8aPt6Tk QR0jutgomMEI+NmUPBCqwRkRs+wmbxUlGwPXtD5XYXdQXYf+qiJAC6o75M0liZMVnDDp 0qDud06vDB/3IAmHwP3Wxwy2F+2OwOOJXz6JSIJ93dCHxOTmb3FoPLtA1w6v7Zbjmzu5 688g== X-Gm-Message-State: AFeK/H21AktTpUxgZ4v4wjmZV2MBgNotlanQrKA+FLJu6Xumzlh15yOrrQbLJA+tsSivdDm4 X-Received: by 10.223.136.125 with SMTP id e58mr659293wre.14.1490795325380; Wed, 29 Mar 2017 06:48:45 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:28 +0100 Message-Id: <20170329134833.12956-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 1/6] EmbeddedPkg/DtPlatformDxe: allow multiple entries in DTB FV file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" To allow some dynamic behavior in selecting the DTB to expose to the OS, allow the DTB FV file to contain multiple sections, and indirect the choice of section via a fixed/dynamic PCD, which defaults to 0. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c | 5 ++++- EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf | 4 ++++ EmbeddedPkg/EmbeddedPkg.dec | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c b/EmbeddedPk= g/Drivers/DtPlatformDxe/DtPlatformDxe.c index 5778633b4985..72f9f5721cda 100644 --- a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c +++ b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -121,7 +122,9 @@ DtPlatformDxeEntryPoint ( // Dtb =3D NULL; Status =3D GetSectionFromAnyFv (&gDtPlatformDefaultDtbFileGuid, - EFI_SECTION_RAW, 0, &Dtb, &DtbSize); + EFI_SECTION_RAW, + PcdGet8 (PcdDtPlatformDefaultDtbSectionIndex), + &Dtb, &DtbSize); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "%a: no DTB blob found, defaulting to ACPI\n", __FUNCTION__)); diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf b/Embedded= Pkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf index b73877a6086b..c16202790ed9 100644 --- a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf +++ b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf @@ -43,6 +43,7 @@ [LibraryClasses] DxeServicesLib HiiLib MemoryAllocationLib + PcdLib UefiBootServicesTableLib UefiDriverEntryPoint UefiRuntimeServicesTableLib @@ -56,3 +57,6 @@ [Guids] [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid + +[Pcd] + gEmbeddedTokenSpaceGuid.PcdDtPlatformDefaultDtbSectionIndex diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index 871fc5ff4016..f1b7af347861 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -198,3 +198,6 @@ [PcdsFixedAtBuild.X64] =20 [PcdsFixedAtBuild.common, PcdsDynamic.common] gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L""|VOID*|0x00000055 + + # the section containing the default DTB for the current platform + gEmbeddedTokenSpaceGuid.PcdDtPlatformDefaultDtbSectionIndex|0|UINT8|0x00= 000057 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490795333108827.2109660567451; Wed, 29 Mar 2017 06:48:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AB5252041D9EF; Wed, 29 Mar 2017 06:48:50 -0700 (PDT) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 67B692041D9EA for ; Wed, 29 Mar 2017 06:48:48 -0700 (PDT) Received: by mail-wr0-x22f.google.com with SMTP id k6so9918688wre.2 for ; Wed, 29 Mar 2017 06:48:48 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:46 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ymEq1aiSdDJcFJq5+cxu+zANXQIHPputW7DKjUUpUMw=; b=B1hUIuhPz/ywfihz2KtFPZsOH7lDizRLqwkT6Ow3fOM90eGV4CClpZ58eDtg3Xo0X7 yM3rQAEtdU4ohnQZvLo6oYvcL09T6uAfOOc/4mhbAKs9+8xjlemoAt65OmkhKZensem/ jIet9PxJ7f9xuQfRahyg8oEF+9J/81NVFPuMg= 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; bh=ymEq1aiSdDJcFJq5+cxu+zANXQIHPputW7DKjUUpUMw=; b=HPN+LrqMKyBQyoNMjcCmx4TTIWXXpkvStroidsk00/pfqvR+rnrPsKzSIC14mRAJ9v Mn3brwB6NUNxYAWNcTnbRcmeNj53e9z4sFMT0aapcq8a4FODBjVWzcAGtOWGazYDWnO1 qwbmydSYyCwXR/6TJ6c0Cc+1woT18lbCTCcy5CuvlgklCb5I1yNxFdD+FZZ1Ss7N/QI3 bf9c6rIk+GkTjDRgfl2wTsGAFiojVJj+HkG7EmaQcCOOKgmsB0/gh6LNs1k6f2qm0BM4 IstMh5IsMflwuwEII3cCWxeYqVHW0VeTvy5+oDIEg+Szlx6OraxIl5DCk4M/NOutLEVq ryRg== X-Gm-Message-State: AFeK/H2mRLTtW7sur9iQuGk6awt3plsDe4Nl63eF3urT/5GPLnqCEvPhjKQCVdM92LsEe1Mz X-Received: by 10.223.130.102 with SMTP id 93mr597201wrb.59.1490795327034; Wed, 29 Mar 2017 06:48:47 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:29 +0100 Message-Id: <20170329134833.12956-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 2/6] EmbeddedPkg/DtPlatformDxe: declare symbolic name for FILE_GUID X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a definition to the package .dec file to allow DEPEXes to refer to DtPlatformDxe in a BEFORE/AFTER DEPEX. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf | 2 +- EmbeddedPkg/EmbeddedPkg.dec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf b/Embedded= Pkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf index c16202790ed9..64a674ad94b1 100644 --- a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf +++ b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf @@ -16,7 +16,7 @@ [Defines] INF_VERSION =3D 0x00010019 BASE_NAME =3D DtPlatformDxe - FILE_GUID =3D FC097B3C-2EBD-4A75-A3DA-121DCAB365CC + FILE_GUID =3D FC097B3C-2EBD-4A75-A3DA-121DCAB365CC # gDt= PlatformDxeFileGuid MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 ENTRY_POINT =3D DtPlatformDxeEntryPoint diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index f1b7af347861..4d0322b73867 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -68,6 +68,9 @@ [Guids.common] # File GUID for default DTB image embedded in the firmware volume gDtPlatformDefaultDtbFileGuid =3D { 0x25462cda, 0x221f, 0x47df, { 0xac, = 0x1d, 0x25, 0x9c, 0xfa, 0xa4, 0xe3, 0x26 } } =20 + # FILE_GUID defined in Drivers/DtPlatformDxe/DtPlatformDxe.inf + gDtPlatformDxeFileGuid =3D { 0xFC097B3C, 0x2EBD, 0x4A75, { 0xA3, 0xDA, 0= x12, 0x1D, 0xCA, 0xB3, 0x65, 0xCC } } + [Protocols.common] gHardwareInterruptProtocolGuid =3D { 0x2890B3EA, 0x053D, 0x1643, { 0xAD= , 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } } gEfiDebugSupportPeriodicCallbackProtocolGuid =3D { 0x9546e07c, 0x2cbb, 0= x4c88, { 0x98, 0x6c, 0xcd, 0x34, 0x10, 0x86, 0xf0, 0x44 } } --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490795335894538.7513545595017; Wed, 29 Mar 2017 06:48:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E73982041D9F1; Wed, 29 Mar 2017 06:48:52 -0700 (PDT) Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 930D02041D9DF for ; Wed, 29 Mar 2017 06:48:50 -0700 (PDT) Received: by mail-wr0-x22e.google.com with SMTP id w43so16328921wrb.0 for ; Wed, 29 Mar 2017 06:48:50 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:48 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oci815GXPAFGsT4XnGr5teSS2muXRJzcPg9KzeY3gtk=; b=AzKqvlzz5hPvW8MbxnDGmGZSo7CwTrayaFmhh/qbK230IJrXZYEX4QlVS87bLWhra4 /YDiC1nroxPQFXOcmY8/yo7tDxXqIHKkbZnVaYYIrGArOyD62pnaJM3PfVWwtFSPeGNB 8qx46hCQaHXIcD6qjmHIS8ls7MZwdiwbqIJtM= 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; bh=oci815GXPAFGsT4XnGr5teSS2muXRJzcPg9KzeY3gtk=; b=BjuOyT6/r/gy/CUPbr8hD5NOnCsycJXZQkMyIPQ4wl93OCAocOU7rTUG117PTfG5oP 69NtxmpbXY0uadnDeS6+K0NWJELi2K0ZQ/+tc63RQYRaSDp52Zq/KzhWcl1MFcuKetpk cxLBjf8ltaOnHpM06P9DpZxiu7JlfrYKl3mHBzmZ0a6ewNrRZj5vwCcoLVxI16cYUea5 8DHUitCNIuKq+TeN3Q+aHjsrVy9e0U0fCVHmWUjrY8kzW9xDDRbsmiCUyPHgO6bckMIT z3eGX3wrMjZuwtbGW3kSbcWP6HMh+6asqQ5M+KTLq26X1mf2k5jCk0BhZ8gm6YRdJafg WNqw== X-Gm-Message-State: AFeK/H3uedCeTFKuQnybAl7d5wKCDofTTbfEaxItWZ+SX/MI+tEYvZ8iWC763dqU0pfyzWpj X-Received: by 10.28.136.204 with SMTP id k195mr817798wmd.99.1490795329231; Wed, 29 Mar 2017 06:48:49 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:30 +0100 Message-Id: <20170329134833.12956-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 3/6] ArmPlatformPkg/ArmShellCmdRunAxf: remove BdsLib dependency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Remove ArmShellCmdRunAxf's dependency on the deprecated BdsLib by cloning the ShutdownUefiBootServices() routine into a local source file; this is the only BdsLib feature 'runaxf' depends on. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf | 1 - ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c | 58 ++++++= +++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf= b/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf index 9a34f666612a..7d15f6934608 100644 --- a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf +++ b/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf @@ -43,7 +43,6 @@ [Packages] [LibraryClasses] ArmLib BaseLib - BdsLib DebugLib HiiLib ShellLib diff --git a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c b/ArmPlatfor= mPkg/Library/ArmShellCmdRunAxf/RunAxf.c index 2abfb6cc1053..9f4fc780307d 100644 --- a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c +++ b/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include =20 @@ -35,6 +34,63 @@ typedef VOID (*ELF_ENTRYPOINT)(UINTN arg0, UINTN arg1, UINTN arg2, UINTN arg3); =20 +STATIC +EFI_STATUS +ShutdownUefiBootServices ( + VOID + ) +{ + EFI_STATUS Status; + UINTN MemoryMapSize; + EFI_MEMORY_DESCRIPTOR *MemoryMap; + UINTN MapKey; + UINTN DescriptorSize; + UINT32 DescriptorVersion; + UINTN Pages; + + MemoryMap =3D NULL; + MemoryMapSize =3D 0; + Pages =3D 0; + + do { + Status =3D gBS->GetMemoryMap ( + &MemoryMapSize, + MemoryMap, + &MapKey, + &DescriptorSize, + &DescriptorVersion + ); + if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { + + Pages =3D EFI_SIZE_TO_PAGES (MemoryMapSize) + 1; + MemoryMap =3D AllocatePages (Pages); + + // + // Get System MemoryMap + // + Status =3D gBS->GetMemoryMap ( + &MemoryMapSize, + MemoryMap, + &MapKey, + &DescriptorSize, + &DescriptorVersion + ); + } + + // Don't do anything between the GetMemoryMap() and ExitBootServices() + if (!EFI_ERROR(Status)) { + Status =3D gBS->ExitBootServices (gImageHandle, MapKey); + if (EFI_ERROR(Status)) { + FreePages (MemoryMap, Pages); + MemoryMap =3D NULL; + MemoryMapSize =3D 0; + } + } + } while (EFI_ERROR(Status)); + + return Status; +} + =20 STATIC EFI_STATUS --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490795338073283.4929713747646; Wed, 29 Mar 2017 06:48:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 27D6E2041D9F4; Wed, 29 Mar 2017 06:48:54 -0700 (PDT) Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8B852041D9DF for ; Wed, 29 Mar 2017 06:48:52 -0700 (PDT) Received: by mail-wr0-x22b.google.com with SMTP id l43so16643527wre.1 for ; Wed, 29 Mar 2017 06:48:52 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iM7bIVRveeMdzQtgcpbgCmLLQINSyJnouF1VDxh7kjo=; b=MdG1VHBE/RpMP6F/lnGpxVWTB5PBzbPSgpHLDPwOxFRZb2KZ2Z+IIOasPfi71nOCuE 8YEMF+X8VLNsHVnA4Gy8rjVZE1cNIgVOVvMSpcMElcyeWVHxH2upbjARKTAwfPFJ73qg CcB9STpIM/U93/807UHy3zR08hfCUioGqhLUg= 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; bh=iM7bIVRveeMdzQtgcpbgCmLLQINSyJnouF1VDxh7kjo=; b=J/mERr8x8dYLdhfh/3EzkbuM5cvyK5sGxcJx5Cb9+2+yk6TmoCf+UO05uq7zXLciv5 ntwk2VPzzgZ3YiAF71U9SHW9KOdXjU5MWhRwxkTaflGqrvrZ1EGEAjM/cGP76fm2tlMW yyh1BQX7EYeQelGehMRCNBfias97SmwewbChu0Apf8szTFGcnvIOoiLXd6arHecc0wEn PXwFwB0KGpdDic/U18id+WLuasgPcpeH09VVzmoLCn82Vl21TLmYv88Qc5wcEn88yIXL EQe3E7pGXBqQh7kBaOeZNjoTQNc4DVpot1nbg3yJWwcQ2yFsbCMqlCasEyFy50JLrHAG zWrw== X-Gm-Message-State: AFeK/H0cnRSz8Qx4rj5oqEU8T3svEOXcGjYvYboHsLsWLUeuflwUKXsGLGyABShvFEdua7mj X-Received: by 10.28.183.4 with SMTP id h4mr928913wmf.32.1490795330991; Wed, 29 Mar 2017 06:48:50 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:31 +0100 Message-Id: <20170329134833.12956-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 4/6] ArmPlatformPkg/ArmVExpressDxe: remove ARM support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 32-bit ARM support in this driver is unused, and thus untested. So let's just remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c | 84 -----= --------------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf | 9 --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec | 10 --- 3 files changed, 103 deletions(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.= c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c deleted file mode 100644 index 2057c6e2156a..000000000000 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c +++ /dev/null @@ -1,84 +0,0 @@ -/** @file - - Copyright (c) 2014, ARM Ltd. All rights reserved. - - This program and the accompanying materials are licensed and made availa= ble - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WI= THOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "ArmVExpressInternal.h" -#include // To get Core Count - -// -// Description of the four ARM model platforms : -// Platform ids are defined in ArmVExpressInternal.h for -// all "ArmVExpress-like" platforms (AARCH64 or ARM architecture, -// model or hardware platforms). -// -CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] =3D { - { ARM_FVP_VEXPRESS_A9x4, FixedPcdGetPtr (PcdFdtVExpressFvpA9x4), L"rts= m_ve-cortex_a9x4.dtb" }, - { ARM_FVP_VEXPRESS_A15x1, FixedPcdGetPtr (PcdFdtVExpressFvpA15x1), L"rts= m_ve-cortex_a15x1.dtb" }, - { ARM_FVP_VEXPRESS_A15x2, FixedPcdGetPtr (PcdFdtVExpressFvpA15x2), L"rts= m_ve-cortex_a15x2.dtb" }, - { ARM_FVP_VEXPRESS_A15x4, FixedPcdGetPtr (PcdFdtVExpressFvpA15x4), L"rts= m_ve-cortex_a15x4.dtb" }, - { ARM_FVP_VEXPRESS_UNKNOWN, } -}; - -/** - Get information about the VExpress platform the firmware is running on. - - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ) -{ - UINT32 SysId; - UINTN CpuType; - EFI_STATUS Status; - UINTN CoreCount; - - ASSERT (Platform !=3D NULL); - - CpuType =3D 0; - Status =3D EFI_NOT_FOUND; - *Platform =3D NULL; - - SysId =3D MmioRead32 (ARM_VE_SYS_ID_REG); - if (SysId =3D=3D ARM_RTSM_SYS_ID) { - // Get the Cortex-A version - CpuType =3D (ArmReadMidr () >> 4) & ARM_CPU_TYPE_MASK; - if (CpuType =3D=3D ARM_CPU_TYPE_A9) { - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A9x4, Plat= form); - } else if (CpuType =3D=3D ARM_CPU_TYPE_A15) { - CoreCount =3D ArmGetCpuCountPerCluster (); - if (CoreCount =3D=3D 1) { - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x1, P= latform); - } else if (CoreCount =3D=3D 2) { - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x2, P= latform); - } else if (CoreCount =3D=3D 4) { - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x4, P= latform); - } - } - } - - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Unsupported platform (SysId:0x%X, CpuType:0x%X)\= n", SysId, CpuType)); - ASSERT_EFI_ERROR (Status); - } - - return Status; -} diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf b/A= rmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf index 327c5101ddb5..2a8c8388a3b2 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf @@ -24,9 +24,6 @@ [Sources.common] ArmFvpDxe.c ArmVExpressCommon.c =20 -[Sources.ARM] - Arm/ArmFvpDxeArm.c - [Sources.AARCH64] AArch64/ArmFvpDxeAArch64.c =20 @@ -61,12 +58,6 @@ [Protocols] [FixedPcd] gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase =20 -[FixedPcd.ARM] - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4 - [FixedPcd.AARCH64] gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4 gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2 diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec b/ArmPlatform= Pkg/ArmVExpressPkg/ArmVExpressPkg.dec index c774d97541e1..39f046541502 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec @@ -60,16 +60,6 @@ [PcdsFixedAtBuild.common] # # ARM Versatile Express FDT Guids # - # FVP platforms - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4|{ 0x12, 0x7b, 0xdf, 0xa= 1, 0x60, 0x11, 0xcf, 0x16, 0xb8, 0xc6, 0x98, 0xde, 0xdf, 0xe2, 0xce, 0xae }= |VOID*|0x00000007 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1|{ 0xe5, 0x1b, 0xc0, 0x= 96, 0xeb, 0xd7, 0x1a, 0x42, 0xc8, 0xe8, 0x6a, 0xfd, 0x5a, 0x86, 0x1d, 0x84 = }|VOID*|0x00000008 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2|{ 0x84, 0x43, 0x70, 0x= 4d, 0x19, 0xf1, 0x29, 0xe3, 0xef, 0xcd, 0xa5, 0x9b, 0x3d, 0x0a, 0x5a, 0x5f = }|VOID*|0x00000009 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4|{ 0x72, 0x3b, 0x28, 0x= 27, 0x90, 0x2f, 0xca, 0x4d, 0x9a, 0xb5, 0x98, 0x48, 0xfb, 0xc2, 0xd4, 0xed = }|VOID*|0x0000000A - # HW platforms - gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA9x4|{ 0xf6, 0x1c, 0xd2, 0x2f= , 0xe8, 0xe6, 0xf2, 0x4f, 0xa9, 0xca, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 }|= VOID*|0x0000000B - gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15x2A7x3|{ 0xeb, 0x06, 0xe6,= 0xd5, 0xdf, 0x83, 0x90, 0x4e, 0x81, 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x= 9a }|VOID*|0x0000000C - gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15|{ 0xc2, 0x47, 0x89, 0x6b,= 0x87, 0x42, 0x91, 0x4d, 0x8f, 0xe0, 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f }|V= OID*|0x0000000D - gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA5|{ 0x63, 0x76, 0xcc, 0xa2, = 0x7c, 0x4d, 0x8a, 0x44, 0xaa, 0xb5, 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 }|VO= ID*|0x0000000E =20 # AArch64 FVP platforms gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4|{ 0xa8, 0x95, 0x5f, = 0xf6, 0x32, 0x7b, 0xf3, 0x16, 0x12, 0x32, 0x45, 0x50, 0xbd, 0x54, 0xca, 0xe= 5 }|VOID*|0x00000010 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149079534081559.69864614632763; Wed, 29 Mar 2017 06:49:00 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6212D2041D9EA; Wed, 29 Mar 2017 06:48:56 -0700 (PDT) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AD2C52041D9C8 for ; Wed, 29 Mar 2017 06:48:54 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id k6so9922786wre.2 for ; Wed, 29 Mar 2017 06:48:54 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:52 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0P6i8n0oJv094OfJIqkCcL3f+6IGm6oL7lrnGsSJDcU=; b=kiu8j7MSia00jP4OtzT+uXyCo16goWXO/mjtU5iZUw90bDEqz2aFtlsFzqJjlbAijn 9UMOYPbQRqSHjtlVnhyx3MAuK3mAqAXW8sg4LaD85KPy2E00vzYBkwsDOMNrMm5u32yJ 2wjnOl7BGKx5p8JblXNFyVwkbLG4W5FwwXTQY= 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; bh=0P6i8n0oJv094OfJIqkCcL3f+6IGm6oL7lrnGsSJDcU=; b=t2KYwn3JifRsLMsFtFZTygqmX5gySUaEk+Uh2YHJ1w71XxkutFLQQugGGIoIt4c20J aSDXqIYPFPWC/97aawajCkJQ4oeQ790+X/rApG/K0+Lddt4Gt0x5HnblsuxwrQ3sH8zi j5vXoThCf9Be7QBPA0puAztKXjPSLlzf7ox43PJ34bBFME0/i5HuZSRcc3XIDlxIpgkZ pe9dLcOiDPrvNzq/kFQoEWfyf5yyl0gycqnvpJDLpPpL5RpbaxEROCc5rsf5RW9zWnS7 VA+fzm+NO7QfoFgn/XJHpsMeKn2wEIbK0xcQqetkLZ8FtrREnpGMYFetFtpL8rPzZVTK TbwA== X-Gm-Message-State: AFeK/H1ZUBInbVwJwMwYSBJGZ7ZF1Cf98Yo0K1UIGZ4UP36dhiIBk5+aGqAIxN/QKsVS6A2F X-Received: by 10.28.184.87 with SMTP id i84mr841498wmf.129.1490795333260; Wed, 29 Mar 2017 06:48:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:32 +0100 Message-Id: <20170329134833.12956-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 5/6] ArmPlatformPkg/ArmVExpressDxe: remove unused cruft from ArmHwDxe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Remove unused cruft from ArmHwDxe -- the only thing that remains is installation of the 'runaxf' shell command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.c | 43 +----------= --------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf | 3 -- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.c b/ArmP= latformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.c index 351c73312dc4..19efa3c23dea 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.c @@ -12,49 +12,8 @@ =20 **/ =20 -#include "ArmVExpressInternal.h" #include - -CONST EFI_GUID ArmHwA9x4Guid =3D { 0x2fd21cf6, 0xe6e8, 0x4ff2, { 0xa9, 0xc= a, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 } }; -CONST EFI_GUID ArmHwA15x2A7x3Guid =3D { 0xd5e606eb, 0x83df, 0x4e90, { 0x81= , 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x9a } }; -CONST EFI_GUID ArmHwA15Guid =3D { 0x6b8947c2, 0x4287, 0x4d91, { 0x8f, 0xe0= , 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f } }; -CONST EFI_GUID ArmHwA5Guid =3D { 0xa2cc7663, 0x4d7c, 0x448a, { 0xaa, 0xb5,= 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 } }; -CONST EFI_GUID NullGuid =3D { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x= 0, 0x0, 0x0 } }; - -// -// Description of the four hardware platforms : -// just the platform id for the time being. -// Platform ids are defined in ArmVExpressInternal.h for -// all "ArmVExpress-like" platforms (AARCH64 or ARM architecture, -// model or hardware platforms). -// -//Note: File extensions are stripped with the VExpress NOR Flash FileSystem -CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] =3D { - { ARM_HW_A9x4, &ArmHwA9x4Guid, L"ca9" }, - { ARM_HW_A15x2_A7x3, &ArmHwA15x2A7x3Guid, L"ca15a7" }, - { ARM_HW_A15, &ArmHwA15Guid, L"ca15a7" }, - { ARM_HW_A5, &ArmHwA5Guid, L"ca5s" }, - { ARM_FVP_VEXPRESS_UNKNOWN, &NullGuid, NULL } -}; - -/** - Get information about the VExpress platform the firmware is running on. - - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. Not used here. - - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ) -{ - return EFI_NOT_FOUND; -} +#include =20 /** * Generic UEFI Entrypoint for 'ArmHwDxe' driver diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf b/Ar= mPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf index 1a007627ad3f..1ecdbb0b231e 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf @@ -22,12 +22,9 @@ [Defines] =20 [Sources.common] ArmHwDxe.c - ArmVExpressCommon.c =20 [Packages] - ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec - EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec =20 [LibraryClasses] --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 10:25:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490795343664247.58962017333965; Wed, 29 Mar 2017 06:49:03 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 984C12041D9F9; Wed, 29 Mar 2017 06:48:58 -0700 (PDT) Received: from mail-wr0-x233.google.com (mail-wr0-x233.google.com [IPv6:2a00:1450:400c:c0c::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 244172041D9F9 for ; Wed, 29 Mar 2017 06:48:57 -0700 (PDT) Received: by mail-wr0-x233.google.com with SMTP id w11so15854923wrc.3 for ; Wed, 29 Mar 2017 06:48:57 -0700 (PDT) Received: from localhost.localdomain ([196.81.160.3]) by smtp.gmail.com with ESMTPSA id h65sm9479406wrh.32.2017.03.29.06.48.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 06:48:54 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GC4b6QYHFm0m9in1fUxLpOu5NiR32oUQZilYdbR+2sw=; b=YZi1Zm3X2R74G0uV8N4kXVIyYGrUVVHRXWtUXX2TTo2ySI7gwX6WZZ36P3fJ6wyJ6N UGooMe2FBNelwy1gseP/tciegGpG93AC042Eet1VMbAjJP0ZXgUmfNEx4/PcUBSYTIDa bNO8zd7HulMCBYfX3JxiPLewI6WOnKv5q8GmA= 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; bh=GC4b6QYHFm0m9in1fUxLpOu5NiR32oUQZilYdbR+2sw=; b=cfElWkcHRKexsFaLsVtGf7iMZuDNPD+vsxK3j0kILBIVhVyYHlgwxAi5Qt8kQu2ctP uz9v5ikk7xe88CfJJhvtwyG00wYIAGyudeE0Cg1ompx85p9TXSkDpkjOamjjJ283IRqT YXHW9P9uM0fCkDaUK2Nerko0C5yi2VImttGT6WEa4JAaN2L9lT4yp9CFEp/5B2+92wVU Or0sN0nkNaSu+b/p0fyo9Q388u+nsq6HAhavPzQ9oRb2aGTmqF576ESyalcvcanbepkN cbX5E2c9ST5ZGIJBBck+J9YXTTX9/hOvmZGEVC4AyzIo/PcpowzX+CxkiL2ro9NlFxcF NZ0w== X-Gm-Message-State: AFeK/H2AzZ2BY6PZt7yNlUgm3kciFdCX0lACXCifY+wETeYrqPf0QPPgQgF5GHRoj+tj7TJG X-Received: by 10.28.113.73 with SMTP id m70mr923618wmc.12.1490795335256; Wed, 29 Mar 2017 06:48:55 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 29 Mar 2017 14:48:33 +0100 Message-Id: <20170329134833.12956-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170329134833.12956-1-ard.biesheuvel@linaro.org> References: <20170329134833.12956-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 6/6] ArmPlatformPkg/ArmVExpressDxe: simply FDT handling in ArmFvpDxe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan.harkin@linaro.org, lersek@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace the elaborate but awkward handling of FDT images using device paths and string PCDs initialized to 128 spaces with a simple scheme involving a set of builtin DTBs and a bit of runtime logic to select between them. This is sufficient for ordinary use, which makes it more suitable as reference code. Note that overriding the DTB presented to the OS can easily be done with a UEFI application that simply installs a new DTB image under the existing FDT configuration table GUID. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c | = 60 +++------ ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c | = 134 ++------------------ ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf | = 33 ++--- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c | = 48 ------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h | = 52 +------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec | = 18 --- 6 files changed, 35 insertions(+), 310 deletions(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxe= AArch64.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeA= Arch64.c index c368957dcd3d..fe8e115c97eb 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64= .c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64= .c @@ -1,6 +1,7 @@ /** @file =20 Copyright (c) 2014-2015, ARM Ltd. All rights reserved. + Copyright (c) 2017, Linaro Ltd. All rights reserved. =20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -15,30 +16,11 @@ #include "ArmVExpressInternal.h" #include =20 -// -// Description of the AARCH64 model platforms : -// Platform ids are defined in ArmVExpressInternal.h for -// all "ArmVExpress-like" platforms (AARCH64 or ARM architecture, -// model or hardware platforms). -// -CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] =3D { - { ARM_FVP_VEXPRESS_AEMv8x4, FixedPcdGetPtr (PcdFdtFvpVE= xpressAEMv8x4), L"rtsm_ve-aemv8a.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV2), L"fvp-base-gicv2-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV2Legacy), L"fvp-base-gicv2legacy-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV3), L"fvp-base-gicv3-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV2), L"fvp-foundation-gicv2-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV2Legacy), L"fvp-foundation-gicv2legacy-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV3, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV3), L"fvp-foundation-gicv3-psci.dtb" }, - { ARM_FVP_VEXPRESS_UNKNOWN } -}; - /** + Get information about the VExpress platform the firmware is running on. =20 - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. + @param[out] PlatformId ARM_VEXPRESS_PLATFORM_ID value of current platfo= rm =20 @retval EFI_SUCCESS The platform information was returned. @retval EFI_NOT_FOUND The platform was not recognised. @@ -46,19 +28,14 @@ CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] =3D { **/ EFI_STATUS ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform + OUT ARM_VEXPRESS_PLATFORM_ID *PlatformId ) { - EFI_STATUS Status; UINT32 SysId; UINT32 FvpSysId; UINT32 VariantSysId; ARM_GIC_ARCH_REVISION GicRevision; =20 - ASSERT (Platform !=3D NULL); - - Status =3D EFI_NOT_FOUND; - SysId =3D MmioRead32 (ARM_VE_SYS_ID_REG); if (SysId !=3D ARM_RTSM_SYS_ID) { // Remove the GIC variant to identify if we are running on the FVP Bas= e or @@ -70,44 +47,41 @@ ArmVExpressGetPlatform ( =20 if (FvpSysId =3D=3D ARM_FVP_BASE_BOARD_SYS_ID) { if (VariantSysId =3D=3D ARM_FVP_GIC_VE_MMAP) { - // FVP Base Model with legacy GIC memory map - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AEMv= 8x4_GICV2_LEGACY, Platform); + // FVP Base Model with legacy GIC memory map -- no longer supported + goto NotFound; } else { GicRevision =3D ArmGicGetSupportedArchRevision (); =20 if (GicRevision =3D=3D ARM_GIC_ARCH_REVISION_2) { // FVP Base Model with GICv2 support - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AE= Mv8x4_GICV2, Platform); + *PlatformId =3D ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2; } else { // FVP Base Model with GICv3 support - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AE= Mv8x4_GICV3, Platform); + *PlatformId =3D ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3; } } } else if (FvpSysId =3D=3D ARM_FVP_FOUNDATION_BOARD_SYS_ID) { if (VariantSysId =3D=3D ARM_FVP_GIC_VE_MMAP) { - // FVP Foundation Model with legacy GIC memory map - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV2_= LEGACY, Platform); + // FVP Foundation Model with legacy GIC memory map -- no longer su= pported + goto NotFound; } else { GicRevision =3D ArmGicGetSupportedArchRevision (); =20 if (GicRevision =3D=3D ARM_GIC_ARCH_REVISION_2) { // FVP Foundation Model with GICv2 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV= 2, Platform); + *PlatformId =3D ARM_FVP_FOUNDATION_GICV2; } else { // FVP Foundation Model with GICv3 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV= 3, Platform); + *PlatformId =3D ARM_FVP_FOUNDATION_GICV3; } } } - } else { - // FVP Versatile Express AEMv8 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_AEMv8x4, Pla= tform); + return EFI_SUCCESS; } =20 - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Unsupported AArch64 RTSM (SysId:0x%X).\n", SysId= )); - ASSERT_EFI_ERROR (Status); - } +NotFound: + DEBUG ((EFI_D_ERROR, "Unsupported AArch64 RTSM (SysId:0x%X).\n", SysId)); + ASSERT_EFI_ERROR (EFI_NOT_FOUND); =20 - return Status; + return EFI_NOT_FOUND; } diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c b/Arm= PlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c index 8c42814a04dc..bf100bbaa822 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c @@ -55,95 +55,6 @@ VIRTIO_BLK_DEVICE_PATH mVirtioBlockDevicePath =3D } }; =20 -STATIC -EFI_STATUS -InternalFindFdtByGuid ( - IN OUT EFI_DEVICE_PATH **FdtDevicePath, - IN CONST EFI_GUID *FdtGuid - ) -{ - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileDevicePath; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FvProtocol; - EFI_GUID NameGuid; - UINTN Size; - VOID *Key; - EFI_FV_FILETYPE FileType; - EFI_FV_FILE_ATTRIBUTES Attributes; - EFI_DEVICE_PATH *FvDevicePath; - EFI_STATUS Status; - - if (FdtGuid =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - EfiInitializeFwVolDevicepathNode (&FileDevicePath, FdtGuid); - - HandleBuffer =3D NULL; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &FvProtocol - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // Allocate Key - Key =3D AllocatePool (FvProtocol->KeySize); - ASSERT (Key !=3D NULL); - ZeroMem (Key, FvProtocol->KeySize); - - do { - FileType =3D EFI_FV_FILETYPE_RAW; - Status =3D FvProtocol->GetNextFile (FvProtocol, Key, &FileType, &Nam= eGuid, &Attributes, &Size); - if (Status =3D=3D EFI_NOT_FOUND) { - break; - } - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Check whether this file is the one we are looking for. If so, - // create a device path for it and return it to the caller. - // - if (CompareGuid (&NameGuid, FdtGuid)) { - Status =3D gBS->HandleProtocol (HandleBuffer[Index], &gEfiDevice= PathProtocolGuid, (VOID **)&FvDevicePath); - if (!EFI_ERROR (Status)) { - *FdtDevicePath =3D AppendDevicePathNode (FvDevicePath, - (EFI_DEVICE_PATH_PROTOCOL *)&FileDevicePath= ); - } - goto Done; - } - } while (TRUE); - FreePool (Key); - } - - if (Index =3D=3D HandleCount) { - Status =3D EFI_NOT_FOUND; - } - return Status; - -Done: - FreePool (Key); - return Status; -} - /** * Generic UEFI Entrypoint for 'ArmFvpDxe' driver * See UEFI specification for the details of the parameters @@ -155,12 +66,15 @@ ArmFvpInitialise ( IN EFI_SYSTEM_TABLE *SystemTable ) { - CONST ARM_VEXPRESS_PLATFORM* Platform; EFI_STATUS Status; - CHAR16 *TextDevicePath; - UINTN TextDevicePathSize; - VOID *Buffer; - EFI_DEVICE_PATH *FdtDevicePath; + ARM_VEXPRESS_PLATFORM_ID PlatformId; + + Status =3D ArmVExpressGetPlatform (&PlatformId); + ASSERT_EFI_ERROR (Status); + + if (!EFI_ERROR (Status)) { + PcdSet8 (PcdDtPlatformDefaultDtbSectionIndex, (UINT8)PlatformId); + } =20 Status =3D gBS->InstallProtocolInterface (&ImageHandle, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, @@ -169,38 +83,6 @@ ArmFvpInitialise ( return Status; } =20 - Status =3D ArmVExpressGetPlatform (&Platform); - if (!EFI_ERROR (Status)) { - FdtDevicePath =3D NULL; - Status =3D InternalFindFdtByGuid (&FdtDevicePath, Platform->FdtGuid); - if (!EFI_ERROR (Status)) { - TextDevicePath =3D ConvertDevicePathToText (FdtDevicePath, FALSE, FA= LSE); - if (TextDevicePath !=3D NULL) { - TextDevicePathSize =3D StrSize (TextDevicePath); - } - FreePool (FdtDevicePath); - } else { - TextDevicePathSize =3D StrSize ((CHAR16*)PcdGetPtr (PcdFvpFdtDevice= PathsBase)) - sizeof (CHAR16); - TextDevicePathSize +=3D StrSize (Platform->FdtName); - - TextDevicePath =3D AllocatePool (TextDevicePathSize); - if (TextDevicePath !=3D NULL) { - StrCpy (TextDevicePath, ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsB= ase))); - StrCat (TextDevicePath, Platform->FdtName); - } - } - if (TextDevicePath !=3D NULL) { - Buffer =3D PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDe= vicePath); - if (Buffer =3D=3D NULL) { - DEBUG (( - EFI_D_ERROR, - "ArmFvpDxe: Setting of FDT device path in PcdFdtDevicePaths fail= ed - %r\n", EFI_BUFFER_TOO_SMALL - )); - } - FreePool (TextDevicePath); - } - } - // Declare the Virtio BlockIo device Status =3D VirtioMmioInstallDevice (ARM_FVP_BASE_VIRTIO_BLOCK_BASE, Imag= eHandle); if (EFI_ERROR (Status)) { diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf b/A= rmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf index 2a8c8388a3b2..605ca160391d 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf @@ -22,7 +22,6 @@ [Defines] =20 [Sources.common] ArmFvpDxe.c - ArmVExpressCommon.c =20 [Sources.AARCH64] AArch64/ArmFvpDxeAArch64.c @@ -31,41 +30,25 @@ [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec - ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec EmbeddedPkg/EmbeddedPkg.dec OvmfPkg/OvmfPkg.dec =20 [LibraryClasses] - PcdLib + #ArmLib + #ArmPlatformLib ArmShellCmdRunAxfLib - ArmLib - ArmPlatformLib BaseMemoryLib - DxeServicesTableLib - MemoryAllocationLib + IoLib + PcdLib UefiDriverEntryPoint UefiBootServicesTableLib VirtioMmioDeviceLib - DevicePathLib =20 [LibraryClasses.AARCH64] ArmGicLib =20 -[Protocols] - gEfiFirmwareVolume2ProtocolGuid - gEfiDevicePathProtocolGuid - -[FixedPcd] - gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase - -[FixedPcd.AARCH64] - gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3 - [Pcd] - gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths + gEmbeddedTokenSpaceGuid.PcdDtPlatformDefaultDtbSectionIndex + +[Depex] + BEFORE gDtPlatformDxeFileGuid diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon= .c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c deleted file mode 100644 index e1cac7fb3714..000000000000 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c +++ /dev/null @@ -1,48 +0,0 @@ -/** @file - - Copyright (c) 2014, ARM Ltd. All rights reserved. - - This program and the accompanying materials are licensed and made availa= ble - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WI= THOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "ArmVExpressInternal.h" - -/** - Get information about the VExpress platform the firmware is running on g= iven its Id. - - @param[in] PlatformId Id of the VExpress platform. - @param[out] Platform Address where the pointer to the platform infor= mation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloc= ated - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatformFromId ( - IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId, - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ) -{ - UINTN Index; - - ASSERT (Platform !=3D NULL); - - for (Index =3D 0; ArmVExpressPlatforms[Index].Id !=3D ARM_FVP_VEXPRESS_U= NKNOWN; Index++) { - if (ArmVExpressPlatforms[Index].Id =3D=3D PlatformId) { - *Platform =3D &ArmVExpressPlatforms[Index]; - return EFI_SUCCESS; - } - } - - return EFI_NOT_FOUND; -} diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressIntern= al.h b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h index e123eea2d28b..2676f2d4f903 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h @@ -22,70 +22,22 @@ #include #include #include -#include =20 #include =20 // This 'enum' is needed as variations based on existing platform exist typedef enum { - ARM_FVP_VEXPRESS_UNKNOWN =3D 0, - ARM_FVP_VEXPRESS_A9x4, - ARM_FVP_VEXPRESS_A15x1, - ARM_FVP_VEXPRESS_A15x2, - ARM_FVP_VEXPRESS_A15x4, - ARM_FVP_VEXPRESS_A15x1_A7x1, - ARM_FVP_VEXPRESS_A15x4_A7x4, - ARM_FVP_VEXPRESS_AEMv8x4, ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, - ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, ARM_FVP_FOUNDATION_GICV2, - ARM_FVP_FOUNDATION_GICV2_LEGACY, ARM_FVP_FOUNDATION_GICV3, - ARM_HW_A9x4, - ARM_HW_A15x2_A7x3, - ARM_HW_A15, - ARM_HW_A5 } ARM_VEXPRESS_PLATFORM_ID; =20 -typedef struct { - ARM_VEXPRESS_PLATFORM_ID Id; - - // Flattened Device Tree (FDT) File - CONST EFI_GUID *FdtGuid; /// Name of the FDT when present int= o the FV - CONST CHAR16 *FdtName; /// Name of the FDT when present int= o a File System -} ARM_VEXPRESS_PLATFORM; - -// Array that contains the list of the VExpress based platform supported b= y this DXE driver -extern CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[]; - -/** - Get information about the VExpress platform the firmware is running on g= iven its Id. - - @param[in] PlatformId Id of the VExpress platform. - @param[out] Platform Address where the pointer to the platform infor= mation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloc= ated - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatformFromId ( - IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId, - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ); - /** =20 Get information about the VExpress platform the firmware is running on. =20 - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. + @param[out] PlatformId ARM_VEXPRESS_PLATFORM_ID value of current platfo= rm =20 @retval EFI_SUCCESS The platform information was returned. @retval EFI_NOT_FOUND The platform was not recognised. @@ -93,7 +45,7 @@ ArmVExpressGetPlatformFromId ( **/ EFI_STATUS ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform + OUT ARM_VEXPRESS_PLATFORM_ID *PlatformId ); =20 #endif // __ARM_VEXPRESS_INTERNAL_H__ diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec b/ArmPlatform= Pkg/ArmVExpressPkg/ArmVExpressPkg.dec index 39f046541502..3814513c2241 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec @@ -51,21 +51,3 @@ [PcdsFixedAtBuild.common] # Device path of block device on which Fastboot will flash partitions # gArmVExpressTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|""|VOID*|0x00= 000004 - - # FVP platforms : install FDT from SemiHosting - gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase|L"VenHw(C5B9C74A-6D7= 2-4719-99AB-C59F199091EB)/"|VOID*|0x00000005 - # HW platforms : install FDT from NOR Flash - gArmVExpressTokenSpaceGuid.PcdHwFdtDevicePathsBase|L"VenHw(E7223039-5836= -41E1-B542-D7EC736C5E59)/"|VOID*|0x00000006 - - # - # ARM Versatile Express FDT Guids - # - - # AArch64 FVP platforms - gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4|{ 0xa8, 0x95, 0x5f, = 0xf6, 0x32, 0x7b, 0xf3, 0x16, 0x12, 0x32, 0x45, 0x50, 0xbd, 0x54, 0xca, 0xe= 5 }|VOID*|0x00000010 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2|{ 0x66, 0xcf, 0x57,= 0xa4, 0xac, 0x7e, 0x7f, 0x3d, 0x21, 0x88, 0x3a, 0x58, 0x3c, 0x27, 0xd7, 0x= e8 }|VOID*|0x00000011 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy|{ 0x8b, 0xcb,= 0xe0, 0x14, 0xd1, 0x46, 0x79, 0xae, 0x7f, 0x20, 0xcf, 0x84, 0x22, 0xc7, 0x= 94, 0x4a }|VOID*|0x00000012 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3|{ 0x4d, 0x03, 0xb8,= 0x77, 0x63, 0x25, 0x0a, 0x7f, 0xe9, 0x72, 0xfa, 0x68, 0x74, 0xc7, 0x5e, 0x= b5 }|VOID*|0x00000013 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2|{ 0x36, 0x4f, 0x61, = 0x92, 0x86, 0xb1, 0xa2, 0x16, 0x32, 0x65, 0x35, 0x3f, 0x01, 0xf3, 0x3b, 0x6= 4 }|VOID*|0x00000014 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy|{ 0xf6, 0xcb, = 0x9d, 0x86, 0x38, 0x74, 0x8a, 0xb0, 0xfe, 0x40, 0x08, 0x0f, 0x3f, 0xb3, 0x5= 0, 0x7c }|VOID*|0x00000015 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3|{ 0x51, 0xd0, 0x75, = 0x6b, 0x9d, 0x35, 0x1b, 0x1b, 0xa6, 0xc6, 0xab, 0xa0, 0x90, 0xf9, 0xf0, 0x0= a }|VOID*|0x00000016 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel