|
NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A generic cpu state class. More...
#include <cpustate.h>
Public Member Functions | |
| unsigned | cpl () |
| unsigned | iopl () |
| unsigned | pm () |
| unsigned | pg () |
| unsigned | v86 () |
| void | edx_eax (unsigned long long value) |
| unsigned long long | edx_eax () |
Public Member Functions inherited from Utcb | |
| unsigned | ind2fp (unsigned ofs) |
| Converts index to UTCB data to UTCB "frame pointers". | |
| unsigned | fp2ind (unsigned fp) |
| Converts UTCB "frame pointer" to index to UTCB data area. | |
| unsigned | get_stack_top () |
| Returns the index to UTCB data area of the first empty word above the UTCB stack area. | |
| void | set_stack_top (unsigned ofs) |
| Sets the "top pointer" of the UTCB stack area. | |
| Frame | get_nested_frame () |
| unsigned | frame_words () |
| Returns the number of words needed for storing the current UTCB content to a UTCB frame as implemented in add_frame(). | |
| Utcb & | add_frame () |
| Push UTCB header and data to a stack area in the UTCB. | |
| void | skip_frame () |
| void | drop_frame () |
| Restore UTCB to the state saved by the last add_frame() and remove the restored state from the stack area. | |
| void | set_header (unsigned untyped, unsigned typed) |
| unsigned * | item_start () |
| Utcb & | operator<< (unsigned value) |
| bool | validate_send_bounds () |
| bool | validate_recv_bounds () |
| template<typename T > | |
| Utcb & | operator<< (T &value) |
| Utcb & | operator<< (String string) |
| Utcb & | operator<< (TypedMapCap value) |
| Utcb & | operator<< (TypedIdentifyCap value) |
| Utcb & | operator<< (Crd value) |
| template<typename T > | |
| bool | operator>> (T &value) |
| WARN_UNUSED unsigned long | 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) |
| Add mappings to a UTCB. | |
| void | reset () |
| 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. | |
Additional Inherited Members | |
Public Types inherited from Utcb | |
| enum | { STACK_START = 512 } |
| enum | { MINSHIFT = 12 } |
| enum | { HEADER_SIZE = sizeof(struct head), MAX_DATA_WORDS = sizeof(msg) / sizeof(msg[0]), MAX_FRAME_WORDS = MAX_DATA_WORDS - STACK_START - 1 } |
| typedef struct Utcb::Descriptor | Descriptor |
Public Attributes inherited from Utcb | |
| struct Utcb::head | head |
| union { | |
| struct { | |
| unsigned mtd | |
| unsigned inst_len | |
| unsigned eip | |
| unsigned efl | |
| unsigned intr_state | |
| unsigned actv_state | |
| unsigned inj_info | |
| unsigned inj_error | |
| union { | |
| struct { | |
| } | |
| unsigned gpr [8] | |
| } | |
| unsigned long long qual [2] | |
| unsigned ctrl [2] | |
| long long reserved | |
| unsigned cr0 | |
| unsigned cr2 | |
| unsigned cr3 | |
| unsigned cr4 | |
| unsigned dr7 | |
| unsigned sysenter_cs | |
| unsigned sysenter_esp | |
| unsigned sysenter_eip | |
| Descriptor es | |
| Descriptor cs | |
| Descriptor ss | |
| Descriptor ds | |
| Descriptor fs | |
| Descriptor gs | |
| Descriptor ld | |
| Descriptor tr | |
| Descriptor gd | |
| Descriptor id | |
| long long tsc_value | |
| long long tsc_off | |
| } | |
| unsigned msg [(4096-sizeof(struct head))/sizeof(unsigned)] | |
| }; | |
A generic cpu state class.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |