aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* xen/arm: Add Exynos 4210 UART support for early printkAnthony PERARD2013-05-133-0/+81
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add Exynos 4210 UART supportAnthony PERARD2013-05-134-0/+478
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't use pl011 UART by default for early printkJulien Grall2013-05-1314-92/+285
| | | | | | | | | | | | | | | | | | | | | | | Add CONFIG_EARLY_PRINTK options in configs/arm{32,64}.mk to let the user to choose if he wants to have early output, ie before the console is initialized. This code is specific for each UART. When CONFIG_EARLY_PRINTK is enabled, Xen will only be able to run on a board with this UART. If a developper wants to add support for a new UART, he must implement the following assembly macro/define: - EALY_UART_BASE_ADDRESS: variable which contains the physical base address for the UART - early_uart_init: initialize the UART - early_uart_ready: check and wait until the UART can transmit a new character - early_uart_transmit: transmit a character For more details about the parameters of each function, see arm{32,64}/debug-pl011.inc comments. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove setup_irqJulien Grall2013-05-131-7/+2
| | | | | | | | All calls to this function in ARM code have been removed. This function SHOULD not be used. If someone calls this function, a linking error will occur. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove request_irqJulien Grall2013-05-131-9/+2
| | | | | | | | All calls to this function in ARM code have been removed. This function SHOULD not be used. If someone calls this function, a linking error will occur. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add versatile express platformJulien Grall2013-05-134-17/+43
| | | | | | | This platform contains nearly nothing specific except the reset function. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: WORKAROUND 1:1 memory mapping for dom0Julien Grall2013-05-132-0/+47
| | | | | | | | | | | | | Currently xen doesn't implement SYS MMU. When a device will talk with dom0 with DMA request the domain will use GFN instead of MFN. For instance on the arndale board, without this patch the network doesn't work. The 1:1 mapping is a workaround and MUST be remove as soon as a SYS MMU is implemented in XEN. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Allow Xen to run on multiple platform without recompilationJulien Grall2013-05-138-0/+215
| | | | | | | | | | | | | | | | | | Xen can include various platform support (ie: exynos5, versatile express...) and choose during boot time a set of callbacks for the current board. These callbacks will be called in places where each board can have specific code. For the moment the callbacks are: - platform_init: additional initialization for the platform - platform_init_time: some platform (ie: Exynos 5) needs to initialize the timer with an uncommon way - platform_specific_mapping: add mapping to dom0 which are not specified in the device tree - platform_reset: reset the platform - platform_poweroff: poweroff the platform - platform_quirks: list of quirks for a specific board. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use the device tree to map the address range and IRQ to dom0Julien Grall2013-05-133-23/+138
| | | | | | | | - gic_route_irq_to_guest takes a dt_irq instead of an IRQ number - remove hardcoded address/IRQ Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use device tree API in pl011 UART driverJulien Grall2013-05-134-25/+72
| | | | | | | | Allow UART driver to retrieve all its information in the device tree. It's possible to choose the pl011 driver via the Xen command line. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add generic UART to get the device in the device treeJulien Grall2013-05-136-3/+83
| | | | | | | | | | | | | This generic UART will find the right UART via xen command line with dtuart=myserial. "myserial" is the alias of the UART in the device tree. Xen will retrieve the information via the device tree and call the initialization function for this specific UART thanks to the device API. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: New callback in uart_driver to get device tree interrupt structureJulien Grall2013-05-133-0/+27
| | | | | | | | | | | The existing function serial_irq doesn't allow to retrieve if the interrupt is edge or level trigger. Use this function to routes IRQs for all serial ports which Xen is using to Xen. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce a generic way to use a device from the device treeJulien Grall2013-05-134-0/+134
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't hardcode virtual timer IRQsJulien Grall2013-05-133-6/+19
| | | | | | | Define virtual timer IRQs per VCPU Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't hardcode VGIC informationsJulien Grall2013-05-134-10/+39
| | | | | | | | | | | - Define VGIC base address per domain. For the moment the base addresses to dom0 base addresses. - The number of interrupt lines (ie number of SPIs) is equal to: * 0 for guests * number of host SPIs for dom0 Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Retrieve timer interrupts from the device treeJulien Grall2013-05-133-13/+61
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use hierarchical device tree to retrieve GIC informationJulien Grall2013-05-133-68/+45
| | | | | | | | - Remove early parsing for GIC addresses - Remove hard coded maintenance IRQ number Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce request_dt_irqJulien Grall2013-05-132-0/+11
| | | | | | | | This function will replace request_irq in a later patch. It takes a dt_irq as first argument instead of an unsigned int. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce setup_dt_irqJulien Grall2013-05-132-0/+9
| | | | | | | | This function will replace setup_irq in later patch. It takes a dt_irq as first argument instead of an unsigned int. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce gic_irq_xlateJulien Grall2013-05-133-0/+25
| | | | | | | | This function translates an interrupt specifier to an IRQ number and IRQ type (ie: level trigger, edge trigger,...). It's GIC specific. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce gic_route_dt_irqJulien Grall2013-05-132-0/+16
| | | | | | | | This function routes an IRQ to a specific cpu. The IRQ is retrieved via the device tree. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to retrieve an interrupt description from the device treeJulien Grall2013-05-132-0/+492
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to retrieve an address from the device treeJulien Grall2013-05-132-0/+365
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to use the device treeJulien Grall2013-05-132-34/+283
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a hierarchical device treeJulien Grall2013-05-133-5/+540
| | | | | | | | | Add function to parse the device tree and create a hierarchical tree. This code is based on drivers/of/base.c in linux source. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers ioreadl/iowritelJulien Grall2013-05-133-0/+92
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce ioremap_attr, ioremap_cache, ioremap_nocache, ioremap_wcJulien Grall2013-05-135-40/+35
| | | | | | | | | | | | Map physical range in virtual memory with a specific mapping attribute. Also add new mapping attributes for ARM: PAGE_HYPERVISOR_NOCACHE and PAGE_HYPERVISOR_WC. This function replaces early_ioremap which is only able to deal with 2Mb aligned mapping. Therefore, vmap initialization has been moved earlier. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/mm: Align virtual address on PAGE_SIZE in iounmapJulien Grall2013-05-131-1/+4
| | | | | | | | | | ioremap function can unlikely return an unaligned virtual address if the physical address itself is unaligned on a page size. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> [ ijc -- include asm/page.h to fix build error on x86 ]
* xen/arm: Extend create_xen_entries prototype to take mapping attributeJulien Grall2013-05-131-4/+5
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into stagingIan Campbell2013-05-131-1/+1
|\
| * x86/EFI: fix buildJan Beulich2013-05-131-1/+1
| | | | | | | | | | | | | | | | | | ... after f6254405 ("xen/arm: compile and initialize vmap") moving the map_pages_to_xen() declaration. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | tools/libfsimage: Fix clean and distclean make targetsDaniel Kiper2013-05-132-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a single colon for a given target and the target is redefined in another place (e.g. in included file) then make executes only new target and displays following warning: Makefile:35: warning: overriding commands for target `clean' tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25: warning: ignoring old commands for target `clean' To cope with that issue define all required targets as double-colon rules. Additionally, remove some redundant stuff. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* | docs: make 'gmake dist-docs' workChristoph Egger2013-05-134-9/+64
|/ | | | | | | | | | | | doc: buildsystem fixes - use correct pathes (make gmake dist-docs from toplevel directory work) - configure detects perl as tools/configure does Signed-off-by: Christoph Egger <chegger@amazon.de> Reviewed-by: Matthew Wilson <msw@amazon.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- reran autogen.sh ]
* xen/arm: gic_disable_cpu must be called with interrupts disabledJulien Grall2013-05-101-2/+4
| | | | | | | | | gic_disable_cpu is only called with interrupt disabled. Use spin_lock instead of spin_lock_irq and check the function is called with interrupts disabled. Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Change cd-insert docs to match behaviorGeorge Dunlap2013-05-101-1/+1
| | | | | | | xl cd-insert takes a plain file. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Switch to SYS_STATE_boot right after console setupJulien Grall2013-05-101-0/+2
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Load dtb after dom0 kernelJulien Grall2013-05-101-1/+2
| | | | | | | | | On some setup, the first linux page table is at 0x40004000. Xen will load dom0 device tree at 0x4000100. In case of the device tree is big, linux will corrupt the device tree. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Fix early_panic when EARLY_PRINTK is disabledJulien Grall2013-05-101-1/+1
| | | | | | | Even if EARLY_PRINTK is not enabled, early_panic must never return. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Bump early printk internal buffer to 512Julien Grall2013-05-101-2/+3
| | | | | | | | When debug is enabled in device tree code, some lines are bigger than 80 characters. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove duplicated GICD_ICPIDR2 definitionJulien Grall2013-05-101-1/+0
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't allow dom0 to access to vpl011 UART0 memory rangeJulien Grall2013-05-101-1/+3
| | | | | | | | | As vpl011 UART is not initialized for dom 0, when the domain tries to access to this range, a segfault will occur in Xen. The right behaviour should be a data abort for the guest. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: lr must be included in range [0-nr_lr(Julien Grall2013-05-101-1/+3
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* arm: cast int<->pointer via uintptr_tIan Campbell2013-05-101-3/+4
| | | | | | | | | | | | | | | | Fixes build on arm64: gic.c: In function ‘gic_irq_eoi’: gic.c:726:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] gic.c: In function ‘maintenance_interrupt’: gic.c:776:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] gic.c:778:64: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] cc1: all warnings being treated as errors make[3]: *** [gic.o] Error 1 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
* .gitignore: Add vim swap filesJulien Grall2013-05-102-0/+2
| | | | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- corrected .hgignore regex syntax ]
* MAINTAINERS: Change tmem maintainerKonrad Rzeszutek Wilk2013-05-101-1/+1
| | | | | | | | Konrad has graduated to becoming an maintainer in the Xen hypervisor. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* x86/mm/shadow: remove dead code for avoiding Xen entries on 32-bit tables.Tim Deegan2013-05-091-28/+21
| | | | | | | | | | | | | | | All non-external-mode (==PV) guests have 4-level pagetables now that the PAE build of Xen is gone. This patch should have no effect, since the condition it removes could never be true anyway: the l2 offset of HYPERVISOR_VIRT_START on 64-bit Xen is much higher than any l2 offset we could have seen in the tables (and indeed bigger than the 'int' type, which clang was complaining about). Actual compat PV guest xen entries are handled by the equivalent test in the 64-bit SHADOW_FOREACH_L2E() below. Reported-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Tim Deegan <tim@xen.org>
* xen/arm: handle the runstate_memory_areaStefano Stabellini2013-05-081-6/+16
| | | | | | | | Support VCPUOP_register_runstate_memory_area on ARM. Update_runstate_area on context switch. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: move VCPUOP_register_runstate_memory_area to common codeStefano Stabellini2013-05-082-28/+28
| | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: initialize vtimer offset to CNTPCTStefano Stabellini2013-05-081-2/+1
| | | | | | | | | | | Currently we initialize the vtimer offset to CNTVCT + CNTVOFF = CNTPCT - CNTVOFF + CNTVOFF = CNTPCT Simply initialize vtimer offset to CNTPCT. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: clear pending irq queues on do_psci_cpu_onStefano Stabellini2013-05-084-2/+31
| | | | | | | | | | | Don't inject irqs to vcpus that are down. Also when (re)activating a vcpu, clear the vgic and gic irq queues: we don't want to inject any irqs that couldn't be handled by the vcpu right before going offline. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>