Skip to content

Commit

Permalink
bugfix on pic - IRQ priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
crazii committed Apr 26, 2024
1 parent 08735ba commit 75a88d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sbemu/pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ uint8_t PIC_GetIRQ(void)
//get irq mask
outp(PIC_PORT1, PIC_READISR);
uint16_t mask = inp(PIC_PORT1);
if(mask&0x4)
if((mask&0x4) && !(mask&0x03))
{
outp(PIC_PORT2, PIC_READISR);
mask &= ~0x04;
mask = (uint16_t)(inp(PIC_PORT2)<<8) | mask;
mask = (uint16_t)(inp(PIC_PORT2)<<8);
}
STIL();
if(mask == 0)
Expand Down

0 comments on commit 75a88d6

Please sign in to comment.