From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517937731138110.36507205163355; Tue, 6 Feb 2018 09:22:11 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0E5CF21F0DA43; Tue, 6 Feb 2018 09:16:26 -0800 (PST) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 8CF29223972B5 for ; Tue, 6 Feb 2018 09:16:24 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id v123so5333302wmd.5 for ; Tue, 06 Feb 2018 09:22:07 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:04 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=JUWunl5O1GEDIbFp2RbKnx3kMZGn2NeZ4OqdEvh2yCQ=; b=NtkE6gGlO4ddlcEt9jgPt5G3QNYzE2BhjdB9gfK9uleEXmETgopzDe1jJgnEbkckZ2 kfpXMs1/rN4DPvM70VycQkkD4kpz99KcmcJJXZ+0SMGFcRi3u0vn5t/o6ns3PSdGn03T ma0B0e8OiPwUucSPmhv4dU5m2XKxadrtSYUlE= 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=JUWunl5O1GEDIbFp2RbKnx3kMZGn2NeZ4OqdEvh2yCQ=; b=tQbVf35vtmfdfM/yuow8KxMUxfRbJR/AfWMAUg4vv0pNxO2+nJ9a7yrckvr8ApyZMp I5iDRyWqqUIYnVPR2YRcfBaPBM7rlQsWDp5oQfJaD0FI6IPckye6JmQpdMvPV3ib/bfJ 4EBy/GwGt3yGolGbf6UfKiZ1ql+fsgkw6fiXTo+QjdODLWaYosMB9TVcr6qkxVprxXby e7dG7WSzrVe3F6IzwVAGbsyjjQNXGzZdeKJggdpiWjc1pMzLLM2KiPbBb2PfycVNKa3e DW5+Bon/swP06JkiPXjpaauNfJdKXdhwhT4uTun4OQCbD18TcFFfocrcHhX4P7AGibW0 X9jw== X-Gm-Message-State: APf1xPAcLAoa0uNq8DeJzoKBOJca8cBSpoK1M3IR+VCqwj8OnwIF3IRw f23LFOQgEDrGCqY9ni08HRwWdskoXRg= X-Google-Smtp-Source: AH8x226Dv9V87vG4TFwZMnLW7gLGlDdOPg+2xsRtSbfbwfPsBs8H1sz4nmEwO6sjOJjuQ2Dx9J1i3Q== X-Received: by 10.28.151.70 with SMTP id z67mr2296642wmd.13.1517937725778; Tue, 06 Feb 2018 09:22:05 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:21:57 +0000 Message-Id: <20180206172202.11667-2-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 1/6] ArmVirtPkg: drop unused PcdCacheEnable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" ArmVirt.dsc.inc sets gEmbeddedTokenSpaceGuid.PcdCacheEnable, which is unused and about to be deleted. Drop it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirt.dsc.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 9874637a3d..5144bb10df 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -257,8 +257,6 @@ [BuildOptions] [PcdsFeatureFlag.common] gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE =20 - gEmbeddedTokenSpaceGuid.PcdCacheEnable|TRUE - # Use the Vector Table location in CpuDxe. We will not copy the Vector T= able at PcdCpuVectorBaseAddress gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE =20 --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517937733499829.3969355411364; Tue, 6 Feb 2018 09:22:13 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5FF2921F0DA4B; Tue, 6 Feb 2018 09:16:27 -0800 (PST) Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 EFBD221F0DA41 for ; Tue, 6 Feb 2018 09:16:25 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id i56so2763857wra.7 for ; Tue, 06 Feb 2018 09:22:08 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:06 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=YgVgYh8PFSrnoYeO235W9pvXpCwkM9T50mWML/KKBaI=; b=A5woA8shIh+nWJCNLV1RrOYQxsKq3o9EMM1XaN5tJqjlSEi7my1yb22ae5puNcqv38 Fg5YYFHtRnlGJHsIuZoCxMspiTcVZO/BIIjRNY3HTVLLNKTgm2Wf0wxwwNRhVAnamFAH f/XcFTj8re7LNc3+w+PMJHv6SSdnKUxrQjaKY= 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=YgVgYh8PFSrnoYeO235W9pvXpCwkM9T50mWML/KKBaI=; b=D3HCf1jXSJ76tmvv0jPbR9Fdw3TSfS/IQhzRuuJnJxo5lLVug5rYII01FPxylRiLzd oyacnI/Uaf1aDt4c8J6SvhY1WFlW9jmbQMKAUbtU/PAZnN5y1SsQ7qknG7UUiCj5+4/R xdIqHkG2gPvjWW5HDE1Ng5xK49C+wM+HfvZ4ARp7Etv0CoLeaoMWL9UQzctxGkESpIyt SGZFfK2g5LcZKy8iAXKoS4J55AukStaHNTPyDTRllVLEM+/TJ7K4FaFtcJ6KryNAtNVX B5UF9etKTs6GGK0nRXffbOYHQ7IJaoKAffZdM9ufDAMoehELTBlgt90risPHfPuxfFHa SHMA== X-Gm-Message-State: APf1xPB1We5K2AYq3OnAp/4DOioyL1QaWRtJZM7IRFvXP+8T7DOAiRly YLVVBaUHQL1T+zxg3fP0dp+Uf6xDbOM= X-Google-Smtp-Source: AH8x2279IT9qthv5mtYyrzIM1KlzHnYx+x535TySXut5cfAb03lVA+AIyl+zzAEcAJTwvHU+hw97bA== X-Received: by 10.223.160.27 with SMTP id k27mr2946032wrk.5.1517937727362; Tue, 06 Feb 2018 09:22:07 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:21:58 +0000 Message-Id: <20180206172202.11667-3-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 2/6] BeagleBoardPkg: drop unused EmbeddedPkg Pcds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" Drop a bunch of unused EmbeddedPkg Pcds, including one used in local code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- BeagleBoardPkg/BeagleBoardPkg.dsc | 18 --------------= ---- BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c | 6 +----- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoard= Pkg.dsc index 039c4ad62d..348624a038 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -235,20 +235,6 @@ [PcdsFeatureFlag.common] gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE =20 - # - # Control what commands are supported from the UI - # Turn these on and off to add features or save size - # - gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedDirCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedHobCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedHwDebugCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedPciDebugCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedIoEnable|FALSE - gEmbeddedTokenSpaceGuid.PcdEmbeddedScriptCmd|FALSE - - gEmbeddedTokenSpaceGuid.PcdCacheEnable|TRUE - # Use the Vector Table location in CpuDxe. We will not copy the Vector T= able at PcdCpuVectorBaseAddress gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE =20 @@ -309,10 +295,6 @@ [PcdsFixedAtBuild.common] =20 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 =20 - gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|"" - gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07 - gEmbeddedTokenSpaceGuid.PcdEmbeddedMemVariableStoreSize|0x10000 - # # Optional feature to help prevent EFI memory map fragments # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c b/Beagl= eBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c index b77b069930..3a81ef54a2 100644 --- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c +++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c @@ -48,11 +48,7 @@ ArmPlatformGetVirtualMemoryMap ( return; } =20 - if (FeaturePcdGet(PcdCacheEnable) =3D=3D TRUE) { - CacheAttributes =3D DDR_ATTRIBUTES_CACHED; - } else { - CacheAttributes =3D DDR_ATTRIBUTES_UNCACHED; - } + CacheAttributes =3D DDR_ATTRIBUTES_CACHED; =20 // ReMap (Either NOR Flash or DRAM) VirtualMemoryTable[Index].PhysicalBase =3D PcdGet64 (PcdSystemMemoryBase= ); --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517937736743704.4324121142004; Tue, 6 Feb 2018 09:22:16 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C59B821F0DA53; Tue, 6 Feb 2018 09:16:29 -0800 (PST) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 84D5E21F0DA53 for ; Tue, 6 Feb 2018 09:16:27 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id r78so5377180wme.0 for ; Tue, 06 Feb 2018 09:22:10 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:07 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=1cC15yR3+ouhYCIXLO2xFtKmiEKdlxt4IL7FwRobbYE=; b=L5TQ500ZdyfyyVW8gfnSCXDhU5A2Vdjz7qGxxnrHzVVSd+FpURxUWkNR6MhwG1tgob TlvefRb+PMfU/J+gqDbGN2GjhK7f8ihgCTYvTqSy1T6Q26zC51kuVxK/bk4uJ5ChwOp/ Splcm8NZLhWvH5vfA4jbxM5ufuu4TwSCAWdmw= 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=1cC15yR3+ouhYCIXLO2xFtKmiEKdlxt4IL7FwRobbYE=; b=rtRD2aUxsINObtoSwTVeUa+JzFNVFad9/SeJ6aQihOMmWZg669HFfcHFMvuLntm3mZ AgTzvmVQl7IxV/Z5WL9zXMuwqjLKaofS5Hmt+9vHVyFbH7VOLhD1y2Y1U2YhmC34QoqH iENXxcXCZvHbVwL9p6mpvmboPp/Pnggj4V0J2I755/4iiMPtLmJbB30YPNEQjcBRXtuO +XoVunzo9uvUYHEZnRch0M1Dsd6MwwHzOqo3ayWC/UTD4sDvEGr0aiJDbyIJvKUi+Di+ L2UX1zUpbHp+hyHQLPbbzZ2S5PUj6bZxy1485STYhc6RCSagwWmcyGHWFJL9/dcB5ZwC PLMg== X-Gm-Message-State: APf1xPDKpzWELs1XKuO6N1Z7644aLh/KgtwKgW9FL3nj/6/jxJL9QkHo 1XZtGdM6TveJ3ADr2sqK2KJuIxLRGr4= X-Google-Smtp-Source: AH8x2266+bNys4D0dPMd1YDi0ONOFIBX3zpaozITqFYDWLr1nKV6kHOlIoexbFU9Neg5+al9IB4Jkw== X-Received: by 10.28.37.5 with SMTP id l5mr2521551wml.143.1517937728852; Tue, 06 Feb 2018 09:22:08 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:21:59 +0000 Message-Id: <20180206172202.11667-4-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 3/6] ArmPkg: delete references to unused guids/Pcds from CpuDxe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" gEfiDebugSupportPeriodicCallbackProtocolGuid and PcdCpuDxeProduceDebugSupport are referred to from CpuDxe. Delete references from .inf and .h. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- ArmPkg/Drivers/CpuDxe/CpuDxe.h | 1 - ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 2 -- 2 files changed, 3 deletions(-) diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h index a0f71e69ec..70afe00a08 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h @@ -35,7 +35,6 @@ #include #include #include -#include #include =20 extern BOOLEAN mIsFlushingGCD; diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDx= e.inf index d068e06803..0c5017b31e 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf @@ -60,7 +60,6 @@ [LibraryClasses] =20 [Protocols] gEfiCpuArchProtocolGuid - gEfiDebugSupportPeriodicCallbackProtocolGuid =20 [Guids] gEfiDebugImageInfoTableGuid @@ -72,7 +71,6 @@ [Pcd.common] gArmTokenSpaceGuid.PcdVFPEnabled =20 [FeaturePcd.common] - gArmTokenSpaceGuid.PcdCpuDxeProduceDebugSupport gArmTokenSpaceGuid.PcdDebuggerExceptionSupport =20 [Depex] --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 151793773825558.50417318100301; Tue, 6 Feb 2018 09:22:18 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2D80E21F0DA58; Tue, 6 Feb 2018 09:16:31 -0800 (PST) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 4B122223972B5 for ; Tue, 6 Feb 2018 09:16:29 -0800 (PST) Received: by mail-wr0-x242.google.com with SMTP id a43so2772745wrc.4 for ; Tue, 06 Feb 2018 09:22:12 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:09 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=2wBDpGHmPRUjDrC1LsVhzpxxlKxODOsXztFgCyV/5r0=; b=hD2yqvV0a6kK7BhsrHpsQ4MKL7ZYLZHJChFgx8NvMu2xTkgQ8FnYb2daQoJU0FhLJz 5Okz689Z/YBkeLeX5gNMz/BjtDoq3wTFKd/uJ53EXRDRc70MN99pQHUwy7xLENnnP1c4 MIoZeYi3MXFNfz2gXnEFs5KhB249IIlTYD0/4= 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=2wBDpGHmPRUjDrC1LsVhzpxxlKxODOsXztFgCyV/5r0=; b=Zh0AccOomvy4X57fiNIYrljxu7dR4LjTNvdaoAyPWMxPbMUBVLcsx6ZyxYek9djxrC x5gTYfw1+wKkoWplRCUKT9YlN8TQ6dR3QHSPfO6MYO/k44y6rmkEbUVzyZaNXkllLOBJ R3PPOvTA2A6Yor99TPV55eYYGvDNVcSCtcXKfEi1C1/vHHvLZU94rXl4CIjihmzCyFQV Jf9UQAqA3+yvbo7vz3dihK37kWDr6Dd6Bu5f7Lwe/rwotlpHMAmxJmdjjw6i4uIqxQJJ k+fl+DVhsbmxr1u6nmLSx2VaH4wjipihei2hUDVi3aUmW/8QPG94kFrwdC68vEE9veYG UVDw== X-Gm-Message-State: APf1xPArOuQwZIrbey7gclKVqWBi24WBumwAYBN2xK2EbL/KqBZfPo69 2xse/90P5/eooJ68TkE57azyY8bRkcs= X-Google-Smtp-Source: AH8x225mqbfPsBwoN65AhPqV+jCbwyf2DkMK/nvsyGfdE+AdQf5OjmplaIHnZqgDJgYeo8QRqsIavg== X-Received: by 10.223.172.174 with SMTP id o43mr2929820wrc.121.1517937730649; Tue, 06 Feb 2018 09:22:10 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:22:00 +0000 Message-Id: <20180206172202.11667-5-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 4/6] EmbeddedPkg: drop unused Pcds from package .dsc X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" A bunch of Ebl-related Pcds are still referenced in package Pcd. Drop them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- EmbeddedPkg/EmbeddedPkg.dsc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index 6120c46b35..e6fad5e58b 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -148,18 +148,6 @@ [PcdsFeatureFlag.common] gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|FALSE gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|FALSE =20 - # - # Control what commands are supported from the UI - # Turn these on and off to add features or save size - # - gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedDirCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedHobCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedHwDebugCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdEmbeddedIoEnable|FALSE - gEmbeddedTokenSpaceGuid.PcdEmbeddedScriptCmd|FALSE - gEmbeddedTokenSpaceGuid.PcdEmbeddedPciDebugCmd|TRUE - gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|FALSE =20 =20 @@ -180,9 +168,6 @@ [PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000 gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000 - gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|L"" - gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07 - gEmbeddedTokenSpaceGuid.PcdEmbeddedMemVariableStoreSize|0x10000 =20 gEmbeddedTokenSpaceGuid.PcdPrePiStackBase|0 gEmbeddedTokenSpaceGuid.PcdPrePiStackSize|0 --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517937741827951.447350368251; Tue, 6 Feb 2018 09:22:21 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9011421F0DA63; Tue, 6 Feb 2018 09:16:34 -0800 (PST) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::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 8098F223972C4 for ; Tue, 6 Feb 2018 09:16:32 -0800 (PST) Received: by mail-wm0-x235.google.com with SMTP id j21-v6so18892726wmh.1 for ; Tue, 06 Feb 2018 09:22:15 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:11 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::235; helo=mail-wm0-x235.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=N0f7Lcsuh8WPdU2abwk2NWYN5bdSZWn3ErNkAOMRgPw=; b=eRrn1+Ge1rUMKa9LfvGhuFfSqjaHx0EiO6Y+PmJCUuKrYYaDYwwmNtkVQkv0vRySnL ghAgyWZj1mUQv6mCeRTjX8r6clSH/pgMhSI5B3mIjKjq1YZ7eh0Sr1gKpwAzUbnKkEBJ vub37VC2NX6RagQ1sM19sfD4Avk1DEnN2HIT4= 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=N0f7Lcsuh8WPdU2abwk2NWYN5bdSZWn3ErNkAOMRgPw=; b=lv3ZOzSaIgvaCmv4w2S2I2OCIZCQ+SiNVjCMnNNPtfV84J+cbVVRFR7pdBuxJtC3Gi XRwoz/qYSgNCqKQUHaUlkI7z65qPMJb6Wp38wn0W1JkTr+ZLU847J6qi83nxi0ioGvS9 2pWyqa1/rj4nAm4WsgG7FsNSc+3JboY7/ykl82cLLe6OLUn0LIBugaRGj2f4Wu76CXGA yILxvf/Vv1KcLk1Jib5CtSJnEA2zlHlhMl3awkxJLHN9GqG/9SXMzeywXJirHPTZyaQp MxWgzMmeluB/BJxBTaar+06Lu8Y6qS3S9SbNSTENCLWqhAdgy62Ga+SgzHI4samEqATL oyJA== X-Gm-Message-State: APf1xPCuSSd4xCAXWb7yhvpbxOU0zPbPiavCRCQ0+LlRQdo626O1O4Cy KG1oUgoSCjVXcQF+6xE1ByCcwSMdpWA= X-Google-Smtp-Source: AH8x226ZzaBJ487jIiLN4KD9CYsZedpCTCBMOfTxBn3BkCasPi16RoFYNOlEyXKKde5rjFycbe62Pw== X-Received: by 10.28.237.23 with SMTP id l23mr2576515wmh.113.1517937732796; Tue, 06 Feb 2018 09:22:12 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:22:01 +0000 Message-Id: <20180206172202.11667-6-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 5/6] EmbeddedPkg: delete unused HalRuntimeServicesExampleLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" HalRuntimeServicesExampleLib contains no .inf and none of its contents are included elsewhere - so get rid of it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Capsule.c | 288 = ------- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Mtc.c | 226 = ----- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/ReportStatusCode.c | 198 = ----- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Reset.c | 63 = -- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Rtc.c | 862 = -------------------- EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Variable.c | 306 = ------- 6 files changed, 1943 deletions(-) diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Capsule.c b/E= mbeddedPkg/Library/HalRuntimeServicesExampleLib/Capsule.c deleted file mode 100644 index 0b1e6b0862..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Capsule.c +++ /dev/null @@ -1,288 +0,0 @@ -/** @file - Generic Capsule services - - Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#include - - -// -//Max size capsule services support are platform policy,to populate capsul= es we just need -//memory to maintain them across reset,it is not a problem. And to special= capsules ,for -//example,update flash,it is mostly decided by the platform. Here is a sam= ple size for -//different type capsules. -// -#define MAX_SIZE_POPULATE (0) -#define MAX_SIZE_NON_POPULATE (0) -#define MAX_SUPPORT_CAPSULE_NUM 0x10 - - -BOOLEAN -EFIAPI -SupportUpdateCapsuleRest ( - VOID - ) -{ - // - //If the platform has a way to guarantee the memory integrity across a s= ystem reset, return - //TRUE, else FALSE. - // - return FALSE; -} - - - -VOID -EFIAPI -SupportCapsuleSize ( - IN OUT UINT32 *MaxSizePopulate, - IN OUT UINT32 *MaxSizeNonPopulate - ) -{ - // - //Here is a sample size, different platforms have different sizes. - // - *MaxSizePopulate =3D MAX_SIZE_POPULATE; - *MaxSizeNonPopulate =3D MAX_SIZE_NON_POPULATE; - return; -} - - - - -EFI_STATUS -LibUpdateCapsule ( - IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL - ) -/*++ - -Routine Description: - - This code finds if the capsule needs reset to update, if no, update imme= diately. - -Arguments: - - CapsuleHeaderArray A array of pointers to capsule headers pa= ssed in - CapsuleCount The number of capsule - ScatterGatherList Physical address of datablock list points= to capsule - -Returns: - - EFI STATUS - EFI_SUCCESS Valid capsule was passed.If CAPSULE_FLAG_= PERSIT_ACROSS_RESET is - not set, the capsule has been successfull= y processed by the firmware. - If it set, the ScattlerGatherList is succ= essfully to be set. - EFI_INVALID_PARAMETER CapsuleCount is less than 1,CapsuleGuid i= s not supported. - EFI_DEVICE_ERROR Failed to SetVariable or AllocatePool or = ProcessFirmwareVolume. - ---*/ -{ - UINTN CapsuleSize; - UINTN ArrayNumber; - VOID *BufferPtr; - EFI_STATUS Status; - EFI_HANDLE FvHandle; - UEFI_CAPSULE_HEADER *CapsuleHeader; - - if ((CapsuleCount < 1) || (CapsuleCount > MAX_SUPPORT_CAPSULE_NUM)){ - return EFI_INVALID_PARAMETER; - } - - BufferPtr =3D NULL; - CapsuleHeader =3D NULL; - - // - //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSUL= E_FLAGS_PERSIST_ACROSS_RESET - //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,th= e service supports. - // - for (ArrayNumber =3D 0; ArrayNumber < CapsuleCount; ArrayNumber++) { - CapsuleHeader =3D CapsuleHeaderArray[ArrayNumber]; - if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPS= ULE_FLAGS_POPULATE_SYSTEM_TABLE)) =3D=3D CAPSULE_FLAGS_POPULATE_SYSTEM_TABL= E) { - return EFI_INVALID_PARAMETER; - } - if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) { - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) =3D= =3D 0) { - return EFI_UNSUPPORTED; - } - } - } - - // - //Assume that capsules have the same flags on resetting or not. - // - CapsuleHeader =3D CapsuleHeaderArray[0]; - - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) !=3D 0) { - // - //Check if the platform supports update capsule across a system reset - // - if (!SupportUpdateCapsuleRest()) { - return EFI_UNSUPPORTED; - } - - if (ScatterGatherList =3D=3D 0) { - return EFI_INVALID_PARAMETER; - } else { - Status =3D EfiSetVariable ( - EFI_CAPSULE_VARIABLE_NAME, - &gEfiCapsuleVendorGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS |= EFI_VARIABLE_BOOTSERVICE_ACCESS, - sizeof (UINTN), - (VOID *) &ScatterGatherList - ); - if (Status !=3D EFI_SUCCESS) { - return EFI_DEVICE_ERROR; - } - } - return EFI_SUCCESS; - } - - // - //The rest occurs in the condition of non-reset mode - // - if (EfiAtRuntime ()) { - return EFI_INVALID_PARAMETER; - } - - // - //Here should be in the boot-time - // - for (ArrayNumber =3D 0; ArrayNumber < CapsuleCount ; ArrayNumber++) { - CapsuleHeader =3D CapsuleHeaderArray[ArrayNumber]; - CapsuleSize =3D CapsuleHeader->CapsuleImageSize - CapsuleHeader->Heade= rSize; - Status =3D gBS->AllocatePool (EfiBootServicesData, CapsuleSize, &Buffe= rPtr); - if (Status !=3D EFI_SUCCESS) { - goto Done; - } - gBS->CopyMem (BufferPtr, (UINT8*)CapsuleHeader+ CapsuleHeader->HeaderS= ize, CapsuleSize); - - // - //Call DXE service ProcessFirmwareVolume to process immediatelly - // - Status =3D gDS->ProcessFirmwareVolume (BufferPtr, CapsuleSize, &FvHand= le); - if (Status !=3D EFI_SUCCESS) { - gBS->FreePool (BufferPtr); - return EFI_DEVICE_ERROR; - } - gDS->Dispatch (); - gBS->FreePool (BufferPtr); - } - return EFI_SUCCESS; - -Done: - if (BufferPtr !=3D NULL) { - gBS->FreePool (BufferPtr); - } - return EFI_DEVICE_ERROR; -} - - -EFI_STATUS -QueryCapsuleCapabilities ( - IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - OUT UINT64 *MaxiumCapsuleSize, - OUT EFI_RESET_TYPE *ResetType - ) -/*++ - -Routine Description: - - This code is query about capsule capability. - -Arguments: - - CapsuleHeaderArray A array of pointers to capsule headers p= assed in - CapsuleCount The number of capsule - MaxiumCapsuleSize Max capsule size is supported - ResetType Reset type the capsule indicates, if res= et is not needed,return EfiResetCold. - If reset is needed, return EfiResetWarm. - -Returns: - - EFI STATUS - EFI_SUCCESS Valid answer returned - EFI_INVALID_PARAMETER MaxiumCapsuleSize is NULL,ResetType is N= ULL.CapsuleCount is less than 1,CapsuleGuid is not supported. - EFI_UNSUPPORTED The capsule type is not supported. - ---*/ -{ - UINTN ArrayNumber; - UEFI_CAPSULE_HEADER *CapsuleHeader; - UINT32 MaxSizePopulate; - UINT32 MaxSizeNonPopulate; - - - if ((CapsuleCount < 1) || (CapsuleCount > MAX_SUPPORT_CAPSULE_NUM)){ - return EFI_INVALID_PARAMETER; - } - - if ((MaxiumCapsuleSize =3D=3D NULL) ||(ResetType =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - - CapsuleHeader =3D NULL; - - // - //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSUL= E_FLAGS_PERSIST_ACROSS_RESET - //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,th= e service supports. - // - for (ArrayNumber =3D 0; ArrayNumber < CapsuleCount; ArrayNumber++) { - CapsuleHeader =3D CapsuleHeaderArray[ArrayNumber]; - if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPS= ULE_FLAGS_POPULATE_SYSTEM_TABLE)) =3D=3D CAPSULE_FLAGS_POPULATE_SYSTEM_TABL= E) { - return EFI_INVALID_PARAMETER; - } - if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) { - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) =3D= =3D 0) { - return EFI_UNSUPPORTED; - } - } - } - - SupportCapsuleSize(&MaxSizePopulate,&MaxSizeNonPopulate); - // - //Assume that capsules have the same flags on resetting or not. - // - CapsuleHeader =3D CapsuleHeaderArray[0]; - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) !=3D 0) { - // - //Check if the platform supports update capsule across a system reset - // - if (!SupportUpdateCapsuleRest()) { - return EFI_UNSUPPORTED; - } - *ResetType =3D EfiResetWarm; - *MaxiumCapsuleSize =3D MaxSizePopulate; - } else { - *ResetType =3D EfiResetCold; - *MaxiumCapsuleSize =3D MaxSizeNonPopulate; - } - return EFI_SUCCESS; -} - - -VOID -LibCapsuleVirtualAddressChangeEvent ( - VOID - ) -{ -} - -VOID -LibCapsuleInitialize ( - VOID - ) -{ -} diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Mtc.c b/Embed= dedPkg/Library/HalRuntimeServicesExampleLib/Mtc.c deleted file mode 100644 index 2b60d07203..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Mtc.c +++ /dev/null @@ -1,226 +0,0 @@ -/** @file - Generic Monotonic Counter services - - Copyright (c) 2007, Intel Corporation. All rights reserved.
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - - -// -// The current Monotonic count value -// -UINT64 mEfiMtc =3D 0; - - -// -// Event to use to update the Mtc's high part when wrapping -// -EFI_EVENT mEfiMtcEvent; - -// -// EfiMtcName - Variable name of the MTC value -// -CHAR16 *mEfiMtcName =3D L"MTC"; - -// -// EfiMtcGuid - Guid of the MTC value -// -EFI_GUID mEfiMtcGuid =3D { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x= 0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } }; - - - -// -// Worker functions -// - - -VOID -EFIAPI -EfiMtcEventHandler ( - IN EFI_EVENT Event, - IN VOID *Context - ) -/*++ - -Routine Description: - - Monotonic count event handler. This handler updates the high monotonic = count. - -Arguments: - - Event The event to handle - Context The event context - -Returns: - - EFI_SUCCESS The event has been handled properly - EFI_NOT_FOUND An error occurred updating the variable. - ---*/ -{ - UINT32 HighCount; - - EfiGetNextHighMonotonicCount (&HighCount); - return; -} - - - -VOID -LibMtcVirtualAddressChangeEvent (VOID) -{ -} - - -EFI_STATUS -EFIAPI -LibMtcGetNextHighMonotonicCount ( - OUT UINT32 *HighCount - ) -{ - EFI_STATUS Status; - EFI_TPL OldTpl; - - // - // Check input parameters - // - if (HighCount =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - - if (!EfiAtRuntime ()) { - // Use a lock if called before ExitBootServices() - OldTpl =3D gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); - } - - *HighCount =3D (UINT32) RShiftU64 (mEfiMtc, 32) + 1; - mEfiMtc =3D LShiftU64 (*HighCount, 32); - - if (!EfiAtRuntime ()) { - gBS->RestoreTPL (OldTpl); - } - - // - // Update the NvRam store to match the new high part - // - Status =3D EfiSetVariable ( - mEfiMtcName, - &mEfiMtcGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EF= I_VARIABLE_BOOTSERVICE_ACCESS, - sizeof (UINT32), - HighCount - ); - - return Status; -} - - -EFI_STATUS -LibMtcGetNextMonotonicCount ( - OUT UINT64 *Count - ) -{ - EFI_STATUS Status; - EFI_TPL OldTpl; - UINT32 HighCount; - UINTN BufferSize; - - // - // Can not be called after ExitBootServices() - // - if (EfiAtRuntime ()) { - return EFI_UNSUPPORTED; - } - - // - // Check input parameters - // - if (Count =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - if (mEfiMtc =3D=3D 0) { - // - // If the MTC has not been initialized read the variable - // - - // - // Read the last high part - // - BufferSize =3D sizeof (UINT32); - Status =3D EfiGetVariable ( - mEfiMtcName, - &mEfiMtcGuid, - NULL, - &BufferSize, - &HighCount - ); - if (EFI_ERROR (Status)) { - HighCount =3D 0; - } - - // - // Set the current value - // - mEfiMtc =3D LShiftU64 (HighCount, 32); - // - // Increment the upper 32 bits for this boot - // Continue even if it fails. It will only fail if the variable servi= ces are - // not functional. - // - Status =3D EfiGetNextHighMonotonicCount (&HighCount); - } - - - // - // Update the monotonic counter with a lock - // - OldTpl =3D gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); - *Count =3D mEfiMtc; - mEfiMtc++; - gBS->RestoreTPL (OldTpl); - - // - // If the MSB bit of the low part toggled, then signal that the high - // part needs updated now - // - if ((((UINT32) mEfiMtc) ^ ((UINT32) *Count)) & 0x80000000) { - gBS->SignalEvent (mEfiMtcEvent); - } - - return EFI_SUCCESS; -} - - - -VOID -LibMtcInitialize ( - VOID - ) -{ - EFI_STATUS Status; - - // - // Initialize event to handle overflows - // - Status =3D gBS->CreateEvent ( - EVT_NOTIFY_SIGNAL, - EFI_TPL_CALLBACK, - EfiMtcEventHandler, - NULL, - &mEfiMtcEvent - ); - ASSERT_EFI_ERROR (Status); -} - diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/ReportStatusC= ode.c b/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/ReportStatusCode.c deleted file mode 100644 index e2d5500ae0..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/ReportStatusCode.c +++ /dev/null @@ -1,198 +0,0 @@ -/** @file - Report status code lib on top of either SerialLib and/or EFI Serial Prot= ocol. - Based on PcdStatusCodeUseEfiSerial & PcdStatusCodeUseHardSerial settings - - There is just a single runtime memory buffer that contans all the data. - - Copyright (c) 2007, Intel Corporation. All rights reserved.
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - -//////////#include "DxeStatusCode.h" - - -EFI_SERIAL_IO_PROTOCOL *mSerialIoProtocol =3D NULL; - - -EFI_STATUS -LibReportStatusCode ( - IN EFI_STATUS_CODE_TYPE CodeType, - IN EFI_STATUS_CODE_VALUE Value, - IN UINT32 Instance, - IN EFI_GUID *CallerId, - IN EFI_STATUS_CODE_DATA *Data OPTIONAL - ) -{ - CHAR8 *Filename; - CHAR8 *Description; - CHAR8 *Format; - CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE]; - UINT32 ErrorLevel; - UINT32 LineNumber; - UINTN CharCount; - VA_LIST Marker; - EFI_DEBUG_INFO *DebugInfo; - EFI_TPL CurrentTpl; - - - if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) { - if (EfiAtRuntime ()) { - return EFI_DEVICE_ERROR; - } - CurrentTpl =3D gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); - gBS->RestoreTPL (CurrentTpl); - - if (CurrentTpl > EFI_TPL_CALLBACK ) { - return EFI_DEVICE_ERROR; - } - } - - Buffer[0] =3D '\0'; - - if (Data !=3D NULL && - ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename,= &Description, &LineNumber)) { - // - // Print ASSERT() information into output buffer. - // - CharCount =3D AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "\n\rDXE_ASSERT!: %a (%d): %a\n\r", - Filename, - LineNumber, - Description - ); - } else if (Data !=3D NULL && - ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker,= &Format)) { - // - // Print DEBUG() information into output buffer. - // - CharCount =3D AsciiVSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - Format, - Marker - ); - } else if (Data !=3D NULL && - CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid) && - (CodeType & EFI_STATUS_CODE_TYPE_MASK) =3D=3D EFI_DEBUG_CODE)= { - // - // Print specific data into output buffer. - // - DebugInfo =3D (EFI_DEBUG_INFO *) (Data + 1); - Marker =3D (VA_LIST) (DebugInfo + 1); - Format =3D (CHAR8 *) (((UINT64 *) (DebugInfo + 1)) + 12); - - CharCount =3D AsciiVSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, For= mat, Marker); - } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) =3D=3D EFI_ERROR_CODE)= { - // - // Print ERROR information into output buffer. - // - CharCount =3D AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "ERROR: C%x:V%x I%x", - CodeType, - Value, - Instance - ); - - // - // Make sure we don't try to print values that weren't - // intended to be printed, especially NULL GUID pointers. - // - - if (CallerId !=3D NULL) { - CharCount +=3D AsciiSPrint ( - &Buffer[CharCount - 1], - (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) = * CharCount)), - " %g", - CallerId - ); - } - - if (Data !=3D NULL) { - CharCount +=3D AsciiSPrint ( - &Buffer[CharCount - 1], - (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) = * CharCount)), - " %x", - Data - ); - } - - CharCount +=3D AsciiSPrint ( - &Buffer[CharCount - 1], - (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * = CharCount)), - "\n\r" - ); - } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) =3D=3D EFI_PROGRESS_CO= DE) { - CharCount =3D AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "PROGRESS CODE: V%x I%x\n\r", - Value, - Instance - ); - } else { - CharCount =3D AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "Undefined: C%x:V%x I%x\n\r", - CodeType, - Value, - Instance - ); - } - - - if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) { - // - // Callout to SerialPort Lib function to do print. - // - SerialPortWrite ((UINT8 *) Buffer, CharCount); - } - if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) { - if (mSerialIoProtocol =3D=3D NULL) { - gBS->LocateProtocol (&gEfiSerialIoProtocolGuid, NULL, (VOID **) &mSe= rialIoProtocol); - } - - if (mSerialIoProtocol =3D=3D NULL) { - mSerialIoProtocol->Write ( - mSerialIoProtocol, - &CharCount, - Buffer - ); - } - } - - return EFI_SUCCESS; -} - - -VOID -LibReportStatusCodeVirtualAddressChangeEvent ( - VOID - ) -{ - return; -} - -VOID -LibReportStatusCodeInitialize ( - VOID - ) -{ - return; -} - - - diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Reset.c b/Emb= eddedPkg/Library/HalRuntimeServicesExampleLib/Reset.c deleted file mode 100644 index c6ae1f0c32..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Reset.c +++ /dev/null @@ -1,63 +0,0 @@ -/** @file - Simple PC Port 0x92 reset driver - - Copyright (c) 2007, Intel Corporation. All rights reserved.
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - - - -VOID -LibResetInitializeReset ( - VOID - ) -{ -} - -VOID -LibResetVirtualAddressChangeEvent ( - VOID - ) -{ -} - - -VOID -LibResetSystem ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN CHAR16 *ResetData OPTIONAL - ) -{ - UINT8 Data; - - switch (ResetType) { - case EfiResetWarm: - case EfiResetCold: - case EfiResetShutdown: - Data =3D IoRead8 (0x92); - Data |=3D 1; - IoWrite8 (0x92, Data); - break; - - default: - return ; - } - - // - // Given we should have reset getting here would be bad - // - ASSERT (FALSE); -} - diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Rtc.c b/Embed= dedPkg/Library/HalRuntimeServicesExampleLib/Rtc.c deleted file mode 100644 index 9e2b2e3805..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Rtc.c +++ /dev/null @@ -1,862 +0,0 @@ -/** @file - Simple PC RTC - - Copyright (c) 2007, Intel Corporation. All rights reserved.
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- Copyright (c) 2014, ARM Ltd. All rights reserved. - - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - - - -typedef struct { - EFI_LOCK RtcLock; - UINT16 SavedTimeZone; - UINT8 Daylight; -} PC_RTC_GLOBALS; - -#define PCAT_RTC_ADDRESS_REGISTER 0x70 -#define PCAT_RTC_DATA_REGISTER 0x71 - -// -// Dallas DS12C887 Real Time Clock -// -#define RTC_ADDRESS_SECONDS 0 // R/W Range 0..59 -#define RTC_ADDRESS_SECONDS_ALARM 1 // R/W Range 0..59 -#define RTC_ADDRESS_MINUTES 2 // R/W Range 0..59 -#define RTC_ADDRESS_MINUTES_ALARM 3 // R/W Range 0..59 -#define RTC_ADDRESS_HOURS 4 // R/W Range 1..12 or 0..23 Bit= 7 is AM/PM -#define RTC_ADDRESS_HOURS_ALARM 5 // R/W Range 1..12 or 0..23 Bit= 7 is AM/PM -#define RTC_ADDRESS_DAY_OF_THE_WEEK 6 // R/W Range 1..7 -#define RTC_ADDRESS_DAY_OF_THE_MONTH 7 // R/W Range 1..31 -#define RTC_ADDRESS_MONTH 8 // R/W Range 1..12 -#define RTC_ADDRESS_YEAR 9 // R/W Range 0..99 -#define RTC_ADDRESS_REGISTER_A 10 // R/W[0..6] R0[7] -#define RTC_ADDRESS_REGISTER_B 11 // R/W -#define RTC_ADDRESS_REGISTER_C 12 // RO -#define RTC_ADDRESS_REGISTER_D 13 // RO -#define RTC_ADDRESS_CENTURY 50 // R/W Range 19..20 Bit 8 is R/W -// -// Date and time initial values. -// They are used if the RTC values are invalid during driver initialization -// -#define RTC_INIT_SECOND 0 -#define RTC_INIT_MINUTE 0 -#define RTC_INIT_HOUR 0 -#define RTC_INIT_DAY 1 -#define RTC_INIT_MONTH 1 -#define RTC_INIT_YEAR 2001 - -// -// Register initial values -// -#define RTC_INIT_REGISTER_A 0x26 -#define RTC_INIT_REGISTER_B 0x02 -#define RTC_INIT_REGISTER_D 0x0 - -#pragma pack(1) -// -// Register A -// -typedef struct { - UINT8 RS : 4; // Rate Selection Bits - UINT8 DV : 3; // Divisor - UINT8 UIP : 1; // Update in progress -} RTC_REGISTER_A_BITS; - -typedef union { - RTC_REGISTER_A_BITS Bits; - UINT8 Data; -} RTC_REGISTER_A; - -// -// Register B -// -typedef struct { - UINT8 DSE : 1; // 0 - Daylight saving disabled 1 - Daylight savings en= abled - UINT8 MIL : 1; // 0 - 12 hour mode 1 - 24 hour mode - UINT8 DM : 1; // 0 - BCD Format 1 - Binary Format - UINT8 SQWE : 1; // 0 - Disable SQWE output 1 - Enable SQWE output - UINT8 UIE : 1; // 0 - Update INT disabled 1 - Update INT enabled - UINT8 AIE : 1; // 0 - Alarm INT disabled 1 - Alarm INT Enabled - UINT8 PIE : 1; // 0 - Periodic INT disabled 1 - Periodic INT Enabled - UINT8 SET : 1; // 0 - Normal operation. 1 - Updates inhibited -} RTC_REGISTER_B_BITS; - -typedef union { - RTC_REGISTER_B_BITS Bits; - UINT8 Data; -} RTC_REGISTER_B; - -// -// Register C -// -typedef struct { - UINT8 Reserved : 4; // Read as zero. Can not be written. - UINT8 UF : 1; // Update End Interrupt Flag - UINT8 AF : 1; // Alarm Interrupt Flag - UINT8 PF : 1; // Periodic Interrupt Flag - UINT8 IRQF : 1; // Iterrupt Request Flag =3D PF & PIE | AF & AIE | U= F & UIE -} RTC_REGISTER_C_BITS; - -typedef union { - RTC_REGISTER_C_BITS Bits; - UINT8 Data; -} RTC_REGISTER_C; - -// -// Register D -// -typedef struct { - UINT8 Reserved : 7; // Read as zero. Can not be written. - UINT8 VRT : 1; // Valid RAM and Time -} RTC_REGISTER_D_BITS; - -typedef union { - RTC_REGISTER_D_BITS Bits; - UINT8 Data; -} RTC_REGISTER_D; - -#pragma pack() - -PC_RTC_GLOBALS mRtc; - -BOOLEAN -IsLeapYear ( - IN EFI_TIME *Time - ) -{ - if (Time->Year % 4 =3D=3D 0) { - if (Time->Year % 100 =3D=3D 0) { - if (Time->Year % 400 =3D=3D 0) { - return TRUE; - } else { - return FALSE; - } - } else { - return TRUE; - } - } else { - return FALSE; - } -} - - -const INTN mDayOfMonth[12] =3D { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, = 30, 31 }; - -BOOLEAN -DayValid ( - IN EFI_TIME *Time - ) -{ - if (Time->Day < 1 || - Time->Day > mDayOfMonth[Time->Month - 1] || - (Time->Month =3D=3D 2 && (!IsLeapYear (Time) && Time->Day > 28)) - ) { - return FALSE; - } - - return TRUE; -} - - -UINT8 -DecimaltoBcd ( - IN UINT8 DecValue - ) -{ - UINTN High; - UINTN Low; - - High =3D DecValue / 10; - Low =3D DecValue - (High * 10); - - return (UINT8) (Low + (High << 4)); -} - -UINT8 -BcdToDecimal ( - IN UINT8 BcdValue - ) -{ - UINTN High; - UINTN Low; - - High =3D BcdValue >> 4; - Low =3D BcdValue - (High << 4); - - return (UINT8) (Low + (High * 10)); -} - - - - -VOID -ConvertEfiTimeToRtcTime ( - IN EFI_TIME *Time, - IN RTC_REGISTER_B RegisterB, - IN UINT8 *Century - ) -{ - BOOLEAN PM; - - PM =3D TRUE; - // - // Adjust hour field if RTC in in 12 hour mode - // - if (RegisterB.Bits.MIL =3D=3D 0) { - if (Time->Hour < 12) { - PM =3D FALSE; - } - - if (Time->Hour >=3D 13) { - Time->Hour =3D (UINT8) (Time->Hour - 12); - } else if (Time->Hour =3D=3D 0) { - Time->Hour =3D 12; - } - } - // - // Set the Time/Date/Daylight Savings values. - // - *Century =3D DecimaltoBcd ((UINT8) (Time->Year / 100)); - - Time->Year =3D (UINT16) (Time->Year % 100); - - if (RegisterB.Bits.DM =3D=3D 0) { - Time->Year =3D DecimaltoBcd ((UINT8) Time->Year); - Time->Month =3D DecimaltoBcd (Time->Month); - Time->Day =3D DecimaltoBcd (Time->Day); - Time->Hour =3D DecimaltoBcd (Time->Hour); - Time->Minute =3D DecimaltoBcd (Time->Minute); - Time->Second =3D DecimaltoBcd (Time->Second); - } - // - // If we are in 12 hour mode and PM is set, then set bit 7 of the Hour f= ield. - // - if (RegisterB.Bits.MIL =3D=3D 0 && PM) { - Time->Hour =3D (UINT8) (Time->Hour | 0x80); - } -} - -/** - Check the validity of all the fields of a data structure of type EFI_TIME - - @param[in] Time Pointer to a data structure of type EFI_TIME that defi= nes a date and time - - @retval EFI_SUCCESS All date and time fields are valid - @retval EFI_INVALID_PARAMETER At least one date or time field is not v= alid -**/ -EFI_STATUS -RtcTimeFieldsValid ( - IN EFI_TIME *Time - ) -{ - if ((Time->Year < 1998 ) || - (Time->Year > 2099 ) || - (Time->Month < 1 ) || - (Time->Month > 12 ) || - (!DayValid (Time)) || - (Time->Hour > 23 ) || - (Time->Minute > 59 ) || - (Time->Second > 59 ) || - (Time->Nanosecond > 999999999) || - ((Time->TimeZone !=3D EFI_UNSPECIFIED_TIMEZONE) && - ((Time->TimeZone < -1440) || - (Time->TimeZone > 1440 ) ) ) || - (Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | - EFI_TIME_IN_DAYLIGHT ))) - ) { - return EFI_INVALID_PARAMETER; - } - - return EFI_SUCCESS; -} - -UINT8 -RtcRead ( - IN UINT8 Address - ) -{ - IoWrite8 (PCAT_RTC_ADDRESS_REGISTER, (UINT8) (Address | (UINT8) (IoRead8= (PCAT_RTC_ADDRESS_REGISTER) & 0x80))); - return IoRead8 (PCAT_RTC_DATA_REGISTER); -} - -VOID -RtcWrite ( - IN UINT8 Address, - IN UINT8 Data - ) -{ - IoWrite8 (PCAT_RTC_ADDRESS_REGISTER, (UINT8) (Address | (UINT8) (IoRead8= (PCAT_RTC_ADDRESS_REGISTER) & 0x80))); - IoWrite8 (PCAT_RTC_DATA_REGISTER, Data); -} - - -EFI_STATUS -RtcTestCenturyRegister ( - VOID - ) -{ - UINT8 Century; - UINT8 Temp; - - Century =3D RtcRead (RTC_ADDRESS_CENTURY); - // - // RtcWrite (RTC_ADDRESS_CENTURY, 0x00); - // - Temp =3D (UINT8) (RtcRead (RTC_ADDRESS_CENTURY) & 0x7f); - RtcWrite (RTC_ADDRESS_CENTURY, Century); - if (Temp =3D=3D 0x19 || Temp =3D=3D 0x20) { - return EFI_SUCCESS; - } - - return EFI_DEVICE_ERROR; -} - -VOID -ConvertRtcTimeToEfiTime ( - IN EFI_TIME *Time, - IN RTC_REGISTER_B RegisterB - ) -{ - BOOLEAN PM; - - if ((Time->Hour) & 0x80) { - PM =3D TRUE; - } else { - PM =3D FALSE; - } - - Time->Hour =3D (UINT8) (Time->Hour & 0x7f); - - if (RegisterB.Bits.DM =3D=3D 0) { - Time->Year =3D BcdToDecimal ((UINT8) Time->Year); - Time->Month =3D BcdToDecimal (Time->Month); - Time->Day =3D BcdToDecimal (Time->Day); - Time->Hour =3D BcdToDecimal (Time->Hour); - Time->Minute =3D BcdToDecimal (Time->Minute); - Time->Second =3D BcdToDecimal (Time->Second); - } - // - // If time is in 12 hour format, convert it to 24 hour format - // - if (RegisterB.Bits.MIL =3D=3D 0) { - if (PM && Time->Hour < 12) { - Time->Hour =3D (UINT8) (Time->Hour + 12); - } - - if (!PM && Time->Hour =3D=3D 12) { - Time->Hour =3D 0; - } - } - - Time->Nanosecond =3D 0; - Time->TimeZone =3D EFI_UNSPECIFIED_TIMEZONE; - Time->Daylight =3D 0; -} - -EFI_STATUS -RtcWaitToUpdate ( - UINTN Timeout - ) -{ - RTC_REGISTER_A RegisterA; - RTC_REGISTER_D RegisterD; - - // - // See if the RTC is functioning correctly - // - RegisterD.Data =3D RtcRead (RTC_ADDRESS_REGISTER_D); - - if (RegisterD.Bits.VRT =3D=3D 0) { - return EFI_DEVICE_ERROR; - } - // - // Wait for up to 0.1 seconds for the RTC to be ready. - // - Timeout =3D (Timeout / 10) + 1; - RegisterA.Data =3D RtcRead (RTC_ADDRESS_REGISTER_A); - while (RegisterA.Bits.UIP =3D=3D 1 && Timeout > 0) { - MicroSecondDelay (10); - RegisterA.Data =3D RtcRead (RTC_ADDRESS_REGISTER_A); - Timeout--; - } - - RegisterD.Data =3D RtcRead (RTC_ADDRESS_REGISTER_D); - if (Timeout =3D=3D 0 || RegisterD.Bits.VRT =3D=3D 0) { - return EFI_DEVICE_ERROR; - } - - return EFI_SUCCESS; -} - -EFI_STATUS -LibGetTime ( - OUT EFI_TIME *Time, - OUT EFI_TIME_CAPABILITIES *Capabilities - ) -{ - EFI_STATUS Status; - RTC_REGISTER_B RegisterB; - UINT8 Century; - UINTN BufferSize; - - // - // Check parameters for null pointer - // - if (Time =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - - } - // - // Acquire RTC Lock to make access to RTC atomic - // - EfiAcquireLock (&mRtc.RtcLock); - - // - // Wait for up to 0.1 seconds for the RTC to be updated - // - Status =3D RtcWaitToUpdate (100000); - if (EFI_ERROR (Status)) { - EfiReleaseLock (&mRtc.RtcLock); - return Status; - } - // - // Read Register B - // - RegisterB.Data =3D RtcRead (RTC_ADDRESS_REGISTER_B); - - // - // Get the Time/Date/Daylight Savings values. - // - Time->Second =3D RtcRead (RTC_ADDRESS_SECONDS); - Time->Minute =3D RtcRead (RTC_ADDRESS_MINUTES); - Time->Hour =3D RtcRead (RTC_ADDRESS_HOURS); - Time->Day =3D RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH); - Time->Month =3D RtcRead (RTC_ADDRESS_MONTH); - Time->Year =3D RtcRead (RTC_ADDRESS_YEAR); - - ConvertRtcTimeToEfiTime (Time, RegisterB); - - if (RtcTestCenturyRegister () =3D=3D EFI_SUCCESS) { - Century =3D BcdToDecimal ((UINT8) (RtcRead (RTC_ADDRESS_CENTURY) & 0x7= f)); - } else { - Century =3D BcdToDecimal (RtcRead (RTC_ADDRESS_CENTURY)); - } - - Time->Year =3D (UINT16) (Century * 100 + Time->Year); - - // - // Release RTC Lock. - // - EfiReleaseLock (&mRtc.RtcLock); - - // - // Get the variable that containts the TimeZone and Daylight fields - // - Time->TimeZone =3D mRtc.SavedTimeZone; - Time->Daylight =3D mRtc.Daylight; - - BufferSize =3D sizeof (INT16) + sizeof (UINT8); - - // - // Make sure all field values are in correct range - // - Status =3D RtcTimeFieldsValid (Time); - if (EFI_ERROR (Status)) { - return EFI_DEVICE_ERROR; - } - // - // Fill in Capabilities if it was passed in - // - if (Capabilities) { - Capabilities->Resolution =3D 1; - // - // 1 hertz - // - Capabilities->Accuracy =3D 50000000; - // - // 50 ppm - // - Capabilities->SetsToZero =3D FALSE; - } - - return EFI_SUCCESS; -} - - - -EFI_STATUS -LibSetTime ( - IN EFI_TIME *Time - ) -{ - EFI_STATUS Status; - EFI_TIME RtcTime; - RTC_REGISTER_B RegisterB; - UINT8 Century; - - if (Time =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - // - // Make sure that the time fields are valid - // - Status =3D RtcTimeFieldsValid (Time); - if (EFI_ERROR (Status)) { - return Status; - } - - CopyMem (&RtcTime, Time, sizeof (EFI_TIME)); - - // - // Acquire RTC Lock to make access to RTC atomic - // - EfiAcquireLock (&mRtc.RtcLock); - - // - // Wait for up to 0.1 seconds for the RTC to be updated - // - Status =3D RtcWaitToUpdate (100000); - if (EFI_ERROR (Status)) { - EfiReleaseLock (&mRtc.RtcLock); - return Status; - } - // - // Read Register B, and inhibit updates of the RTC - // - RegisterB.Data =3D RtcRead (RTC_ADDRESS_REGISTER_B); - RegisterB.Bits.SET =3D 1; - RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); - - ConvertEfiTimeToRtcTime (&RtcTime, RegisterB, &Century); - - RtcWrite (RTC_ADDRESS_SECONDS, RtcTime.Second); - RtcWrite (RTC_ADDRESS_MINUTES, RtcTime.Minute); - RtcWrite (RTC_ADDRESS_HOURS, RtcTime.Hour); - RtcWrite (RTC_ADDRESS_DAY_OF_THE_MONTH, RtcTime.Day); - RtcWrite (RTC_ADDRESS_MONTH, RtcTime.Month); - RtcWrite (RTC_ADDRESS_YEAR, (UINT8) RtcTime.Year); - if (RtcTestCenturyRegister () =3D=3D EFI_SUCCESS) { - Century =3D (UINT8) ((Century & 0x7f) | (RtcRead (RTC_ADDRESS_CENTURY)= & 0x80)); - } - - RtcWrite (RTC_ADDRESS_CENTURY, Century); - - // - // Allow updates of the RTC registers - // - RegisterB.Bits.SET =3D 0; - RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); - - // - // Release RTC Lock. - // - EfiReleaseLock (&mRtc.RtcLock); - - // - // Set the variable that containts the TimeZone and Daylight fields - // - mRtc.SavedTimeZone =3D Time->TimeZone; - mRtc.Daylight =3D Time->Daylight; - return Status; -} - -EFI_STATUS -libGetWakeupTime ( - OUT BOOLEAN *Enabled, - OUT BOOLEAN *Pending, - OUT EFI_TIME *Time - ) -{ - EFI_STATUS Status; - RTC_REGISTER_B RegisterB; - RTC_REGISTER_C RegisterC; - UINT8 Century; - - // - // Check parameters for null pointers - // - if ((Enabled =3D=3D NULL) || (Pending =3D=3D NULL) || (Time =3D=3D NULL)= ) { - return EFI_INVALID_PARAMETER; - - } - // - // Acquire RTC Lock to make access to RTC atomic - // - EfiAcquireLock (&mRtc.RtcLock); - - // - // Wait for up to 0.1 seconds for the RTC to be updated - // - Status =3D RtcWaitToUpdate (100000); - if (EFI_ERROR (Status)) { - EfiReleaseLock (&mRtc.RtcLock); - return EFI_DEVICE_ERROR; - } - // - // Read Register B and Register C - // - RegisterB.Data =3D RtcRead (RTC_ADDRESS_REGISTER_B); - RegisterC.Data =3D RtcRead (RTC_ADDRESS_REGISTER_C); - - // - // Get the Time/Date/Daylight Savings values. - // - *Enabled =3D RegisterB.Bits.AIE; - if (*Enabled) { - Time->Second =3D RtcRead (RTC_ADDRESS_SECONDS_ALARM); - Time->Minute =3D RtcRead (RTC_ADDRESS_MINUTES_ALARM); - Time->Hour =3D RtcRead (RTC_ADDRESS_HOURS_ALARM); - Time->Day =3D RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH); - Time->Month =3D RtcRead (RTC_ADDRESS_MONTH); - Time->Year =3D RtcRead (RTC_ADDRESS_YEAR); - } else { - Time->Second =3D 0; - Time->Minute =3D 0; - Time->Hour =3D 0; - Time->Day =3D RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH); - Time->Month =3D RtcRead (RTC_ADDRESS_MONTH); - Time->Year =3D RtcRead (RTC_ADDRESS_YEAR); - } - - ConvertRtcTimeToEfiTime (Time, RegisterB); - - if (RtcTestCenturyRegister () =3D=3D EFI_SUCCESS) { - Century =3D BcdToDecimal ((UINT8) (RtcRead (RTC_ADDRESS_CENTURY) & 0x7= f)); - } else { - Century =3D BcdToDecimal (RtcRead (RTC_ADDRESS_CENTURY)); - } - - Time->Year =3D (UINT16) (Century * 100 + Time->Year); - - // - // Release RTC Lock. - // - EfiReleaseLock (&mRtc.RtcLock); - - // - // Make sure all field values are in correct range - // - Status =3D RtcTimeFieldsValid (Time); - if (EFI_ERROR (Status)) { - return EFI_DEVICE_ERROR; - } - - *Pending =3D RegisterC.Bits.AF; - - return EFI_SUCCESS; -} - -EFI_STATUS -LibSetWakeupTime ( - IN BOOLEAN Enabled, - OUT EFI_TIME *Time - ) -{ - EFI_STATUS Status; - EFI_TIME RtcTime; - RTC_REGISTER_B RegisterB; - UINT8 Century; - EFI_TIME_CAPABILITIES Capabilities; - - if (Enabled) { - - if (Time =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - // - // Make sure that the time fields are valid - // - Status =3D RtcTimeFieldsValid (Time); - if (EFI_ERROR (Status)) { - return EFI_INVALID_PARAMETER; - } - // - // Just support set alarm time within 24 hours - // - LibGetTime (&RtcTime, &Capabilities); - if (Time->Year !=3D RtcTime.Year || - Time->Month !=3D RtcTime.Month || - (Time->Day !=3D RtcTime.Day && Time->Day !=3D (RtcTime.Day + 1)) - ) { - return EFI_UNSUPPORTED; - } - // - // Make a local copy of the time and date - // - CopyMem (&RtcTime, Time, sizeof (EFI_TIME)); - - } - // - // Acquire RTC Lock to make access to RTC atomic - // - EfiAcquireLock (&mRtc.RtcLock); - - // - // Wait for up to 0.1 seconds for the RTC to be updated - // - Status =3D RtcWaitToUpdate (100000); - if (EFI_ERROR (Status)) { - EfiReleaseLock (&mRtc.RtcLock); - return EFI_DEVICE_ERROR; - } - // - // Read Register B, and inhibit updates of the RTC - // - RegisterB.Data =3D RtcRead (RTC_ADDRESS_REGISTER_B); - - RegisterB.Bits.SET =3D 1; - RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); - - if (Enabled) { - ConvertEfiTimeToRtcTime (&RtcTime, RegisterB, &Century); - - // - // Set RTC alarm time - // - RtcWrite (RTC_ADDRESS_SECONDS_ALARM, RtcTime.Second); - RtcWrite (RTC_ADDRESS_MINUTES_ALARM, RtcTime.Minute); - RtcWrite (RTC_ADDRESS_HOURS_ALARM, RtcTime.Hour); - - RegisterB.Bits.AIE =3D 1; - - } else { - RegisterB.Bits.AIE =3D 0; - } - // - // Allow updates of the RTC registers - // - RegisterB.Bits.SET =3D 0; - RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); - - // - // Release RTC Lock. - // - EfiReleaseLock (&mRtc.RtcLock); - - return EFI_SUCCESS; -} - - - -VOID -LibRtcVirtualAddressChangeEvent ( - VOID - ) -{ -} - - -VOID -LibRtcInitialize ( - VOID - ) -{ - EFI_STATUS Status; - RTC_REGISTER_A RegisterA; - RTC_REGISTER_B RegisterB; - RTC_REGISTER_C RegisterC; - RTC_REGISTER_D RegisterD; - UINT8 Century; - EFI_TIME Time; - - // - // Acquire RTC Lock to make access to RTC atomic - // - EfiAcquireLock (&mRtc.RtcLock); - - // - // Initialize RTC Register - // - // Make sure Division Chain is properly configured, - // or RTC clock won't "tick" -- time won't increment - // - RegisterA.Data =3D RTC_INIT_REGISTER_A; - RtcWrite (RTC_ADDRESS_REGISTER_A, RegisterA.Data); - - // - // Read Register B - // - RegisterB.Data =3D RtcRead (RTC_ADDRESS_REGISTER_B); - - // - // Clear RTC flag register - // - RegisterC.Data =3D RtcRead (RTC_ADDRESS_REGISTER_C); - - // - // Clear RTC register D - // - RegisterD.Data =3D RTC_INIT_REGISTER_D; - RtcWrite (RTC_ADDRESS_REGISTER_D, RegisterD.Data); - - // - // Wait for up to 0.1 seconds for the RTC to be updated - // - Status =3D RtcWaitToUpdate (100000); - if (EFI_ERROR (Status)) { - EfiReleaseLock (&mRtc.RtcLock); - return; - } - - // - // Get the Time/Date/Daylight Savings values. - // - Time.Second =3D RtcRead (RTC_ADDRESS_SECONDS); - Time.Minute =3D RtcRead (RTC_ADDRESS_MINUTES); - Time.Hour =3D RtcRead (RTC_ADDRESS_HOURS); - Time.Day =3D RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH); - Time.Month =3D RtcRead (RTC_ADDRESS_MONTH); - Time.Year =3D RtcRead (RTC_ADDRESS_YEAR); - - ConvertRtcTimeToEfiTime (&Time, RegisterB); - - if (RtcTestCenturyRegister () =3D=3D EFI_SUCCESS) { - Century =3D BcdToDecimal ((UINT8) (RtcRead (RTC_ADDRESS_CENTURY) & 0x7= f)); - } else { - Century =3D BcdToDecimal (RtcRead (RTC_ADDRESS_CENTURY)); - } - - Time.Year =3D (UINT16) (Century * 100 + Time.Year); - - // - // Set RTC configuration after get original time - // - RtcWrite (RTC_ADDRESS_REGISTER_B, RTC_INIT_REGISTER_B); - - // - // Release RTC Lock. - // - EfiReleaseLock (&mRtc.RtcLock); - - // - // Validate time fields - // - Status =3D RtcTimeFieldsValid (&Time); - if (EFI_ERROR (Status)) { - Time.Second =3D RTC_INIT_SECOND; - Time.Minute =3D RTC_INIT_MINUTE; - Time.Hour =3D RTC_INIT_HOUR; - Time.Day =3D RTC_INIT_DAY; - Time.Month =3D RTC_INIT_MONTH; - Time.Year =3D RTC_INIT_YEAR; - } - // - // Reset time value according to new RTC configuration - // - LibSetTime (&Time); - - return; -} - - diff --git a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Variable.c b/= EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Variable.c deleted file mode 100644 index 0c1b76a4bb..0000000000 --- a/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/Variable.c +++ /dev/null @@ -1,306 +0,0 @@ -/** @file - Variable services implemented from system memory - - There is just a single runtime memory buffer that contans all the data. - - Copyright (c) 2007, Intel Corporation. All rights reserved.
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - - -UINT64 mMaximumVariableStorageSize; -UINT64 mRemainingVariableStorageSize; -UINT64 mMaximumVariableSize; - -typedef struct { - EFI_GUID VendorGuid; - UINT32 Attribute; - UINTN DataSize; -} VARIABLE_ARRAY_ENTRY; -// CHAR16 VariableName[] -// UINT8 Data[] - -VARIABLE_ARRAY_ENTRY *mVariableArray =3D NULL; -VARIABLE_ARRAY_ENTRY *mVariableArrayNextFree =3D NULL; -VARIABLE_ARRAY_ENTRY *mVariableArrayEnd =3D NULL; - - -VARIABLE_ARRAY_ENTRY * -AddEntry ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data - ) -{ - UINTN Size; - UINTN SizeOfString; - VARIABLE_ARRAY_ENTRY *Entry; - EFI_TPL CurrentTpl; - - - SizeOfString =3D StrSize (VariableName); - Size =3D SizeOfString + sizeof (VARIABLE_ARRAY_ENTRY) + DataSize; - if ((VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArrayNextFree) + Size) >= mVariableArrayEnd) { - // ran out of space - return NULL; - } - - if (!EfiAtRuntime ()) { - // Enter critical section - CurrentTpl =3D gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); - } - - Entry =3D mVariableArrayNextFree; - CopyGuid (&Entry->VendorGuid, VendorGuid); - Entry->Attribute =3D Attributes; - Entry->DataSize =3D DataSize; - StrCpy ((CHAR16 *)++mVariableArrayNextFree, VariableName); - mVariableArrayNextFree =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableA= rrayNextFree) + SizeOfString); - CopyMem (mVariableArrayNextFree, Data, DataSize); - mVariableArrayNextFree =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableA= rrayNextFree) + DataSize); - - if (!EfiAtRuntime ()) { - // Exit Critical section - gBS->RestoreTPL (CurrentTpl); - } - - return Entry; -} - -VOID -DeleteEntry ( - IN VARIABLE_ARRAY_ENTRY *Entry - ) -{ - UINTN Size; - UINT8 *Data; - EFI_TPL CurrentTpl; - - Size =3D StrSize ((CHAR16 *)(Entry + 1)) + sizeof (VARIABLE_ARRAY_ENTRY)= + Entry->DataSize; - Data =3D ((UINT8 *)Entry) + Size; - - CopyMem (Entry, Data, (UINTN)mVariableArrayNextFree - (UINTN)Data); - - if (!EfiAtRuntime ()) { - // Enter critical section - CurrentTpl =3D gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); - } - - mVariableArrayNextFree =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableA= rrayNextFree) - Size); - - if (!EfiAtRuntime ()) { - // Exit Critical section - gBS->RestoreTPL (CurrentTpl); - } -} - - -VARIABLE_ARRAY_ENTRY * -GetVariableArrayEntry ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - OUT VOID **Data OPTIONAL - ) -{ - VARIABLE_ARRAY_ENTRY *Entry; - UINTN Size; - - if (*VariableName =3D=3D L'\0') { - // by definition first entry is null-terminated string - if (mVariableArray =3D=3D mVariableArrayNextFree) { - return NULL; - } - return mVariableArray; - } - - for (Entry =3D mVariableArray; Entry < mVariableArrayEnd;) { - if (CompareGuid (VendorGuid, &Entry->VendorGuid)) { - if (StrCmp (VariableName, (CHAR16 *)(Entry + 1))) { - Size =3D StrSize ((CHAR16 *)(Entry + 1)); - if (Data !=3D NULL) { - *Data =3D (VOID *)(((UINT8 *)Entry) + (Size + sizeof (VARIABLE_A= RRAY_ENTRY))); - } - return Entry; - } - } - - Size =3D StrSize ((CHAR16 *)(Entry + 1)) + sizeof (VARIABLE_ARRAY_ENTR= Y) + Entry->DataSize; - Entry =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)Entry) + Size); - } - - return NULL; -} - - -EFI_STATUS -LibGetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - IN OUT UINTN *DataSize, - OUT VOID *Data - ) -{ - VARIABLE_ARRAY_ENTRY *Entry; - VOID *InternalData; - - if (EfiAtRuntime () && (Attributes !=3D NULL)) { - if ((*Attributes & EFI_VARIABLE_RUNTIME_ACCESS) =3D=3D 0) { - return EFI_NOT_FOUND; - } - } - - Entry =3D GetVariableArrayEntry (VariableName, VendorGuid, &InternalData= ); - if (Entry =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - if (*DataSize < Entry->DataSize) { - *DataSize =3D Entry->DataSize; - return EFI_BUFFER_TOO_SMALL; - } - - *DataSize =3D Entry->DataSize; - if (Attributes !=3D NULL) { - *Attributes =3D Entry->Attribute; - } - - CopyMem (Data, InternalData, *DataSize); - return EFI_SUCCESS; -} - - -EFI_STATUS -LibGetNextVariableName ( - IN OUT UINTN *VariableNameSize, - IN OUT CHAR16 *VariableName, - IN OUT EFI_GUID *VendorGuid - ) -{ - VARIABLE_ARRAY_ENTRY *Entry; - VOID *InternalData; - UINTN StringSize; - BOOLEAN Done; - - for (Done =3D FALSE; !Done; ) { - Entry =3D GetVariableArrayEntry (VariableName, VendorGuid, &InternalDa= ta); - if (Entry =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - // If we are at runtime skip variables that do not have the Runitme at= tribute set. - Done =3D (EfiAtRuntime () && ((Entry->Attribute & EFI_VARIABLE_RUNTIME= _ACCESS) =3D=3D 0)) ? FALSE : TRUE; - } - - StringSize =3D StrSize ((CHAR16 *)(Entry + 1)); - Entry =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)Entry) + (StringSize + size= of (VARIABLE_ARRAY_ENTRY) + Entry->DataSize)); - if (Entry >=3D mVariableArrayEnd) { - return EFI_NOT_FOUND; - } - - if (*VariableNameSize < StringSize) { - *VariableNameSize =3D StringSize; - return EFI_BUFFER_TOO_SMALL; - } - - *VariableNameSize =3D StringSize; - CopyMem (VariableName, (CHAR16 *)(Entry + 1), StringSize); - CopyMem (VendorGuid, &Entry->VendorGuid, sizeof (EFI_GUID)); - return EFI_SUCCESS; -} - - - -EFI_STATUS -LibSetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data - ) -{ - VARIABLE_ARRAY_ENTRY *Entry; - VOID *InternalData; - - if (EfiAtRuntime () && ((Attributes & EFI_VARIABLE_RUNTIME_ACCESS) =3D= =3D 0)) { - return EFI_NOT_FOUND; - } - - Entry =3D GetVariableArrayEntry (VariableName, VendorGuid, &InternalData= ); - if (Entry =3D=3D NULL) { - if (DataSize =3D=3D 0) { - return EFI_NOT_FOUND; - } - Entry =3D AddEntry (VariableName, VendorGuid, Attributes, DataSize, Da= ta); - return (Entry =3D=3D NULL) ? EFI_OUT_OF_RESOURCES : EFI_SUCCESS; - - } else if (DataSize =3D=3D 0) { - // DataSize is zero so delete - DeleteEntry (Entry); - } else if (DataSize =3D=3D Entry->DataSize) { - // No change is size so just update the store - Entry->Attribute |=3D Attributes; - CopyMem (InternalData, Data, DataSize); - } else { - // Grow the entry by deleting and adding back. Don't lose previous Att= ributes - Attributes |=3D Entry->Attribute; - DeleteEntry (Entry); - Entry =3D AddEntry (VariableName, VendorGuid, Attributes, DataSize, Da= ta); - return (Entry =3D=3D NULL) ? EFI_OUT_OF_RESOURCES : EFI_SUCCESS; - } -} - - -EFI_STATUS -LibQueryVariableInfo ( - IN UINT32 Attributes, - OUT UINT64 *MaximumVariableStorageSize, - OUT UINT64 *RemainingVariableStorageSize, - OUT UINT64 *MaximumVariableSize - ) -{ - *MaximumVariableStorageSize =3D mMaximumVariableStorageSize; - *RemainingVariableStorageSize =3D mRemainingVariableStorageSize; - *MaximumVariableStorageSize =3D mRemainingVariableStorageSize; - return EFI_SUCCESS; -} - - -VOID -LibVariableVirtualAddressChangeEvent (VOID) -{ - EfiConvertPointer (0, (VOID **)&mVariableArray); - EfiConvertPointer (0, (VOID **)&mVariableArrayNextFree); - EfiConvertPointer (0, (VOID **)&mVariableArrayEnd); -} - - -VOID -LibVariableInitialize (VOID) -{ - UINTN Size; - - Size =3D PcdGet32 (PcdEmbeddedMemVariableStoreSize); - mVariableArray =3D mVariableArrayNextFree =3D (VARIABLE_ARRAY_ENTRY *)Al= locateRuntimePool (Size); - ASSERT (mVariableArray !=3D NULL); - - mVariableArrayEnd =3D (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArray)= + Size); - - mMaximumVariableStorageSize =3D Size - sizeof (VARIABLE_ARRAY_ENTRY); - mRemainingVariableStorageSize =3D mMaximumVariableStorageSize; - mMaximumVariableSize =3D mMaximumVariableStorageSize; -} - --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 09:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517937743999497.69409985747404; Tue, 6 Feb 2018 09:22:23 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0688421F0DA67; Tue, 6 Feb 2018 09:16:35 -0800 (PST) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 31E9B21F0DA40 for ; Tue, 6 Feb 2018 09:16:33 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id f71so5227504wmf.0 for ; Tue, 06 Feb 2018 09:22:16 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 77sm14854664wmt.37.2018.02.06.09.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:22:13 -0800 (PST) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=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=yCs+geWjBPRybo/dtYjbeEsqS2YH3xlXOwzhWHNV3Lg=; b=M9W5s+uumMTO663hrvmOrsSH/rKsLUBnY+3sk9Z4mfd1E0wc3rr2I5lEv4vvzXr6dQ EdVXd0Z2aT8FoKVeEnEHOqqAijTrvFnnJLb6mupD0MHWSAsN8eWOIxqIpP8oh3kpGDin RK7NtKsdED/BqbN0/XLydVHIHCoNZTbna2/To= 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=yCs+geWjBPRybo/dtYjbeEsqS2YH3xlXOwzhWHNV3Lg=; b=Lk2ah7NXFjhgpsO5jd3j0tVCpr35PwMhVRi0VlEAJJhcE4v+lfSZAopqLjagZJDjHf gaIiCpKbzsWPr0+kSVmAGLXjtIRfTC9qxsd6pvf7ZCoAzmkmNy+wYSkwJuRK6r0ILY6C Gjl+j/9ZdIG/pTozNPeMmYKvqYzSYN2TZ7bHdZkYkEgSHz2THFFeg1LCkkkIzdIQb1Kc 1b0QSBbipUdhCyDswwAjWgYuo/SIUZMirYHg/fW5wDg0dxXYnQJekPB62Yr02IsFxOVV CTkp5GkKC6UFFv8qJSfPplg7SVJcZYsfi16lmYiJalbD7D2OlqGTb6kU58vzWtV9wbJl vi3g== X-Gm-Message-State: APf1xPDDbjONb6G4tIvvzw5gU43l02Ls1R+RvVfODI6AhI6kPLs8CCDx IVicgwhR9snC96DVn+XJuD0zz/XW0mY= X-Google-Smtp-Source: AH8x225JCVzkYK+FK/45i951KdyepUoDCJEbYwFN2bEJI3j3biu+SDQtSzrgG6RKZHt2WWA1AFKvDA== X-Received: by 10.28.135.208 with SMTP id j199mr2456054wmd.151.1517937734477; Tue, 06 Feb 2018 09:22:14 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 17:22:02 +0000 Message-Id: <20180206172202.11667-7-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206172202.11667-1-leif.lindholm@linaro.org> References: <20180206172202.11667-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 6/6] EmbeddedPkg: delete unused Pcds and guids X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org 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" Delete a bunch of Pcds, a guid, and a related header file - probably Ebl related. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel --- EmbeddedPkg/EmbeddedPkg.dec | 17 -------- EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h | 42 ---------= ----------- 2 files changed, 59 deletions(-) diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index a226b4e4f2..7cb04d61b1 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -70,7 +70,6 @@ [Guids.common] [Protocols.common] gHardwareInterruptProtocolGuid =3D { 0x2890B3EA, 0x053D, 0x1643, { 0xAD= , 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } } gHardwareInterrupt2ProtocolGuid =3D { 0x32898322, 0x2da1, 0x474a, { 0xba= , 0xaa, 0xf3, 0xf7, 0xcf, 0x56, 0x94, 0x70 } } - gEfiDebugSupportPeriodicCallbackProtocolGuid =3D { 0x9546e07c, 0x2cbb, 0= x4c88, { 0x98, 0x6c, 0xcd, 0x34, 0x10, 0x86, 0xf0, 0x44 } } gEmbeddedDeviceGuid =3D { 0xbf4b9d10, 0x13ec, 0x43dd, { 0x88, 0x80, 0x= e9, 0xb, 0x71, 0x8f, 0x27, 0xde } } gEmbeddedExternalDeviceProtocolGuid =3D { 0x735F8C64, 0xD696, 0x44D0, { = 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }} gEmbeddedGpioProtocolGuid =3D { 0x17a0a3d7, 0xc0a5, 0x4635, { = 0xbb, 0xd5, 0x07, 0x21, 0x87, 0xdf, 0xe2, 0xee }} @@ -86,15 +85,6 @@ [Ppis] gEdkiiEmbeddedGpioPpiGuid =3D { 0x21c3b115, 0x4e0b, 0x470c, { 0x85, 0xc7= , 0xe1, 0x05, 0xa5, 0x75, 0xc9, 0x7b }} =20 [PcdsFeatureFlag.common] - gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x00000001 - gEmbeddedTokenSpaceGuid.PcdEmbeddedDirCmd|TRUE|BOOLEAN|0x00000002 - gEmbeddedTokenSpaceGuid.PcdEmbeddedHobCmd|TRUE|BOOLEAN|0x00000003 - gEmbeddedTokenSpaceGuid.PcdEmbeddedHwDebugCmd|TRUE|BOOLEAN|0x00000004 - gEmbeddedTokenSpaceGuid.PcdEmbeddedIoEnable|FALSE|BOOLEAN|0x00000005 - gEmbeddedTokenSpaceGuid.PcdEmbeddedScriptCmd|FALSE|BOOLEAN|0x00000006 - gEmbeddedTokenSpaceGuid.PcdEmbeddedPciDebugCmd|FALSE|BOOLEAN|0x00000041 - gEmbeddedTokenSpaceGuid.PcdEmbeddedProbeRemovable|TRUE|BOOLEAN|0x00000052 - gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|FALSE|BO= OLEAN|0x0000001b gEmbeddedTokenSpaceGuid.PcdCacheEnable|FALSE|BOOLEAN|0x00000042 gEmbeddedTokenSpaceGuid.PcdGdbSerial|FALSE|BOOLEAN|0x00000053 @@ -103,10 +93,6 @@ [PcdsFeatureFlag.common] gEmbeddedTokenSpaceGuid.PcdSataSiI3132FeatureDirectCommandIssuing|FALSE|= BOOLEAN|0x00000051 =20 [PcdsFixedAtBuild.common] - gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|L""|VOID*|0x0000= 0007 - gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07|UINT32|0x000000= 08 - gEmbeddedTokenSpaceGuid.PcdEmbeddedMemVariableStoreSize|0x10000|UINT32|0= x00000009 - gEmbeddedTokenSpaceGuid.PcdPrePiStackBase|0|UINT32|0x0000000b gEmbeddedTokenSpaceGuid.PcdPrePiStackSize|131072|UINT32|0x0000000c =20 @@ -141,9 +127,6 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|0x000= 0000|UINT64|0x00000032 gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterPeriodInNanoseconds= |0x0000000|UINT32|0x00000033 =20 -# Shell characteristics - gEmbeddedTokenSpaceGuid.PcdEmbeddedShellCharacterEcho|TRUE|BOOLEAN|0x000= 00046 - gEmbeddedTokenSpaceGuid.PcdGdbBaudRate|115200|UINT64|0x00000047 gEmbeddedTokenSpaceGuid.PcdGdbDataBits|8|UINT8|0x00000048 gEmbeddedTokenSpaceGuid.PcdGdbParity|1|UINT8|0x00000049 diff --git a/EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h b/= EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h deleted file mode 100644 index 3d95f930b9..0000000000 --- a/EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h +++ /dev/null @@ -1,42 +0,0 @@ -/** @file - Protocol is used to help implement DebugSupport.RegisterPeriodicCallback= () functionality. - This enables the DXE timer driver to support the periodic callback funct= ion so the - DebugSupport driver does not need to contain platform specific informati= on about how a timer - works. - - Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - - -#ifndef __DEBUG_SUPPORT_PERIODIC_CALLBACK_H__ -#define __DEBUG_SUPPORT_PERIODIC_CALLBACK_H__ - -#include - -typedef struct _EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL EFI_DEBUG_SUP= PORT_PERIODIC_CALLBACK_PROTOCOL; - - -// {9546E07C-2CBB-4c88-986C-CD341086F044} -#define EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL_GUID \ - { 0x9546e07c, 0x2cbb, 0x4c88, { 0x98, 0x6c, 0xcd, 0x34, 0x10, 0x86, 0xf0= , 0x44 } } - - -// -// DebugSupport protocol definition -// -struct _EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL { - EFI_PERIODIC_CALLBACK PeriodicCallback; -}; - -extern EFI_GUID gEfiDebugSupportPeriodicCallbackProtocolGuid; - -#endif --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel