diff --git a/paw/stos/head/arch/amd64/hpetreg.h b/paw/stos/head/arch/amd64/hpetreg.h new file mode 100644 index 0000000..f57bcfc --- /dev/null +++ b/paw/stos/head/arch/amd64/hpetreg.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: HPET registers + * Author: Chloe M. + */ + +#ifndef _MACHINE_HPETREG_H_ +#define _MACHINE_HPETREG_H_ 1 + +#include + +/* Register offsets */ +#define HPET_GENERAL_CAP 0x00 +#define HPET_GENERAL_CONF 0x10 +#define HPET_MAIN_COUNTER 0xF0 + +/* General capabilities */ +#define HPET_REV_ID_MASK 0xFF +#define HPET_REV_ID_SHIFT 0 +#define HPET_PERIOD_MASK 0xFFFFFFFF +#define HPET_PERIOD_SHIFT 32 + +/* General conf fields */ +#define HPET_GCONF_EN BIT(0) +#define HPET_LEG_RT BIT(1) + +#endif /* !_MACHINE_HPETREG_H_ */