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

[PATCH v2 4/7] x86/boot: simplify mode_table


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Sep 2021 15:25:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+iOZotKkLcJY4CXebIky0sg+x0ejVE7dgfMqo24AelE=; b=mzST7ToNYe6I/VK1pRGOzGsiePTHMT03Q24GTE4axPv3GuXJK8ZCT6Jho2kqArpQMTjw2okltFH3DXg1zEXwjjk628Mvq0+b5L1ht6kYtW6fVb8RdN2NxkzSFUOLbp1uIJYk20RczXclysW5/m+XNSUfJb2fZbgWP3rJKR8XWZj6/6eXsx2qKGg+xyfx4eCfkbL417vgUn17lDLJamH06cDtRhLHLvOtZrOz7z845rcqMucQSP19h5pbMrQgCku/GgClZGEzkKKkh4yRLCvQDCADaMdbTWq90Fcmxf70Y+INRcTGQluG6SKMuxAQwMghnLBjr2pj75jA6uHl+4FXGg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HjqLmfPJTlcT6Uq40v4YIkdeBsvCXYRr+SNip+0cff+Yj4E9YPoEuWcRjcyLTEEHHsE2l3vVO9Ryh8Nk+XZvyypp9WiJVvoPNyfdYQJDN821qic54FFrm2u+4JuEFMDrx9cLz4M5aIWe4eHNcpyPKotjYQlrV948BztXpv4Se4yGnfwL3YE80s+6AYd8UTPtfV6NLvu6l9R0itcwV/UvpMAUeLZSu2dmwqH8/z7Ru4b+34PpNFQkUG6XHba76THXbgwY6SA9qcYUvjJfeyVxH5NV9wXAFpDfaQvfZk01RCH1PA2U7ICDImb2muWAwfqE/cD/ZFVX+kCWhaAgJMkMSQ==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Sep 2021 13:25:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

There's no point in writing 80x25 text mode information via multiple
insns all storing immediate values. The data can simply be included
first thing in the vga_modes table, allowing the already present
REP MOVSB to take care of everything in one go.

While touching this also correct a related but stale comment.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/boot/video.S
+++ b/xen/arch/x86/boot/video.S
@@ -655,8 +655,9 @@ outidx: outb    %al, %dx
 # Build the table of video modes (stored after the setup.S code at the
 # `modelist' label. Each video mode record looks like:
 #        .word        MODE-ID             (our special mode ID (see above))
-#        .byte        rows                (number of rows)
-#        .byte        columns             (number of columns)
+#        .word        rows                (number of rows)
+#        .word        columns             (number of columns)
+#        .word        0                   (color depth; gfx modes only)
 # Returns address of the end of the table in DI, the end is marked
 # with a ASK_VGA ID.
 mode_table:
@@ -665,12 +666,6 @@ mode_table:
         jnz     mtab1
 
         leaw    modelist, %di           # Store standard modes:
-        movw    $VIDEO_80x25,(%di)      # The 80x25 mode (ALL)
-        movw    $0x50,2(%di)
-        movw    $0x19,4(%di)
-        movw    $0x00,6(%di)
-        addw    $8,%di
-
         leaw    bootsym(vga_modes), %si # All modes for std VGA
         movw    $vga_modes_end-vga_modes, %cx
         rep     movsb
@@ -684,6 +679,7 @@ ret0:   ret
 
 # Modes usable on all standard VGAs
 vga_modes:
+        .word   VIDEO_80x25, 0x50,0x19,0        # 80x25
         .word   VIDEO_80x50, 0x50,0x32,0        # 80x50
         .word   VIDEO_80x43, 0x50,0x2b,0        # 80x43
         .word   VIDEO_80x28, 0x50,0x1c,0        # 80x28




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.