Correct merge of master

This commit is contained in:
Adrian Danis 2016-06-02 12:15:46 +10:00
parent b001bc4489
commit 41603a26ca
4 changed files with 42 additions and 24 deletions

View file

@ -77,23 +77,4 @@
<param dir="in" name="vroot" type="seL4_ARM_PageDirectory"/>
</method>
</interface>
<interface name="seL4_ARM_VCPU">
<method id="ARMVCPUSetTCB" name="SetTCB">
<param dir="in" name="tcb" type="seL4_TCB" />
</method>
<method id="ARMVCPUInjectIRQ" name="InjectIRQ">
<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">
<param dir="in" name="field" type="seL4_Uint32"/>
<param dir="out" name="value" type="seL4_Uint32"/>
</method>
<method id="ARMVCPUWriteReg" name="WriteRegs">
<param dir="in" name="field" type="seL4_Uint32"/>
<param dir="in" name="value" type="seL4_Uint32"/>
</method>
</interface>
</api>

View file

@ -46,4 +46,23 @@
<param dir="in" name="end" type="seL4_Word"/>
</method>
</interface>
<interface name="seL4_ARM_VCPU">
<method id="ARMVCPUSetTCB" name="SetTCB">
<param dir="in" name="tcb" type="seL4_TCB" />
</method>
<method id="ARMVCPUInjectIRQ" name="InjectIRQ">
<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">
<param dir="in" name="field" type="seL4_Uint32"/>
<param dir="out" name="value" type="seL4_Uint32"/>
</method>
<method id="ARMVCPUWriteReg" name="WriteRegs">
<param dir="in" name="field" type="seL4_Uint32"/>
<param dir="in" name="value" type="seL4_Uint32"/>
</method>
</interface>
</api>

View file

@ -51,12 +51,14 @@ WORD_SIZE_BITS_ARCH = {
"ia32": 32,
"aarch64": 64,
"ia64": 64,
"x86_64": 64
"x86_64": 64,
"arm_hyp": 32,
}
MESSAGE_REGISTERS_FOR_ARCH = {
"aarch32": 4,
"ia32": 2,
"arm_hyp": 4,
}
WORD_CONST_SUFFIX_BITS = {
@ -233,6 +235,16 @@ def init_data_types(wordsize):
def init_arch_types(wordsize):
arch_types = {
"aarch32" : [
Type("seL4_ARM_VMAttributes", wordsize, wordsize),
CapType("seL4_ARM_Page", wordsize),
CapType("seL4_ARM_PageTable", wordsize),
CapType("seL4_ARM_PageDirectory", wordsize),
CapType("seL4_ARM_ASIDControl", wordsize),
CapType("seL4_ARM_ASIDPool", wordsize),
StructType("seL4_UserContext", wordsize * 17, wordsize),
],
"arm_hyp" : [
Type("seL4_ARM_VMAttributes", wordsize, wordsize),
CapType("seL4_ARM_Page", wordsize),
CapType("seL4_ARM_PageTable", wordsize),
@ -243,7 +255,6 @@ def init_arch_types(wordsize):
CapType("seL4_ARM_IOSpace", wordsize),
CapType("seL4_ARM_IOPageTable", wordsize),
StructType("seL4_UserContext", wordsize * 17, wordsize),
],
"ia32" : [
@ -681,9 +692,6 @@ def generate_stub_file(arch, wordsize, input_files, output_file, use_only_ipc_bu
"""
result = []
if arch == "arm_hyp":
arch = "aarch32"
# Ensure architecture looks sane.
if arch not in WORD_SIZE_BITS_ARCH.keys():
raise Exception("Invalid architecture.")

View file

@ -3029,12 +3029,22 @@ readWordFromVSpace(pde_t *pd, word_t vaddr)
offset = vaddr & MASK(ARMSectionBits);
} else {
ptSlot = lookupPTSlot(pd, vaddr);
#ifdef ARM_HYP
if (ptSlot.status == EXCEPTION_NONE && pte_ptr_get_pteType(ptSlot.ptSlot) == pte_pte_small) {
paddr = pte_pte_small_ptr_get_address(ptSlot.ptSlot);
if (pte_pte_small_ptr_get_contiguous_hint(ptSlot.ptSlot)) {
offset = vaddr & MASK(ARMLargePageBits);
} else {
offset = vaddr & MASK(ARMSmallPageBits);
}
#else
if (ptSlot.status == EXCEPTION_NONE && pte_ptr_get_pteType(ptSlot.ptSlot) == pte_pte_small) {
paddr = pte_pte_small_ptr_get_address(ptSlot.ptSlot);
offset = vaddr & MASK(ARMSmallPageBits);
} else if (ptSlot.status == EXCEPTION_NONE && pte_ptr_get_pteType(ptSlot.ptSlot) == pte_pte_large) {
paddr = pte_pte_large_ptr_get_address(ptSlot.ptSlot);
offset = vaddr & MASK(ARMLargePageBits);
#endif
} else {
ret.status = EXCEPTION_LOOKUP_FAULT;
return ret;