2 #include "cmos_lowlevel.h"
4 static void mem_hal_init(void* data
);
5 static unsigned char mem_hal_read(unsigned addr
);
6 static void mem_hal_write(unsigned addr
, unsigned char value
);
7 static void mem_set_iopl(int level
);
9 static unsigned char* mem_hal_data
= (unsigned char*)-1;
10 static void mem_hal_init(void *data
)
15 static unsigned char mem_hal_read(unsigned index
)
17 assert(mem_hal_data
!= (unsigned char*)-1);
18 return mem_hal_data
[index
];
21 static void mem_hal_write(unsigned index
, unsigned char value
)
23 assert(mem_hal_data
!= (unsigned char*)-1);
24 mem_hal_data
[index
] = value
;
27 static void mem_set_iopl(__attribute__ ((unused
)) int level
)
31 cmos_access_t memory_hal
= {
34 .write
= mem_hal_write
,
35 .set_iopl
= mem_set_iopl
,