linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shannon.zhao@linaro.org (shannon.zhao at linaro.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/13] Xen : Hide UART used by Xen
Date: Tue, 17 Nov 2015 17:56:59 +0800	[thread overview]
Message-ID: <1447754231-7772-2-git-send-email-shannon.zhao@linaro.org> (raw)
In-Reply-To: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org>

From: Shannon Zhao <shannon.zhao@linaro.org>

According to the STAO table, hide UART used by Xen from Dom0.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
 drivers/acpi/bus.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a212cef..e93806b 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -46,6 +46,7 @@ ACPI_MODULE_NAME("bus");
 struct acpi_device *acpi_root;
 struct proc_dir_entry *acpi_root_dir;
 EXPORT_SYMBOL(acpi_root_dir);
+static u64 uart_addr;
 
 #ifdef CONFIG_X86
 #ifdef CONFIG_ACPI_CUSTOM_DSDT
@@ -93,6 +94,16 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle,
 {
 	acpi_status status;
 
+	if (uart_addr) {
+		u64 addr;
+		status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
+					       &addr);
+		if (ACPI_SUCCESS(status) && (addr == uart_addr)) {
+			*sta = 0;
+			return AE_OK;
+		}
+	}
+
 	status = acpi_evaluate_integer(handle, "_STA", NULL, sta);
 	if (ACPI_SUCCESS(status))
 		return AE_OK;
@@ -1069,6 +1080,7 @@ EXPORT_SYMBOL_GPL(acpi_kobj);
 static int __init acpi_init(void)
 {
 	int result;
+	struct acpi_table_stao *stao_ptr;
 
 	if (acpi_disabled) {
 		printk(KERN_INFO PREFIX "Interpreter disabled.\n");
@@ -1081,6 +1093,16 @@ static int __init acpi_init(void)
 		acpi_kobj = NULL;
 	}
 
+	acpi_get_table(ACPI_SIG_STAO, 1,
+		       (struct acpi_table_header **)&stao_ptr);
+	if(stao_ptr->ignore_uart)
+	{
+		struct acpi_table_spcr *spcr_ptr;
+		acpi_get_table(ACPI_SIG_SPCR, 1,
+			       (struct acpi_table_header **)&spcr_ptr);
+		uart_addr = spcr_ptr->serial_port.address;
+	}
+
 	init_acpi_device_notify();
 	result = acpi_bus_init();
 	if (result) {
-- 
2.1.0

  reply	other threads:[~2015-11-17  9:56 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  9:56 [PATCH 00/13] Add ACPI support for Xen Dom0 on ARM64 shannon.zhao at linaro.org
2015-11-17  9:56 ` shannon.zhao at linaro.org [this message]
2015-11-20 16:07   ` [PATCH 01/13] Xen : Hide UART used by Xen Stefano Stabellini
2015-11-17  9:57 ` [PATCH 02/13] xen/grant-table: Move xlated_setup_gnttab_pages to common place shannon.zhao at linaro.org
2015-11-17 16:02   ` [Xen-devel] " David Vrabel
2015-11-18  4:32     ` Shannon Zhao
2015-11-18 10:38       ` David Vrabel
2015-11-18 12:25   ` Julien Grall
2015-11-18 13:34     ` Shannon Zhao
2015-11-17  9:57 ` [PATCH 03/13] arm/xen: Use xlated_setup_gnttab_pages to setup grant table shannon.zhao at linaro.org
2015-11-20 16:19   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 04/13] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio shannon.zhao at linaro.org
2015-11-17 11:16   ` Ard Biesheuvel
2015-11-17  9:57 ` [PATCH 05/13] Xen: ARM: Add support for mapping platform device mmio shannon.zhao at linaro.org
2015-11-17 16:32   ` [Xen-devel] " David Vrabel
2015-11-18  6:11     ` Shannon Zhao
     [not found]   ` <20151117143822.GH3003@char.us.oracle.com>
2015-11-18  5:48     ` Shannon Zhao
2015-11-20 16:30   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 06/13] Xen: ARM: Add support for mapping amba " shannon.zhao at linaro.org
2015-11-17 16:36   ` [Xen-devel] " David Vrabel
     [not found]   ` <20151117144040.GI3003@char.us.oracle.com>
2015-11-18  6:03     ` Shannon Zhao
2015-11-18 12:27       ` Julien Grall
2015-11-18 13:15         ` Shannon Zhao
2015-11-20 16:39   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 07/13] ARM: Xen: Document UEFI support on Xen ARM virtual platforms shannon.zhao at linaro.org
2015-11-17 16:46   ` [Xen-devel] " David Vrabel
2015-11-18  6:33     ` Shannon Zhao
2015-11-20 16:42     ` Stefano Stabellini
2015-11-17 20:44   ` Rob Herring
2015-11-18  6:24     ` Shannon Zhao
2015-11-17  9:57 ` [PATCH 08/13] Xen: EFI: Parse DT parameters for Xen specific UEFI shannon.zhao at linaro.org
2015-11-17 11:25   ` Ard Biesheuvel
2015-11-17 11:37     ` Mark Rutland
2015-11-17 12:17       ` Ard Biesheuvel
2015-11-18  6:26         ` Shannon Zhao
2015-11-20 17:04   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 09/13] ARM: Xen: Initialize Xen specific UEFI runtime services shannon.zhao at linaro.org
2015-11-17 11:28   ` Ard Biesheuvel
2015-11-17 12:17     ` Shannon Zhao
2015-11-20 16:57   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 10/13] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI shannon.zhao at linaro.org
2015-11-20 17:20   ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 11/13] xen/hvm/params: Add a new dilivery type for event-channel in HVM_PARAM_CALLBACK_IRQ shannon.zhao at linaro.org
2015-11-20 17:07   ` Stefano Stabellini
2015-11-20 17:22     ` [Xen-devel] " Andrew Cooper
2015-11-20 17:32       ` Stefano Stabellini
2015-11-17  9:57 ` [PATCH 12/13] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI shannon.zhao at linaro.org
2015-11-20 17:11   ` Stefano Stabellini
2015-11-24  3:49     ` Shannon Zhao
2015-11-17  9:57 ` [PATCH 13/13] ARM: XEN: Move xen_early_init() before efi_init() shannon.zhao at linaro.org
2015-11-20 17:30   ` Stefano Stabellini
2015-11-24  3:50     ` Shannon Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447754231-7772-2-git-send-email-shannon.zhao@linaro.org \
    --to=shannon.zhao@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).