From: Jiandi An <anjiandi@codeaurora.org>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@arm.com>,
sstabellini@kernel.org, shannon.zhao@linaro.org,
shankerd@codeaurora.org
Subject: Xen: ARM: Support for mapping OperationRegion in ACPI ASL
Date: Tue, 13 Dec 2016 19:14:27 -0600 [thread overview]
Message-ID: <58509CF3.5060406@codeaurora.org> (raw)
Hi Guys,
Xen currently does not handle mapping of MMIO regions specified under OperationRegion in ACPI ASL. OperationRegion is well defined in ACPI specification. I'm seeking for architectural direction on adding support for mapping OperationRegion.
Some context here. Mapping of resources specificed under _CRS in ACPI is handled by dom0 requesting Xen to map as platform devices are added. https://lwn.net/Articles/674666/ provided service xen_map_device_mmio() in dom0 to call Xen to map and it's done so by registering xen_platform_notifier() platform bus driver. This covers the platform devices.
The OperationRegion access in dom0 is in acpica path. The following is a stack of the code path where OperationRegion is parsed. acpi_ex_system_memory_space_handler() gets the parsed address specified in OperationRegion in ACPI and maps it then performs the memory read or write.
acpi_ex_system_memory_space_handler+0x378/0x424
acpi_ev_address_space_dispatch+0x294/0x310
acpi_ex_access_region+0x3c0/0x468
acpi_ex_field_datum_io+0x14c/0x380
acpi_ex_extract_from_field+0xe8/0x2f4
acpi_ex_read_data_from_field+0x330/0x38c
acpi_ex_resolve_node_to_value+0x310/0x3fc
acpi_ex_resolve_to_value+0x354/0x3e8
acpi_ds_evaluate_name_path+0xa4/0x15c
acpi_ds_exec_end_op+0xbc/0x6c8
acpi_ps_parse_loop+0x7ac/0x840
acpi_ps_parse_aml+0x1c4/0x434
acpi_ps_execute_method+0x1f0/0x2a0
acpi_ns_evaluate+0x2e4/0x424
acpi_ut_evaluate_object+0xb0/0x250
acpi_ut_execute_STA+0xb0/0x164
acpi_ns_init_one_device+0xac/0x250
acpi_ns_walk_namespace+0x108/0x254
acpi_ns_initialize_devices+0x274/0x35c
acpi_initialize_objects+0x90/0xf0
acpi_init+0xc0/0x30c
do_one_initcall+0x44/0x138
kernel_init_freeable+0x148/0x1ec
kernel_init+0x18/0x108
The workaround in testing for handling OperationRegion I did is to call xen_map_device_mmio() to map the resource specificied in OperationRegion if it's dom0 running under XEN in acpi_ex_system_memory_space_handler(). But this is a fairly generic ACPI code path. Looking for achitectural suggestion to properly handle OperationRegion for Xen on ARM.
Thanks.
--
Jiandi An
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2016-12-14 1:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 1:14 Jiandi An [this message]
2016-12-14 13:40 ` Xen: ARM: Support for mapping OperationRegion in ACPI ASL Konrad Rzeszutek Wilk
2016-12-19 23:01 ` Xen: " Stefano Stabellini
2016-12-20 7:56 ` Jan Beulich
2016-12-20 22:50 ` Stefano Stabellini
2016-12-22 7:48 ` Jan Beulich
2017-01-03 19:10 ` Stefano Stabellini
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=58509CF3.5060406@codeaurora.org \
--to=anjiandi@codeaurora.org \
--cc=julien.grall@arm.com \
--cc=shankerd@codeaurora.org \
--cc=shannon.zhao@linaro.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.