summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-25 18:56:26 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-25 18:56:26 +0000
commitb700254aa5150023a13902adbe31839ec4f926cb (patch)
tree087400b833d533b12097fa21454815aff6df9784 /payloads/libpayload/include
parent7208f6e031957ab163136546c191d577c7418299 (diff)
Add coreboot framebuffer support to libpayload
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5295 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h20
-rw-r--r--payloads/libpayload/include/i386/arch/endian.h5
-rw-r--r--payloads/libpayload/include/sysinfo.h2
-rw-r--r--payloads/libpayload/include/video_console.h6
4 files changed, 30 insertions, 3 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 768bb34ec1..04b8cef4c1 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -136,6 +136,26 @@ struct cb_forward {
u64 forward;
};
+#define CB_TAG_FRAMEBUFFER 0x0012
+struct cb_framebuffer {
+ u32 tag;
+ u32 size;
+
+ u64 physical_address;
+ u32 x_resolution;
+ u32 y_resolution;
+ u32 bytes_per_line;
+ u8 bits_per_pixel;
+ u8 red_mask_pos;
+ u8 red_mask_size;
+ u8 green_mask_pos;
+ u8 green_mask_size;
+ u8 blue_mask_pos;
+ u8 blue_mask_size;
+ u8 reserved_mask_pos;
+ u8 reserved_mask_size;
+};
+
#define CB_TAG_CMOS_OPTION_TABLE 0x00c8
struct cb_cmos_option_table {
u32 tag;
diff --git a/payloads/libpayload/include/i386/arch/endian.h b/payloads/libpayload/include/i386/arch/endian.h
index a50ac1fede..3164376a12 100644
--- a/payloads/libpayload/include/i386/arch/endian.h
+++ b/payloads/libpayload/include/i386/arch/endian.h
@@ -38,4 +38,9 @@
(( (in) & 0xFF0000) >> 8) | (( (in) & 0xFF000000) >> 24))
#define ntohll(in) (((u64) ntohl( (in) & 0xFFFFFFFF) << 32) | ((u64) ntohl( (in) >> 32)))
+
+#define htonw(in) ntohw(in)
+#define htonl(in) ntohl(in)
+#define htonll(in) ntohll(in)
+
#endif
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index 3b3a1563fd..518f021ce3 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -50,6 +50,8 @@ struct sysinfo_t {
u32 cmos_range_end;
u32 cmos_checksum_location;
+ struct cb_framebuffer *framebuffer;
+
unsigned long *mbtable; /** Pointer to the multiboot table */
};
diff --git a/payloads/libpayload/include/video_console.h b/payloads/libpayload/include/video_console.h
index 1646ec6056..4894da4dfd 100644
--- a/payloads/libpayload/include/video_console.h
+++ b/payloads/libpayload/include/video_console.h
@@ -30,9 +30,6 @@
#ifndef _VIDEO_CONSOLE_H
#define _VIDEO_CONSOLE_H
-#define VIDEO_ROWS 25
-#define VIDEO_COLS 80
-
struct video_console {
int (*init)(void);
void (*putc)(u8, u8, unsigned int);
@@ -42,6 +39,9 @@ struct video_console {
void (*get_cursor)(unsigned int *, unsigned int *, unsigned int *);
void (*set_cursor)(unsigned int, unsigned int);
void (*enable_cursor)(int);
+
+ unsigned int rows;
+ unsigned int columns;
};
#endif