From patchwork Tue Jun 30 13:17:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 50479 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 47C26229DF for ; Tue, 30 Jun 2015 13:18:14 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf3799392wgj.3 for ; Tue, 30 Jun 2015 06:18:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=rsmst9O4rYdfsxy6Dx9zp72QWJtsLilDRSdUUEzRhLs=; b=KNyX1DQqNgpOdvsGNf+HpHVsBCh7zHL9TYJ9sMXvBpXeGo5RJehJ4KLN687I3rptjK 9cqViTiBBOKNHFwgh+YJ4vYryZnFKLJTXtTOzY0n9rNxLIRuOmJ4Rx1FKb3h1jc6bviL cVsrSS/V55Lb9ne3BucOukj/LEKYupMhEBsGVPltTo123ZB5o8iStG2j0LVEPW2R+ztl YseGuJD0w1YGBEU/nmvBn3KYfsenU4PGjmILK57945tqwplX2EhJNbid6/2Fy5OdFsG3 IBjUpv1md9i5XRH2o/8CzVwmWOTermz2VGP9ofohvVPcJGWBvEvUqmlV1tqf/+JL1S5A QOTQ== X-Gm-Message-State: ALoCoQkizRgN5JAY/8YfmQzZd/YsVaFyzJ4iu0DJ58RDBuMD2NxkB//1QXXMtWH9b9X6UopahthR X-Received: by 10.152.2.196 with SMTP id 4mr14057528law.10.1435670293588; Tue, 30 Jun 2015 06:18:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.2 with SMTP id t2ls42637laz.8.gmail; Tue, 30 Jun 2015 06:18:13 -0700 (PDT) X-Received: by 10.112.10.138 with SMTP id i10mr12754480lbb.43.1435670293310; Tue, 30 Jun 2015 06:18:13 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id iz3si38106937lbc.174.2015.06.30.06.18.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 06:18:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lagx9 with SMTP id x9so13083472lag.1 for ; Tue, 30 Jun 2015 06:18:13 -0700 (PDT) X-Received: by 10.112.234.200 with SMTP id ug8mr19474351lbc.117.1435670292973; Tue, 30 Jun 2015 06:18:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2444475lbb; Tue, 30 Jun 2015 06:18:11 -0700 (PDT) X-Received: by 10.50.132.70 with SMTP id os6mr25007128igb.27.1435670291324; Tue, 30 Jun 2015 06:18:11 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id z8si18392641ick.41.2015.06.30.06.18.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 06:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z9vQD-00029h-9k; Tue, 30 Jun 2015 13:17:57 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z9vQC-00029c-0q for edk2-devel@lists.sourceforge.net; Tue, 30 Jun 2015 13:17:56 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.179 as permitted sender) client-ip=209.85.212.179; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f179.google.com; Received: from mail-wi0-f179.google.com ([209.85.212.179]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z9vQA-0005Tl-7a for edk2-devel@lists.sourceforge.net; Tue, 30 Jun 2015 13:17:55 +0000 Received: by wiga1 with SMTP id a1so98041900wig.0 for ; Tue, 30 Jun 2015 06:17:48 -0700 (PDT) X-Received: by 10.194.78.110 with SMTP id a14mr41202742wjx.87.1435670268135; Tue, 30 Jun 2015 06:17:48 -0700 (PDT) Received: from localhost.localdomain ([185.13.106.91]) by mx.google.com with ESMTPSA id lk5sm16980848wic.24.2015.06.30.06.17.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 06:17:47 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, jiewen.yao@intel.com Date: Tue, 30 Jun 2015 15:17:32 +0200 Message-Id: <1435670255-4106-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435670255-4106-1-git-send-email-ard.biesheuvel@linaro.org> References: <1435670255-4106-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1Z9vQA-0005Tl-7a Cc: matt.fleming@intel.com Subject: [edk2] [PATCH 2/5] MdeModulePkg: make internal functions STATIC in Core/Dxe/Misc/PropertiesTable.c X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add STATIC to functions that are only used internally. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c index 24240113659d..9459c6bda337 100644 --- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c @@ -94,6 +94,7 @@ EFI_LOCK mPropertiesTableLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTI @return The number of bytes associated with the number of EFI_PAGEs specified by Pages. **/ +STATIC UINT64 EfiPagesToSize ( IN UINT64 Pages @@ -113,6 +114,7 @@ EfiPagesToSize ( by Size. **/ +STATIC UINT64 EfiSizeToPages ( IN UINT64 Size @@ -124,6 +126,7 @@ EfiSizeToPages ( /** Acquire memory lock on mPropertiesTableLock. **/ +STATIC VOID CoreAcquirePropertiesTableLock ( VOID @@ -135,6 +138,7 @@ CoreAcquirePropertiesTableLock ( /** Release memory lock on mPropertiesTableLock. **/ +STATIC VOID CoreReleasePropertiesTableLock ( VOID @@ -151,6 +155,7 @@ CoreReleasePropertiesTableLock ( @param MemoryMapSize Size, in bytes, of the MemoryMap buffer. @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. **/ +STATIC VOID SortMemoryMap ( IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, @@ -195,6 +200,7 @@ SortMemoryMap ( it is the size of new memory map after merge. @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. **/ +STATIC VOID MergeMemoryMap ( IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, @@ -242,6 +248,7 @@ MergeMemoryMap ( @param MemoryMapSize Size, in bytes, of the MemoryMap buffer. @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. **/ +STATIC VOID EnforceMemoryMapAttribute ( IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, @@ -283,6 +290,7 @@ EnforceMemoryMapAttribute ( @return first image record covered by [buffer, length] **/ +STATIC IMAGE_PROPERTIES_RECORD * GetImageRecordByAddress ( IN EFI_PHYSICAL_ADDRESS Buffer, @@ -327,6 +335,7 @@ GetImageRecordByAddress ( @param OldRecord A pointer to one old memory map entry. @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. **/ +STATIC UINTN SetNewRecord ( IN IMAGE_PROPERTIES_RECORD *ImageRecord, @@ -422,6 +431,7 @@ SetNewRecord ( @retval 0 no entry need to be splitted. @return the max number of new splitted entries **/ +STATIC UINTN GetMaxSplitRecordCount ( IN EFI_MEMORY_DESCRIPTOR *OldRecord @@ -467,6 +477,7 @@ GetMaxSplitRecordCount ( @retval 0 no entry is splitted. @return the real number of splitted record. **/ +STATIC UINTN SplitRecord ( IN EFI_MEMORY_DESCRIPTOR *OldRecord, @@ -595,6 +606,7 @@ SplitRecord ( the current memory map. @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. **/ +STATIC VOID SplitTable ( IN OUT UINTN *MemoryMapSize, @@ -705,6 +717,7 @@ SplitTable ( @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. **/ +STATIC EFI_STATUS EFIAPI CoreGetMemoryMapPropertiesTable ( @@ -766,6 +779,7 @@ CoreGetMemoryMapPropertiesTable ( @param SectionAlignment PE/COFF section alignment **/ +STATIC VOID SetPropertiesTableSectionAlignment ( IN UINT32 SectionAlignment @@ -787,6 +801,7 @@ SetPropertiesTableSectionAlignment ( @param FirstImageRecordCodeSection first code section in image record @param SecondImageRecordCodeSection second code section in image record **/ +STATIC VOID SwapImageRecordCodeSection ( IN IMAGE_PROPERTIES_RECORD_CODE_SECTION *FirstImageRecordCodeSection, @@ -810,6 +825,7 @@ SwapImageRecordCodeSection ( @param ImageRecord image record to be sorted **/ +STATIC VOID SortImageRecordCodeSection ( IN IMAGE_PROPERTIES_RECORD *ImageRecord @@ -860,6 +876,7 @@ SortImageRecordCodeSection ( @retval TRUE image record is valid @retval FALSE image record is invalid **/ +STATIC BOOLEAN IsImageRecordCodeSectionValid ( IN IMAGE_PROPERTIES_RECORD *ImageRecord @@ -916,6 +933,7 @@ IsImageRecordCodeSectionValid ( @param FirstImageRecord first image record. @param SecondImageRecord second image record. **/ +STATIC VOID SwapImageRecord ( IN IMAGE_PROPERTIES_RECORD *FirstImageRecord, @@ -942,6 +960,7 @@ SwapImageRecord ( /** Sort image record based upon the ImageBase from low to high. **/ +STATIC VOID SortImageRecord ( VOID @@ -987,6 +1006,7 @@ SortImageRecord ( /** Dump image record. **/ +STATIC VOID DumpImageRecord ( VOID @@ -1205,6 +1225,7 @@ Finish: @return image record **/ +STATIC IMAGE_PROPERTIES_RECORD * FindImageRecord ( IN EFI_PHYSICAL_ADDRESS ImageBase,