stos/amd64: hpetreg: Add HPET register defs

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-25 22:06:44 -05:00
parent 95e2c96126
commit 45dea1edb9
+29
View File
@@ -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 <stdef.h>
/* 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_ */