WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Qemu bios timeout

To: Nick Anderson <nick@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Qemu bios timeout
From: Stephan Seitz <s.seitz@xxxxxxxxxxxx>
Date: Sun, 04 May 2008 01:03:43 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 May 2008 05:44:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <481CE8B2.10200@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: netz-haut e.K.
References: <481CE8B2.10200@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (X11/20080227)
You have to modify the /tools/firmware/rombios/rombios.c

I did some work on this based on some patches found on xen-devel.

I'll attach a patch to rombios.c and a hvmloader build on 3.2.0 with
rombios patches applied.

Please don't look too close at this patch as this was my first try
with bios routines... ;)


Cheers,

Stephan



Nick Anderson schrieb:
Does anyone know how to change the bios timeout for qemu when dealing with HVMs? Sometimes getting connected with vnc takes a bit, It would be nice to have a bit more time.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


--
Stephan Seitz
Senior System Administrator

*netz-haut* e.K.
multimediale kommunikation

zweierweg 22
97074 würzburg

fon: +49 931 2876247
fax: +49 931 2876248

web: www.netz-haut.de <http://www.netz-haut.de/>

registriergericht: amtsgericht würzburg, hra 5054
--- xen-3.2-3.2.0/tools/firmware/rombios/rombios.c      2008-01-17 
00:21:33.000000000 +0100
+++ xen-3.2-3.2.0.new/tools/firmware/rombios/rombios.c  2008-01-21 
10:11:11.404418186 +0100
@@ -858,8 +858,6 @@ typedef struct {
   flags_t flags;
   } iret_addr_t;
 
-
-
 static Bit8u          inb();
 static Bit8u          inb_cmos();
 static void           outb();
@@ -959,6 +957,27 @@ static char CVSID[] = "$Id: rombios.c,v 
 /* Offset to skip the CVS $Id: prefix */ 
 #define bios_version_string  (CVSID + 4)
 
+#define SC_BLACK       0
+#define SC_BLUE                1
+#define SC_GREEN       2
+#define SC_CYAN                3
+#define SC_RED         4
+#define SC_MAGENTA     5
+#define SC_BROWN       6
+#define SC_LIGHTGRAY   7
+#define SC_DARKGRAY    8
+#define SC_LIGHTBLUE   9
+#define SC_LIGHTGREEN  10
+#define SC_LIGHTCYAN   11
+#define SC_LIGHTRED    12
+#define SC_LIGHTMAGENTA 13
+#define SC_YELLOW      14
+#define SC_WHITE       15
+
+Bit8u bios_textcolor = 15; //SC_LIGHTGRAY;
+Bit8u bios_backgroundcolor = 0; //SC_BLACK;
+
+
 #define BIOS_PRINTF_HALT     1
 #define BIOS_PRINTF_SCREEN   2
 #define BIOS_PRINTF_INFO     4
@@ -1529,7 +1548,50 @@ wrch(c)
   pop  bp
   ASM_END
 }
- 
+
+  void
+_wrchs(c,cg)
+  Bit8u c;
+  Bit8u cg;
+{
+  ASM_START
+  push bp
+  mov  bp, sp
+
+  push bx
+  push cx
+
+  mov  ah, #0x09 ;; write character at cursor position
+  mov  al, 4[bp] ;; the character
+  mov  bx, 6[bp] ;; 0001 blue and 1110 yellow
+  mov  bh, #0x00 ;; bh is the page number and left alone by now
+  mov  cx, #0x01 ;; number of characters
+  int #0x10
+
+  pop  cx
+  pop  bx
+  
+  pop bp
+  ASM_END
+}
+
+//  mov  bh, #0x00 ;; page
+//  mov  ah, #0x03 ;; get cursor position dh row dl column
+//  int  #0x10
+//  add  dl, #0x01 ;; increase column
+//  mov  ah, #0x02 ;; set cursor position
+//  int #0x10
+
+void wrchs(c,fg,bg)
+  Bit8u fg;
+  Bit8u bg;
+{
+  Bit8u cg;
+  cg = (bg<<4)+fg;
+  _wrchs(c,cg); // screen output with color, character is overwritten by 
typewriter
+  wrch(c); // typewriter (colored if on screen, otherwise simple
+}
+
   void
 send(action, c)
   Bit16u action;
@@ -1547,8 +1609,13 @@ send(action, c)
   if (action & BIOS_PRINTF_INFO) outb(INFO_PORT, c);
 #endif
   if (action & BIOS_PRINTF_SCREEN) {
-    if (c == '\n') wrch('\r');
-    wrch(c);
+    if (c == '\n') {
+       wrch('\r');
+       wrch(c);
+    }
+    else {
+       wrchs(c, bios_textcolor, bios_backgroundcolor);
+    }
   }
 }
 
@@ -1585,6 +1652,24 @@ put_uint(action, val, width, neg)
   send(action, val - (nval * 10) + '0');
 }
 
+  void
+put_luint(action, val, width, neg)
+  Bit16u action;
+  unsigned long val;
+  short width;
+  bx_bool neg;
+{
+  unsigned long nval = val / 10;
+  if (nval)
+    put_luint(action, nval, width - 1, neg);
+  else {
+    while (--width > 0) send(action, ' ');
+    if (neg) send(action, '-');
+    }
+  send(action, val - (nval * 10) + '0');
+}
+
+
 //--------------------------------------------------------------------------
 // bios_printf()
 //   A compact variable argument printf function which prints its output via
@@ -1603,7 +1688,7 @@ bios_printf(action, s)
   bx_bool  in_format;
   short i;
   Bit16u  *arg_ptr;
-  Bit16u   arg_seg, arg, nibble, shift_count, format_width;
+  Bit16u   arg_seg, arg, nibble, hibyte, shift_count, format_width, hexadd;
 
   arg_ptr = &s;
   arg_seg = get_SS();
@@ -1630,17 +1715,49 @@ bios_printf(action, s)
       else {
         arg_ptr++; // increment to next arg
         arg = read_word(arg_seg, arg_ptr);
-        if (c == 'x') {
+        if (c == 'x' || c == 'X') {
           if (format_width == 0)
             format_width = 4;
+         if (c == 'x')
+           hexadd = 'a';
+         else
+           hexadd = 'A';
           for (i=format_width-1; i>=0; i--) {
             nibble = (arg >> (4 * i)) & 0x000f;
-            send (action, (nibble<=9)? (nibble+'0') : (nibble-10+'A'));
+            send (action, (nibble<=9)? (nibble+'0') : (nibble-10+hexadd));
             }
           }
         else if (c == 'u') {
           put_uint(action, arg, format_width, 0);
           }
+       else if (c == 'l') {
+         s++;
+         c = read_byte(get_CS(), s); /* is it ld,lx,lu? */
+         arg_ptr++; /* increment to next arg */
+         hibyte = read_word(arg_seg, arg_ptr);
+         if (c == 'd') {
+           if (hibyte & 0x8000)
+             put_luint(action, 0L-(((Bit32u) hibyte << 16) | arg), 
format_width-1, 1);
+           else
+             put_luint(action, ((Bit32u) hibyte << 16) | arg, format_width, 0);
+         }
+         else if (c == 'u') {
+           put_luint(action, ((Bit32u) hibyte << 16) | arg, format_width, 0);
+         }
+         else if (c == 'x' || c == 'X')
+         {
+           if (format_width == 0)
+             format_width = 8;
+           if (c == 'x')
+             hexadd = 'a';
+           else
+             hexadd = 'A';
+           for (i=format_width-1; i>=0; i--) {
+             nibble = ((((Bit32u) hibyte << 16) | arg) >> (4 * i)) & 0x000f;
+             send (action, (nibble<=9)? (nibble+'0') : (nibble-10+hexadd));
+             }
+          }
+        }
         else if (c == 'd') {
           if (arg & 0x8000)
             put_int(action, -arg, format_width - 1, 1);
@@ -1893,6 +2010,8 @@ shutdown_status_panic(status)
 void
 print_bios_banner()
 {
+  bios_textcolor=SC_WHITE;
+  bios_backgroundcolor=SC_BLACK;
   printf(BX_APPNAME" BIOS, %d cpu%s, ", BX_SMP_PROCESSORS, 
BX_SMP_PROCESSORS>1?"s":"");
   printf("%s %s\n", bios_cvs_version_string, bios_date_string);
 #if BX_TCGBIOS
@@ -1994,7 +2113,9 @@ print_boot_device(type)
   /* NIC appears as type 0x80 */ 
   if (type == 0x80 ) type = 0x4;
   if (type == 0 || type > 0x4) BX_PANIC("Bad drive type\n"); 
-  printf("Booting from %s...\n", drivetypes[type]);
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+  printf("\n\nBooting from %s...\n", drivetypes[type]);
 }
 
 //--------------------------------------------------------------------------
@@ -2007,6 +2128,8 @@ print_boot_failure(type, reason)
 {
   if (type == 0 || type > 0x3) BX_PANIC("Bad drive type\n"); 
 
+  bios_textcolor=SC_RED;
+  bios_backgroundcolor=SC_BLACK;
   printf("Boot from %s failed", drivetypes[type]);
   if (type < 4) {
     /* Report the reason too */
@@ -2026,11 +2149,340 @@ print_boot_failure(type, reason)
 print_cdromboot_failure( code )
   Bit16u code;
 {
+  bios_textcolor=SC_RED;
+  bios_backgroundcolor=SC_BLACK;
   bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "CDROM boot failure code 
: %04x\n",code);
   
   return;
 }
 
+
+#define WAIT_HZ 18
+/**
+ * Check for keystroke.
+ * @returns    True if keystroke available, False if not.
+ */
+Bit8u check_for_keystroke()
+{
+ASM_START
+    mov  ax, #0x100
+    int  #0x16
+    jz   no_key
+    mov  al, #1
+    jmp  done
+no_key:
+    xor  al, al
+done:
+ASM_END
+}
+
+/**
+ * Get keystroke.
+ * @returns    BIOS scan code.
+ */
+Bit8u get_keystroke()
+{
+ASM_START
+    mov  ax, #0x0
+    int  #0x16
+    xchg ah, al
+ASM_END
+}
+
+/**
+ * Waits (sleeps) for the given number of ticks.
+ * Checks for keystroke.
+ *
+ * @returns BIOS scan code if available, 0 if not.
+ * @param   ticks       Number of ticks to sleep.
+ * @param   stop_on_key Whether to stop immediately upon keypress.
+ */
+Bit8u wait(ticks, stop_on_key)
+  Bit16u ticks;
+  Bit8u stop_on_key;
+{
+    long ticks_to_wait, delta;
+    Bit32u prev_ticks, t;
+    Bit8u scan_code = 0;
+
+    /*
+     * The 0:046c wraps around at 'midnight' according to a 18.2Hz clock.
+     * We also have to be careful about interrupt storms.
+     */
+    ticks_to_wait = ticks;
+    prev_ticks = read_dword(0x0, 0x46c);
+    do
+    {
+        t = read_dword(0x0, 0x46c);
+        if (t > prev_ticks)
+        {
+            delta = t - prev_ticks;     /* The temp var is required or bcc 
screws up. */
+            ticks_to_wait -= delta;
+        }
+        else if (t < prev_ticks)
+            ticks_to_wait -= t;         /* wrapped */
+        prev_ticks = t;
+
+        if (check_for_keystroke())
+        {
+            scan_code = get_keystroke();
+            bios_printf(BIOS_PRINTF_DEBUG, "Key pressed: %x\n", scan_code);
+            if (stop_on_key)
+                return scan_code;
+        }
+    } while (ticks_to_wait > 0);
+    return scan_code;
+}
+
+void clearscreen() {
+    /* Hide cursor, clear screen and move cursor to starting position */
+ASM_START
+        push bx
+        push cx
+        push dx
+
+        mov  ax, #0x100
+        mov  cx, #0x1000
+        int  #0x10
+
+        mov  ax, #0x700
+        mov  bh, #7
+        xor  cx, cx
+        mov  dx, #0x184f
+        int  #0x10
+
+        mov  ax, #0x200
+        xor  bx, bx
+        xor  dx, dx
+        int  #0x10
+
+        pop  dx
+        pop  cx
+        pop  bx
+ASM_END
+}
+
+void move_cursor(col,row)
+Bit8u col;
+Bit8u row;
+{
+ASM_START
+  push bp
+  mov  bp, sp
+
+  push bx
+  mov  ax, #0x200
+  xor  bx,bx
+  mov  dl, 4[bp]
+  mov  dh, 6[bp]
+  int  #0x10
+
+  pop  bx
+  pop  bp
+ASM_END
+}
+
+int bootmenu(selected)
+  int selected;
+{
+    Bit8u scode;
+    int max;
+    Bit8u screencol=21;
+    Bit8u screenrow=5;
+
+    /* get the number of boot devices */
+    max = read_word(IPL_SEG, IPL_COUNT_OFFSET);
+
+    bios_textcolor = SC_BLUE;
+    bios_backgroundcolor = SC_LIGHTGRAY;
+
+    for(;;) {
+        if (selected > max || selected < 1) selected = 1;
+        clearscreen();
+       bios_textcolor = SC_BLUE;
+        bios_backgroundcolor = SC_LIGHTGRAY;
+       screenrow=5;
+       move_cursor (screencol,screenrow++);
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, 
"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%%c%c%c%c%c",218,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,191);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c              
Boot Menu             %c",179,179);
+       move_cursor (screencol,screenrow++);
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, 
"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%%c%c%c%c%c",195,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,180);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c                 
                   %c",179,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c  == Select a 
Boot First device ==  %c",179,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c                 
                   %c",179,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c            1. 
",179);
+       if (selected==1) {
+           bios_textcolor = SC_LIGHTGRAY;
+           bios_backgroundcolor = SC_BLUE;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "Floppy     ");
+       if (selected==1) {
+           bios_textcolor = SC_BLUE;
+           bios_backgroundcolor = SC_LIGHTGRAY;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "          %c",179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c            2. 
",179);
+       if (selected==2) {
+           bios_textcolor = SC_LIGHTGRAY;
+           bios_backgroundcolor = SC_BLUE;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "Hard drive ");
+       if (selected==2) {
+           bios_textcolor = SC_BLUE;
+           bios_backgroundcolor = SC_LIGHTGRAY;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "          %c",179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c            3. 
",179);
+       if (selected==3) {
+           bios_textcolor = SC_LIGHTGRAY;
+           bios_backgroundcolor = SC_BLUE;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "CD-ROM     ");
+       if (selected==3) {
+           bios_textcolor = SC_BLUE;
+           bios_backgroundcolor = SC_LIGHTGRAY;
+           }
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "          %c",179);
+        if (max == 4) {
+           move_cursor (screencol,screenrow++);
+           bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c            
4. ",179);
+           if (selected==4) {
+               bios_textcolor = SC_LIGHTGRAY;
+               bios_backgroundcolor = SC_BLUE;
+               }
+           bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "Network    ");
+           if (selected==4) {
+               bios_textcolor = SC_BLUE;
+               bios_backgroundcolor = SC_LIGHTGRAY;
+               }
+           bios_printf(BIOS_PRINTF_SCREEN
+           
+            | BIOS_PRINTF_INFO, "          %c",179);
+       }
+       move_cursor (screencol,screenrow++);
+       bios_textcolor = SC_BLUE;
+       bios_backgroundcolor = SC_LIGHTGRAY;
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c                 
                   %c",179,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c                 
                   %c",179,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c      Currently 
selected: %d         %c",179,selected,179);
+       move_cursor (screencol,screenrow++);
+        bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c                 
                   %c",179,179);
+       move_cursor (screencol,screenrow++);
+       bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "%c%c%c%c%c%c%c%c 
%c%c:Move Enter:Accept %c%c%c%c%c%c%c%c",
+                                                           
192,196,196,196,196,196,196,180,24,25,195,196,196,196,196,196,196,180);
+
+        do {
+            scode = wait(WAIT_HZ, 1);
+        } while (scode == 0);
+        switch(scode) {
+        case 0x02:
+        case 0x03:
+        case 0x04:
+            selected = scode - 1;
+            break;
+        case 0x05:
+            if (max == 4)
+                selected = scode -1 ;
+            else
+                scode = 0;
+            break;
+        case 0x48:
+            selected -= 1;
+            if (selected < 1)
+                selected = 1;
+            scode = 0;
+            break;
+        case 0x50:
+            selected += 1;
+            if (selected > max)
+                selected = max;
+            scode = 0;
+            break;
+        case 0x1c:
+            break;
+        default:
+            scode = 0;
+            break;
+        }
+        if (scode != 0)
+            break;
+    }
+
+    switch (selected) {
+    case 1:
+        return 0x3D;
+    case 2:
+        return 0x3E;
+    case 3:
+        return 0x3F;
+    case 4:
+        return 0x58;
+    default:
+        return 0;
+    }
+}
+
+void interactive_bootkey()
+{
+    Bit16u i;
+    Bit8u scan = 0;
+    bios_textcolor=SC_LIGHTGRAY;
+    bios_backgroundcolor=SC_BLACK;
+    bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "\n\nPress ");
+    bios_textcolor=SC_WHITE;
+    bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "F10");
+    bios_textcolor=SC_LIGHTGRAY;
+    bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, " to select boot 
device... ");
+    for (i = 5; i > 0; i--)
+    {
+        _wrchs(i+48,(SC_WHITE<<4)+SC_BLACK);
+        scan = wait(WAIT_HZ, 0);
+        switch (scan) {
+        case 0x3D:
+        case 0x3E:
+        case 0x3F:
+        case 0x58:
+            break;
+        case 0x44:
+            scan = bootmenu(inb_cmos(0x3d) & 0x0f);
+            break;
+        default:
+            scan = 0;
+            break;
+        }
+        if (scan != 0)
+            break;
+    }
+
+    /* set the default based on the keypress or menu */
+    switch(scan) {
+    case 0x3D:
+        outb_cmos(0x3d, 0x01);
+        break;
+    case 0x3E:
+        outb_cmos(0x3d, 0x02);
+        break;
+    case 0x3F:
+        outb_cmos(0x3d, 0x03);
+        break;
+    case 0x58:
+        outb_cmos(0x3d, 0x04);
+        break;
+    default:
+        break;
+    }
+}
+
+
 void
 nmi_handler_msg()
 {
@@ -2362,6 +2814,9 @@ void ata_detect( )
         }
       }
 
+    bios_textcolor=SC_LIGHTGRAY;
+    bios_backgroundcolor=SC_BLACK;
+
     type=read_byte(ebda_seg,&EbdaData->ata.devices[device].type);
     
     // Now we send a IDENTIFY command to ATA device 
@@ -2870,6 +3325,9 @@ Bit32u lba;
     if ( !(status & ATA_CB_STAT_BSY) ) break;
     }
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   if (status & ATA_CB_STAT_ERR) {
     BX_DEBUG_ATA("ata_cmd_data_out : read error\n");
     return 2;
@@ -2978,6 +3436,9 @@ Bit32u length;
   channel = device / 2;
   slave = device % 2;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   // Data out is not supported yet
   if (inout == ATA_DATA_OUT) {
     BX_INFO("ata_cmd_packet: DATA_OUT not supported yet\n");
@@ -3593,6 +4054,9 @@ int15_function(regs, ES, DS, FLAGS)
   Bit16u bRegister;
   Bit8u irqDisable;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
 BX_DEBUG_INT15("int15 AX=%04x\n",regs.u.r16.ax);
 
   switch (regs.u.r8.ah) {
@@ -3901,6 +4365,9 @@ int15_function_mouse(regs, ES, DS, FLAGS
   Bit8u  comm_byte, prev_command_byte;
   Bit8u  ret, mouse_data1, mouse_data2, mouse_data3;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
 BX_DEBUG_INT15("int15 AX=%04x\n",regs.u.r16.ax);
 
   switch (regs.u.r8.ah) {
@@ -4335,6 +4802,9 @@ int16_function(DI, SI, BP, SP, BX, DX, C
   Bit8u scan_code, ascii_code, shift_flags, count;
   Bit16u kbd_code, max;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT16("int16: AX=%04x BX=%04x CX=%04x DX=%04x \n", AX, BX, CX, DX);
 
   switch (GET_AH()) {
@@ -4501,6 +4971,9 @@ inhibit_mouse_int_and_events()
 {
   Bit8u command_byte, prev_command_byte;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   // Turn off IRQ generation and aux data line
   if ( inb(0x64) & 0x02 )
     BX_PANIC(panic_msg_keyb_buffer_full,"inhibmouse");
@@ -4869,6 +5342,9 @@ int13_harddisk(DS, ES, DI, SI, BP, ELDX,
   Bit16u size, count;
   Bit8u  device, status;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_HD("int13_harddisk: AX=%04x BX=%04x CX=%04x DX=%04x 
ES=%04x\n", AX, BX, CX, DX, ES);
 
   write_byte(0x0040, 0x008e, 0);  // clear completion flag
@@ -5262,6 +5738,9 @@ int13_cdrom(EHBX, DS, ES, DI, SI, BP, EL
   Bit32u lba;
   Bit16u count, segment, offset, i, size;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_CD("int13_cdrom: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", 
AX, BX, CX, DX, ES);
   // BX_DEBUG_INT13_CD("int13_cdrom: SS=%04x DS=%04x ES=%04x DI=%04x 
SI=%04x\n",get_SS(), DS, ES, DI, SI);
   
@@ -5613,6 +6092,9 @@ int13_eltorito(DS, ES, DI, SI, BP, SP, B
 {
   Bit16u ebda_seg=read_word(0x0040,0x000E);
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_ET("int13_eltorito: AX=%04x BX=%04x CX=%04x DX=%04x 
ES=%04x\n", AX, BX, CX, DX, ES);
   // BX_DEBUG_INT13_ET("int13_eltorito: SS=%04x DS=%04x ES=%04x DI=%04x 
SI=%04x\n",get_SS(), DS, ES, DI, SI);
   
@@ -5689,6 +6171,9 @@ int13_cdemu(DS, ES, DI, SI, BP, SP, BX, 
   Bit16u before, segment, offset;
   Bit8u  atacmd[12];
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_ET("int13_cdemu: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", 
AX, BX, CX, DX, ES);
   //BX_DEBUG_INT13_ET("int13_cdemu: SS=%04x ES=%04x DI=%04x SI=%04x\n", 
get_SS(), ES, DI, SI);
   
@@ -5957,6 +6442,9 @@ int13_harddisk(DS, ES, DI, SI, BP, ELDX,
   Bit32u   lba;
   Bit16u   error;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_HD("int13 harddisk: AX=%04x BX=%04x CX=%04x DX=%04x 
ES=%04x\n", AX, BX, CX, DX, ES);
 
   write_byte(0x0040, 0x008e, 0);  // clear completion flag
@@ -6662,6 +7150,9 @@ floppy_drive_recal(drive)
   Bit8u  val8, dor;
   Bit16u curr_cyl_offset;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   // set 40:3e bit 7 to 0
   val8 = read_byte(0x0000, 0x043e);
   val8 &= 0x7f;
@@ -6754,6 +7245,9 @@ int13_diskette_function(DS, ES, DI, SI, 
   Bit8u  drive_type, num_floppies, ah;
   Bit16u es, last_addr;
 
+  bios_textcolor=SC_LIGHTGRAY;
+  bios_backgroundcolor=SC_BLACK;
+
   BX_DEBUG_INT13_FL("int13_diskette: AX=%04x BX=%04x CX=%04x DX=%04x 
ES=%04x\n", AX, BX, CX, DX, ES);
   // BX_DEBUG_INT13_FL("int13_diskette: SS=%04x DS=%04x ES=%04x DI=%04x 
SI=%04x\n",get_SS(), get_DS(), ES, DI, SI);
 
@@ -7624,6 +8118,9 @@ Bit16u seq_nr;
 
   struct ipl_entry e;
 
+  bios_textcolor=SC_WHITE;
+  bios_backgroundcolor=SC_BLACK;
+
   // if BX_ELTORITO_BOOT is not defined, old behavior
   //   check bit 5 in CMOS reg 0x2d.  load either 0x00 or 0x80 into DL
   //   in preparation for the intial INT 13h (0=floppy A:, 0x80=C:)
@@ -7966,6 +8463,10 @@ int1a_function(regs, ds, iret_addr)
     case 0xb1:
       // real mode PCI BIOS functions now handled in assembler code
       // this C code handles the error code for information only
+
+      bios_textcolor=SC_LIGHTGRAY;
+      bios_backgroundcolor=SC_BLACK;
+
       if (regs.u.r8.bl == 0xff) {
         BX_INFO("PCI BIOS: PCI not present\n");
       } else if (regs.u.r8.bl == 0x81) {
@@ -9825,7 +10326,9 @@ post_default_ints:
   call _cdemu_init
   ;;
 #endif // BX_ELTORITO_BOOT
- 
+
+  call _interactive_bootkey
+
 #if BX_TCGBIOS
   call _tcpa_calling_int19h          /* specs: 8.2.3 step 1 */
   call _tcpa_add_event_separators    /* specs: 8.2.3 step 2 */

Attachment: hvmloader
Description: Binary data

Attachment: s_seitz.vcf
Description: Vcard

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>