gdt: add kernel implementation.