1 ; @brief This function is used to flush the GDT when we want to
2 ; enter into ring 3 (userspace) since we need to flush out all of
3 ; the kernel information and replace it with info safe for user
4 ; applications. The following function flushes the TSS and can
5 ; "flush" (invalidate) a page.
22 ; Do a long jump back and return
29 mov ax, 0x2B ; Load the index of our TSS structure - The index is
30 ; 0x28, as it is the 5th selector and each is 8 bytes
31 ; long, but we set the bottom two bits (making 0x2B)
32 ; so that it has an RPL of 3, not zero.
33 ltr ax ; Load 0x2B into the task state register.