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