blob: f69b0084ff9feba21f310e22fb2945c564c1d41b [file] [log] [blame]
Niklaus Gigere9084b22008-11-03 22:14:36 +01001/*
2 * (C) Copyright 2008
3 * Niklaus Giger, niklaus.giger@member.fsf.org
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Niklaus Gigere9084b22008-11-03 22:14:36 +01006 */
7
8#ifndef _VXWORKS_H_
9#define _VXWORKS_H_
10
Bin Mengb90ff0f2015-10-07 20:19:18 -070011/*
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
29struct 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
Wolfgang Denk54841ab2010-06-28 22:00:46 +020040int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
Miao Yan871a57b2013-11-28 17:51:38 +080041void boot_prep_vxworks(bootm_headers_t *images);
42void boot_jump_vxworks(bootm_headers_t *images);
43void do_bootvx_fdt(bootm_headers_t *images);
Niklaus Gigere9084b22008-11-03 22:14:36 +010044
Niklaus Gigere9084b22008-11-03 22:14:36 +010045#endif