45dea1edb9
Signed-off-by: Chloe M. <chloe@mensia.org>
30 lines
623 B
C
30 lines
623 B
C
/*
|
|
* 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_ */
|