mirror of
https://github.com/drasko/codezero.git
synced 2026-01-21 15:23:15 +01:00
Merge branch 'master' into linux
This commit is contained in:
@@ -304,6 +304,13 @@ CONT%(cn)d_VIRT5_END 'Container %(cn)d Virtual Region 5 End Address'
|
||||
CONT%(cn)d_PAGER_LMA 'Container %(cn)d Pager LMA'
|
||||
CONT%(cn)d_PAGER_VMA 'Container %(cn)d Pager VMA'
|
||||
CONT%(cn)d_PAGER_SIZE 'Container %(cn)d Pager Initial Map Size (Optional)'
|
||||
CONT%(cn)d_PAGER_SHM_START 'Container %(cn)d Shared Mappings Region Start'
|
||||
CONT%(cn)d_PAGER_SHM_END 'Container %(cn)d Shared Mappings Region End'
|
||||
CONT%(cn)d_PAGER_TASK_START 'Container %(cn)d Task Address Space Region Start'
|
||||
CONT%(cn)d_PAGER_TASK_END 'Container %(cn)d Task Address Space Region End'
|
||||
CONT%(cn)d_PAGER_UTCB_START 'Container %(cn)d UTCB Mappings Region Start'
|
||||
CONT%(cn)d_PAGER_UTCB_END 'Container %(cn)d UTCB Mappings Region End'
|
||||
|
||||
CONT%(cn)d_LINUX_PAGE_OFFSET 'Container %(cn)d Linux PAGE_OFFSET Parameter'
|
||||
CONT%(cn)d_LINUX_PHYS_OFFSET 'Container %(cn)d Linux PHYS_OFFSET Parameter'
|
||||
CONT%(cn)d_LINUX_MAPSIZE 'Container %(cn)d Linux Initial Kernel Map Size Parameter'
|
||||
@@ -311,6 +318,13 @@ CONT%(cn)d_LINUX_MAPSIZE 'Container %(cn)d Linux Initial Kernel Map Size Paramet
|
||||
default CONT%(cn)d_PAGER_LMA from 0x0
|
||||
default CONT%(cn)d_PAGER_VMA from 0x0
|
||||
default CONT%(cn)d_PAGER_SIZE from 0x0
|
||||
default CONT%(cn)d_PAGER_SHM_START from 0x0
|
||||
default CONT%(cn)d_PAGER_SHM_END from 0x0
|
||||
default CONT%(cn)d_PAGER_TASK_START from 0x0
|
||||
default CONT%(cn)d_PAGER_TASK_END from 0x0
|
||||
default CONT%(cn)d_PAGER_UTCB_START from 0x0
|
||||
default CONT%(cn)d_PAGER_UTCB_END from 0x0
|
||||
|
||||
default CONT%(cn)d_LINUX_PAGE_OFFSET from 0x0
|
||||
default CONT%(cn)d_LINUX_PHYS_OFFSET from 0x0
|
||||
default CONT%(cn)d_LINUX_MAPSIZE from 0x0
|
||||
@@ -370,8 +384,8 @@ default CONT%(cn)d_VIRT5_END from 0x0
|
||||
|
||||
default CONT%(cn)d_OPT_NAME from (CONT%(cn)d_TYPE_LINUX==y) ? "linux%(cn)d" : ((CONT%(cn)d_TYPE_BARE==y) ? "bare%(cn)d" : "posix%(cn)d")
|
||||
|
||||
when CONT%(cn)d_TYPE_LINUX==y suppress cont%(cn)d_bare_pager_params
|
||||
when CONT%(cn)d_TYPE_BARE==y suppress cont%(cn)d_linux_pager_params
|
||||
when CONT%(cn)d_TYPE_LINUX==y suppress cont%(cn)d_bare_pager_params cont%(cn)d_posix_pager_params
|
||||
when CONT%(cn)d_TYPE_BARE==y suppress cont%(cn)d_linux_pager_params cont%(cn)d_posix_pager_params
|
||||
when CONT%(cn)d_TYPE_POSIX==y suppress cont%(cn)d_linux_pager_params
|
||||
|
||||
symbols
|
||||
@@ -381,14 +395,24 @@ cont%(cn)d_virtmem_list 'Container %(cn)d Virtual Memory Regions'
|
||||
container%(cn)d_type 'Container %(cn)d Type'
|
||||
container%(cn)d_options 'Container %(cn)d Options'
|
||||
|
||||
cont%(cn)d_linux_pager_params 'Container %(cn)d Pager Parameters'
|
||||
cont%(cn)d_bare_pager_params 'Container %(cn)d Pager Parameters'
|
||||
cont%(cn)d_linux_pager_params 'Container %(cn)d Linux Pager Parameters'
|
||||
cont%(cn)d_bare_pager_params 'Container %(cn)d Default Pager Parameters'
|
||||
cont%(cn)d_posix_pager_params 'Container %(cn)d POSIX Pager Parameters'
|
||||
|
||||
menu cont%(cn)d_bare_pager_params
|
||||
CONT%(cn)d_PAGER_LMA@
|
||||
CONT%(cn)d_PAGER_VMA@
|
||||
CONT%(cn)d_PAGER_SIZE@
|
||||
|
||||
menu cont%(cn)d_posix_pager_params
|
||||
CONT%(cn)d_PAGER_SHM_START@
|
||||
CONT%(cn)d_PAGER_SHM_END@
|
||||
CONT%(cn)d_PAGER_TASK_START@
|
||||
CONT%(cn)d_PAGER_TASK_END@
|
||||
CONT%(cn)d_PAGER_UTCB_START@
|
||||
CONT%(cn)d_PAGER_UTCB_END@
|
||||
|
||||
|
||||
menu cont%(cn)d_linux_pager_params
|
||||
CONT%(cn)d_LINUX_PAGE_OFFSET@
|
||||
CONT%(cn)d_LINUX_PHYS_OFFSET@
|
||||
@@ -414,6 +438,7 @@ menu container%(cn)d_options
|
||||
CONT%(cn)d_OPT_NAME$
|
||||
cont%(cn)d_linux_pager_params
|
||||
cont%(cn)d_bare_pager_params
|
||||
cont%(cn)d_posix_pager_params
|
||||
cont%(cn)d_physmem_list
|
||||
cont%(cn)d_virtmem_list
|
||||
|
||||
|
||||
@@ -13,6 +13,12 @@ class Container:
|
||||
self.pager_lma = 0
|
||||
self.pager_vma = 0
|
||||
self.pager_size = 0
|
||||
self.pager_task_region_start = 0
|
||||
self.pager_task_region_end = 0
|
||||
self.pager_shm_region_start = 0
|
||||
self.pager_shm_region_end = 0
|
||||
self.pager_utcb_region_start = 0
|
||||
self.pager_utcb_region_end = 0
|
||||
self.linux_page_offset = 0
|
||||
self.linux_phys_offset = 0
|
||||
self.linux_mapsize = 0
|
||||
@@ -31,6 +37,12 @@ class Container:
|
||||
print 'Container Name: %s' % self.name
|
||||
print 'Container Pager lma: %s' % conv_hex(self.pager_lma)
|
||||
print 'Container Pager vma: %s' % conv_hex(self.pager_vma)
|
||||
print 'Container Pager shm region start: %s' % conv_hex(self.pager_shm_region_start)
|
||||
print 'Container Pager shm region end: %s' % conv_hex(self.pager_shm_region_end)
|
||||
print 'Container Pager task region start: %s' % conv_hex(self.pager_task_region_start)
|
||||
print 'Container Pager task region end: %s' % conv_hex(self.pager_task_region_end)
|
||||
print 'Container Pager utcb region start: %s' % conv_hex(self.pager_utcb_region_start)
|
||||
print 'Container Pager utcb region end: %s' % conv_hex(self.pager_utcb_region_end)
|
||||
print 'Container Pager size: %s' % conv_hex(self.pager_size)
|
||||
print 'Container Virtual regions: %s' % self.virt_regions
|
||||
print 'Container Physical regions: %s' % self.phys_regions
|
||||
@@ -86,6 +98,18 @@ class configuration:
|
||||
self.containers[id].pager_lma = int(val, 0)
|
||||
elif param[:len("PAGER_VMA")] == "PAGER_VMA":
|
||||
self.containers[id].pager_vma = int(val, 0)
|
||||
elif param[:len("PAGER_UTCB_START")] == "PAGER_UTCB_START":
|
||||
self.containers[id].pager_utcb_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_UTCB_END")] == "PAGER_UTCB_END":
|
||||
self.containers[id].pager_utcb_region_end = int(val, 0)
|
||||
elif param[:len("PAGER_SHM_START")] == "PAGER_SHM_START":
|
||||
self.containers[id].pager_shm_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_SHM_END")] == "PAGER_SHM_END":
|
||||
self.containers[id].pager_shm_region_end = int(val, 0)
|
||||
elif param[:len("PAGER_TASK_START")] == "PAGER_TASK_START":
|
||||
self.containers[id].pager_task_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_TASK_END")] == "PAGER_TASK_END":
|
||||
self.containers[id].pager_task_region_end = int(val, 0)
|
||||
elif param[:len("PAGER_SIZE")] == "PAGER_SIZE":
|
||||
self.containers[id].pager_size = int(val, 0)
|
||||
elif param[:len("LINUX_MAPSIZE")] == "LINUX_MAPSIZE":
|
||||
|
||||
@@ -35,18 +35,27 @@ def build_parse_options():
|
||||
default = False, dest = "backup_config",
|
||||
help = "Backs up old configuration file settings to a .saved file"
|
||||
"(Subsequent calls would overwrite. Only meaningful with -r)")
|
||||
parser.add_option("-p", "--print-config", action = "store_true",
|
||||
default = False, dest = "print_config",
|
||||
help = "Prints out configuration settings"
|
||||
"(Symbol values and container parameters are printed)")
|
||||
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
autogen_true = len(sys.argv) > 1 or not os.path.exists(CML2_CML_FILE)
|
||||
autogen_true = options.backup_config or options.reset_old_config \
|
||||
or options.cml_file or options.config \
|
||||
or options.ncont or options.arch or not os.path.exists(CML2_CML_FILE)
|
||||
|
||||
# Prepare default if arch not supplied
|
||||
if autogen_true and not options.arch:
|
||||
print "No arch supplied (-a), using `arm' as default."
|
||||
options.arch = "arm"
|
||||
|
||||
# Prepare default if number of containers not supplied
|
||||
if autogen_true and not options.ncont:
|
||||
options.ncont = 4
|
||||
print "Max container count not supplied (-c), using %d as default." % options.ncont
|
||||
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
||||
|
||||
# Regenerate cml file if options are supplied or the file doesn't exist.
|
||||
if autogen_true:
|
||||
|
||||
Reference in New Issue
Block a user