Files
SystemPaw3/paw/stos/head/arch/amd64/gdt.h
T
Chloe M. 27af606ba2 stos/amd64: Add GDT header
Signed-off-by: Chloe M. <chloe@mensia.org>
2026-06-23 19:00:14 +00:00

28 lines
500 B
C

/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause.
*
* Description: Global descriptor table
* Author: Chloe M.
*/
#ifndef _MACHINE_GDT_H_
#define _MACHINE_GDT_H_ 1
/* Number of GDT entries */
#define GDT_ENTRY_COUNT 7
/* Kernel code/data */
#define GDT_KCODE 0x08
#define GDT_KDATA 0x10
/* User code/data */
#define GDT_UCODE 0x18
#define GDT_UDATA 0x20
/* Task state segment */
#define GDT_TSS 0x28
#define GDT_TSS_INDEX 0x05
#endif /* !_MACHINE_GDT_H_ */