why are software ints disabled?(in pmode)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

why are software ints disabled?(in pmode)

Post by earlz »

I know this may sound like a stupid question but exactly why are software ints disabled in protected mode, every doc ive read just say "you cant use software interrupts" but none of them have told me why exactly

could anyone tell me why
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: why are software ints disabled?(in pmode)

Post by Legend »

One big issue would be segmentation, as the bios code in the software ints expects it to work like in real mode.
Worse might be the different meaning of opcodes in 32 bit mode then in 16 bit mode.
*post*
Osbios
Member
Member
Posts: 116
Joined: Fri Jun 10, 2005 11:00 pm

Re: why are software ints disabled?(in pmode)

Post by Osbios »

If you want to use Bios(16bit) Ints with a 32bit os then you have 3 ways:
1.Use them befor jmp32 (boot)
2.Use them after jmp16 (reboot/halt)
3.Use them with v86 mode
dw 0xAA55
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: why are software ints disabled?(in pmode)

Post by carbonBased »

Software interrupts are NOT disabled when you're in pmode. Software interrupts != BIOS. Beyond that, the BIOS isn't disabled when you're in pmode either. Feel free to call it, but the box will reset.

Software interrupts are enabled, as always, be sti... whether you're in pmode or not. The only difference is that, while in pmode, each interrupt is described by a descriptor in the IDT... when in real mode, the interrupt is described by an offset in the IDT.

As per the BIOS, yes, it's not usable in pmode. It's not designed to work in PMODE. But, as per your question, software interrupts are only disabled by a 'cli' (whether in pmode or rmode) so if interrutps are disabled... you must have disabled them.
Post Reply