Add initial support for some basic CMOS read/write functions and the
bcd2dec()/dec2bcd() functions we'll need for (among other things) converting some date/time parameters in CMOS. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Jordan Crouse <jordan.crouse@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3192 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@ -41,6 +41,18 @@
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
/* Some CMOS byte definitions */
|
||||
#define CMOS_RTC_SECONDS 0
|
||||
#define CMOS_RTC_MINUTES 2
|
||||
#define CMOS_RTC_HOURS 4
|
||||
#define CMOS_RTC_DAY 7
|
||||
#define CMOS_RTC_MONTH 8
|
||||
#define CMOS_RTC_YEAR 9
|
||||
|
||||
/* drivers/cmos.c */
|
||||
u8 cmos_read(u8 addr);
|
||||
void cmos_write(u8 val, u8 addr);
|
||||
|
||||
/* drivers/keyboard.c */
|
||||
int keyboard_havechar(void);
|
||||
unsigned char keyboard_get_scancode(void);
|
||||
@ -87,6 +99,10 @@ void *malloc(size_t size);
|
||||
void *calloc(size_t nmemb, size_t size);
|
||||
void *realloc(void *ptr, size_t size);
|
||||
|
||||
/* libc/lib.c */
|
||||
int bcd2dec(int b);
|
||||
int dec2bcd(int d);
|
||||
|
||||
/* libc/memory.c */
|
||||
void *memset(void *s, int c, size_t n);
|
||||
void *memcpy(void *dst, const void *src, size_t n);
|
||||
|
Reference in New Issue
Block a user