From patchwork Wed Nov 28 14:33:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152274 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1163922ljp; Wed, 28 Nov 2018 06:34:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/VPMRnztvwx4U/bZWO9J8hzLsnb7RojpcR5i5QyQYELKav2CkOrv7Jgx2vfDGODrxLWomYS X-Received: by 2002:a17:902:4681:: with SMTP id p1mr37176328pld.184.1543415652652; Wed, 28 Nov 2018 06:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543415652; cv=none; d=google.com; s=arc-20160816; b=yVEBSBrkTHO5yspjA/cxuLdrsqxbOkRNMGCtfnvANyTTjR2Vfiedasaa6/HzO1lv5d 4z2OnXMhM4WZ3lRQMVrCKhA84WOy5WjbXnsPaFh6L3BIbifwSNTmXycnHmnzpVvqSxyX 0H10XMXQULtb5TN5GnyqEGwvozDLHWzIgd98RRZtHgnyX4dZ0S97GYzyZd7NH7Te/91P /e/QNbvoIxRKX/mkm4KvLAPCb5giomUpLTe8Ltz2g/PRsUjOLoMnnwLiw2kiz8l/c0oz 9VuYXqNOSTR0K1eZfixDK60jfN5oNGyi15/v+u/ieghpaNq55wWXAQKbiry42lfX9W/G bpYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=hw1VCc2AQjkyCWNys/+xVJiA2Not537YRCvS8NhLqis=; b=gaAoVsyTljXdCEl8+X2Mo3iYXBECX3Q2cgJ3Mn0rEo6U+u11ywUcuw4ssLvKrvobV1 y0tzWEz0oZeitM/XNqJshW0Roz6dZTXotzHtLK+L9dFJjUfhumYzWMdR1wi4aNxhUkjH 4Qc0I4CsmJijHPZVcpRCOEhH8Fn0/UjSNwfZFnNu1aAy7GWWAy7+Hv4HBkLtl4EFl0qT jqzd1nzbLIYogVsq5rPo9tNAa8+aq3uX1e2EF2XGUD05aLhrVAC7lzSxAlZWQmXwgNH5 kQuo/eEqOxxTtGXAjQxZuE0jXmsEsCtDzNaOqt+nunjkTa4XxG51r6H5MIeFPczHFlNv AEWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LL5TW2CX; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id y6si7911049pfi.228.2018.11.28.06.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LL5TW2CX; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C352721196210; Wed, 28 Nov 2018 06:34:10 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 1A53C21962301 for ; Wed, 28 Nov 2018 06:34:09 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 125so2879435wmh.0 for ; Wed, 28 Nov 2018 06:34:08 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=BBMGLk7llGWLq/gTu49g1poV6To6RM0+rommnYLhx6c=; b=LL5TW2CXcbFnLN5KtvH3O744rqFD/KEm5uAZKWwDMJT4sYsquojkXJp1IqrYgYS+5G jzfmdyLFhu6D2zvMDV7mu9GtU70jVhnSyAVz8UlOhPqNKk2rLzi8juK3s3VRrAMcDbHn jS7jsac1mKx941nTS+gy8n3IMLQB1K0frig+0= 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:mime-version:content-transfer-encoding; bh=BBMGLk7llGWLq/gTu49g1poV6To6RM0+rommnYLhx6c=; b=WAq6kne4wlJjwSLAjmSt5U3w+sp/PNAh1YrjTnzOpFhtPYLRR+dEwTrgxhzjKI+frB tg5abg3FS1IkslK3V0/mYocDoxj6k9zMXJvGmdPbLVl1NSy2dl/kZN0IXm4pudbmKS6u hYQuk5AVUhhLJQv2aFUNPx7bz2OVfiKTQulXVGj7eQ+0OgKHFjpWojyb6705d5LFtdU/ EUSuVNg/LFb/mVKOg3SkM1Vhn62h0NCzizrIlidlrR5xSxL2ToZ7VDNjbtTRqSbHkxul YbVIoI04eg8gchaOkaM6f9G11aZ4n8ZpRfYH3G2GcL0As8Fj39R8f5MnF+LldcYA00r0 Bszw== X-Gm-Message-State: AA+aEWYpYHyAuH6txFfy3HMMxya0NLyRuGmidPNPg765AEHglxRAsxyt jHY9eDCkwV4R5RhRu36Joyivl1moUuE= X-Received: by 2002:a7b:c315:: with SMTP id k21mr2862211wmj.145.1543415646687; Wed, 28 Nov 2018 06:34:06 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:296f:238b:c20d:3626]) by smtp.gmail.com with ESMTPSA id 6sm3391891wmk.26.2018.11.28.06.34.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:05 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 28 Nov 2018 15:33:43 +0100 Message-Id: <20181128143357.991-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128143357.991-1-ard.biesheuvel@linaro.org> References: <20181128143357.991-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH v3 02/16] EmbeddedPkg/PrePiHobLib: drop CreateHobList() from library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Laszlo Ersek Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Drop the declaration and the implementation of CreateHoblist(), which is not used anywhere. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- EmbeddedPkg/Include/Library/PrePiLib.h | 18 --------- EmbeddedPkg/Library/PrePiHobLib/Hob.c | 41 -------------------- 2 files changed, 59 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm diff --git a/EmbeddedPkg/Include/Library/PrePiLib.h b/EmbeddedPkg/Include/Library/PrePiLib.h index cf70fca3b619..a857308ecec2 100644 --- a/EmbeddedPkg/Include/Library/PrePiLib.h +++ b/EmbeddedPkg/Include/Library/PrePiLib.h @@ -274,24 +274,6 @@ HobConstructor ( IN VOID *EfiFreeMemoryTop ); -/** - Retrieves the magic value from the PE/COFF header. - - @param Hdr The buffer in which to return the PE32, PE32+, or TE header. - - @return EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC - Image is PE32 - @return EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC - Image is PE32+ - -**/ -VOID -CreateHobList ( - IN VOID *MemoryBegin, - IN UINTN MemoryLength, - IN VOID *HobBase, - IN VOID *StackBase - ); - - /** This service enables PEIMs to create various types of HOBs. diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c index aff8ea05797b..ba16899a9184 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c @@ -175,47 +175,6 @@ BuildResourceDescriptorHob ( Hob->ResourceLength = NumberOfBytes; } -/** - - -**/ -VOID -CreateHobList ( - IN VOID *MemoryBegin, - IN UINTN MemoryLength, - IN VOID *HobBase, - IN VOID *StackBase - ) -{ - EFI_HOB_HANDOFF_INFO_TABLE *Hob; - EFI_RESOURCE_ATTRIBUTE_TYPE Attributes; - - Hob = HobConstructor (MemoryBegin,MemoryLength,HobBase,StackBase); - SetHobList (Hob); - - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); - - Attributes =( - EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - EFI_RESOURCE_ATTRIBUTE_TESTED | - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE - ); - - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, Attributes, (UINTN)MemoryBegin, MemoryLength); - - BuildStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN)StackBase, ((UINTN)MemoryBegin + MemoryLength) - (UINTN)StackBase); - - if (FeaturePcdGet (PcdPrePiProduceMemoryTypeInformationHob)) { - // Optional feature that helps prevent EFI memory map fragmentation. - BuildMemoryTypeInformationHob (); - } -} - - VOID EFIAPI BuildFvHobs (