From patchwork Wed Feb 4 14:02:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 44361 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB03C2029F for ; Wed, 4 Feb 2015 14:06:51 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf1503993lbj.0 for ; Wed, 04 Feb 2015 06:06:50 -0800 (PST) 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=hYuMeeVzDVCvIRhKqsjxuWUhOQr5fb6RX5vo7zPiQRY=; b=YMPyWxc9OAS6wA8XVM/4r1gyxoGy7FgQHW+bckDPiTV1Zfxb9Z5SttDhKKdHMBlypz ye1ZjPKeQe7CFbnaFFIzouIC2zkHqbxC/t0QzTOBriejhsMaCexSY5XTU4B+3e8DnvC0 Uk4PBaSCJwj1SuE0ohNvcqClxGzd9nTTqiWeKhCinkkXUO2gauoDs6eoJA7oGDmvCfGp wI+Pm4txWy4YCP8+Nh193AJ4Hyd13F/oJr158QyE/i/aI11QTzPg3GkNZrevscWTD/hv +bRLFk5jWA8a3M0ONnkrm966WnPnrcbeYRxqrVG9EPVll2Bfkvp9v2ZRIOWfiFdSWwho prDw== X-Gm-Message-State: ALoCoQmXMSB4tZNkMIidZZWgZUUGX+Vn8SWehfpRiErqYr5BFw4rKIXn/afGUFnU9DC2SO0JmCHL X-Received: by 10.112.140.65 with SMTP id re1mr3991967lbb.4.1423058810604; Wed, 04 Feb 2015 06:06:50 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.97 with SMTP id p1ls39500laj.4.gmail; Wed, 04 Feb 2015 06:06:50 -0800 (PST) X-Received: by 10.112.98.202 with SMTP id ek10mr30717173lbb.30.1423058810367; Wed, 04 Feb 2015 06:06:50 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id b5si1462218lah.17.2015.02.04.06.06.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 06:06:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b6so1624224lbj.11 for ; Wed, 04 Feb 2015 06:06:50 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr30084844lbc.56.1423058810282; Wed, 04 Feb 2015 06:06:50 -0800 (PST) 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.35.133 with SMTP id h5csp507950lbj; Wed, 4 Feb 2015 06:06:48 -0800 (PST) X-Received: by 10.52.183.164 with SMTP id en4mr1031300vdc.61.1423058804659; Wed, 04 Feb 2015 06:06:44 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id tr5si765880vcb.4.2015.02.04.06.06.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 06:06:44 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1YJ0ab-0000Cm-78; Wed, 04 Feb 2015 14:05:57 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJ0aa-0000Ak-5V for xen-devel@lists.xen.org; Wed, 04 Feb 2015 14:05:56 +0000 Received: from [85.158.143.35] by server-3.bemta-4.messagelabs.com id A9/A0-02754-34722D45; Wed, 04 Feb 2015 14:05:55 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-15.tower-21.messagelabs.com!1423058753!12457967!1 X-Originating-IP: [209.85.220.48] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22056 invoked from network); 4 Feb 2015 14:05:54 -0000 Received: from mail-pa0-f48.google.com (HELO mail-pa0-f48.google.com) (209.85.220.48) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 4 Feb 2015 14:05:54 -0000 Received: by mail-pa0-f48.google.com with SMTP id ey11so2964660pad.7 for ; Wed, 04 Feb 2015 06:05:53 -0800 (PST) X-Received: by 10.66.62.137 with SMTP id y9mr46666677par.87.1423058753184; Wed, 04 Feb 2015 06:05:53 -0800 (PST) Received: from parthd-ubunutu.qualcomm.com ([202.46.23.62]) by mx.google.com with ESMTPSA id kg12sm2161881pbb.44.2015.02.04.06.05.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 06:05:51 -0800 (PST) From: parth.dixit@linaro.org To: xen-devel@lists.xen.org Date: Wed, 4 Feb 2015 19:32:10 +0530 Message-Id: <1423058539-26403-27-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> Cc: ian.campbell@citrix.com, julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, Parth Dixit , christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH RFC 26/35] arm : acpi read mmio tables from uefi 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.217.180 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: From: Parth Dixit For ACPI on arm device initialization is done by dom0 after parsing DSDT. xen requires mmio region information described in uefi tables for mapping it to dom0. Signed-off-by: Parth Dixit --- xen/arch/arm/efi/efi-boot.h | 16 ++++++++++++++++ xen/arch/arm/setup.c | 1 + xen/include/asm-arm/setup.h | 1 + 3 files changed, 18 insertions(+) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 639942d..535f484 100644 --- a/xen/arch/arm/efi/efi-boot.h +++ b/xen/arch/arm/efi/efi-boot.h @@ -127,6 +127,8 @@ static EFI_STATUS __init efi_process_memory_map_bootinfo(EFI_MEMORY_DESCRIPTOR * { int Index; int i = 0; + int j = 0; + EFI_MEMORY_DESCRIPTOR *desc_ptr = map; for ( Index = 0; Index < (mmap_size / desc_size); Index++ ) @@ -145,10 +147,24 @@ static EFI_STATUS __init efi_process_memory_map_bootinfo(EFI_MEMORY_DESCRIPTOR * break; } } + else if ( desc_ptr->Type == EfiMemoryMappedIO + || desc_ptr->Type == EfiMemoryMappedIOPortSpace ) + { + acpi_mmio.bank[j].start = desc_ptr->PhysicalStart; + acpi_mmio.bank[j].size = desc_ptr->NumberOfPages * EFI_PAGE_SIZE; + if ( ++j >= NR_MEM_BANKS ) + { + PrintStr(L"Warning: All "); + DisplayUint(NR_MEM_BANKS, -1); + PrintStr(L" acpi meminfo mem banks exhausted.\r\n"); + break; + } + } desc_ptr = NextMemoryDescriptor(desc_ptr, desc_size); } bootinfo.mem.nr_banks = i; + acpi_mmio.nr_banks = j; return EFI_SUCCESS; } diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 93c8a8a..930746b 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -50,6 +50,7 @@ #include struct bootinfo __initdata bootinfo; +struct meminfo __initdata acpi_mmio; struct cpuinfo_arm __read_mostly boot_cpu_data; diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h index ba5a67d..5ea9ed6 100644 --- a/xen/include/asm-arm/setup.h +++ b/xen/include/asm-arm/setup.h @@ -46,6 +46,7 @@ struct bootinfo { }; extern struct bootinfo bootinfo; +extern struct meminfo acpi_mmio; void arch_init_memory(void);