From patchwork Wed Jun 24 10:25:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 50265 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 274C1228FC for ; Wed, 24 Jun 2015 10:25:47 +0000 (UTC) Received: by lbbvz5 with SMTP id vz5sf9798224lbb.1 for ; Wed, 24 Jun 2015 03:25:46 -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: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=PpHFINWnChMD32wHpfInr2kWpj9na2/LBXCr33Zc0WE=; b=HVx0tMz8a5ltzlW47q0ccZ4Uot7H0hKJ+c5iwH4KtqZhlmTmRJ31FZWsLu3APNhv19 YFZfhpMabsuxhB/vlKSL82a78AtHEXGiPjWNxT7+h1wuvhjZJelIlg215CGQVJ3Yc+XQ uEkNHUl+/dhqCkknwVmP2JJMhSuOj3qAVgF+LKvw7AkxMTbdejL5SteD2TWED3NkcF9f pkVp102MNgLJH5eBVl67XaGcLtHnSCFTHVd8xs7/QOSwc9xfZeZpLibDpKu167NqmnMz dwry4/EBhfPEeA+o2fGiTSD3qRonhQiXdFYg8EoxfWDQaOYJ1ica314gYNnf3azdQDUY m4Vw== X-Gm-Message-State: ALoCoQmjmAZU8vnSOK4/X1x9YFHNg7y0X4Z06OXtwN1gxjKTMwNLi5rxg96IMjBij6xd+jTxC9UI X-Received: by 10.112.255.66 with SMTP id ao2mr29454988lbd.15.1435141545868; Wed, 24 Jun 2015 03:25:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.7 with SMTP id m7ls183784laj.70.gmail; Wed, 24 Jun 2015 03:25:45 -0700 (PDT) X-Received: by 10.112.166.5 with SMTP id zc5mr38579982lbb.91.1435141545643; Wed, 24 Jun 2015 03:25:45 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id lp10si21677295lbb.1.2015.06.24.03.25.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2015 03:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbpo10 with SMTP id po10so23453677lbb.3 for ; Wed, 24 Jun 2015 03:25:45 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr40180991lbb.56.1435141545234; Wed, 24 Jun 2015 03:25:45 -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 hn6csp3685987lbb; Wed, 24 Jun 2015 03:25:44 -0700 (PDT) X-Received: by 10.107.169.234 with SMTP id f103mr4040651ioj.42.1435141543742; Wed, 24 Jun 2015 03:25:43 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id kb9si1016526igb.48.2015.06.24.03.25.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Jun 2015 03:25:43 -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 1Z7hs2-0006H4-HR; Wed, 24 Jun 2015 10:25:30 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z7hs0-0006Gy-Sf for edk2-devel@lists.sourceforge.net; Wed, 24 Jun 2015 10:25:28 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.169 as permitted sender) client-ip=209.85.212.169; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f169.google.com; Received: from mail-wi0-f169.google.com ([209.85.212.169]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z7hrx-000087-Gg for edk2-devel@lists.sourceforge.net; Wed, 24 Jun 2015 10:25:28 +0000 Received: by wicgi11 with SMTP id gi11so41899681wic.0 for ; Wed, 24 Jun 2015 03:25:19 -0700 (PDT) X-Received: by 10.180.82.162 with SMTP id j2mr3626613wiy.54.1435141519263; Wed, 24 Jun 2015 03:25:19 -0700 (PDT) Received: from localhost.localdomain ([185.13.106.79]) by mx.google.com with ESMTPSA id j7sm39896360wjz.11.2015.06.24.03.25.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jun 2015 03:25:18 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Wed, 24 Jun 2015 12:25:11 +0200 Message-Id: <1435141511-9700-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 X-Spam-Score: -1.4 (-) 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.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1Z7hrx-000087-Gg Subject: [edk2] [PATCH] ArmVirtPkg: signal EndOxDxe event in PlatformBsdInit 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.217.169 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 Currently, the ArmVirtPkg platforms fail to signal the end-of-DXE event 'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results in some loss of functionality, i.e., variable reclaim in the VariableDxe drivers, and the splitting of the memory regions that is part of the recently added UEFI 2.5 properties table feature. This patch adds signalling of the event to PlatformBdsInit() of the PlatformBdsLib instance for the Intel BDS. Note that the ARM BDS does signal the event, so this looks like a convenient place to put it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 35 ++++++++++++++++++++++ .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf | 1 + 2 files changed, 36 insertions(+) diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c index 499cce5dcde6..0e60409cdc73 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "IntelBdsPlatform.h" @@ -118,6 +119,23 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = { } }; +/** + An empty function to pass error checking of CreateEventEx (). + + @param Event Event whose notification function is being invoked. + @param Context Pointer to the notification function's context, + which is implementation-dependent. + +**/ +VOID +EFIAPI +EmptyCallbackFunction ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + return; +} // // BDS Platform Functions @@ -133,6 +151,23 @@ PlatformBdsInit ( VOID ) { + EFI_EVENT EndOfDxeEvent; + EFI_STATUS Status; + + // + // Signal EndOfDxe PI Event + // + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_NOTIFY, + EmptyCallbackFunction, + NULL, + &gEfiEndOfDxeEventGroupGuid, + &EndOfDxeEvent + ); + if (!EFI_ERROR (Status)) { + gBS->SignalEvent (EndOfDxeEvent); + } } diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf index d8f892642c2e..d9982167e81d 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -65,6 +65,7 @@ [Guids] gEfiFileInfoGuid gEfiFileSystemInfoGuid gEfiFileSystemVolumeLabelInfoIdGuid + gEfiEndOfDxeEventGroupGuid [Protocols] gEfiDevicePathProtocolGuid