arm: add files that are required to support the Tegra2 harmony board.
PATCH 11/14 arm: add files that are required to support the Tegra2 harmony board.
arm: add files that are required to support the Tegra2 harmony board.
xen/arch/arm/tegra/Makefile | 3 +- xen/arch/arm/tegra/entry.S | 33 ++++++++ xen/arch/arm/tegra/tegra250.c | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ xen/arch/arm/tegra/timer.c | 110 +++++++++++++++++++++++++++ xen/arch/arm/xen/cpu.c | 5 + xen/arch/arm/xen/fault.c | 1 - xen/arch/arm/xen/irq.c | 46 +++++++++++- xen/arch/arm/xen/mm.c | 24 ++++++ xen/arch/arm/xen/setup.c | 6 +- xen/arch/arm/xen/time.c | 1 - xen/drivers/char/console.c | 4 + xen/include/asm-arm/gic.h | 101 +++++++++++++++++++++++++ xen/include/asm-arm/irq.h | 3 +- xen/include/asm-arm/tegra/avp.h | 144 ++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/tegra/config.h | 7 +- xen/include/asm-arm/tegra/irqs.h | 60 +++++++++++++++ xen/include/asm-arm/tegra/smp.h | 7 + xen/include/asm-arm/tegra/tegra.h | 75 ++++++++++++++++++ xen/include/xen/irq.h | 6 + 19 files changed, 952 insertions(+), 14 deletions(-)
xen/arch/arm/tegra/Makefile +2 -1
@@ -1,1 +1,2 @@ -obj-y += dummy.o +obj-y += timer.o entry.o tegra250.o +
xen/arch/arm/tegra/entry.S new file +33 -0
@@ -0,0 +1,33 @@ +/* + * entry.S + * + * Copyright (C) 2008 Samsung Electronics + * JaeMin Ryu <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public version 2 of License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <xen/config.h> +#inlcude <asm/arch/irqs.h> +#include <asm/page.h> +#include <asm/system.h> +#include <asm/asm-macros.h> +#include <asm/cpu-domain.h> +#include <asm/asm-offsets.h> + + .align 5 + +ENTRY(arch_context_switch) + mov pc, lr +
xen/arch/arm/tegra/tegra250.c new file +330 -0
330 lines not on this page · raw message
xen/arch/arm/tegra/timer.c new file +110 -0
110 lines not on this page · raw message
xen/arch/arm/xen/cpu.c +5 -0
@@ -53,6 +53,11 @@ int __cpu_up(unsigned int cpu) {int ret =0 ; + ret =wakeup_cpu (cpu); +if (!ret) { +return -EINVAL ; + } +while (!cpu_online (cpu)) {cpu_relax ();process_pending_softirqs ();
xen/arch/arm/xen/fault.c +0 -1
@@ -33,7 +33,6 @@#include <asm/processor.h> #include <asm/guest_access.h> #include <asm/system.h> -#include <asm/memory.h> asmlinkage void __div0(void) {
xen/arch/arm/xen/irq.c +45 -1
60 lines not on this page · raw message
xen/arch/arm/xen/mm.c +24 -0
@@ -255,3 +255,27 @@ int alloc_page_map(unsigned long virt, ureturn 0 ; } +int map_pages_to_xen (unsigned long virt,unsigned long mfn,int nr,unsigned long flags) +{ +unsigned long vaddr =round_down (virt,PAGE_SIZE ); +unsigned long maddr = mfn <<PAGE_SHIFT ; +unsigned int end = virt + (nr <<PAGE_SHIFT ); + +l1e_t *l1e =l1_linear_offset_xen (vaddr); + +do { +unsigned long limit = (vaddr +SECTION_SIZE ) & (SECTION_MASK ); + limit = (limit < end) ? limit : end; + +if (((vaddr | maddr | limit) & ~SECTION_MASK ) ==0 ) { + *l1e =MK_L1E (maddr, flags); +pte_sync (l1e); + + vaddr +=SECTION_SIZE ; + maddr +=SECTION_SIZE ; + } + }while (l1e++, vaddr < end); + +return 0 ; +} +
xen/arch/arm/xen/setup.c +4 -2
@@ -64,11 +64,11 @@ static unsigned int dom0_size = 256 * 10integer_param ("dom0_size" , dom0_size);//static unsigned long dom0_image_start = 0x40B00000UL; -static unsigned long dom0_image_start =0x00B00000UL ; +static unsigned long dom0_image_start =0xA00000UL ;integer_param ("image_start" , dom0_image_start);//static unsigned long dom0_image_size = 0xA00000UL; -static unsigned long dom0_image_size =0xA00000UL ; +static unsigned long dom0_image_size =0x1400000UL ;integer_param ("image_length" , dom0_image_size);void arch_get_xen_caps (xen_capabilities_info_t *info)
@@ -211,6 +211,8 @@ asmlinkage void start_xen(void)tasklet_subsys_init (); +machine_setup (); +timer_init ();idle_domain_init ();
xen/arch/arm/xen/time.c +0 -1
@@ -79,5 +79,4 @@ void domain_set_time_offset(struct domaivoid timekeeping_init (void ) { -NOT_YET (); }
xen/drivers/char/console.c +4 -0
@@ -412,7 +412,11 @@ long do_console_io(int cmd, int count, X* ***************************************************** */ +#if defined(__arm__) +static bool_t console_locks_busted =1 ; +#else static bool_t console_locks_busted; +#endif static void __putstr (const char *str) {
xen/include/asm-arm/gic.h new file +101 -0
101 lines not on this page · raw message
xen/include/asm-arm/irq.h +1 -2
@@ -15,6 +15,7 @@#define irq_cfg (irq) (&irq_cfg[irq])#define irq_to_desc (irq) (&irq_desc[irq]) +#define desc_to_irq (desc) ((desc - &irq_desc[0]) / sizeof(struct irq_desc));#define IRQ_MAX_GUESTS 7 typedef struct {
@@ -40,8 +41,6 @@ typedef struct {DECLARE_BITMAP (_bits,NR_IRQS ); } vmask_t; -extern struct irq_desc *irq_desc; -static inline int irq_desc_initialized (struct irq_desc *desc) {return 0 ;
xen/include/asm-arm/tegra/avp.h new file +144 -0
144 lines not on this page · raw message
xen/include/asm-arm/tegra/config.h +1 -6
@@ -1,11 +1,6 @@#ifndef __TEGRA_CONFIG_H__#define __TEGRA_CONFIG_H__ -#define HZ 100 -#define CLOCK_TICK_RATE 1000000 +#define MAX_PHYS_CPUS 2 -#define MAX_PHYS_CPUS 2 - -#define BUILTIN_COMMAND_LINE_SIZE 256 -#define BUILTIN_COMMAND_LINE ""#endif
xen/include/asm-arm/tegra/irqs.h new file +60 -0
60 lines not on this page · raw message
xen/include/asm-arm/tegra/smp.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef ASMARM_ARCH_SMP_H +#define ASMARM_ARCH_SMP_H + + +#include <asm/gic.h> + +#endif
xen/include/asm-arm/tegra/tegra.h new file +75 -0
75 lines not on this page · raw message
xen/include/xen/irq.h +6 -0
@@ -95,6 +95,10 @@ int arch_init_one_irq_desc(struct irq_de#define irq_desc_initialized (desc) ((desc)->handler != NULL) +#if defined(__arm__) +extern irq_desc_t irq_desc[NR_IRQS ]; +#endif +#if defined(__ia64__)extern irq_desc_t irq_desc[NR_VECTORS ];
@@ -121,6 +125,8 @@ extern void irq_actor_none(struct irq_de#define irq_shutdown_none irq_actor_none#define irq_disable_none irq_actor_none#define irq_enable_none irq_actor_none +#define irq_ack_none irq_actor_none +#define irq_end_none irq_actor_nonestruct domain ;struct vcpu ;
arm: add files that are required to support the Tegra2 harmony board.
xen/arch/arm/tegra/Makefile | 3 +- xen/arch/arm/tegra/entry.S | 33 ++++++++ xen/arch/arm/tegra/tegra250.c | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ xen/arch/arm/tegra/timer.c | 110 +++++++++++++++++++++++++++ xen/arch/arm/xen/cpu.c | 5 + xen/arch/arm/xen/fault.c | 1 - xen/arch/arm/xen/irq.c | 46 +++++++++++- xen/arch/arm/xen/mm.c | 24 ++++++ xen/arch/arm/xen/setup.c | 6 +- xen/arch/arm/xen/time.c | 1 - xen/drivers/char/console.c | 4 + xen/include/asm-arm/gic.h | 101 +++++++++++++++++++++++++ xen/include/asm-arm/irq.h | 3 +- xen/include/asm-arm/tegra/avp.h | 144 ++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/tegra/config.h | 7 +- xen/include/asm-arm/tegra/irqs.h | 60 +++++++++++++++ xen/include/asm-arm/tegra/smp.h | 7 + xen/include/asm-arm/tegra/tegra.h | 75 ++++++++++++++++++ xen/include/xen/irq.h | 6 + 19 files changed, 952 insertions(+), 14 deletions(-)
xen/arch/arm/tegra/Makefile +2 -1
@@ -1,1 +1,2 @@ -obj-y += dummy.o +obj-y += timer.o entry.o tegra250.o +
xen/arch/arm/tegra/entry.S new file +33 -0
@@ -0,0 +1,33 @@ +/* + * entry.S + * + * Copyright (C) 2008 Samsung Electronics + * JaeMin Ryu <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public version 2 of License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <xen/config.h> +#inlcude <asm/arch/irqs.h> +#include <asm/page.h> +#include <asm/system.h> +#include <asm/asm-macros.h> +#include <asm/cpu-domain.h> +#include <asm/asm-offsets.h> + + .align 5 + +ENTRY(arch_context_switch) + mov pc, lr +
xen/arch/arm/tegra/tegra250.c new file +330 -0
330 lines not on this page · raw message
xen/arch/arm/tegra/timer.c new file +110 -0
110 lines not on this page · raw message
xen/arch/arm/xen/cpu.c +5 -0
@@ -53,6 +53,11 @@ int __cpu_up(unsigned int cpu) {int ret =0 ; + ret =wakeup_cpu (cpu); +if (!ret) { +return -EINVAL ; + } +while (!cpu_online (cpu)) {cpu_relax ();process_pending_softirqs ();
xen/arch/arm/xen/fault.c +0 -1
@@ -33,7 +33,6 @@#include <asm/processor.h> #include <asm/guest_access.h> #include <asm/system.h> -#include <asm/memory.h> asmlinkage void __div0(void) {
xen/arch/arm/xen/irq.c +45 -1
60 lines not on this page · raw message
xen/arch/arm/xen/mm.c +24 -0
@@ -255,3 +255,27 @@ int alloc_page_map(unsigned long virt, ureturn 0 ; } +int map_pages_to_xen (unsigned long virt,unsigned long mfn,int nr,unsigned long flags) +{ +unsigned long vaddr =round_down (virt,PAGE_SIZE ); +unsigned long maddr = mfn <<PAGE_SHIFT ; +unsigned int end = virt + (nr <<PAGE_SHIFT ); + +l1e_t *l1e =l1_linear_offset_xen (vaddr); + +do { +unsigned long limit = (vaddr +SECTION_SIZE ) & (SECTION_MASK ); + limit = (limit < end) ? limit : end; + +if (((vaddr | maddr | limit) & ~SECTION_MASK ) ==0 ) { + *l1e =MK_L1E (maddr, flags); +pte_sync (l1e); + + vaddr +=SECTION_SIZE ; + maddr +=SECTION_SIZE ; + } + }while (l1e++, vaddr < end); + +return 0 ; +} +
xen/arch/arm/xen/setup.c +4 -2
@@ -64,11 +64,11 @@ static unsigned int dom0_size = 256 * 10integer_param ("dom0_size" , dom0_size);//static unsigned long dom0_image_start = 0x40B00000UL; -static unsigned long dom0_image_start =0x00B00000UL ; +static unsigned long dom0_image_start =0xA00000UL ;integer_param ("image_start" , dom0_image_start);//static unsigned long dom0_image_size = 0xA00000UL; -static unsigned long dom0_image_size =0xA00000UL ; +static unsigned long dom0_image_size =0x1400000UL ;integer_param ("image_length" , dom0_image_size);void arch_get_xen_caps (xen_capabilities_info_t *info)
@@ -211,6 +211,8 @@ asmlinkage void start_xen(void)tasklet_subsys_init (); +machine_setup (); +timer_init ();idle_domain_init ();
xen/arch/arm/xen/time.c +0 -1
@@ -79,5 +79,4 @@ void domain_set_time_offset(struct domaivoid timekeeping_init (void ) { -NOT_YET (); }
xen/drivers/char/console.c +4 -0
@@ -412,7 +412,11 @@ long do_console_io(int cmd, int count, X* ***************************************************** */ +#if defined(__arm__) +static bool_t console_locks_busted =1 ; +#else static bool_t console_locks_busted; +#endif static void __putstr (const char *str) {
xen/include/asm-arm/gic.h new file +101 -0
101 lines not on this page · raw message
xen/include/asm-arm/irq.h +1 -2
@@ -15,6 +15,7 @@#define irq_cfg (irq) (&irq_cfg[irq])#define irq_to_desc (irq) (&irq_desc[irq]) +#define desc_to_irq (desc) ((desc - &irq_desc[0]) / sizeof(struct irq_desc));#define IRQ_MAX_GUESTS 7 typedef struct {
@@ -40,8 +41,6 @@ typedef struct {DECLARE_BITMAP (_bits,NR_IRQS ); } vmask_t; -extern struct irq_desc *irq_desc; -static inline int irq_desc_initialized (struct irq_desc *desc) {return 0 ;
xen/include/asm-arm/tegra/avp.h new file +144 -0
144 lines not on this page · raw message
xen/include/asm-arm/tegra/config.h +1 -6
@@ -1,11 +1,6 @@#ifndef __TEGRA_CONFIG_H__#define __TEGRA_CONFIG_H__ -#define HZ 100 -#define CLOCK_TICK_RATE 1000000 +#define MAX_PHYS_CPUS 2 -#define MAX_PHYS_CPUS 2 - -#define BUILTIN_COMMAND_LINE_SIZE 256 -#define BUILTIN_COMMAND_LINE ""#endif
xen/include/asm-arm/tegra/irqs.h new file +60 -0
60 lines not on this page · raw message
xen/include/asm-arm/tegra/smp.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef ASMARM_ARCH_SMP_H +#define ASMARM_ARCH_SMP_H + + +#include <asm/gic.h> + +#endif
xen/include/asm-arm/tegra/tegra.h new file +75 -0
75 lines not on this page · raw message
xen/include/xen/irq.h +6 -0
@@ -95,6 +95,10 @@ int arch_init_one_irq_desc(struct irq_de#define irq_desc_initialized (desc) ((desc)->handler != NULL) +#if defined(__arm__) +extern irq_desc_t irq_desc[NR_IRQS ]; +#endif +#if defined(__ia64__)extern irq_desc_t irq_desc[NR_VECTORS ];
@@ -121,6 +125,8 @@ extern void irq_actor_none(struct irq_de#define irq_shutdown_none irq_actor_none#define irq_disable_none irq_actor_none#define irq_enable_none irq_actor_none +#define irq_ack_none irq_actor_none +#define irq_end_none irq_actor_nonestruct domain ;struct vcpu ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel