29 Commits
Author SHA1 Message Date
Edgar E. Iglesias 900a8717ff xen/arm: zynqmp: Remove blacklist of ZynqMP's PM node
Stop blacklisting ZynqMP's power management node. It is now possible
since we allow the hardware domain to issue HVC/SMC calls to firmware.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
2018-12-19 13:48:51 +00:00
Edgar E. Iglesias 0dd0734a44 xen/arm: zynqmp: implement zynqmp_eemi
zynqmp_eemi uses the defined functions and structs to decide whether to
make a call to the firmware, or to simply return a predefined value.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
2018-12-19 13:48:51 +00:00
Edgar E. Iglesias 1417b6a8ad xen/arm: zynqmp: introduce zynqmp specific defines
Introduce zynqmp specific defines for the firmware calls.
See EEMI:
https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf

The error codes are described, under XIlPM Error Codes:
https://www.xilinx.com/support/documentation/user_guides/ug1137-zynq-ultrascale-mpsoc-swdev.pdf

- pm_api_id
These are the EEMI function IDs. Unavoidable.

- pm_ret_status
These are the EEMI return statuses. Unavoidable.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
2018-12-19 13:48:51 +00:00
Edgar E. Iglesias 3e7a3500e8 xen/arm: zynqmp: Forward plaform specific firmware calls
Introduce zynqmp_eemi: a function responsible for implementing access
controls over the firmware calls. Only calls that are allowed are
forwarded to the firmware.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2018-12-19 13:48:51 +00:00
Edgar E. Iglesias d5608349ba xen/arm: introduce platform_smc
Introduce platform_smc as a way to handle firmware calls that Xen does
not know about in a platform specific way. This is particularly useful
for implementing the SiP (SoC implementation specific) service calls.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2018-12-19 13:48:51 +00:00
Edgar E. Iglesias 5a44ff111d xen/arm: acpi: Relax hw domain mapping attributes to p2m_mmio_direct_c
Since the hardware domain is a trusted domain, we extend the
trust to include making final decisions on what attributes to
use when mapping memory regions.

For ACPI configured hardware domains, this patch relaxes the hardware
domains mapping attributes to p2m_mmio_direct_c. This will allow the
hardware domain to control the attributes via its S1 mappings.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2017-01-31 14:14:29 -08:00
Edgar E. Iglesias a24021e664 Revert "xen/arm: Map mmio-sram nodes as un-cached memory"
This reverts commit 1e75ed8b64.

The default attribute mapping for MMIO as been relaxed and now rely on
the hardware domain to set the correct memory attribute

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2017-01-31 14:14:28 -08:00
Edgar E. Iglesias 18d500642f xen/arm: dt: Relax hw domain mapping attributes to p2m_mmio_direct_c
Since the hardware domain is a trusted domain, we extend the
trust to include making final decisions on what attributes to
use when mapping memory regions.

For device-tree configured hardware domains, this patch relaxes
the hardware domains mapping attributes to p2m_mmio_direct_c.
This will allow the hardware domain to control the attributes
via its S1 mappings.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2017-01-31 14:14:27 -08:00
Edgar E. Iglesias fc658208e0 tools/xenstat: Don't disable xentop when cross-compiling
This partially reverts 16504669c5
since xentop cross-compiles fine.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-12-16 10:57:45 +00:00
Edgar E. Iglesias 119d7157ca tools/xenstat: Remove redundant check for curses.h
This check for curses.h does not consider cross-compilation.
It only checks host paths.

Luckily, commit 65da491321
introduced proper configure checks for ncurses so we can
remove the redundant check in the Makefile.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-12-16 10:57:23 +00:00
Edgar E. Iglesias d96ea24492 xen/arm: Disable the Cortex-a53-edac
Disable the Cortex-a53-edac. Xen currently does not yet
handle reads/writes to the implementation defined CPUMERRSR
register.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2016-10-12 15:01:38 +01:00
Edgar E. Iglesias 1e75ed8b64 xen/arm: Map mmio-sram nodes as un-cached memory
Map mmio-sram nodes as un-cached memory. If the node
has set the no-memory-wc property, we map it as device.

The DTS bindings for mmio-sram nodes can be found in the
Linux tree under Documentation/devicetree/bindings/sram/sram.txt.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2016-09-27 18:28:01 -07:00
Edgar E. Iglesias 9eed361acd xen/arm: domain_build: Plumb for different mapping attributes
Add plumbing for passing around mapping attributes.
Nodes that don't specifically state their type will inherit
their type from their parent.

This is in preparation for allowing us to differentiate the attributes
for specific device nodes.

We still use the same DEVICE mappings for all nodes so this
patch has no functional change.

Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2016-09-27 18:27:45 -07:00
Edgar E. Iglesias cef9cf36c8 xen/device-tree: Make dt_match_node match props
Make dt_match_node match for a single existing property.
We only search for the existence of the property, not
for specific values.

Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2016-09-27 18:27:35 -07:00
Edgar E. Iglesias ca1a2e956f xen/device-tree: Add __DT_MATCH macros without braces
Add __DT_MATCH macros without braces to allow the creation
of match descriptors with multiple combined match options.

Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2016-09-27 18:27:30 -07:00
Edgar E. Iglesias 0e7f5f9367 xen/arm: Rename and generalize un/map_regions_rw_cache
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Rename and generalize un/map_regions_rw_cache into
un/map_regions_p2mt. The new functions take the mapping
attributes as an argument.

No functional change.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2016-09-27 18:27:10 -07:00
Edgar E. Iglesias 8ff10a0baa xen/arm: p2m: Add support for normal non-cacheable memory
Add support for describing normal non-cacheable memory.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2016-09-27 18:26:08 -07:00
Edgar E. Iglesias 1951d4975c xen/arm: p2m: Rename p2m_mmio_direct_nc -> p2m_mmio_direct_dev
Rename p2m_mmio_direct_nc to p2m_mmio_direct_dev to better
express that we are mapping device memory. This will allow us
to use p2m_mmio_direct_nc for Normal Non-Cached mappings.

No functional change.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2016-09-27 18:25:53 -07:00
Edgar E. Iglesias c32381352c xen/device-tree: Do not remap IRQs for secondary IRQ controllers
Do not remap IRQs connected to secondary interrupt controllers.
These IRQs have no meaning to us until they connect to the
primary controller.

Secondary IRQ controllers will at some point connect to the
primary controller (possibly via other IRQ controllers). We
map the IRQs at that last connection point.

Reviewed-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2016-05-17 18:27:04 +01:00
Edgar E. Iglesias efc904263f xen/arm: Re-add the Xilinx ZynqMP platform
Re-add the Xilinx ZynqMP platform. This time include a
blacklisted zynqmp-pm (Power Management) device that does
not yet play nicely with Xen.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-03-15 14:14:07 -04:00
Edgar E. Iglesias 58cd994c6b MAINTAINERS: Add xen/drivers/char/cadence-uart.c
Add xen/drivers/char/cadence-uart.c to the ARM section.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-15 15:37:29 +00:00
Edgar E. Iglesias 67f7afd26f xen/arm: Add r1p12 to the list of supported Cadence UARTs
Add r1p12 to the list of supported Cadence UARTs. Xen only
uses the subset of features available in r1p8, so we don't
need to differentiate between r1p8 and r1p12 yet.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-15 15:36:22 +00:00
Edgar E. Iglesias 3de112bcac xen/iommu: arm: Use p2m_ipa_bits as stage2 input size
The Stage2 input-size must match what the CPU uses because
the SMMU and the CPU share page-tables.

Test that the SMMU supports the P2M IPA bit size, use it if
supported or bail out if not.

Reviewed-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-05-13 14:49:43 +01:00
Edgar E. Iglesias cb493c7141 xen/arm: Add p2m_ipa_bits
Export p2m_ipa_bits holding the bit size of IPAs used in p2m tables.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
2015-05-13 14:49:39 +01:00
Edgar E. Iglesias a1ce81ca26 xen/arm: Re-order iommu_setup to after setup_virt_paging
This is needed to allow the paging setup to probe for
IPA bit sizes to be used in p2m tables prior to iommu setup.

Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2015-05-13 14:49:09 +01:00
Edgar E. Iglesias a91fce8c26 xen/arm: Don't write to GICH_MISR
GICH_MISR is read-only in GICv2.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-04-15 16:02:33 +01:00
Edgar E. Iglesias e1eb56fb6b xen/arm: Remove warning for platforms without platform specific code
Replace the warning with an info message stating that the platform
is generic.

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-03-11 12:57:53 +00:00
Edgar E. Iglesias d6ccfe6ba0 xen/arm: Add Xilinx ZynqMP early printk support
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-03-11 12:39:10 +00:00
Edgar E. Iglesias ed6f3aec05 xen/arm: Add Xilinx ZynqMP platform support
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- resorted list in Makefile, moving thunderx entry ]
2015-03-11 12:38:43 +00:00