1/* 2 * This file describes the structure passed from the BootX application 3 * (for MacOS) when it is used to boot Linux. 4 * 5 * Written by Benjamin Herrenschmidt. 6 * 7 * Move to coreboot by LYH yhlu@tyan.com 8 * 9 */ 10 11 12#ifndef _BTEXT_H__ 13#define _BTEXT_H__ 14 15#define u32 uint32_t 16#define u16 uint16_t 17#define u8 uint8_t 18 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. */ 22typedef struct boot_infos 23{ 24 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; 28 29 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 (*) */ 36 37 38 /* The framebuffer size (optional, currently 0) */ 39 u32 frameBufferSize; /* Represents a max size, can be 0. */ 40 41 42} boot_infos_t; 43 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. 47 */ 48#define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL) 49 50 51/* 52 * Definitions for using the procedures in btext.c. 53 * 54 * Benjamin Herrenschmidt <benh@kernel.crashing.org> 55 */ 56 57extern void btext_clearscreen(void); 58 59extern boot_infos_t disp_bi; 60extern u32 boot_text_mapped; 61 62void btext_setup_display(u32 width, u32 height, u32 depth, u32 pitch, 63 unsigned long address); 64void map_boot_text(void); 65void btext_update_display(unsigned long phys, u32 width, u32 height, 66 u32 depth, u32 pitch); 67 68void btext_drawchar(char c); 69void btext_drawstring(const char *str); 70void btext_drawhex(u32 v); 71 72#endif /* _BTEXT_H */ 73

