#include "common.h"
#include "layout.h"
+typedef struct {
+ void (*init)(void* data);
+ unsigned char (*read)(unsigned addr);
+ void (*write)(unsigned addr, unsigned char value);
+ void (*set_iopl)(int level);
+} cmos_access_t;
+
+typedef enum { HAL_CMOS, HAL_MEMORY } hal_t;
+void select_hal(hal_t hal, void *data);
+
#define CMOS_AREA_OUT_OF_RANGE (CMOS_RESULT_START + 0)
#define CMOS_AREA_OVERLAPS_RTC (CMOS_RESULT_START + 1)
#define CMOS_AREA_TOO_WIDE (CMOS_RESULT_START + 2)