]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commitdiff
vgabios: Don't check for special case of page==0xff on external calls
authorKevin O'Connor <kevin@koconnor.net>
Mon, 4 Jul 2016 16:27:38 +0000 (12:27 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 4 Jul 2016 16:27:38 +0000 (12:27 -0400)
The original "lgpl vgabios" internally used page=0xff as a mechanism
for specifying the current page.  It also would allow int1013 calls to
externally specify bh==0xff for the current page.  However, there is
no documentation supporting this as an externally available feature.
SeaVGABIOS does not need the internal shortcut; this patch removes the
code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/vgabios.c
vgasrc/vgafb.c

index 8b50192174b88b71aab5a0201c10a65f3aa23734..2593e037a2a8aa01b800fccff8846dcb405ddc26 100644 (file)
@@ -109,16 +109,10 @@ set_cursor_pos(struct cursorpos cp)
 struct cursorpos
 get_cursor_pos(u8 page)
 {
-    if (page == 0xff)
-        // special case - use current page
-        page = GET_BDA(video_page);
-    if (page > 7) {
-        struct cursorpos cp = { 0, 0, 0xfe };
-        return cp;
-    }
+    if (page > 7)
+        return (struct cursorpos) { 0, 0, 0 };
     u16 xy = GET_BDA(cursor_pos[page]);
-    struct cursorpos cp = {xy, xy>>8, page};
-    return cp;
+    return (struct cursorpos) { xy, xy>>8, page };
 }
 
 static void
@@ -555,7 +549,7 @@ handle_100e(struct bregs *regs)
     // Ralf Brown Interrupt list is WRONG on bh(page)
     // We do output only on the current page !
     struct carattr ca = {regs->al, regs->bl, 0};
-    struct cursorpos cp = get_cursor_pos(0xff);
+    struct cursorpos cp = get_cursor_pos(GET_BDA(video_page));
     write_teletype(&cp, ca);
     set_cursor_pos(cp);
 }
index 5d1ecc936ca7eaf05078564a699e96e27a39fbf6..58c60ad54f6a28eb30f9ba0844ef8f1bc524c1fe 100644 (file)
@@ -674,7 +674,7 @@ vgafb_set_swcursor(int enable)
     struct vgamode_s *vmode_g = get_current_mode();
     if (!vmode_g)
         return;
-    struct cursorpos cp = get_cursor_pos(0xff);
+    struct cursorpos cp = get_cursor_pos(GET_BDA(video_page));
     if (cp.x >= GET_BDA(video_cols) || cp.y > GET_BDA(video_rows)
         || GET_BDA(cursor_type) >= 0x2000)
         // Cursor not visible