xref: /OK3568_Linux_fs/u-boot/include/vxworks.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * (C) Copyright 2008
3*4882a593Smuzhiyun  * Niklaus Giger, niklaus.giger@member.fsf.org
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef _VXWORKS_H_
9*4882a593Smuzhiyun #define _VXWORKS_H_
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun /*
12*4882a593Smuzhiyun  * VxWorks x86 E820 related stuff
13*4882a593Smuzhiyun  *
14*4882a593Smuzhiyun  * VxWorks on x86 gets E820 information from pre-defined address @
15*4882a593Smuzhiyun  * 0x4a00 and 0x4000. At 0x4a00 it's an information table defined
16*4882a593Smuzhiyun  * by VxWorks and the actual E820 table entries starts from 0x4000.
17*4882a593Smuzhiyun  * As defined by the BIOS E820 spec, the maximum number of E820 table
18*4882a593Smuzhiyun  * entries is 128 and each entry occupies 20 bytes, so it's 128 * 20
19*4882a593Smuzhiyun  * = 2560 (0xa00) bytes in total. That's where VxWorks stores some
20*4882a593Smuzhiyun  * information that is retrieved from the BIOS E820 call and saved
21*4882a593Smuzhiyun  * later for sanity test during the kernel boot-up.
22*4882a593Smuzhiyun  */
23*4882a593Smuzhiyun #define VXWORKS_E820_DATA_ADDR	0x4000
24*4882a593Smuzhiyun #define VXWORKS_E820_INFO_ADDR	0x4a00
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun /* E820 info signatiure "SMAP" - System MAP */
27*4882a593Smuzhiyun #define E820_SIGNATURE	0x534d4150
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun struct e820info {
30*4882a593Smuzhiyun 	u32 sign;	/* "SMAP" signature */
31*4882a593Smuzhiyun 	u32 x0;		/* don't care, used by VxWorks */
32*4882a593Smuzhiyun 	u32 x1;		/* don't care, used by VxWorks */
33*4882a593Smuzhiyun 	u32 x2;		/* don't care, used by VxWorks */
34*4882a593Smuzhiyun 	u32 addr;	/* last e820 table entry addr */
35*4882a593Smuzhiyun 	u32 x3;		/* don't care, used by VxWorks */
36*4882a593Smuzhiyun 	u32 entries;	/* e820 table entry count */
37*4882a593Smuzhiyun 	u32 error;	/* must be zero */
38*4882a593Smuzhiyun };
39*4882a593Smuzhiyun 
40*4882a593Smuzhiyun int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
41*4882a593Smuzhiyun void boot_prep_vxworks(bootm_headers_t *images);
42*4882a593Smuzhiyun void boot_jump_vxworks(bootm_headers_t *images);
43*4882a593Smuzhiyun void do_bootvx_fdt(bootm_headers_t *images);
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun #endif
46