[PATCH] kvm tools: Use vesa reserved space for strings and modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As defined in the spec, the reserved space in struct vesa_general_info
should be used to store vesa oem string an a list of possible modes.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 tools/kvm/bios/int10.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/tools/kvm/bios/int10.c b/tools/kvm/bios/int10.c
index 48abe10..57647a1 100644
--- a/tools/kvm/bios/int10.c
+++ b/tools/kvm/bios/int10.c
@@ -20,14 +20,16 @@ struct int10_args {
 
 /* VESA General Information table */
 struct vesa_general_info {
-	u32 signature;			/* 0 Magic number = "VESA" */
-	u16 version;			/* 4 */
-	void *vendor_string;		/* 6 */
-	u32 capabilities;		/* 10 */
-	void *video_mode_ptr;		/* 14 */
-	u16 total_memory;		/* 18 */
-
-	u8 reserved[236];		/* 20 */
+	u32	signature;		/* 0 Magic number = "VESA" */
+	u16	version;		/* 4 */
+	void	*vendor_string;		/* 6 */
+	u32	capabilities;		/* 10 */
+	void	*video_mode_ptr;	/* 14 */
+	u16	total_memory;		/* 18 */
+	u16	modes[2];		/* 20 */
+	char	oem_string[11];		/* 24 */
+
+	u8 reserved[223];		/* 35 */
 } __attribute__ ((packed));
 
 
@@ -69,9 +71,6 @@ struct vminfo {
 	u8	reserved[206];		/* 50 */
 };
 
-char oemstring[11] = "KVM VESA";
-u16 modes[2] = { 0x0112, 0xffff };
-
 static inline void outb(unsigned short port, unsigned char val)
 {
 	asm volatile("outb %0, %1" : : "a"(val), "Nd"(port));
@@ -104,10 +103,12 @@ static void int10_vesa(struct int10_args *args)
 		*destination = (struct vesa_general_info) {
 			.signature	= VESA_MAGIC,
 			.version	= 0x102,
-			.vendor_string	= oemstring,
+			.vendor_string	= &destination->oem_string,
 			.capabilities	= 0x10,
-			.video_mode_ptr	= modes,
+			.video_mode_ptr	= &destination->modes,
 			.total_memory	= (4*VESA_WIDTH * VESA_HEIGHT) / 0x10000,
+			.oem_string	= "KVM VESA",
+			.modes		= { 0x0112, 0xffff },
 		};
 
 		break;
-- 
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux