diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-26 10:41:07 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-26 10:41:07 +0100 |
commit | a0e7ccf6864c196906d58b54cd0996b4dbc1b022 (patch) | |
tree | b0231df2a09496de24e7446b5d60f25d422b6461 /tools/firmware/vgabios | |
parent | 1ad6a137c37508e9ea5372fb2ac4b509059853a7 (diff) | |
download | xen-a0e7ccf6864c196906d58b54cd0996b4dbc1b022.tar.gz xen-a0e7ccf6864c196906d58b54cd0996b4dbc1b022.tar.bz2 xen-a0e7ccf6864c196906d58b54cd0996b4dbc1b022.zip |
x86, hvm: Allow Cirrus VGA BIOS to clear framebuffer with minimal PIO writes.
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Diffstat (limited to 'tools/firmware/vgabios')
-rw-r--r-- | tools/firmware/vgabios/clext.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/tools/firmware/vgabios/clext.c b/tools/firmware/vgabios/clext.c index 1eb3c69734..97ae080b2c 100644 --- a/tools/firmware/vgabios/clext.c +++ b/tools/firmware/vgabios/clext.c @@ -1489,14 +1489,26 @@ cirrus_clear_vram_1: mov dx, #0x3ce out dx, ax push ax - mov cx, #0xa000 - mov es, cx - xor di, di + +;; Windows Vista appears to be emulating this sequence as part of changing +;; screen resolution, but it generates 4096 writes per iteration. +;; Instead, use a magic register sequence to write the whole bank. +;;mov cx, #0xa000 +;;mov es, cx +;;xor di, di +;;mov ax, si +;;mov cx, #8192 +;;cld +;;rep +;; stosw mov ax, si - mov cx, #8192 - cld - rep - stosw + shl ax, #8 + mov al, #0xfe + out dx, ax ;; Low byte of value to be written to the bank + mov ax, si + mov al, #0xff + out dx, ax ;; High byte and trigger the write + pop ax inc ah cmp ah, bl |