acpi.h: Small fixes and adding comments.
[coreboot.git] / src / include / console / btext.h
blob1d2e37e1fc4458efda9c09ecfd1e8409e9e2fe1e
1 /*
2 * This file describes the structure passed from the BootX application
3 * (for MacOS) when it is used to boot Linux.
5 * Written by Benjamin Herrenschmidt.
7 * Move to coreboot by LYH yhlu@tyan.com
9 */
12 #ifndef _BTEXT_H__
13 #define _BTEXT_H__
15 #define u32 uint32_t
16 #define u16 uint16_t
17 #define u8 uint8_t
19 /* Here are the boot informations that are passed to the bootstrap
20 * Note that the kernel arguments and the device tree are appended
21 * at the end of this structure. */
22 typedef struct boot_infos
25 /* NEW (vers. 2) this holds the current _logical_ base addr of
26 the frame buffer (for use by early boot message) */
27 u8* logicalDisplayBase;
30 /* Some infos about the current MacOS display */
31 u32 dispDeviceRect[4]; /* left,top,right,bottom */
32 u32 dispDeviceDepth; /* (8, 16 or 32) */
33 u8* dispDeviceBase; /* base address (physical) */
34 u32 dispDeviceRowBytes; /* rowbytes (in bytes) */
35 u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */
38 /* The framebuffer size (optional, currently 0) */
39 u32 frameBufferSize; /* Represents a max size, can be 0. */
42 } boot_infos_t;
44 /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index is represented
45 * by 3 short words containing a 16 bits (unsigned) color component.
46 * Later versions may contain the gamma table for direct-color devices here.
48 #define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL)
52 * Definitions for using the procedures in btext.c.
54 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
57 extern void btext_clearscreen(void);
59 extern boot_infos_t disp_bi;
60 extern u32 boot_text_mapped;
62 void btext_setup_display(u32 width, u32 height, u32 depth, u32 pitch,
63 unsigned long address);
64 void map_boot_text(void);
65 void btext_update_display(unsigned long phys, u32 width, u32 height,
66 u32 depth, u32 pitch);
68 void btext_drawchar(char c);
69 void btext_drawstring(const char *str);
70 void btext_drawhex(u32 v);
72 #endif /* _BTEXT_H */