Overview   API Reference  

machine_config.hpp

00001 #if !defined(__MACHINE_CONFIG_HPP__)
00002 #define __MACHINE_CONFIG_HPP__
00003 
00004 //
00005 // local includes
00006 //
00007 #include "core/common.hpp"
00008 
00014 struct machine_config : public l4vmm_config, public bitmask<unsigned>
00015 {
00019     l4_threadid_t client;
00020 
00024     machine_config(const l4_threadid_t client=L4_INVALID_ID);
00025 
00030     machine_config &update(const l4vmm_config &config);
00031 
00036     machine_config &update(const machine_config &config);
00037 
00038     //
00039     // debug stuff
00040     //
00044     static inline const char *mode2string(const enum l4vmm_emulation_modes mode)
00045     {
00046         return (mode == L4VMM_MODE_DEFAULT) ? "default" :
00047                    (mode == L4VMM_MODE_X86_REAL) ? "x86 real mode" :
00048                        (mode == L4VMM_MODE_X86_PROTECTED16) ? "x86 16-bit protected mode" :
00049                            (mode == L4VMM_MODE_X86_PROTECTED32) ? "x86 32-bit protected mode" :
00050                                (mode == L4VMM_MODE_X86_PROTECTED64) ? "x86 64-bit protected mode" :
00051                                    "unknown";
00052     }
00053 
00057     inline const char *mode2string(void) const
00058     {
00059         return mode2string(mode);
00060     }
00061 
00065     void print(const char *header=nullptr) const;
00066 
00070     void print_client(const char *header=nullptr) const;
00071 };
00072 
00073 #endif
00074 
00075 // ***** end of source ***** //
00076 

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008