public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* ASSERT in QemuVideoDxe driver during reset
@ 2017-09-06  8:15 Wang, Jian J
  2017-09-06 10:20 ` Laszlo Ersek
  0 siblings, 1 reply; 13+ messages in thread
From: Wang, Jian J @ 2017-09-06  8:15 UTC (permalink / raw)
  To: lersek@redhat.com, Justen, Jordan L, Yao, Jiewen
  Cc: edk2-devel@lists.01.org, Kinney, Michael D

Hi guys,

I found an ASSERT issue in function InstallVbeShim() in QemuVideoDxe driver during reset. The assert statement is like below.

    ASSERT (Int0x10->Segment == 0x0000);
    ASSERT (Int0x10->Offset  == 0x0000);

This happened after I have enabled NULL pointer access detection feature, in which page 0 (4K)  is disabled. And because of page 0 disabled, I have to skip the memory clearing for page 0 in DXE core. Otherwise it will cause page fault exception there. It seems that QEMU may clear all its memory at startup. Skipping the action of clearing page 0 in core won't cause ASSERT issue in QemuVideoDxe, for the first time boot. But QemuVideoDxe will write int10 vector at memory 0x10 and QEMU will not clear all its memory during warm boot. ASSERT will be triggered after reset.

It's easy to fix this issue but there're some subtle situations which I'm not quite certain. I'd like your opinions for them.

Here're my thoughts on several solutions:
a) Remove the ASSERT statement in InstallVbeShim(). But I'm sure if it is safe to do so because I don't quite understand the purpose of the ASSERT. 
b) Instead of skipping clearing page 0, enable it, do clearing and then disable it. The problem here is that CPU arch protocol is not ready at that time. I have to "manually" do page operation, which might be non-portable and a little bit odd in DXE core.
c) Move code clearing page 0 from DXE core to another place wherever appropriate, like DxeIpl or cpu driver. But I think there's a good reason to put code there before.

Thanks,
Wang, Jian J


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-09-07 11:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06  8:15 ASSERT in QemuVideoDxe driver during reset Wang, Jian J
2017-09-06 10:20 ` Laszlo Ersek
2017-09-06 11:16   ` Yao, Jiewen
2017-09-06 13:18     ` Laszlo Ersek
2017-09-06 14:47       ` Gao, Liming
2017-09-06 15:35         ` Laszlo Ersek
2017-09-06 15:06       ` Yao, Jiewen
2017-09-06 15:25         ` Laszlo Ersek
2017-09-07  0:54           ` Yao, Jiewen
2017-09-07  0:41     ` Wang, Jian J
2017-09-07  1:28       ` Yao, Jiewen
2017-09-07 10:58         ` Laszlo Ersek
2017-09-07 11:16           ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox