direct-io.hg

changeset 15380:07688f8f5394

x86: Re-introduce VIDEO_CURRENT_MODE into video.S video-mode-setting
code, and make visible at the command line via 'vga=current'.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jun 19 15:09:59 2007 +0100 (2007-06-19)
parents 8eaee9ef472f
children f1ca92bf7e0f
files docs/src/user.tex xen/arch/x86/boot/cmdline.S xen/arch/x86/boot/video.S xen/arch/x86/boot/video.h xen/drivers/video/vga.c
line diff
     1.1 --- a/docs/src/user.tex	Tue Jun 19 15:03:55 2007 +0100
     1.2 +++ b/docs/src/user.tex	Tue Jun 19 15:09:59 2007 +0100
     1.3 @@ -3178,6 +3178,7 @@ editing \path{grub.conf}.
     1.4    \begin{description}
     1.5    \item[ ask ] Display a vga menu allowing manual selection of video
     1.6    mode.
     1.7 +  \item[ current ] Use existing vga mode without modification.
     1.8    \item[ text-$<$mode$>$ ] Select text-mode resolution, where mode is
     1.9    one of 80x25, 80x28, 80x30, 80x34, 80x43, 80x50, 80x60.
    1.10    \item[ gfx-$<$mode$>$ ] Select VESA graphics mode
     2.1 --- a/xen/arch/x86/boot/cmdline.S	Tue Jun 19 15:03:55 2007 +0100
     2.2 +++ b/xen/arch/x86/boot/cmdline.S	Tue Jun 19 15:09:59 2007 +0100
     2.3 @@ -297,7 +297,7 @@ 1:      lodsw
     2.4          call    .Lstr_prefix
     2.5          add     $8,%esp
     2.6          test    %eax,%eax
     2.7 -        jnz     .Lcmdline_exit
     2.8 +        jnz     .Lparse_vga_current
     2.9  
    2.10          /* We have 'vga=mode-<mode>'. */
    2.11          add     $5,%ebx
    2.12 @@ -305,6 +305,19 @@ 1:      lodsw
    2.13          call    .Latoi
    2.14          add     $4,%esp
    2.15          mov     %ax,bootsym_phys(boot_vid_mode)
    2.16 +        jmp     .Lcmdline_exit
    2.17 +
    2.18 +.Lparse_vga_current:
    2.19 +        /* Check for 'vga=current'. */
    2.20 +        push    %ebx
    2.21 +        pushl   $sym_phys(.Lvga_current)
    2.22 +        call    .Lstr_prefix
    2.23 +        add     $8,%esp
    2.24 +        test    %eax,%eax
    2.25 +        jnz     .Lcmdline_exit
    2.26 +
    2.27 +        /* We have 'vga=current'. */
    2.28 +        movw    $VIDEO_CURRENT_MODE,bootsym_phys(boot_vid_mode)
    2.29  
    2.30  .Lcmdline_exit:
    2.31          popa
    2.32 @@ -328,6 +341,8 @@ 1:      lodsw
    2.33          .asciz  "gfx-"
    2.34  .Lvga_mode:
    2.35          .asciz  "mode-"
    2.36 +.Lvga_current:
    2.37 +        .asciz  "current"
    2.38  .Lno_rm_opt:
    2.39          .asciz  "no-real-mode"
    2.40  .Ledid_opt:
     3.1 --- a/xen/arch/x86/boot/video.S	Tue Jun 19 15:03:55 2007 +0100
     3.2 +++ b/xen/arch/x86/boot/video.S	Tue Jun 19 15:09:59 2007 +0100
     3.3 @@ -530,6 +530,7 @@ spec_inits:
     3.4          .word   bootsym(set_8pixel)
     3.5          .word   bootsym(set_80x43)
     3.6          .word   bootsym(set_80x28)
     3.7 +        .word   bootsym(set_current)
     3.8          .word   bootsym(set_80x30)
     3.9          .word   bootsym(set_80x34)
    3.10          .word   bootsym(set_80x60)
    3.11 @@ -575,6 +576,7 @@ set14:  movw    $0x1111, %ax            
    3.12          movb    $0x01, %ah              # Define cursor scan lines 11-12
    3.13          movw    $0x0b0c, %cx
    3.14          int     $0x10
    3.15 +set_current:
    3.16          stc
    3.17          ret
    3.18  
     4.1 --- a/xen/arch/x86/boot/video.h	Tue Jun 19 15:03:55 2007 +0100
     4.2 +++ b/xen/arch/x86/boot/video.h	Tue Jun 19 15:09:59 2007 +0100
     4.3 @@ -16,10 +16,11 @@
     4.4  #define VIDEO_80x50         0x0f01
     4.5  #define VIDEO_80x43         0x0f02
     4.6  #define VIDEO_80x28         0x0f03
     4.7 -#define VIDEO_80x30         0x0f04
     4.8 -#define VIDEO_80x34         0x0f05
     4.9 -#define VIDEO_80x60         0x0f06
    4.10 -#define VIDEO_LAST_SPECIAL  0x0f07
    4.11 +#define VIDEO_CURRENT_MODE  0x0f04
    4.12 +#define VIDEO_80x30         0x0f05
    4.13 +#define VIDEO_80x34         0x0f06
    4.14 +#define VIDEO_80x60         0x0f07
    4.15 +#define VIDEO_LAST_SPECIAL  0x0f08
    4.16  
    4.17  #define ASK_VGA             0xfffd
    4.18  #define VIDEO_VESA_BY_SIZE  0xffff
     5.1 --- a/xen/drivers/video/vga.c	Tue Jun 19 15:03:55 2007 +0100
     5.2 +++ b/xen/drivers/video/vga.c	Tue Jun 19 15:09:59 2007 +0100
     5.3 @@ -33,6 +33,9 @@ static unsigned char *video;
     5.4   *   'vga=ask':
     5.5   *      display a vga menu of available modes
     5.6   * 
     5.7 + *   'vga=current':
     5.8 + *      use the current vga mode without modification
     5.9 + * 
    5.10   *   'vga=text-80x<rows>':
    5.11   *      text mode, where <rows> is one of {25,28,30,34,43,50,60}
    5.12   *