On Mon, 2018-06-04 at 09:31 -0400, Kevin O'Connor wrote:
On Mon, Jun 04, 2018 at 09:29:17AM +0200, Gerd Hoffmann wrote:
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
vgasrc/cbvga.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index 3f16bee10c..f6ebe71242 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -192,8 +192,16 @@ int cbvga_set_mode(struct vgamode_s *vmode_g, int flags) { u8 emul = vmode_g == &CBemulinfo || GET_GLOBAL(CBmode) == 0x03;
- /*
* The extra_stack flag is false when running in windows x86
* emulator, to avoid stack switching triggering bugs. Using the
* same flag here to skip screen clearing, because the windows
* emulator seems to have problems to handle the int 1587 call
* too, and GO_MEMSET uses that.
*/
- u8 extra_stack = GET_BDA_EXT(flags) & BF_EXTRA_STACK; MASK_BDA_EXT(flags, BF_EMULATE_TEXT, emul ? BF_EMULATE_TEXT : 0);
- if (!(flags & MF_NOCLEARMEM)) {
- if (!(flags & MF_NOCLEARMEM) && extra_stack) {
FYI, extra_stack will only be true if CONFIG_VGA_ALLOCATE_EXTRA_STACK is set, but I guess that's okay.
Thanks, the series looks good to me. -Kevin
This commit breaks SeaBIOS' menu when used with coreboot's native graphic init in text mode. Payloads are not affacted (tested NTLDR and coreinfo). Everything works fine with native graphic init in high resolution framebuffer mode. I've got no debug log at hand, but I'll investigate asap. Tested on Lenovo T500 using libgfxinit with latest coreboot master.
Regards, Patrick
SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
On Wed, Jun 20, 2018 at 08:00:28PM +0200, Patrick Rudolph wrote:
On Mon, 2018-06-04 at 09:31 -0400, Kevin O'Connor wrote:
On Mon, Jun 04, 2018 at 09:29:17AM +0200, Gerd Hoffmann wrote:
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
vgasrc/cbvga.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index 3f16bee10c..f6ebe71242 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -192,8 +192,16 @@ int cbvga_set_mode(struct vgamode_s *vmode_g, int flags) { u8 emul = vmode_g == &CBemulinfo || GET_GLOBAL(CBmode) == 0x03;
- /*
* The extra_stack flag is false when running in windows x86
* emulator, to avoid stack switching triggering bugs. Using the
* same flag here to skip screen clearing, because the windows
* emulator seems to have problems to handle the int 1587 call
* too, and GO_MEMSET uses that.
*/
- u8 extra_stack = GET_BDA_EXT(flags) & BF_EXTRA_STACK; MASK_BDA_EXT(flags, BF_EMULATE_TEXT, emul ? BF_EMULATE_TEXT : 0);
- if (!(flags & MF_NOCLEARMEM)) {
- if (!(flags & MF_NOCLEARMEM) && extra_stack) {
FYI, extra_stack will only be true if CONFIG_VGA_ALLOCATE_EXTRA_STACK is set, but I guess that's okay.
Thanks, the series looks good to me. -Kevin
This commit breaks SeaBIOS' menu when used with coreboot's native graphic init in text mode. Payloads are not affacted (tested NTLDR and coreinfo). Everything works fine with native graphic init in high resolution framebuffer mode. I've got no debug log at hand, but I'll investigate asap. Tested on Lenovo T500 using libgfxinit with latest coreboot master.
Hmm, no clue what could cause this. But clearing the memory is only problematic for the framebuffer case, so maybe the patch below helps?
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index f6ebe71242..a48f4dc885 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -201,18 +201,20 @@ cbvga_set_mode(struct vgamode_s *vmode_g, int flags) */ u8 extra_stack = GET_BDA_EXT(flags) & BF_EXTRA_STACK; MASK_BDA_EXT(flags, BF_EMULATE_TEXT, emul ? BF_EMULATE_TEXT : 0); - if (!(flags & MF_NOCLEARMEM) && extra_stack) { + if (!(flags & MF_NOCLEARMEM)) { if (GET_GLOBAL(CBmodeinfo.memmodel) == MM_TEXT) { memset16_far(SEG_CTEXT, (void*)0, 0x0720, 80*25*2); return 0; } - struct gfx_op op; - init_gfx_op(&op, &CBmodeinfo); - op.x = op.y = 0; - op.xlen = GET_GLOBAL(CBmodeinfo.width); - op.ylen = GET_GLOBAL(CBmodeinfo.height); - op.op = GO_MEMSET; - handle_gfx_op(&op); + if (extra_stack) { + struct gfx_op op; + init_gfx_op(&op, &CBmodeinfo); + op.x = op.y = 0; + op.xlen = GET_GLOBAL(CBmodeinfo.width); + op.ylen = GET_GLOBAL(CBmodeinfo.height); + op.op = GO_MEMSET; + handle_gfx_op(&op); + } } return 0; }
On Fri, Jun 22, 2018 at 08:42:50AM +0200, Gerd Hoffmann wrote:
On Wed, Jun 20, 2018 at 08:00:28PM +0200, Patrick Rudolph wrote:
This commit breaks SeaBIOS' menu when used with coreboot's native graphic init in text mode. Payloads are not affacted (tested NTLDR and coreinfo). Everything works fine with native graphic init in high resolution framebuffer mode. I've got no debug log at hand, but I'll investigate asap. Tested on Lenovo T500 using libgfxinit with latest coreboot master.
Hmm, no clue what could cause this. But clearing the memory is only problematic for the framebuffer case, so maybe the patch below helps?
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index f6ebe71242..a48f4dc885 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -201,18 +201,20 @@ cbvga_set_mode(struct vgamode_s *vmode_g, int flags) */ u8 extra_stack = GET_BDA_EXT(flags) & BF_EXTRA_STACK; MASK_BDA_EXT(flags, BF_EMULATE_TEXT, emul ? BF_EMULATE_TEXT : 0);
- if (!(flags & MF_NOCLEARMEM) && extra_stack) {
- if (!(flags & MF_NOCLEARMEM)) { if (GET_GLOBAL(CBmodeinfo.memmodel) == MM_TEXT) { memset16_far(SEG_CTEXT, (void*)0, 0x0720, 80*25*2); return 0; }
struct gfx_op op;
init_gfx_op(&op, &CBmodeinfo);
op.x = op.y = 0;
op.xlen = GET_GLOBAL(CBmodeinfo.width);
op.ylen = GET_GLOBAL(CBmodeinfo.height);
op.op = GO_MEMSET;
handle_gfx_op(&op);
if (extra_stack) {
I'm also not sure on the cause, but I think it should be safe to change this to:
if (extra_stack || flags & MF_LEGACY) {
because if this is a legacy call then it should be safe to write to highmem even if the last call was a vesa modeset.
-Kevin
Hi,
if (extra_stack) {
I'm also not sure on the cause, but I think it should be safe to change this to:
if (extra_stack || flags & MF_LEGACY) {
because if this is a legacy call then it should be safe to write to highmem even if the last call was a vesa modeset.
Tested, works with windows.
cheers, Gerd