[SeaBIOS] [PATCH 6/6] [workaround] cbvga_set_mode: disable clearmem

Gerd Hoffmann posted 6 patches 6 years, 11 months ago
There is a newer version of this series
[SeaBIOS] [PATCH 6/6] [workaround] cbvga_set_mode: disable clearmem
Posted by Gerd Hoffmann 6 years, 11 months ago
Break windows, memcpy_high call is problematic.
Possibly the windows x86 emulator doesn't support int 1587.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 vgasrc/cbvga.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c
index 13a666b22b..6933fc72aa 100644
--- a/vgasrc/cbvga.c
+++ b/vgasrc/cbvga.c
@@ -196,6 +196,7 @@ cbvga_set_mode(struct vgamode_s *vmode_g, int flags)
 {
     u8 emul = vmode_g == &CBemulinfo || GET_GLOBAL(CBmode) == 0x03;
     MASK_BDA_EXT(flags, BF_EMULATE_TEXT, emul ? BF_EMULATE_TEXT : 0);
+#if 0
     if (!(flags & MF_NOCLEARMEM)) {
         if (GET_GLOBAL(CBmodeinfo.memmodel) == MM_TEXT) {
             memset16_far(SEG_CTEXT, (void*)0, 0x0720, 80*25*2);
@@ -209,6 +210,7 @@ cbvga_set_mode(struct vgamode_s *vmode_g, int flags)
         op.op = GO_MEMSET;
         handle_gfx_op(&op);
     }
+#endif
     return 0;
 }
 
-- 
2.9.3


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 6/6] [workaround] cbvga_set_mode: disable clearmem
Posted by Kevin O'Connor 6 years, 11 months ago
On Thu, May 31, 2018 at 08:33:53AM +0200, Gerd Hoffmann wrote:
> Break windows, memcpy_high call is problematic.
> Possibly the windows x86 emulator doesn't support int 1587.

Interesting.  I think Patrick ran into this as well.

Are there any runtime checks we could do to avoid this?  Perhaps do
something like the existing BF_EXTRA_STACK check (eg, if we get a vesa
mode call then we disable 1587 on subsequent calls).

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 6/6] [workaround] cbvga_set_mode: disable clearmem
Posted by Gerd Hoffmann 6 years, 11 months ago
On Thu, May 31, 2018 at 10:54:39AM -0400, Kevin O'Connor wrote:
> On Thu, May 31, 2018 at 08:33:53AM +0200, Gerd Hoffmann wrote:
> > Break windows, memcpy_high call is problematic.
> > Possibly the windows x86 emulator doesn't support int 1587.
> 
> Interesting.  I think Patrick ran into this as well.
> 
> Are there any runtime checks we could do to avoid this?

Not investigated yet, happy for now I found the cause windows not
booting ...

> Perhaps do
> something like the existing BF_EXTRA_STACK check (eg, if we get a vesa
> mode call then we disable 1587 on subsequent calls).

Can try whenever the BF_EXTRA_STACK check can be used for this too.

cheers,
  Gerd


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 6/6] [workaround] cbvga_set_mode: disable clearmem
Posted by Gerd Hoffmann 6 years, 11 months ago
  Hi,

> > Perhaps do
> > something like the existing BF_EXTRA_STACK check (eg, if we get a vesa
> > mode call then we disable 1587 on subsequent calls).
> 
> Can try whenever the BF_EXTRA_STACK check can be used for this too.

Yes, works (i.e. clear screen only in case BF_EXTRA_STACK is set).

cheers,
  Gerd


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios