Displaying 12 results from an estimated 12 matches for "one_return".
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...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)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR3, "mo...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...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)
+{
+ u32 ret;
+ vmi_wrap_call(
+ GetCR3, "mo...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...alue), "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)),
+ VMI_CLOBBER_EXTENDED(ONE_RETURN, "memory"));
+ return ret;
+}
+...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...alue), "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)),
+ VMI_CLOBBER_EXTENDED(ONE_RETURN, "memory"));
+ return ret;
+}
+...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...#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
===================================================================
--- linux-2.6.16-rc5.orig/include/asm-i386/mach-default/mach_ap...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...#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
===================================================================
--- linux-2.6.16-rc5.orig/include/asm-i386/mach-default/mach_ap...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...t;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_desc() load_tr(GDT_ENTRY_TSS*8)
+#define load_LDT_desc(...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...t;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_desc() load_tr(GDT_ENTRY_TSS*8)
+#define load_LDT_desc(...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...%%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_IREG3((VMI_UINT32)(expiry >> 32)),
+ VMI_IR...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...%%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_IREG3((VMI_UINT32)(expiry >> 32)),
+ VMI_IR...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...+ 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 $0xffffcfff, (%%esp);"
+ "orl %0, (%%esp);"
+ "popf...
2007 Apr 18
1
[RFC, PATCH 12/24] i386 Vmi processor header
...+ 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 $0xffffcfff, (%%esp);"
+ "orl %0, (%%esp);"
+ "popf...