search for: vmi_uint32

Displaying 14 results from an estimated 14 matches for "vmi_uint32".

2007 Apr 18
4
[RFC, PATCH 3/24] i386 Vmi interface definition
...UINT16 romSignature; // option ROM signature + VMI_INT8 romLength; // ROM length in 512 byte chunks + unsigned char romEntry[4]; // 16-bit code entry point + VMI_UINT8 romPad0; // 4-byte align pad + VMI_UINT32 vRomSignature; // VROM identification signature + VMI_UINT8 APIVersionMinor; // Minor version of API + VMI_UINT8 APIVersionMajor; // Major version of API + VMI_UINT8 reserved0; // Reserved for expansion + VMI...
2007 Apr 18
4
[RFC, PATCH 3/24] i386 Vmi interface definition
...UINT16 romSignature; // option ROM signature + VMI_INT8 romLength; // ROM length in 512 byte chunks + unsigned char romEntry[4]; // 16-bit code entry point + VMI_UINT8 romPad0; // 4-byte align pad + VMI_UINT32 vRomSignature; // VROM identification signature + VMI_UINT8 APIVersionMinor; // Minor version of API + VMI_UINT8 APIVersionMajor; // Major version of API + VMI_UINT8 reserved0; // Reserved for expansion + VMI...
2007 Apr 18
4
[RFC, PATCH 1/24] i386 Vmi documentation
...uts: EAX = reboot mode + #define VMI_REBOOT_SOFT 0x0 + #define VMI_REBOOT_HARD 0x1 + Outputs: None + Clobbers: Standard + Segments: Standard + + VMI_SetInitialAPState: + + void VMI_SetInitialAPState(APState *apState, VMI_UINT32 apicID); + + Sets the initial state of the application processor with local APIC ID + "apicID" to the state in apState. apState must be the page-aligned + linear address of the APState structure describing the initial state of + the specified application processor...
2007 Apr 18
4
[RFC, PATCH 1/24] i386 Vmi documentation
...uts: EAX = reboot mode + #define VMI_REBOOT_SOFT 0x0 + #define VMI_REBOOT_HARD 0x1 + Outputs: None + Clobbers: Standard + Segments: Standard + + VMI_SetInitialAPState: + + void VMI_SetInitialAPState(APState *apState, VMI_UINT32 apicID); + + Sets the initial state of the application processor with local APIC ID + "apicID" to the state in apState. apState must be the page-aligned + linear address of the APState structure describing the initial state of + the specified application processor...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...om + * + */ + +#ifndef __MACH_VMI_H +#define __MACH_VMI_H + +/* Linux type system definitions */ +#include <linux/types.h> +struct tss_struct; +struct Xgt_desc_struct; +typedef struct tss_struct VMI_TASK; +typedef struct Xgt_desc_struct VMI_DTR; +typedef uint64_t VMI_UINT64; +typedef uint32_t VMI_UINT32; +typedef uint16_t VMI_UINT16; +typedef uint16_t VMI_SELECTOR; +typedef uint8_t VMI_UINT8; +typedef int8_t VMI_INT8; +typedef uint8_t VMI_BOOL; +typedef uint64_t VMI_CYCLES; + +#include <paravirtualInterface.h> +#include <mach_asm.h> + +#if defined(CONFIG_VMI_C_CONVENTION) +#define VMI_...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...om + * + */ + +#ifndef __MACH_VMI_H +#define __MACH_VMI_H + +/* Linux type system definitions */ +#include <linux/types.h> +struct tss_struct; +struct Xgt_desc_struct; +typedef struct tss_struct VMI_TASK; +typedef struct Xgt_desc_struct VMI_DTR; +typedef uint64_t VMI_UINT64; +typedef uint32_t VMI_UINT32; +typedef uint16_t VMI_UINT16; +typedef uint16_t VMI_SELECTOR; +typedef uint8_t VMI_UINT8; +typedef int8_t VMI_INT8; +typedef uint8_t VMI_BOOL; +typedef uint64_t VMI_CYCLES; + +#include <paravirtualInterface.h> +#include <mach_asm.h> + +#if defined(CONFIG_VMI_C_CONVENTION) +#define VMI_...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...output calls. The reason is that the memory + * clobber is not an effect of the VMI call, but is used to + * serialize memory writes by the compiler before an I/O + * instruction. In addition, even input operations may clobber + * hardware mapped memory. + */ + +static inline void vmi_outl(const VMI_UINT32 value, const VMI_UINT16 port) +{ + vmi_wrap_call( + OUT, "out %0, %w1", + VMI_NO_OUTPUT, + 2, XCONC("a"(value), "d"(port)), + VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory")); +} + +static inline void vmi_outb(const VMI_UINT8 value, const VMI_UINT16 port) +{...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...output calls. The reason is that the memory + * clobber is not an effect of the VMI call, but is used to + * serialize memory writes by the compiler before an I/O + * instruction. In addition, even input operations may clobber + * hardware mapped memory. + */ + +static inline void vmi_outl(const VMI_UINT32 value, const VMI_UINT16 port) +{ + vmi_wrap_call( + OUT, "out %0, %w1", + VMI_NO_OUTPUT, + 2, XCONC("a"(value), "d"(port)), + VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory")); +} + +static inline void vmi_outb(const VMI_UINT8 value, const VMI_UINT16 port) +{...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...<asm/highmem.h> +#include <asm/pgtable.h> +#include <vmi.h> + +extern char __VMI_END; +extern char __VMI_START; +extern char __VMI_SHARED; +VROMHeader *vmi_rom = NULL; + +VMI_UINT8 hypervisor_found; + +/* Convenient macro for calling VMI functions indirectly in the ROM */ +typedef VMI_UINT32 __attribute__((regparm(1))) (VROMFUNC)(void); + +#define VROMFunc(table,func) \ + (((VROMFUNC *)&(((VROMCallTable *)(table))->vromCall[(func)].f)) \ + ()) + +#define MNEM_PUSH_I 0x68 +#define MNEM_PUSH_IB 0x6a +#define MNEM_PUSH_EAX 0x50 +#define MNEM_PUSH_ECX 0x51 +#define MNEM_PUSH...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...<asm/highmem.h> +#include <asm/pgtable.h> +#include <vmi.h> + +extern char __VMI_END; +extern char __VMI_START; +extern char __VMI_SHARED; +VROMHeader *vmi_rom = NULL; + +VMI_UINT8 hypervisor_found; + +/* Convenient macro for calling VMI functions indirectly in the ROM */ +typedef VMI_UINT32 __attribute__((regparm(1))) (VROMFUNC)(void); + +#define VROMFunc(table,func) \ + (((VROMFUNC *)&(((VROMCallTable *)(table))->vromCall[(func)].f)) \ + ()) + +#define MNEM_PUSH_I 0x68 +#define MNEM_PUSH_IB 0x6a +#define MNEM_PUSH_EAX 0x50 +#define MNEM_PUSH_ECX 0x51 +#define MNEM_PUSH...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...tcall void apic_vmi_timer_interrupt(void); + extern char __VMI_END; extern char __VMI_START; extern char __VMI_SHARED; VROMHeader *vmi_rom = NULL; VMI_UINT8 hypervisor_found; +VMI_UINT8 hypervisor_timer_found; /* Convenient macro for calling VMI functions indirectly in the ROM */ typedef VMI_UINT32 __attribute__((regparm(1))) (VROMFUNC)(void); @@ -201,6 +205,11 @@ void __init intr_init_hook(void) { #ifdef CONFIG_X86_LOCAL_APIC apic_intr_init(); + + /* if the VMI-timer is used, redirect the local APIC timer interrupt + * gate to point to the vmi interrupt handler. */ + if (vmi_timer_used(...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...tcall void apic_vmi_timer_interrupt(void); + extern char __VMI_END; extern char __VMI_START; extern char __VMI_SHARED; VROMHeader *vmi_rom = NULL; VMI_UINT8 hypervisor_found; +VMI_UINT8 hypervisor_timer_found; /* Convenient macro for calling VMI functions indirectly in the ROM */ typedef VMI_UINT32 __attribute__((regparm(1))) (VROMFUNC)(void); @@ -201,6 +205,11 @@ void __init intr_init_hook(void) { #ifdef CONFIG_X86_LOCAL_APIC apic_intr_init(); + + /* if the VMI-timer is used, redirect the local APIC timer interrupt + * gate to point to the vmi interrupt handler. */ + if (vmi_timer_used(...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...URNS)); +} + +static inline void set_debugreg(const u32 val, const int num) +{ + vmi_wrap_call( + SetDR, "movl %1, %%db%c2", + VMI_NO_OUTPUT, + 2, XCONC(VMI_IREG1(num), VMI_IREG2(val), VMI_IMM (num)), + VMI_CLOBBER(ZERO_RETURNS)); +} + +static inline u32 vmi_get_dr(const int num) +{ + VMI_UINT32 ret; + vmi_wrap_call( + GetDR, "movl %%db%c1, %%eax", + VMI_OREG1(ret), + 1, XCONC(VMI_IREG1(num), VMI_IMM (num)), + VMI_CLOBBER(ONE_RETURN)); + return ret; +} + +#define get_debugreg(var, register) do { var = vmi_get_dr(register); } while (0) + +static inline void set_iopl_mask(u32 m...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...URNS)); +} + +static inline void set_debugreg(const u32 val, const int num) +{ + vmi_wrap_call( + SetDR, "movl %1, %%db%c2", + VMI_NO_OUTPUT, + 2, XCONC(VMI_IREG1(num), VMI_IREG2(val), VMI_IMM (num)), + VMI_CLOBBER(ZERO_RETURNS)); +} + +static inline u32 vmi_get_dr(const int num) +{ + VMI_UINT32 ret; + vmi_wrap_call( + GetDR, "movl %%db%c1, %%eax", + VMI_OREG1(ret), + 1, XCONC(VMI_IREG1(num), VMI_IMM (num)), + VMI_CLOBBER(ONE_RETURN)); + return ret; +} + +#define get_debugreg(var, register) do { var = vmi_get_dr(register); } while (0) + +static inline void set_iopl_mask(u32 m...