What would be the best way to prevent "Ctrl+Alt+Del" from doing warm reboot (or doing anything) while still in real mode and interrupts enabled? As far as I understand, this warm reboot does not restore interrupt vector entries or anything. It is a problem if a user hits the magic buttons at wrong time because I have modified some of those.
I have read about INT 0x19 etc.
Boot loaders and Ctrl+Alt+Del
Re: Boot loaders and Ctrl+Alt+Del
I'd try either disabling IRQ1 or installing an ISR for it that would just read and drop input data.
Re: Boot loaders and Ctrl+Alt+Del
Yes, I was thinking this. I would simply run this code snippet at early startup:alexfru wrote:disabling IRQ1
Code: Select all
Opcodes Mnemonic Comments
E4 21 in al,0x21 get current Master PIC mask
0C 02 or al,0x02 set mask "???? ??1?"
E6 21 out 0x21,al set new Master PIC mask
Re: Boot loaders and Ctrl+Alt+Del
Hi,
If you do something that the BIOS doesn't reset during warm reboot (e.g. messing with MTRRs and PCI configuration space); the best option would be to replace the keyboard IRQ handler with your own, detect "Ctrl+Alt+Del" yourself, and reset the system yourself (so that the behaviour the user expects still occurs).
Cheers,
Brendan
For warm reboot, the BIOS should restore interrupt vectors.Antti wrote:What would be the best way to prevent "Ctrl+Alt+Del" from doing warm reboot (or doing anything) while still in real mode and interrupts enabled? As far as I understand, this warm reboot does not restore interrupt vector entries or anything. It is a problem if a user hits the magic buttons at wrong time because I have modified some of those.
If you do something that the BIOS doesn't reset during warm reboot (e.g. messing with MTRRs and PCI configuration space); the best option would be to replace the keyboard IRQ handler with your own, detect "Ctrl+Alt+Del" yourself, and reset the system yourself (so that the behaviour the user expects still occurs).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Boot loaders and Ctrl+Alt+Del
Good! Then there is no problem at all. From some source I read that warm reboot did not restore the vector but I cannot find it again. By the way, I have not tried what happens to the memory content in general.Brendan wrote:For warm reboot, the BIOS should restore interrupt vectors.
At that point we have crossed the point of no return.Brendan wrote:messing with MTRRs and PCI configuration space