From ccd8a61a8969a50c3a33704d6cab7c30b7bdd7a3 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Fri, 4 Sep 2009 11:41:44 +0300 Subject: [PATCH] Added container physical regions to cml configuration --- configs/arm.cml | 64 +++++++++++++++++++++++++++++++++++++++++ src/generic/container.c | 4 +-- 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/configs/arm.cml b/configs/arm.cml index 046ba9f..360faa7 100644 --- a/configs/arm.cml +++ b/configs/arm.cml @@ -37,6 +37,43 @@ arm_cpu_menu 'ARM CPU type' arm_platform_menu 'ARM Platform Type' drivers_menu 'Platform Drivers' arch_type 'Main architecture' +containers_menu 'Container Setup' + +CONFIG_CONTAINERS 'Number of containers' +CONFIG_CONT0_PHYS_START 'Cont0 Physical Start Address' text +Physical address that this containers starts +. + +CONFIG_CONT0_PHYS_END 'Cont0 Physical End Address' text +Physical address that this container ends +. + +CONFIG_CONT1_PHYS_START 'Cont1 Physical Start Address' text +Physical address that this containers starts +. + +CONFIG_CONT1_PHYS_END 'Cont1 Physical End Address' text +Physical address that this container ends +. + +CONFIG_CONT2_PHYS_START 'Cont2 Physical Start Address' text +physical address that this containers starts +. + +CONFIG_CONT2_PHYS_END 'Cont2 Physical End Address' text +Physical address that this container ends +. + +CONFIG_CONT3_PHYS_START 'Cont3 Physical Start Address' text +physical address that this containers starts +. + +CONFIG_CONT3_PHYS_END 'Cont3 Physical End Address' text +Physical address that this container ends +. + + + ############# # CHOICES # @@ -69,6 +106,15 @@ choices arm_platform_type ############# # MENUS # ############# +menu containers_menu + CONFIG_CONT0_PHYS_START@ + CONFIG_CONT0_PHYS_END@ + CONFIG_CONT1_PHYS_START@ + CONFIG_CONT1_PHYS_END@ + CONFIG_CONT2_PHYS_START@ + CONFIG_CONT2_PHYS_END@ + CONFIG_CONT3_PHYS_START@ + CONFIG_CONT3_PHYS_END@ menu arm_cpu_menu arm_cpu_type @@ -91,6 +137,8 @@ menu arm_menu menu main_menu arch_type arm_menu + CONFIG_CONTAINERS% + containers_menu ############# # RULES # @@ -123,6 +171,22 @@ default DRIVER_TIMER_SP804 from y default DRIVER_IRQ_PL190 from y default DRIVER_IRQ_GIC from y +# Container Rules +default CONFIG_CONTAINERS from 1 +unless CONFIG_CONTAINERS > 1 suppress CONFIG_CONT1_PHYS_START CONFIG_CONT1_PHYS_END +unless CONFIG_CONTAINERS > 2 suppress CONFIG_CONT2_PHYS_START CONFIG_CONT2_PHYS_END +unless CONFIG_CONTAINERS > 3 suppress CONFIG_CONT3_PHYS_START CONFIG_CONT3_PHYS_END + +default CONFIG_CONT0_PHYS_START from 0x40000 +default CONFIG_CONT0_PHYS_END from 0x1000000 +default CONFIG_CONT1_PHYS_START from 0x1000000 +default CONFIG_CONT1_PHYS_END from 0x2000000 +default CONFIG_CONT2_PHYS_START from 0x2000000 +default CONFIG_CONT2_PHYS_END from 0x3000000 +default CONFIG_CONT3_PHYS_START from 0x3000000 +default CONFIG_CONT3_PHYS_END from 0x4000000 + + # USELESS!! This doesnt force it to define invisible symbols as says in the manual. #when ARCH_TEST save SUBARCH_TEST PLATFORM_TEST #derive SUBARCH_TEST from ARCH_TEST diff --git a/src/generic/container.c b/src/generic/container.c index b719fc3..e3beb06 100644 --- a/src/generic/container.c +++ b/src/generic/container.c @@ -17,9 +17,7 @@ * Add irqs, exceptions */ -#define CONFIG_CONT0_PAGER_START 0x40000 -#define CONFIG_CONT0_PHYS_END 0x1000000 -#define CONFIG_CONT0_PHYS_START CONFIG_CONT0_PAGER_START +#define CONFIG_CONT0_PAGER_START CONFIG_CONT0_PHYS_START struct container_info cinfo[] = { [0] = {