@@ -6,18 +6,6 @@
#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
-struct int10_args {
- u32 eax;
- u32 ebx;
- u32 ecx;
- u32 edx;
- u32 esp;
- u32 ebp;
- u32 esi;
- u32 edi;
- u32 es;
-};
-
/* VESA General Information table */
struct vesa_general_info {
u32 signature; /* 0 Magic number = "VESA" */
@@ -79,14 +67,14 @@ static inline void outb(unsigned short port, unsigned char val)
* It's probably much more useful to make this print to the serial
* line rather than print to a non-displayed VGA memory
*/
-static inline void int10_putchar(struct int10_args *args)
+static inline void int10_putchar(struct biosregs *args)
{
u8 al = args->eax & 0xFF;
outb(0x3f8, al);
}
-static void vbe_get_mode(struct int10_args *args)
+static void vbe_get_mode(struct biosregs *args)
{
struct vminfo *info = (struct vminfo *) args->edi;
@@ -109,7 +97,7 @@ static void vbe_get_mode(struct int10_args *args)
};
}
-static void vbe_get_info(struct int10_args *args)
+static void vbe_get_info(struct biosregs *args)
{
struct vesa_general_info *info = (struct vesa_general_info *) args->edi;
@@ -127,7 +115,7 @@ static void vbe_get_info(struct int10_args *args)
#define VBE_STATUS_OK 0x004F
-static void int10_vesa(struct int10_args *args)
+static void int10_vesa(struct biosregs *args)
{
u8 al;
@@ -145,7 +133,7 @@ static void int10_vesa(struct int10_args *args)
args->eax = VBE_STATUS_OK;
}
-bioscall void int10_handler(struct int10_args *args)
+bioscall void int10_handler(struct biosregs *args)
{
u8 ah;
@@ -56,4 +56,20 @@
*/
#define bioscall __attribute__((regparm(3)))
+#ifndef __ASSEMBLER__
+
+struct biosregs {
+ u32 eax;
+ u32 ebx;
+ u32 ecx;
+ u32 edx;
+ u32 esp;
+ u32 ebp;
+ u32 esi;
+ u32 edi;
+ u32 es;
+};
+
+#endif
+
#endif /* BIOS_H_ */
@@ -11,9 +11,9 @@
#define VESA_BPP 32
struct kvm;
-struct int10_args;
+struct biosregs;
struct framebuffer *vesa__init(struct kvm *self);
-void int10_handler(struct int10_args *args);
+void int10_handler(struct biosregs *args);
#endif
This patch renames struct int10_args to struct biosregs in preparation for unifying interrupt handler code. Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> --- tools/kvm/bios/int10.c | 22 +++++----------------- tools/kvm/include/kvm/bios.h | 16 ++++++++++++++++ tools/kvm/include/kvm/vesa.h | 4 ++-- 3 files changed, 23 insertions(+), 19 deletions(-)