From patchwork Tue Nov 17 09:40:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56747 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1827689lbb; Tue, 17 Nov 2015 01:49:26 -0800 (PST) X-Received: by 10.140.254.69 with SMTP id z66mr15706872qhc.5.1447753766891; Tue, 17 Nov 2015 01:49:26 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [50.57.142.19]) by mx.google.com with ESMTPS id c62si7591586qga.124.2015.11.17.01.49.25 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:49:26 -0800 (PST) Received-SPF: neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=50.57.142.19; Authentication-Results: mx.google.com; spf=neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zycs4-0007ZG-Vi; Tue, 17 Nov 2015 09:48:16 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zycs3-0007XQ-8C for xen-devel@lists.xen.org; Tue, 17 Nov 2015 09:48:15 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id DF/83-06091-ED7FA465; Tue, 17 Nov 2015 09:48:14 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-8.tower-206.messagelabs.com!1447753694!4242039!1 X-Originating-IP: [74.125.82.45] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.19.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41733 invoked from network); 17 Nov 2015 09:48:14 -0000 Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by server-8.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Nov 2015 09:48:14 -0000 Received: by wmec201 with SMTP id c201so218119206wme.0 for ; Tue, 17 Nov 2015 01:48:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nCEPGxXUzwj2Hb33Y8B8mB6XESc44p0gds2KVqpN+bU=; b=WCacxl3Ytfv0ZFnxpoFDBkldBktYwvZCP+CnzvGN4Y3vrYKLnRcq0JQsNTHicGSo2A 2+MuTTj0eAnFrmAXWTzhpiPcp6EQobwYxz1lfXpicRlQ1CSYuIb4Ys3uCM6L+tKK0M1s Z1ktoBAUAQJM23K4ftZkqNm+vAdlerUwUUJBzGOC1yJNBv9pBnUiVm0mKUJZiCNKjWwR oYQY4omhdy4VnaS7uf0VJGRfMiY0KSr87atSrWODy2JdpLDchlF53UWDlGgy8/f6YRlP jfGykNkhKQCIcKTJCOBUfxqTanTW2pywILQdpWLICFWWcMicjO70E+Xw3ByTAUHi9cvx 8apA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nCEPGxXUzwj2Hb33Y8B8mB6XESc44p0gds2KVqpN+bU=; b=dihtdKNpz1817dki+ICUILRe9/050SXwjXcAKLKMFLbtvcqDP20H5sfK38dq6z5m9G ifHlHGzNqTJT0ukaZ2KJPuF6eh7WBML4WAvNmWmdog4GnMg/6GV8j8l1FIaJEpBBaD6v PfDFZbsFG8cZy88/1zmiW5tJY88vPsMWdvKEn/rNDR21pDo9+Mk4zoqj7PnPxpzsLsCa xepRugHeCQEP2YQURsR7LoXp7yQiJkE/RFMzCZsuTFCNuhVSOzoyEIn26Dru3M+EgtL2 2GLRUIiJL2cfNM6kbVKFaYTT5Sxsv2T4q/nLJL9xqr4lnhp7K1eGNxaKe65tDqHxagLr 3yMw== X-Gm-Message-State: ALoCoQkEKUf6tGaGpRoBWPuoiWbAIty/4KGTK0kz4zq5Vo0u3KEkkovJMn8FXuyDqeNITSaKeCGk X-Received: by 10.28.24.5 with SMTP id 5mr1575648wmy.3.1447753693901; Tue, 17 Nov 2015 01:48:13 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id z4sm39001540wjz.29.2015.11.17.01.48.10 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:48:13 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, keir@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com, julien.grall@citrix.com, xen-devel@lists.xen.org Date: Tue, 17 Nov 2015 17:40:48 +0800 Message-Id: <1447753261-7552-50-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> References: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> Cc: mark.rutland@arm.com, hangaohuai@huawei.com, ard.biesheuvel@linaro.org, shannon.zhao@linaro.org, christoffer.dall@linaro.org, peter.huangpeng@huawei.com, david.vrabel@citrix.com, zhaoshenglong@huawei.com, linux-arm-kernel@lists.infradead.org, roger.pau@citrix.com Subject: [Xen-devel] [PATCH v3 49/62] arm/acpi: Map rest tables for Dom0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion 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 From: Shannon Zhao Map other reused tables for Dom0. Signed-off-by: Shannon Zhao --- xen/arch/arm/domain_build.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 6ae5761..da4e271 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1359,6 +1359,29 @@ static int prepare_dtb(struct domain *d, struct kernel_info *kinfo) #ifdef CONFIG_ACPI #define XEN_HYPERVISOR_ID 0x000058656E564D4D /* "XenVMM" */ +static void acpi_map_rest_tables(struct domain *d) +{ + int i; + unsigned long res; + u64 addr, size; + + for( i = 0; i < acpi_gbl_root_table_list.count; i++ ) + { + addr = acpi_gbl_root_table_list.tables[i].address; + size = acpi_gbl_root_table_list.tables[i].length; + res = map_regions(d, + paddr_to_pfn(addr & PAGE_MASK), + DIV_ROUND_UP(size, PAGE_SIZE), + paddr_to_pfn(addr & PAGE_MASK)); + if ( res ) + { + panic(XENLOG_ERR "Unable to map 0x%"PRIx64 + " - 0x%"PRIx64" in domain \n", + addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1); + } + } +} + static int acpi_create_rsdp(struct domain *d, struct membank tbl_add[]) { @@ -1711,6 +1734,8 @@ static int prepare_acpi(struct domain *d, struct kernel_info *kinfo) if ( rc != 0 ) return rc; + acpi_map_rest_tables(d); + return 0; } #else