From patchwork Mon Jul 6 20:25:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 50794 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE108218EA for ; Mon, 6 Jul 2015 20:25:29 +0000 (UTC) Received: by wizo10 with SMTP id o10sf2761757wiz.0 for ; Mon, 06 Jul 2015 13:25:29 -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=8xlaASx5NpnjUrFD5Q4PemgXfvv9rczPfyceEIRmF1I=; b=DHR4PIrnRFoS1x9tcjiETJM89urCgf6ZhxGRj38P991yX25Rug+GrubxqVec+OL7Pz /PJY+ufy+zNTdlxj4HIJpCFDWGhz9rMS+jPoZD0acMgEss8vzFLI90M/UAuQqeVD+z6F qzQS780aPP/pVVikCwMkLoAty/vJOZ6IwijMpV1uNvtwRG21dNo1Z6dvS6zLM8Kusm+C pjjHKMpezcl8Ik49DWhzRh0UvyLxIEeoQduxzygpK5MADXaknaQRUSPIDFLzm/OiUpMa j7b/fHhSdAaKNDHHeCdHl4/8zHOIaple+oXB6zL+zE3wwSwcgXfdqNbDEIlnzdKUqH9p 9H5A== X-Gm-Message-State: ALoCoQkW7dzU/0A9IA9Kw2czrwrN8HKMs7kl+9tcNdnAGqF6LW98DjXBZobmrn+PsQzbfcdD6g/a X-Received: by 10.180.198.9 with SMTP id iy9mr1690941wic.7.1436214329075; Mon, 06 Jul 2015 13:25:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.206 with SMTP id q14ls623558lal.58.gmail; Mon, 06 Jul 2015 13:25:28 -0700 (PDT) X-Received: by 10.152.170.234 with SMTP id ap10mr672990lac.28.1436214328782; Mon, 06 Jul 2015 13:25:28 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id qq9si16145268lbc.143.2015.07.06.13.25.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 13:25:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagx9 with SMTP id x9so169797621lag.1 for ; Mon, 06 Jul 2015 13:25:28 -0700 (PDT) X-Received: by 10.152.1.40 with SMTP id 8mr669709laj.56.1436214328566; Mon, 06 Jul 2015 13:25:28 -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 hn6csp1947617lbb; Mon, 6 Jul 2015 13:25:27 -0700 (PDT) X-Received: by 10.107.10.231 with SMTP id 100mr1057120iok.41.1436214327064; Mon, 06 Jul 2015 13:25:27 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id d63si17792539ioe.56.2015.07.06.13.25.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 06 Jul 2015 13:25:27 -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-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCCx0-0003jP-BS; Mon, 06 Jul 2015 20:25:14 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCCwz-0003jK-SE for edk2-devel@lists.sourceforge.net; Mon, 06 Jul 2015 20:25:13 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f42.google.com; Received: from mail-wg0-f42.google.com ([74.125.82.42]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1ZCCwy-0007Bu-V9 for edk2-devel@lists.sourceforge.net; Mon, 06 Jul 2015 20:25:13 +0000 Received: by wgjx7 with SMTP id x7so149988235wgj.2 for ; Mon, 06 Jul 2015 13:25:07 -0700 (PDT) X-Received: by 10.194.192.166 with SMTP id hh6mr1152198wjc.127.1436214306921; Mon, 06 Jul 2015 13:25:06 -0700 (PDT) Received: from ards-macbook-pro.arnhem.chello.nl (dhcp-077-250-063-167.chello.nl. [77.250.63.167]) by mx.google.com with ESMTPSA id c2sm29866416wjf.18.2015.07.06.13.25.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 13:25:05 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, olivier.martin@arm.com, lersek@redhat.com Date: Mon, 6 Jul 2015 22:25:01 +0200 Message-Id: <1436214301-22879-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 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 X-Headers-End: 1ZCCwy-0007Bu-V9 Subject: [edk2] [PATCH] ArmVirtPkg: adapt ArmVirtXen build to system memory end global variable 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.44 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 This fixes the ArmVirtXen build that was broken by r17835, which adds a global variable mSystemMemoryEnd which is shared between a module and a library it depends on. Add the same global variable to the relocatable PrePi used by ArmVirtXen. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- This fixes the build for ArmVirtXen, although I would have preferred a different approach for r17835 in the first place, i.e., a clean interface rather than a global which is declared as an extern in random places. diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S index 568d0086d662..0adaf44c9ed9 100644 --- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -25,8 +25,10 @@ GCC_ASM_IMPORT(ArmReadMpidr) GCC_ASM_IMPORT(ArmPlatformPeiBootAction) GCC_ASM_IMPORT(ArmPlatformStackSet) GCC_ASM_EXPORT(_ModuleEntryPoint) +GCC_ASM_EXPORT(mSystemMemoryEnd) StartupAddr: .8byte ASM_PFX(CEntryPoint) +mSystemMemoryEnd: .8byte 0 ASM_PFX(_ModuleEntryPoint): // @@ -80,6 +82,8 @@ _SetupStackPosition: ldr x2, PcdGet64 (PcdSystemMemorySize) sub x2, x2, #1 add x1, x1, x2 // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize + adr x2, mSystemMemoryEnd + str x1, [x2] // Calculate Top of the Firmware Device ldr x2, PcdGet64 (PcdFdBaseAddress) diff --git a/ArmVirtPkg/PrePi/PrePi.h b/ArmVirtPkg/PrePi/PrePi.h index 517429fab9a4..15b91e49c9bd 100644 --- a/ArmVirtPkg/PrePi/PrePi.h +++ b/ArmVirtPkg/PrePi/PrePi.h @@ -29,6 +29,8 @@ #define SerialPrint(txt) SerialPortWrite (txt, AsciiStrLen(txt)+1); +extern UINT64 mSystemMemoryEnd; + RETURN_STATUS EFIAPI TimerConstructor (