Displaying 14 results from an estimated 14 matches for "vmi_oreg1".
Did you mean:
vmi_ireg1
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...id write_cr4(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR4, "mov %0, %%cr4",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline u32 read_cr0(void)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR0, "mov %%cr0, %%eax",
+ VMI_OREG1(ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline u32 read_cr2(void)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR2, "mov %%cr2, %%eax",
+ VMI_OREG1(ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline u32 read_cr3(void...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...id write_cr4(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR4, "mov %0, %%cr4",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline u32 read_cr0(void)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR0, "mov %%cr0, %%eax",
+ VMI_OREG1(ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline u32 read_cr2(void)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR2, "mov %%cr2, %%eax",
+ VMI_OREG1(ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline u32 read_cr3(void...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
..., "outw %w0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline VMI_UINT32 vmi_inl(const VMI_UINT16 port)
+{
+ VMI_UINT32 ret;
+ vmi_wrap_call(
+ IN, "in %w0, %%eax",
+ VMI_OREG1(ret),
+ 1, XCONC("d"(port)),
+ VMI_CLOBBER_EXTENDED(ONE_RETURN, "memory"));
+ return ret;
+}
+
+static inline VMI_UINT8 vmi_inb(const VMI_UINT16 port)
+{
+ VMI_UINT8 ret;
+ vmi_wrap_call(
+ INB, "inb %w0, %%al",
+ VMI_OREG1(ret),
+ 1, XCONC("d"(port)),
+...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
..., "outw %w0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline VMI_UINT32 vmi_inl(const VMI_UINT16 port)
+{
+ VMI_UINT32 ret;
+ vmi_wrap_call(
+ IN, "in %w0, %%eax",
+ VMI_OREG1(ret),
+ 1, XCONC("d"(port)),
+ VMI_CLOBBER_EXTENDED(ONE_RETURN, "memory"));
+ return ret;
+}
+
+static inline VMI_UINT8 vmi_inb(const VMI_UINT16 port)
+{
+ VMI_UINT8 ret;
+ vmi_wrap_call(
+ INB, "inb %w0, %%al",
+ VMI_OREG1(ret),
+ 1, XCONC("d"(port)),
+...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...BER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+#define apic_write_atomic(r,v) apic_write(r,v)
+
+static inline unsigned long apic_read(unsigned long reg)
+{
+ unsigned long value;
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICRead, "movl (%0), %%eax",
+ VMI_OREG1(value),
+ 1,VMI_IREG1(addr),
+ VMI_CLOBBER(ONE_RETURN));
+ return value;
+}
+
+
+#endif /* CONFIG_X86_LOCAL_APIC */
+
+#endif /* __ASM_MACH_APICOPS_H */
Index: linux-2.6.16-rc5/include/asm-i386/mach-default/mach_apicops.h
===================================================================
--- lin...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...BER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+#define apic_write_atomic(r,v) apic_write(r,v)
+
+static inline unsigned long apic_read(unsigned long reg)
+{
+ unsigned long value;
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICRead, "movl (%0), %%eax",
+ VMI_OREG1(value),
+ 1,VMI_IREG1(addr),
+ VMI_CLOBBER(ONE_RETURN));
+ return value;
+}
+
+
+#endif /* CONFIG_X86_LOCAL_APIC */
+
+#endif /* __ASM_MACH_APICOPS_H */
Index: linux-2.6.16-rc5/include/asm-i386/mach-default/mach_apicops.h
===================================================================
--- lin...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(GetIDT, "sidt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline VMI_SELECTOR vmi_get_ldt(void)
+{
+ VMI_SELECTOR ret;
+ vmi_wrap_call(
+ GetLDT, "sldt %%ax",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline VMI_SELECTOR vmi_get_tr(void)
+{
+ VMI_SELECTOR ret;
+ vmi_wrap_call(
+ GetTR, "str %%ax",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+#define load_TR_de...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(GetIDT, "sidt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline VMI_SELECTOR vmi_get_ldt(void)
+{
+ VMI_SELECTOR ret;
+ vmi_wrap_call(
+ GetLDT, "sldt %%ax",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline VMI_SELECTOR vmi_get_tr(void)
+{
+ VMI_SELECTOR ret;
+ vmi_wrap_call(
+ GetTR, "str %%ax",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+#define load_TR_de...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...+ 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 mask)
+{
+ vmi_wrap_call(
+ SetIOPLMask, "pushfl;"
+ "andl $...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...+ 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 mask)
+{
+ vmi_wrap_call(
+ SetIOPLMask, "pushfl;"
+ "andl $...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...else
+#define VMI_IREG1 "ir"
+#define VMI_IREG2 "ir"
+#define VMI_IREG3 "ir"
+#endif
+#define VMI_IREG4 "ir"
+#define VMI_IREG5 "ir"
+
+#if (__GNUC__ == 4)
+#define VMI_IMM "i"
+#else
+#define VMI_IMM "iV"
+#endif
+
+#define VMI_OREG1 "=a"
+#define VMI_OREG2 "=d"
+#define VMI_OREG64 "=A"
+
+#define vmi_input(arg) \
+ "push %" XSTR(arg) ";"
+
+#if defined(CONFIG_VMI_REGPARM)
+#define vmi_input_early(arg)
+#else
+#define vmi_input_early(arg) \
+ "push %" XSTR(arg) &quo...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...else
+#define VMI_IREG1 "ir"
+#define VMI_IREG2 "ir"
+#define VMI_IREG3 "ir"
+#endif
+#define VMI_IREG4 "ir"
+#define VMI_IREG5 "ir"
+
+#if (__GNUC__ == 4)
+#define VMI_IMM "i"
+#else
+#define VMI_IMM "iV"
+#endif
+
+#define VMI_OREG1 "=a"
+#define VMI_OREG2 "=d"
+#define VMI_OREG64 "=A"
+
+#define vmi_input(arg) \
+ "push %" XSTR(arg) ";"
+
+#if defined(CONFIG_VMI_REGPARM)
+#define vmi_input_early(arg)
+#else
+#define vmi_input_early(arg) \
+ "push %" XSTR(arg) &quo...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...quot;xor %%eax, %%eax;"
+ "xor %%edx, %%edx;",
+ VMI_OREG64 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(TWO_RETURNS));
+ return ret;
+}
+
+static inline VMI_BOOL vmi_wallclock_updated(void)
+{
+ VMI_BOOL ret;
+ vmi_wrap_call(
+ WallclockUpdated, "xor %%eax, %%eax;",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline void vmi_set_alarm(VMI_UINT32 flags, VMI_CYCLES expiry, VMI_CYCLES period)
+{
+ vmi_wrap_call(
+ SetAlarm, "",
+ VMI_NO_OUTPUT,
+ 5, XCONC(VMI_IREG1(flags),
+ VMI_IREG2((VMI_UINT32)expiry), VMI...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...quot;xor %%eax, %%eax;"
+ "xor %%edx, %%edx;",
+ VMI_OREG64 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(TWO_RETURNS));
+ return ret;
+}
+
+static inline VMI_BOOL vmi_wallclock_updated(void)
+{
+ VMI_BOOL ret;
+ vmi_wrap_call(
+ WallclockUpdated, "xor %%eax, %%eax;",
+ VMI_OREG1 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(ONE_RETURN));
+ return ret;
+}
+
+static inline void vmi_set_alarm(VMI_UINT32 flags, VMI_CYCLES expiry, VMI_CYCLES period)
+{
+ vmi_wrap_call(
+ SetAlarm, "",
+ VMI_NO_OUTPUT,
+ 5, XCONC(VMI_IREG1(flags),
+ VMI_IREG2((VMI_UINT32)expiry), VMI...