quok wrote:When you change the SS segment, interrupts are automatically disabled until after the next instruction. So it would be wise to immediately load SP/ESP next and not ES.
so why grub does it?
Check the post by Brendan for the topic with subject "[help] 1st bootloader".
I am reproducing part of it here.
Brendan wrote:
if you're assuming 80386 or later (but not if you're assuming it could be 8086 or something) then you could remove the "cli" and "sti", as 80386 and later CPUs automatically supress IRQs for one instruction after a "mov ss"
Assuming it is true for 80386 and later processors, Grub might have been targetted for CPUs prior to 80386 also.
quok wrote:When you change the SS segment, interrupts are automatically disabled until after the next instruction. So it would be wise to immediately load SP/ESP next and not ES.
so why grub does it?
Check the post by Brendan for the topic with subject "[help] 1st bootloader".
I am reproducing part of it here.
Brendan wrote:
if you're assuming 80386 or later (but not if you're assuming it could be 8086 or something) then you could remove the "cli" and "sti", as 80386 and later CPUs automatically supress IRQs for one instruction after a "mov ss"
Assuming it is true for 80386 and later processors, Grub might have been targetted for CPUs prior to 80386 also.