diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-01-21 10:43:30 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-01-21 10:43:30 -0500 |
commit | 5e1694c71d43bf6fdf6ba02bc225e2022e6eee70 (patch) | |
tree | c27667c5beb9dbc2c3b18ae54e9325bd6a250d43 /vgasrc | |
parent | 8cf8f8e6ce971b16ee25309df7ebf32f7a04dc14 (diff) | |
download | seabios-5e1694c71d43bf6fdf6ba02bc225e2022e6eee70.tar.gz |
vgabios: Use stored total memory in cirrus code instead of recalculating.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r-- | vgasrc/clext.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vgasrc/clext.c b/vgasrc/clext.c index 5468db35..39f3b2a9 100644 --- a/vgasrc/clext.c +++ b/vgasrc/clext.c @@ -404,7 +404,7 @@ static void cirrus_clear_vram(u16 param) { cirrus_enable_16k_granularity(); - u8 count = cirrus_get_memsize() * 4; + u8 count = GET_GLOBAL(VBE_total_memory) / (16 * 1024); u8 i; for (i=0; i<count; i++) { stdvga_grdc_write(0x09, i); @@ -479,7 +479,7 @@ clext_101282(struct bregs *regs) static void clext_101285(struct bregs *regs) { - regs->al = cirrus_get_memsize(); + regs->al = GET_GLOBAL(VBE_total_memory) / (64*1024); } static void @@ -655,7 +655,7 @@ cirrus_vesa_06h(struct bregs *regs) u32 v = cirrus_get_line_offset(); regs->cx = v / cirrus_get_bpp_bytes(); regs->bx = v; - regs->dx = (cirrus_get_memsize() * 64 * 1024) / v; + regs->dx = GET_GLOBAL(VBE_total_memory) / v; regs->ax = 0x004f; } |