summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-03-27 23:26:40 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-03-27 23:26:40 +0000
commit8cc38d2f13bfacddd5e97c1cb3340bcdca4093b0 (patch)
tree1576178eb58c34b87bccf2392464600f5923a824 /payloads/libpayload/include
parenta0c0093a09f0a7115ce73abe00b8b75afab4a08c (diff)
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
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/libpayload.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 34258cf49b..6d80004a98 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -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);