Correct setting the size of the GDT descriptor

This commit is contained in:
Pierre Pronchery 2018-04-07 06:21:58 +02:00
parent e160aa08be
commit 0aa13f90b3

View File

@ -69,7 +69,8 @@ _setgdt:
mov %eax, 0x2(%ecx)
/* set the size of the GDT */
mov 0x8(%esp), %eax
mov %eax, (%ecx)
dec %eax
mov %ax, (%ecx)
/* load the GDT */
lgdt (%ecx)
ret