mirror of
https://github.com/seL4/seL4.git
synced 2026-03-27 10:29:57 +00:00
update #ifdef to #if in auto generated files
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="seL4_ARM_IOPageTable">
|
||||
<method id="ARMIOPageTableMap" name="Map" config="CONFIG_ARM_SMMU">
|
||||
<method id="ARMIOPageTableMap" name="Map" condition="defined(CONFIG_ARM_SMMU)">
|
||||
<param dir="in" name="iospace" type="seL4_ARM_IOSpace"/>
|
||||
<param dir="in" name="ioaddr" type="seL4_Word"/>
|
||||
</method>
|
||||
<method id="ARMIOPageTableUnmap" name="Unmap" config="CONFIG_ARM_SMMU">
|
||||
<method id="ARMIOPageTableUnmap" name="Unmap" condition="defined(CONFIG_ARM_SMMU)">
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="seL4_ARM_Page">
|
||||
@@ -39,7 +39,7 @@
|
||||
<param dir="in" name="attr" type="seL4_ARM_VMAttributes"/>
|
||||
</method>
|
||||
<method id="ARMPageUnmap" name="Unmap"/>
|
||||
<method id="ARMPageMapIO" name="MapIO" config="CONFIG_ARM_SMMU">
|
||||
<method id="ARMPageMapIO" name="MapIO" condition="defined(CONFIG_ARM_SMMU)">
|
||||
<param dir="in" name="iospace" type="seL4_ARM_IOSpace"/>
|
||||
<param dir="in" name="rights" type="seL4_CapRights"/>
|
||||
<param dir="in" name="ioaddr" type="seL4_Word"/>
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
</method>
|
||||
<method id="TCBUnbindNotification" name="UnbindNotification">
|
||||
</method>
|
||||
<method id="TCBSetBreakpoint" name="SetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
||||
<method id="TCBSetBreakpoint" name="SetBreakpoint" condition="defined(CONFIG_HARDWARE_DEBUG_API)">
|
||||
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
||||
<param dir="in" name="vaddr" type="seL4_Word"/>
|
||||
<param dir="in" name="type" type="seL4_Word"/>
|
||||
<param dir="in" name="size" type="seL4_Word"/>
|
||||
<param dir="in" name="rw" type="seL4_Word"/>
|
||||
</method>
|
||||
<method id="TCBGetBreakpoint" name="GetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
||||
<method id="TCBGetBreakpoint" name="GetBreakpoint" condition="defined(CONFIG_HARDWARE_DEBUG_API)">
|
||||
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
||||
<param dir="out" name="vaddr" type="seL4_Word"/>
|
||||
<param dir="out" name="type" type="seL4_Word"/>
|
||||
@@ -90,10 +90,10 @@
|
||||
<param dir="out" name="rw" type="seL4_Word"/>
|
||||
<param dir="out" name="is_enabled" type="seL4_Bool"/>
|
||||
</method>
|
||||
<method id="TCBUnsetBreakpoint" name="UnsetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
||||
<method id="TCBUnsetBreakpoint" name="UnsetBreakpoint" condition="defined(CONFIG_HARDWARE_DEBUG_API)">
|
||||
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
||||
</method>
|
||||
<method id="TCBConfigureSingleStepping" name="ConfigureSingleStepping" config="CONFIG_HARDWARE_DEBUG_API">
|
||||
<method id="TCBConfigureSingleStepping" name="ConfigureSingleStepping" condition="defined(CONFIG_HARDWARE_DEBUG_API)">
|
||||
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
||||
<param dir="in" name="num_instructions" type="seL4_Word"/>
|
||||
<param dir="out" name="bp_was_consumed" type="seL4_Bool"/>
|
||||
|
||||
@@ -47,20 +47,20 @@
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="seL4_ARM_VCPU">
|
||||
<method id="ARMVCPUSetTCB" name="SetTCB" config="CONFIG_ARM_HYPERVISOR_SUPPORT">
|
||||
<method id="ARMVCPUSetTCB" name="SetTCB" condition="defined(CONFIG_ARM_HYPERVISOR_SUPPORT)">
|
||||
<param dir="in" name="tcb" type="seL4_TCB" />
|
||||
</method>
|
||||
<method id="ARMVCPUInjectIRQ" name="InjectIRQ" config="CONFIG_ARM_HYPERVISOR_SUPPORT">
|
||||
<method id="ARMVCPUInjectIRQ" name="InjectIRQ" condition="defined(CONFIG_ARM_HYPERVISOR_SUPPORT)">
|
||||
<param dir="in" name="virq" type="seL4_Uint16"/>
|
||||
<param dir="in" name="priority" type="seL4_Uint8"/>
|
||||
<param dir="in" name="group" type="seL4_Uint8"/>
|
||||
<param dir="in" name="index" type="seL4_Uint8"/>
|
||||
</method>
|
||||
<method id="ARMVCPUReadReg" name="ReadRegs" config="CONFIG_ARM_HYPERVISOR_SUPPORT">
|
||||
<method id="ARMVCPUReadReg" name="ReadRegs" condition="defined(CONFIG_ARM_HYPERVISOR_SUPPORT)">
|
||||
<param dir="in" name="field" type="seL4_Uint32"/>
|
||||
<param dir="out" name="value" type="seL4_Uint32"/>
|
||||
</method>
|
||||
<method id="ARMVCPUWriteReg" name="WriteRegs" config="CONFIG_ARM_HYPERVISOR_SUPPORT">
|
||||
<method id="ARMVCPUWriteReg" name="WriteRegs" condition="defined(CONFIG_ARM_HYPERVISOR_SUPPORT)">
|
||||
<param dir="in" name="field" type="seL4_Uint32"/>
|
||||
<param dir="in" name="value" type="seL4_Uint32"/>
|
||||
</method>
|
||||
|
||||
@@ -683,7 +683,7 @@ def parse_xml_file(input_file, valid_types):
|
||||
for method in interface.getElementsByTagName("method"):
|
||||
method_name = method.getAttribute("name")
|
||||
method_id = method.getAttribute("id")
|
||||
method_config = method.getAttribute("config")
|
||||
method_condition = method.getAttribute("condition")
|
||||
|
||||
#
|
||||
# Get parameters.
|
||||
@@ -703,7 +703,7 @@ def parse_xml_file(input_file, valid_types):
|
||||
input_params.append(Parameter(param_name, param_type))
|
||||
else:
|
||||
output_params.append(Parameter(param_name, param_type))
|
||||
methods.append((interface_name, method_name, method_id, input_params, output_params, method_config))
|
||||
methods.append((interface_name, method_name, method_id, input_params, output_params, method_condition))
|
||||
|
||||
return (methods, structs)
|
||||
|
||||
@@ -781,12 +781,12 @@ def generate_stub_file(arch, wordsize, input_files, output_file, use_only_ipc_bu
|
||||
result.append("/*")
|
||||
result.append(" * Generated stubs.")
|
||||
result.append(" */")
|
||||
for (interface_name, method_name, method_id, inputs, outputs, config) in methods:
|
||||
if config != "":
|
||||
result.append("#ifdef %s" % config)
|
||||
for (interface_name, method_name, method_id, inputs, outputs, condition) in methods:
|
||||
if condition != "":
|
||||
result.append("#if %s" % condition)
|
||||
result.append(generate_stub(arch, wordsize, interface_name, method_name,
|
||||
method_id, inputs, outputs, structs, use_only_ipc_buffer))
|
||||
if config != "":
|
||||
if condition != "":
|
||||
result.append("#endif")
|
||||
|
||||
# Print footer.
|
||||
|
||||
@@ -150,7 +150,7 @@ def parse_xml(xml_file):
|
||||
|
||||
invocation_labels = []
|
||||
for method in doc.getElementsByTagName("method"):
|
||||
invocation_labels.append((str(method.getAttribute("id")), str(method.getAttribute("config"))))
|
||||
invocation_labels.append((str(method.getAttribute("id")), str(method.getAttribute("condition"))))
|
||||
|
||||
return invocation_labels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user