i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios.
Signed-off-by: Gleb Natapov gleb@redhat.com diff --git a/src/resume.c b/src/resume.c index 4390fb5..8f21938 100644 --- a/src/resume.c +++ b/src/resume.c @@ -39,6 +39,7 @@ handle_resume(void) outb_cmos(0, CMOS_RESET_CODE); dprintf(1, "In resume (status=%d)\n", status);
+ pic_setup(); init_dma();
switch (status) { -- Gleb.
On Tue, Jan 24, 2012 at 02:33:42PM +0200, Gleb Natapov wrote:
i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios.
It looks okay to me. Thanks.
-Kevin
On Tue, Jan 24, 2012 at 02:33:42PM +0200, Gleb Natapov wrote:
i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios.
I just noticed your patch turns on the PIC even for the old legacy resume handlers. I'm leery of doing that as it's hard to say what old programs expect. How about doing it just for s3 resume as in the patch below?
-Kevin
commit da0a6cb034f103d6b818293166ac0450742a2bb2 Author: Gleb Natapov gleb@redhat.com Date: Tue Jan 24 14:33:42 2012 +0200
mask interrupts on S3 resume
i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios.
Signed-off-by: Gleb Natapov gleb@redhat.com Signed-off-by: Kevin O'Connor kevin@koconnor.net
diff --git a/src/resume.c b/src/resume.c index 4390fb5..f887f45 100644 --- a/src/resume.c +++ b/src/resume.c @@ -107,6 +107,7 @@ s3_resume(void) return; }
+ pic_setup(); smm_init();
s3_resume_vga_init();
On Sun, Jan 29, 2012 at 03:19:39PM -0500, Kevin O'Connor wrote:
On Tue, Jan 24, 2012 at 02:33:42PM +0200, Gleb Natapov wrote:
i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios.
I just noticed your patch turns on the PIC even for the old legacy resume handlers. I'm leery of doing that as it's hard to say what old programs expect. How about doing it just for s3 resume as in the patch below?
Yeah, definitely more correct. Thanks!
-Kevin
commit da0a6cb034f103d6b818293166ac0450742a2bb2 Author: Gleb Natapov gleb@redhat.com Date: Tue Jan 24 14:33:42 2012 +0200
mask interrupts on S3 resume i8259 clears interrupt mask on reset. Interrupt need to be masked again before enabling interrupts on CPU. Since option roms are called with interrupts enabled, resume should mask interrupts in i8259 before calling vgabios. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/src/resume.c b/src/resume.c index 4390fb5..f887f45 100644 --- a/src/resume.c +++ b/src/resume.c @@ -107,6 +107,7 @@ s3_resume(void) return; }
pic_setup(); smm_init();
s3_resume_vga_init();
-- Gleb.