mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 09:43:14 +01:00
Few more minor fixes on cappool and capctrl
This commit is contained in:
@@ -131,7 +131,7 @@ cap_strings = { 'ipc' : \
|
|||||||
\t\t\t[${idx}] = {
|
\t\t\t[${idx}] = {
|
||||||
\t\t\t\t/* For cap spliting, creating, etc. */
|
\t\t\t\t/* For cap spliting, creating, etc. */
|
||||||
\t\t\t\t.target_type = ${target_type},
|
\t\t\t\t.target_type = ${target_type},
|
||||||
\t\t\t\t.target = {cid},
|
\t\t\t\t.target = ${cid},
|
||||||
\t\t\t\t.type = CAP_TYPE_QUANTITY | CAP_RTYPE_CAPPOOL,
|
\t\t\t\t.type = CAP_TYPE_QUANTITY | CAP_RTYPE_CAPPOOL,
|
||||||
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
||||||
\t\t\t\t.start = 0, .end = 0,
|
\t\t\t\t.start = 0, .end = 0,
|
||||||
@@ -148,7 +148,7 @@ def prepare_custom_capability(cont, param, val):
|
|||||||
capkey = capkey.lower()
|
capkey = capkey.lower()
|
||||||
captype = captype.lower()
|
captype = captype.lower()
|
||||||
cont.caps[capkey] = cap_strings[captype]
|
cont.caps[capkey] = cap_strings[captype]
|
||||||
if 'TARGET' in param:
|
elif 'TARGET' in param:
|
||||||
target_parts = param.split('_', 2)
|
target_parts = param.split('_', 2)
|
||||||
if len(target_parts) == 2:
|
if len(target_parts) == 2:
|
||||||
capkey = target_parts[0].lower()
|
capkey = target_parts[0].lower()
|
||||||
@@ -164,11 +164,16 @@ def prepare_custom_capability(cont, param, val):
|
|||||||
cont.caps[capkey] = templ.safe_substitute(target_type = ttype, cid = cont.id)
|
cont.caps[capkey] = templ.safe_substitute(target_type = ttype, cid = cont.id)
|
||||||
else:
|
else:
|
||||||
cont.caps[capkey] = templ.safe_substitute(target_type = ttype)
|
cont.caps[capkey] = templ.safe_substitute(target_type = ttype)
|
||||||
|
else: # Ignore custom_use symbol
|
||||||
|
return
|
||||||
|
print capkey
|
||||||
|
print cont.caps[capkey]
|
||||||
|
|
||||||
def prepare_typed_capability(cont, param, val):
|
def prepare_typed_capability(cont, param, val):
|
||||||
captype, params = param.split('_', 1)
|
captype, params = param.split('_', 1)
|
||||||
captype = captype.lower()
|
captype = captype.lower()
|
||||||
|
|
||||||
|
|
||||||
# USE makes us assign the initial cap string with blank fields
|
# USE makes us assign the initial cap string with blank fields
|
||||||
if 'USE' in params:
|
if 'USE' in params:
|
||||||
cont.caps[captype] = cap_strings[captype]
|
cont.caps[captype] = cap_strings[captype]
|
||||||
@@ -204,8 +209,8 @@ def prepare_typed_capability(cont, param, val):
|
|||||||
else:
|
else:
|
||||||
cont.caps[captype] = templ.safe_substitute(cid = val)
|
cont.caps[captype] = templ.safe_substitute(cid = val)
|
||||||
|
|
||||||
print captype
|
print captype
|
||||||
print cont.caps[captype]
|
print cont.caps[captype]
|
||||||
|
|
||||||
def prepare_capability(cont, param, val):
|
def prepare_capability(cont, param, val):
|
||||||
if 'CUSTOM' in param:
|
if 'CUSTOM' in param:
|
||||||
|
|||||||
@@ -208,28 +208,28 @@ choices cont%(cn)d_cap_custom0_type
|
|||||||
CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE
|
CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM0_TCTRL_TYPE
|
CONT%(cn)d_CAP_CUSTOM0_TCTRL_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM0_EXREGS_TYPE
|
CONT%(cn)d_CAP_CUSTOM0_EXREGS_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM0_CAP_TYPE
|
CONT%(cn)d_CAP_CUSTOM0_CAPCTRL_TYPE
|
||||||
default CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE
|
default CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE
|
||||||
|
|
||||||
choices cont%(cn)d_cap_custom1_type
|
choices cont%(cn)d_cap_custom1_type
|
||||||
CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE
|
CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM1_TCTRL_TYPE
|
CONT%(cn)d_CAP_CUSTOM1_TCTRL_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM1_EXREGS_TYPE
|
CONT%(cn)d_CAP_CUSTOM1_EXREGS_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM1_CAP_TYPE
|
CONT%(cn)d_CAP_CUSTOM1_CAPCTRL_TYPE
|
||||||
default CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE
|
default CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE
|
||||||
|
|
||||||
choices cont%(cn)d_cap_custom2_type
|
choices cont%(cn)d_cap_custom2_type
|
||||||
CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE
|
CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM2_TCTRL_TYPE
|
CONT%(cn)d_CAP_CUSTOM2_TCTRL_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM2_EXREGS_TYPE
|
CONT%(cn)d_CAP_CUSTOM2_EXREGS_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM2_CAP_TYPE
|
CONT%(cn)d_CAP_CUSTOM2_CAPCTRL_TYPE
|
||||||
default CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE
|
default CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE
|
||||||
|
|
||||||
choices cont%(cn)d_cap_custom3_type
|
choices cont%(cn)d_cap_custom3_type
|
||||||
CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE
|
CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM3_TCTRL_TYPE
|
CONT%(cn)d_CAP_CUSTOM3_TCTRL_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM3_EXREGS_TYPE
|
CONT%(cn)d_CAP_CUSTOM3_EXREGS_TYPE
|
||||||
CONT%(cn)d_CAP_CUSTOM3_CAP_TYPE
|
CONT%(cn)d_CAP_CUSTOM3_CAPCTRL_TYPE
|
||||||
default CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE
|
default CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE
|
||||||
|
|
||||||
default CONT%(cn)d_CAP_CUSTOM0_USE from n
|
default CONT%(cn)d_CAP_CUSTOM0_USE from n
|
||||||
@@ -377,7 +377,7 @@ cont%(cn)d_cap_custom0_type 'Capability Operation Type'
|
|||||||
CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE 'IPC Capability'
|
CONT%(cn)d_CAP_CUSTOM0_IPC_TYPE 'IPC Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_TCTRL_TYPE 'Thread Control Capability'
|
CONT%(cn)d_CAP_CUSTOM0_TCTRL_TYPE 'Thread Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_EXREGS_TYPE 'Exchange Registers Capability'
|
CONT%(cn)d_CAP_CUSTOM0_EXREGS_TYPE 'Exchange Registers Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_CAP_TYPE 'Capability Control Capability'
|
CONT%(cn)d_CAP_CUSTOM0_CAPCTRL_TYPE 'Capability Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
CONT%(cn)d_CAP_CUSTOM0_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
CONT%(cn)d_CAP_CUSTOM0_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
||||||
CONT%(cn)d_CAP_CUSTOM0_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
CONT%(cn)d_CAP_CUSTOM0_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
||||||
@@ -389,7 +389,7 @@ cont%(cn)d_cap_custom1_type 'Capability Operation Type'
|
|||||||
CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE 'IPC Capability'
|
CONT%(cn)d_CAP_CUSTOM1_IPC_TYPE 'IPC Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_TCTRL_TYPE 'Thread Control Capability'
|
CONT%(cn)d_CAP_CUSTOM1_TCTRL_TYPE 'Thread Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_EXREGS_TYPE 'Exchange Registers Capability'
|
CONT%(cn)d_CAP_CUSTOM1_EXREGS_TYPE 'Exchange Registers Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_CAP_TYPE 'Capability Control Capability'
|
CONT%(cn)d_CAP_CUSTOM1_CAPCTRL_TYPE 'Capability Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
CONT%(cn)d_CAP_CUSTOM1_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
CONT%(cn)d_CAP_CUSTOM1_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
||||||
CONT%(cn)d_CAP_CUSTOM1_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
CONT%(cn)d_CAP_CUSTOM1_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
||||||
@@ -401,7 +401,7 @@ cont%(cn)d_cap_custom2_type 'Capability Operation Type'
|
|||||||
CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE 'IPC Capability'
|
CONT%(cn)d_CAP_CUSTOM2_IPC_TYPE 'IPC Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_TCTRL_TYPE 'Thread Control Capability'
|
CONT%(cn)d_CAP_CUSTOM2_TCTRL_TYPE 'Thread Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_EXREGS_TYPE 'Exchange Registers Capability'
|
CONT%(cn)d_CAP_CUSTOM2_EXREGS_TYPE 'Exchange Registers Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_CAP_TYPE 'Capability Control Capability'
|
CONT%(cn)d_CAP_CUSTOM2_CAPCTRL_TYPE 'Capability Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
CONT%(cn)d_CAP_CUSTOM2_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
CONT%(cn)d_CAP_CUSTOM2_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
||||||
CONT%(cn)d_CAP_CUSTOM2_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
CONT%(cn)d_CAP_CUSTOM2_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
||||||
@@ -413,7 +413,7 @@ cont%(cn)d_cap_custom3_type 'Capability Operation Type'
|
|||||||
CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE 'IPC Capability'
|
CONT%(cn)d_CAP_CUSTOM3_IPC_TYPE 'IPC Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_TCTRL_TYPE 'Thread Control Capability'
|
CONT%(cn)d_CAP_CUSTOM3_TCTRL_TYPE 'Thread Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_EXREGS_TYPE 'Exchange Registers Capability'
|
CONT%(cn)d_CAP_CUSTOM3_EXREGS_TYPE 'Exchange Registers Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_CAP_TYPE 'Capability Control Capability'
|
CONT%(cn)d_CAP_CUSTOM3_CAPCTRL_TYPE 'Capability Control Capability'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
CONT%(cn)d_CAP_CUSTOM3_TARGET_CURRENT_CONT 'Capability Targets Current Container'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
CONT%(cn)d_CAP_CUSTOM3_TARGET_CURRENT_PAGER_SPACE 'Capability Targets Current Pager`s Space'
|
||||||
CONT%(cn)d_CAP_CUSTOM3_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
CONT%(cn)d_CAP_CUSTOM3_TARGET_ANOTHER_CONT 'Capability Targets Another Container'
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ def generate_kernel_cinfo(config, cinfo_path):
|
|||||||
containers.sort()
|
containers.sort()
|
||||||
|
|
||||||
print "Generating kernel cinfo..."
|
print "Generating kernel cinfo..."
|
||||||
#config.config_print()
|
config.config_print()
|
||||||
|
|
||||||
pager_ifdefs = generate_pager_memory_ifdefs(config, containers)
|
pager_ifdefs = generate_pager_memory_ifdefs(config, containers)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user