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

[PATCH 2/3] x86/boot: simplify mode_table


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Sep 2021 15:23:46 +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=WBYGlDUPGe63F7i17EzUGyVBfTQXoFhDmoqlfhUwiMUq7FF9dxHSSNF1jRDLQXs9Cp7Igv69/y1BHeq/tlFUVifhp34+QbgMr7owlRPEHRoRqfNFAbysc7Qnt+xd0SRRqxg95Liw+BMINDVjxRG/4MRfnGypeb1Ud4QTFNJVVPgUiHL9nr9un13Qw0P0/zdSsRoeZ+PhJ4pdvO8cclXLJhYW2xpjixzQPZJk6BMrJGKPTmJN0jzxVHyUJGvVm5eC43MdVTpX1m/tPWUfiky6Sddss2N4wGWBjGlODXyRDOr6gzpYbPRODhRMB32yyJmUYKjWUtYtROyGv3jcUEJy4Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBClx6+dHssJUsF+DMg4mZgZ5RgYHpSiSQuQtBJK5aayQtD5cK+iaBxaMMBVznBi9d39YM8aXqYkgewS1yk/4J2FUN7YlFwb9msoxARHp7cqcZuOqQ7xg9FUuYGQjusQpP8qsEQTUv3AoEuKNihoaJYiTTLywEMfeXkw76bkDDOEUyHEHZEzExMyxBwUaNlLyQTIg6h5puGitNfsFEfmD7eGE+xHf4To2UI5eo+Pj2um9OyiSPPij5PWs9FCQfccHAnr5dEk0WCZ9p/9YNAkqN33fPZOE/kNpziyL8cbwXJg1BzjEcChY875IX9fkczMqouzs6ANnaoYdGinSRi6Mw==
  • 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, 08 Sep 2021 13:23:53 +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®.