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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Dec 2021 15:19:03 +0100
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+iOZotKkLcJY4CXebIky0sg+x0ejVE7dgfMqo24AelE=; b=hH6d3D2rVc9iMKqj3WBlFQB5e96X8BvlK0GE+XgVXaBSXKTuIRbcSVWXVh64USv8gF0g3OxLFJXXvZ3EZaCIYBQyUhnQyf9CfVmlgVPDnzKqQub4w7yG9+PgJNfvjYiALtdLcqdvGRqlO54i6QDnSOmOZYraeaeDzuv2BvbOWRYFW3nuEZWPo7JKE+ek3CpPjPbik08HlMlLtqYapbHiR9U6xh3I/RVnC60xciPNTXvZE2ZnXVqLSAFAj1v5+xvAfI8KWrcP7oiXiaN7gv8uiwtkeZup67XzzWqBa784JcPRG/9+8qzF1FUV795GGwUuliQ//FqRRVEbqpRPIOWk9g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TndpcjUim0B/L9qCrAJ48B8VadykP/+F0CNnzTy1YS4zh5TVaVEejxDKtjog6Mh6DiCUt86Qkqhyw1kPH08M81adXeTHbVdKGzEBZxpgoYzcOMF7lo7S1WxP7MxnDfTtLr2qdTs6ZU7dSwfoEB9I7mnzlxdt7m8zhdFMa2hRTiBgrRwb5BrEjs39dupf+57sll4JMQ4FEL0/ulD+iQePA7FYJ0hKuOgV0E7VvFCLTuKxwNagQHC51QVTlZoW1O3GtRtKTna7dr6D6bd5BD9YvagJdcaUgbxqgKrp9U9LNd+6wWyrssqhEEdJT4tJ+1/VbjzhzGDnoGNrQUxlSI74Tw==
  • Authentication-results: dkim=none (message not signed) header.d=none;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: Mon, 06 Dec 2021 14:19:10 +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®.