From 3ed8a920489a802000d472288aa29f7ae4db0263 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 9 Jun 2010 22:17:56 +0400 Subject: [PATCH] test/pit: Fill up IDT with noop handler To cover all IRQs. Signed-off-by: Cyrill Gorcunov --- tests/pit/tick.S | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/pit/tick.S b/tests/pit/tick.S index db64187..e6508e1 100644 --- a/tests/pit/tick.S +++ b/tests/pit/tick.S @@ -16,9 +16,20 @@ _start: mov $(msg1_end-msg1), %cx cs rep/outsb -set_idt: - xor %ax, %ax +/* + * fill up noop handlers + */ + xorw %ax, %ax + xorw %di, %di movw %ax, %es + movw $256, %cx +fill_noop_idt: + movw $noop_handler, %es:(%di) + movw %cs, %es:2(%di) + add $4, %di + loop fill_noop_idt + +set_idt: movw $timer_isr, %es:(IRQ_OFFSET*4) movw %cs, %es:(IRQ_OFFSET*4+2) @@ -86,6 +97,10 @@ timer_isr: popfw popaw iretw + +noop_handler: + iretw + count: .word TEST_COUNT msg1: