It isn't a kernel offset. It is a selector. You must have a GDT. I don't know anything about Limine but according to this bit of documentation
https://github.com/limine-bootloader/li ... ROTOCOL.md if you didn't set up your own GDT the one provided by Limine is guaranteed to have these entries:
The GDT register is loaded to point to a GDT, in bootloader-reclaimable memory, with at least the following entries, starting at offset 0:
- Null descriptor
- 16-bit code descriptor. Base = 0, limit = 0xffff. Readable.
- 16-bit data descriptor. Base = 0, limit = 0xffff. Writable.
- 32-bit code descriptor. Base = 0, limit = 0xffffffff. Readable.
- 32-bit data descriptor. Base = 0, limit = 0xffffffff. Writable.
- 64-bit code descriptor. Base and limit irrelevant. Readable.
- 64-bit data descriptor. Base and limit irrelevant. Writable.
Since each GDT entry is 8 bytes the Null selector is 0x0, 16-bit code selector is 0x08, 16-bit data selector is 0x10, 32-bit code selector is 0x18, 32-bit data selector is 0x20, 64-bit code selector is 0x28, and 64-bit data selector is 0x30.
This would mean that you likely have a 64-bit Code selector in your Limine supplied GDT at offset 0x28 . The CS you probably want assign to `descriptor->kernel_cs` is 0x28 since you appear to be operating in 64-bit mode.