mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Adding mechanism to have differnt run and load address for pagers
This commit is contained in:
@@ -60,6 +60,7 @@ cinfo_end = \
|
||||
pager_start = \
|
||||
'''
|
||||
\t\t[0] = {
|
||||
\t\t\t.start_address = (CONFIG_CONT%d_INIT_PROG_COUNTER),
|
||||
\t\t\t.pager_lma = __pfn(CONFIG_CONT%d_PAGER_LMA),
|
||||
\t\t\t.pager_vma = __pfn(CONFIG_CONT%d_PAGER_VMA),
|
||||
\t\t\t.pager_size = __pfn(CONFIG_CONT%d_PAGER_SIZE),
|
||||
@@ -170,9 +171,14 @@ pager_ifdefs_todotext = \
|
||||
pager_ifdefs = \
|
||||
'''
|
||||
#if defined(CONFIG_CONT%(cn)d_TYPE_LINUX)
|
||||
#define CONFIG_CONT%(cn)d_INIT_PROG_COUNTER \
|
||||
(CONFIG_CONT%(cn)d_LINUX_ZRELADDR - CONFIG_CONT%(cn)d_LINUX_PHYS_OFFSET + \
|
||||
CONFIG_CONT%(cn)d_LINUX_PAGE_OFFSET)
|
||||
#define CONFIG_CONT%(cn)d_PAGER_LMA (CONFIG_CONT%(cn)d_LINUX_PHYS_OFFSET)
|
||||
#define CONFIG_CONT%(cn)d_PAGER_VMA (CONFIG_CONT%(cn)d_LINUX_PAGE_OFFSET)
|
||||
#define CONFIG_CONT%(cn)d_PAGER_SIZE CONFIG_CONT%(cn)d_LINUX_MAPSIZE
|
||||
#else
|
||||
#define CONFIG_CONT%(cn)d_INIT_PROG_COUNTER (CONFIG_CONT%(cn)d_PAGER_LMA)
|
||||
#endif
|
||||
'''
|
||||
def generate_pager_memory_ifdefs(containers):
|
||||
@@ -183,7 +189,7 @@ def generate_pager_memory_ifdefs(containers):
|
||||
if linux == 0:
|
||||
pager_ifdef_string += pager_ifdefs_todotext
|
||||
linux = 1
|
||||
pager_ifdef_string += pager_ifdefs % { 'cn' : c.id }
|
||||
pager_ifdef_string += pager_ifdefs % { 'cn' : c.id }
|
||||
return pager_ifdef_string
|
||||
|
||||
def generate_kernel_cinfo(config, cinfo_path):
|
||||
@@ -202,7 +208,7 @@ def generate_kernel_cinfo(config, cinfo_path):
|
||||
# Currently only these are considered as capabilities
|
||||
total_caps = c.virt_regions + c.phys_regions + total_other_caps
|
||||
fbody += cinfo_start % (c.id, c.name)
|
||||
fbody += pager_start % (c.id, c.id, c.id, total_caps)
|
||||
fbody += pager_start % (c.id, c.id, c.id, c.id, total_caps)
|
||||
cap_index = 0
|
||||
for mem_index in range(c.virt_regions):
|
||||
fbody += cap_virtmem % { 'capidx' : cap_index, 'cn' : c.id, 'vn' : mem_index }
|
||||
|
||||
Reference in New Issue
Block a user