I am currently hanging with my inline assembler line for the long jump. I tried many thinks and googled for hours, but I am still not able to produce something that will compile.
I am in 32bit PMode and setup a new GDT. Now I want to do a far jump to update the CS. Here is what I use:
Code: Select all
#define GDT_CODE32_SEL 0x08
#define GDT_DATA32_SEL 0x10
(...)
asm volatile (
"lgdt %0;"
"ljmp $%1, $1f;"
"1:"
"movw %%ax, %%ds;"
"movw %%ax, %%es;"
"movw %%ax, %%fs;"
"movw %%ax, %%gs;"
"movw %%ax, %%ss;"
:
: "m" (GlobalDescriptorTableDescriptor), "i" (GDT_CODE32_SEL), "ax" (GDT_DATA32_SEL)
:
);
(...)
Why does GCC think the $8 is a symbol and not an immediate value?
Best regards
Sebi