#include <utcb.h>
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
STACK_START |
Index where we store a "frame pointer" to the top of the stack.
|
- Enumerator:
HEADER_SIZE |
|
MAX_DATA_WORDS |
|
MAX_FRAME_WORDS |
|
Member Function Documentation
Utcb& Utcb::add_frame |
( |
| ) |
|
|
inline |
Push UTCB header and data to a stack area in the UTCB.
Later, UTCB can be fully restored by drop_frame() or partially restored by skip_frame().
TODO: put error code at some fixed point
WARN_UNUSED unsigned long Utcb::add_mappings |
( |
unsigned long |
addr, |
|
|
unsigned long |
size, |
|
|
unsigned long |
hotspot, |
|
|
unsigned |
rights, |
|
|
bool |
frame = false , |
|
|
unsigned |
max_items = sizeof(msg) / sizeof(msg[0]) / 2 |
|
) |
| |
|
inline |
Add mappings to a UTCB.
- Parameters
-
addr | Start of the memory area to be delegated/translated |
size | Size of the memory area to be delegated/translated |
hotspot | Zero for translation or hotspot | flags | MAP_MAP for delegation. |
rights | Permission mask and type Crd type bits. |
frame | Set this to true if the receiver uses Utcb::Frame and you want him to pass bound checks. |
max_items | The maximum number of typed items to be put in UTCB. |
- Returns
- Size of memory left which couldn't be put on the utcb because no space is left. If this is not zero, the caller has to handle this case! See sigma0.cc map_self for inspiration.
void Utcb::drop_frame |
( |
| ) |
|
|
inline |
Restore UTCB to the state saved by the last add_frame() and remove the restored state from the stack area.
unsigned Utcb::fp2ind |
( |
unsigned |
fp | ) |
|
|
inline |
Converts UTCB "frame pointer" to index to UTCB data area.
unsigned Utcb::frame_words |
( |
| ) |
|
|
inline |
Returns the number of words needed for storing the current UTCB content to a UTCB frame as implemented in add_frame().
Frame Utcb::get_nested_frame |
( |
| ) |
|
|
inline |
unsigned Utcb::get_stack_top |
( |
| ) |
|
|
inline |
Returns the index to UTCB data area of the first empty word above the UTCB stack area.
unsigned Utcb::ind2fp |
( |
unsigned |
ofs | ) |
|
|
inline |
Converts index to UTCB data to UTCB "frame pointers".
unsigned* Utcb::item_start |
( |
| ) |
|
|
inline |
Utcb& Utcb::operator<< |
( |
unsigned |
value | ) |
|
|
inline |
template<typename T >
Utcb& Utcb::operator<< |
( |
T & |
value | ) |
|
|
inline |
Utcb& Utcb::operator<< |
( |
Crd |
value | ) |
|
|
inline |
template<typename T >
bool Utcb::operator>> |
( |
T & |
value | ) |
|
|
inline |
If you mixing code which manipulates the utcb by its own and you use this Utcb/Frame code, you have to fix up your utcb after the code manipulated the utcb by its own.
Otherwise some of the assertion in the Frame code will trigger because the Utcb/Frame code assumes it's the only one who manipulates the utcb. In general avoid this mixing, however in sigma0 it's not done everywhere.
void Utcb::set_header |
( |
unsigned |
untyped, |
|
|
unsigned |
typed |
|
) |
| |
|
inline |
void Utcb::set_stack_top |
( |
unsigned |
ofs | ) |
|
|
inline |
Sets the "top pointer" of the UTCB stack area.
void Utcb::skip_frame |
( |
| ) |
|
|
inline |
bool Utcb::validate_recv_bounds |
( |
| ) |
|
|
inline |
bool Utcb::validate_send_bounds |
( |
| ) |
|
|
inline |
Member Data Documentation
unsigned Utcb::actv_state |
unsigned Utcb::intr_state |
unsigned Utcb::msg[(4096-sizeof(struct head))/sizeof(unsigned)] |
unsigned long long Utcb::qual[2] |
unsigned Utcb::sysenter_cs |
unsigned Utcb::sysenter_eip |
unsigned Utcb::sysenter_esp |
long long Utcb::tsc_value |
The documentation for this struct was generated from the following file: