Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1816 → Rev 1817

/trunk/kernel/arch/xen32/include/boot/boot.h
46,16 → 46,16
typedef struct {
char magic[32]; /**< "xen-<version>-<platform>" */
unsigned long nr_pages; /**< Total pages allocated to this domain */
unsigned long shared_info; /**< Physical address of shared info struct */
void *shared_info; /**< Machine address of shared info struct */
uint32_t flags; /**< SIF_xxx flags */
unsigned long store_mfn; /**< Physical page number of shared page */
void *store_mfn; /**< Machine page number of shared page */
uint32_t store_evtchn; /**< Event channel for store communication */
unsigned long console_mfn; /**< Physical address of console page */
void *console_mfn; /**< Machine address of console page */
uint32_t console_evtchn; /**< Event channel for console messages */
unsigned long pt_base; /**< Virtual address of page directory */
unsigned long *pt_base; /**< Virtual address of page directory */
unsigned long nr_pt_frames; /**< Number of bootstrap p.t. frames */
unsigned long mfn_list; /**< Virtual address of page-frame list */
unsigned long mod_start; /**< Virtual address of pre-loaded module */
unsigned long *mfn_list; /**< Virtual address of page-frame list */
void *mod_start; /**< Virtual address of pre-loaded module */
unsigned long mod_len; /**< Size (bytes) of pre-loaded module */
int8_t cmd_line[GUEST_CMDLINE];
} start_info_t;
/trunk/kernel/arch/xen32/include/asm.h
154,13 → 154,13
*/
static inline ipl_t interrupts_enable(void)
{
ipl_t v;
__asm__ volatile (
ipl_t v = 0;
/* __asm__ volatile (
"pushf\n\t"
"popl %0\n\t"
"sti\n"
: "=r" (v)
);
);*/
return v;
}
 
173,13 → 173,13
*/
static inline ipl_t interrupts_disable(void)
{
ipl_t v;
__asm__ volatile (
ipl_t v = 0;
/* __asm__ volatile (
"pushf\n\t"
"popl %0\n\t"
"cli\n"
: "=r" (v)
);
);*/
return v;
}
 
191,11 → 191,11
*/
static inline void interrupts_restore(ipl_t ipl)
{
__asm__ volatile (
/* __asm__ volatile (
"pushl %0\n\t"
"popf\n"
: : "r" (ipl)
);
);*/
}
 
/** Return interrupt priority level.
204,12 → 204,12
*/
static inline ipl_t interrupts_read(void)
{
ipl_t v;
__asm__ volatile (
ipl_t v = 0;
/* __asm__ volatile (
"pushf\n\t"
"popl %0\n"
: "=r" (v)
);
);*/
return v;
}
 
/trunk/kernel/arch/xen32/include/hypercall.h
33,7 → 33,29
#include <macros.h>
 
 
typedef uint16_t domid_t;
 
typedef struct {
uint64_t ptr; /**< Machine address of PTE */
uint64_t val; /**< New contents of PTE */
} mmu_update_t;
 
typedef struct {
unsigned int cmd;
union {
unsigned long mfn;
unsigned long linear_addr;
} arg1;
union {
unsigned int nr_ents;
void *vcpumask;
} arg2;
} mmuext_op_t;
 
 
#define XEN_MMU_UPDATE 1
#define XEN_CONSOLE_IO 18
#define XEN_MMUEXT_OP 26
 
 
/*
43,6 → 65,27
#define CONSOLE_IO_READ 1
 
 
#define MMUEXT_PIN_L1_TABLE 0
#define MMUEXT_PIN_L2_TABLE 1
#define MMUEXT_PIN_L3_TABLE 2
#define MMUEXT_PIN_L4_TABLE 3
#define MMUEXT_UNPIN_TABLE 4
#define MMUEXT_NEW_BASEPTR 5
#define MMUEXT_TLB_FLUSH_LOCAL 6
#define MMUEXT_INVLPG_LOCAL 7
#define MMUEXT_TLB_FLUSH_MULTI 8
#define MMUEXT_INVLPG_MULTI 9
#define MMUEXT_TLB_FLUSH_ALL 10
#define MMUEXT_INVLPG_ALL 11
#define MMUEXT_FLUSH_CACHE 12
#define MMUEXT_SET_LDT 13
#define MMUEXT_NEW_USER_BASEPTR 15
 
 
#define DOMID_SELF (0x7FF0U)
#define DOMID_IO (0x7FF1U)
 
 
#define hypercall0(id) \
({ \
unative_t ret; \
141,9 → 184,19
})
 
 
static inline int xen_console_io(const int cmd, const int count, const char *str)
static inline int xen_console_io(const unsigned int cmd, const unsigned int count, const char *str)
{
return hypercall3(XEN_CONSOLE_IO, cmd, count, str);
}
 
static inline int xen_mmu_update(const mmu_update_t *req, const unsigned int count, unsigned int *success_count, domid_t domid)
{
return hypercall4(XEN_MMU_UPDATE, req, count, success_count, domid);
}
 
static inline int xen_mmuext_op(const mmuext_op_t *op, const unsigned int count, unsigned int *success_count, domid_t domid)
{
return hypercall4(XEN_MMUEXT_OP, op, count, success_count, domid);
}
 
#endif