From patchwork Sun May 17 20:03:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 48664 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 12BC321411 for ; Sun, 17 May 2015 20:08:03 +0000 (UTC) Received: by lagr1 with SMTP id r1sf30603421lag.3 for ; Sun, 17 May 2015 13:08:02 -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:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=JkUegBjmHv5/b6EX2TQnULrhkAoPLwfu4VzVHZIQ/G0=; b=maPCxIhLEHAlGTcSxeX1XvOpjY+wZ9KCTEWoAcUgR5Uuxlfvy6Jo7Z+IwuvXBykwNN GlPK/dVwrs+QDErSL482iX7wUzTLvQKcShS0swxUGeqDn2fvo7VNjn8z/mxmspz1W/LI NwxUj1jeu8Yavck1ZjjjyezvbMMsNXxF5beb8R+dSPsmOprQXJkIMjcsfpbikv7ZsZcS CbaJxVmHKEWeqwi8P7I6GHXoPu/y8i9HUHWAZuAVj6ib7PkMBDsxQYOINM36v7f+92K7 6xukqQpTJE/AEsOOmUTx3hS8vY04tpT0+rwqS2jcxfh5al8iSM33Slw03VypR6qqcmgj ccQQ== X-Gm-Message-State: ALoCoQlXFb+s5wKDOxGZv1rmDZHb1gPxo713W2lsCnDU8qSSUgtMEwEyMZerZbn2qIDaJvsS8Vo0 X-Received: by 10.194.236.230 with SMTP id ux6mr15213700wjc.5.1431893282002; Sun, 17 May 2015 13:08:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls689791lac.21.gmail; Sun, 17 May 2015 13:08:01 -0700 (PDT) X-Received: by 10.152.2.227 with SMTP id 3mr14873844lax.73.1431893281679; Sun, 17 May 2015 13:08:01 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id sa9si5322016lbb.132.2015.05.17.13.08.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 13:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labbd9 with SMTP id bd9so191549369lab.2 for ; Sun, 17 May 2015 13:08:01 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr14808392lbb.36.1431893281585; Sun, 17 May 2015 13:08:01 -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 hn6csp3508537lbb; Sun, 17 May 2015 13:08:00 -0700 (PDT) X-Received: by 10.52.75.170 with SMTP id d10mr17659383vdw.49.1431893280089; Sun, 17 May 2015 13:08:00 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id yn14si8681226vdb.73.2015.05.17.13.07.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 17 May 2015 13:08:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4pQ-0003NO-TB; Sun, 17 May 2015 20:06:28 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4pP-0003Kg-QR for xen-devel@lists.xen.org; Sun, 17 May 2015 20:06:28 +0000 Received: from [193.109.254.147] by server-3.bemta-14.messagelabs.com id 64/40-03032-2C4F8555; Sun, 17 May 2015 20:06:26 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-8.tower-27.messagelabs.com!1431893184!18266750!1 X-Originating-IP: [209.85.220.51] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22010 invoked from network); 17 May 2015 20:06:25 -0000 Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by server-8.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 May 2015 20:06:25 -0000 Received: by pabts4 with SMTP id ts4so119805313pab.3 for ; Sun, 17 May 2015 13:06:23 -0700 (PDT) X-Received: by 10.66.249.198 with SMTP id yw6mr37347241pac.149.1431893183786; Sun, 17 May 2015 13:06:23 -0700 (PDT) Received: from localhost.localdomain ([117.247.24.139]) by mx.google.com with ESMTPSA id j9sm7838401pdm.53.2015.05.17.13.06.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 May 2015 13:06:23 -0700 (PDT) From: Parth Dixit To: xen-devel@lists.xen.org Date: Mon, 18 May 2015 01:33:57 +0530 Message-Id: <1431893048-5214-31-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, parth.dixit@linaro.org, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH v2 30/41] arm : acpi add placeholder for acpi load address X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: parth.dixit@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.54 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 List-Archive: EFI table, memory description table and some of acpi tables will reside in DOM0 memory. Add placeholder for starting address for loading in DOM0 and get/set acpi size helpers. Signed-off-by: Parth Dixit --- xen/arch/arm/acpi/lib.c | 12 ++++++++++++ xen/arch/arm/kernel.c | 5 ++++- xen/arch/arm/kernel.h | 1 + xen/include/asm-arm/acpi.h | 4 ++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c index fd9bfa4..9b9f059 100644 --- a/xen/arch/arm/acpi/lib.c +++ b/xen/arch/arm/acpi/lib.c @@ -1,6 +1,8 @@ #include #include +static int acpi_len = 0; + void __iomem * acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) { @@ -17,3 +19,13 @@ inline bool_t acpi_psci_hvc_present(void) { return acpi_gbl_FADT.arm_boot_flags & ACPI_FADT_PSCI_USE_HVC; } + +inline int get_acpi_size(void) +{ + return acpi_len; +} + +inline void set_acpi_size(int size) +{ + acpi_len = size; +} diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index 209c3dd..a9999f6 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "kernel.h" @@ -74,7 +75,8 @@ static void place_modules(struct kernel_info *info, const struct bootmodule *mod = info->initrd_bootmodule; const paddr_t initrd_len = ROUNDUP(mod ? mod->size : 0, MB(2)); const paddr_t dtb_len = ROUNDUP(fdt_totalsize(info->fdt), MB(2)); - const paddr_t modsize = initrd_len + dtb_len; + const paddr_t acpi_len = ROUNDUP(get_acpi_size(), MB(2)); + const paddr_t modsize = initrd_len + dtb_len + acpi_len; /* Convenient */ const paddr_t rambase = info->mem.bank[0].start; @@ -119,6 +121,7 @@ static void place_modules(struct kernel_info *info, info->dtb_paddr = modbase; info->initrd_paddr = info->dtb_paddr + dtb_len; + info->acpi_paddr = info->initrd_paddr + initrd_len; } static paddr_t kernel_zimage_place(struct kernel_info *info) diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h index 0050dfb..f3a67ac 100644 --- a/xen/arch/arm/kernel.h +++ b/xen/arch/arm/kernel.h @@ -26,6 +26,7 @@ struct kernel_info { const struct bootmodule *kernel_bootmodule, *initrd_bootmodule; paddr_t dtb_paddr; paddr_t initrd_paddr; + paddr_t acpi_paddr; /* loader to use for this kernel */ void (*load)(struct kernel_info *info); diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h index 2df9ae0..994c41e 100644 --- a/xen/include/asm-arm/acpi.h +++ b/xen/include/asm-arm/acpi.h @@ -37,11 +37,15 @@ bool_t acpi_psci_present(void); bool_t acpi_psci_hvc_present(void); void __init acpi_init_cpus(void); void __init acpi_preinit_xen_time(unsigned int generic_timer_irq[]); +int get_acpi_size(void); +void set_acpi_size(int size); #else static inline bool_t acpi_psci_present(void) { return false; } static inline bool_t acpi_psci_hvc_present(void) {return false; } static inline void acpi_init_cpus(void) { } static inline void acpi_preinit_xen_time(unsigned int generic_timer_irq[]){ } +static inline int get_acpi_size(void){return 0;} +static inline void set_acpi_size(int size){} #endif /* CONFIG_ACPI */ /* Basic configuration for ACPI */