forked from Imagelibrary/seL4
Recomment of branch getpaddr on release snapshot
This commit is contained in:
@@ -86,6 +86,9 @@
|
||||
<param dir="in" name="start_offset" type="seL4_Word"/>
|
||||
<param dir="in" name="end_offset" type="seL4_Word"/>
|
||||
</method>
|
||||
<method id="ARMPageGetAddress" name="GetAddress">
|
||||
<param dir="out" name="paddr" type="seL4_Word"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="seL4_ARM_ASIDControl">
|
||||
<method id="ARMASIDControlMakePool" name="MakePool">
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
<param dir="in" name="rights" type="seL4_CapRights"/>
|
||||
<param dir="in" name="ioaddr" type="seL4_Word"/>
|
||||
</method>
|
||||
<method id="IA32PageGetAddress" name="GetAddress">
|
||||
<param dir="out" name="paddr" type="seL4_Word"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="seL4_IA32_ASIDControl">
|
||||
<method id="IA32ASIDControlMakePool" name="MakePool">
|
||||
|
||||
@@ -296,6 +296,7 @@ complete the \apifunc{seL4\_Untyped\_Retype}{untyped_retype} request.
|
||||
\inputapidoc{ia32_page_map}
|
||||
\inputapidoc{ia32_page_remap}
|
||||
\inputapidoc{ia32_page_unmap}
|
||||
\inputapidoc{ia32_page_getaddress}
|
||||
\inputapidoc{ia32_pagetable_map}
|
||||
\inputapidoc{ia32_pagetable_unmap}
|
||||
\fi
|
||||
@@ -310,5 +311,6 @@ complete the \apifunc{seL4\_Untyped\_Retype}{untyped_retype} request.
|
||||
\inputapidoc{arm_page_map}
|
||||
\inputapidoc{arm_page_remap}
|
||||
\inputapidoc{arm_page_unmap}
|
||||
\inputapidoc{arm_page_getaddress}
|
||||
\inputapidoc{arm_pagetable_map}
|
||||
\inputapidoc{arm_pagetable_unmap}
|
||||
|
||||
20
manual/parts/api/arm_page_getaddress.tex
Normal file
20
manual/parts/api/arm_page_getaddress.tex
Normal file
@@ -0,0 +1,20 @@
|
||||
%
|
||||
% Copyright 2014, General Dynamics C4 Systems
|
||||
%
|
||||
% This software may be distributed and modified according to the terms of
|
||||
% the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
||||
% See "LICENSE_GPLv2.txt" for details.
|
||||
%
|
||||
% @TAG(GD_GPL)
|
||||
%
|
||||
|
||||
\apidoc
|
||||
{arm_page_getaddress}
|
||||
{ARM Page - Get Address}
|
||||
{Get the physical address of the underlying frame}
|
||||
{static inline seL4\_ARM\_Page\_GetAddress\_t seL4\_ARM\_Page\_GetAddress}
|
||||
{
|
||||
\param{seL4\_ARM\_Page}{\_service}{Capability to the page to lookup.}
|
||||
}
|
||||
{A seL4\_ARM\_Page\_GetAddress\_t structure as described in TODO}
|
||||
{See \autoref{ch:vspace}}
|
||||
20
manual/parts/api/ia32_page_getaddress.tex
Normal file
20
manual/parts/api/ia32_page_getaddress.tex
Normal file
@@ -0,0 +1,20 @@
|
||||
%
|
||||
% Copyright 2014, General Dynamics C4 Systems
|
||||
%
|
||||
% This software may be distributed and modified according to the terms of
|
||||
% the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
||||
% See "LICENSE_GPLv2.txt" for details.
|
||||
%
|
||||
% @TAG(GD_GPL)
|
||||
%
|
||||
|
||||
\apidoc
|
||||
{ia32_page_getaddress}
|
||||
{IA32 Page - Get Address}
|
||||
{Get the physical address of the underlying frame}
|
||||
{static inline seL4\_IA32\_Page\_GetAddress\_t seL4\_IA32\_Page\_GetAddress}
|
||||
{
|
||||
\param{seL4\_IA32\_Page}{\_service}{Capability to the page to lookup.}
|
||||
}
|
||||
{A seL4\_IA32\_Page\_GetAddress\_t structure as described in TODO}
|
||||
{See \autoref{ch:vspace}}
|
||||
@@ -60,6 +60,7 @@ static exception_t performPDFlush(int label, pde_t *pd, asid_t asid,
|
||||
vptr_t start, vptr_t end, paddr_t pstart);
|
||||
static exception_t performPageFlush(int label, pde_t *pd, asid_t asid,
|
||||
vptr_t start, vptr_t end, paddr_t pstart);
|
||||
static exception_t performPageGetAddress(void *vbase_ptr);
|
||||
static exception_t decodeARMPageDirectoryInvocation(word_t label,
|
||||
unsigned int length, cptr_t cptr, cte_t *cte, cap_t cap,
|
||||
extra_caps_t extraCaps, word_t *buffer);
|
||||
@@ -1659,6 +1660,16 @@ decodeARMFrameInvocation(word_t label, unsigned int length,
|
||||
return performPageFlush(label, pd.pd, asid, start, end - 1, pstart);
|
||||
}
|
||||
|
||||
case ARMPageGetAddress: {
|
||||
|
||||
|
||||
/* Check that there are enough message registers */
|
||||
assert(n_msgRegisters >= 1);
|
||||
|
||||
setThreadState(ksCurThread, ThreadState_Restart);
|
||||
return performPageGetAddress((void*)generic_frame_cap_get_capFBasePtr(cap));
|
||||
}
|
||||
|
||||
default:
|
||||
current_syscall_error.type = seL4_IllegalOperation;
|
||||
|
||||
@@ -2008,6 +2019,22 @@ performPageTableInvocationUnmap(cap_t cap, cte_t *ctSlot)
|
||||
return EXCEPTION_NONE;
|
||||
}
|
||||
|
||||
static exception_t
|
||||
performPageGetAddress(void *vbase_ptr)
|
||||
{
|
||||
paddr_t capFBasePtr;
|
||||
|
||||
/* Get the physical address of this frame. */
|
||||
capFBasePtr = addrFromPPtr(vbase_ptr);
|
||||
|
||||
/* return it in the first message register */
|
||||
setRegister(ksCurThread, msgRegisters[0], capFBasePtr);
|
||||
setRegister(ksCurThread, msgInfoRegister,
|
||||
wordFromMessageInfo(message_info_new(0, 0, 0, 1)));
|
||||
|
||||
return EXCEPTION_NONE;
|
||||
}
|
||||
|
||||
static bool_t PURE
|
||||
pteCheckIfMapped(pte_t *pte)
|
||||
{
|
||||
|
||||
@@ -1380,6 +1380,23 @@ static exception_t performASIDPoolInvocation(asid_t asid, asid_pool_t* poolPtr,
|
||||
return EXCEPTION_NONE;
|
||||
}
|
||||
|
||||
static exception_t
|
||||
performPageGetAddress(void *vbase_ptr)
|
||||
{
|
||||
paddr_t capFBasePtr;
|
||||
|
||||
/* Get the physical address of this frame. */
|
||||
capFBasePtr = pptr_to_paddr(vbase_ptr);
|
||||
|
||||
/* return it in the first message register */
|
||||
setRegister(ksCurThread, msgRegisters[0], capFBasePtr);
|
||||
setRegister(ksCurThread, msgInfoRegister,
|
||||
wordFromMessageInfo(message_info_new(0, 0, 0, 1)));
|
||||
|
||||
return EXCEPTION_NONE;
|
||||
}
|
||||
|
||||
|
||||
static inline bool_t
|
||||
checkVPAlignment(vm_page_size_t sz, word_t w)
|
||||
{
|
||||
@@ -1830,6 +1847,15 @@ decodeIA32FrameInvocation(
|
||||
return decodeIA32IOMapInvocation(label, length, cte, cap, extraCaps, buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
case IA32PageGetAddress: {
|
||||
/* Return it in the first message register. */
|
||||
assert(n_msgRegisters >= 1);
|
||||
|
||||
setThreadState(ksCurThread, ThreadState_Restart);
|
||||
return performPageGetAddress((void*)cap_frame_cap_get_capFBasePtr(cap));
|
||||
}
|
||||
|
||||
default:
|
||||
current_syscall_error.type = seL4_IllegalOperation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user