xref: /OK3568_Linux_fs/kernel/arch/powerpc/include/asm/bootx.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * This file describes the structure passed from the BootX application
4*4882a593Smuzhiyun  * (for MacOS) when it is used to boot Linux.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Written by Benjamin Herrenschmidt.
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef __ASM_BOOTX_H__
10*4882a593Smuzhiyun #define __ASM_BOOTX_H__
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <uapi/asm/bootx.h>
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index
15*4882a593Smuzhiyun  * is represented by 3 short words containing a 16 bits (unsigned) color
16*4882a593Smuzhiyun  * component. Later versions may contain the gamma table for direct-color
17*4882a593Smuzhiyun  * devices here.
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun #define BOOTX_COLORTABLE_SIZE    (256UL*3UL*2UL)
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun /* BootX passes the device-tree using a format that comes from earlier
22*4882a593Smuzhiyun  * ppc32 kernels. This used to match what is in prom.h, but not anymore
23*4882a593Smuzhiyun  * so we now define it here
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun struct bootx_dt_prop {
26*4882a593Smuzhiyun 	u32	name;
27*4882a593Smuzhiyun 	int	length;
28*4882a593Smuzhiyun 	u32	value;
29*4882a593Smuzhiyun 	u32	next;
30*4882a593Smuzhiyun };
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun struct bootx_dt_node {
33*4882a593Smuzhiyun 	u32	unused0;
34*4882a593Smuzhiyun 	u32	unused1;
35*4882a593Smuzhiyun 	u32	phandle;	/* not really available */
36*4882a593Smuzhiyun 	u32	unused2;
37*4882a593Smuzhiyun 	u32	unused3;
38*4882a593Smuzhiyun 	u32	unused4;
39*4882a593Smuzhiyun 	u32	unused5;
40*4882a593Smuzhiyun 	u32	full_name;
41*4882a593Smuzhiyun 	u32	properties;
42*4882a593Smuzhiyun 	u32	parent;
43*4882a593Smuzhiyun 	u32	child;
44*4882a593Smuzhiyun 	u32	sibling;
45*4882a593Smuzhiyun 	u32	next;
46*4882a593Smuzhiyun 	u32	allnext;
47*4882a593Smuzhiyun };
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun extern void bootx_init(unsigned long r4, unsigned long phys);
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun #endif
52