Niklaus Giger | e9084b2 | 2008-11-03 22:14:36 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 |
| 3 | * Niklaus Giger, niklaus.giger@member.fsf.org |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Niklaus Giger | e9084b2 | 2008-11-03 22:14:36 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _VXWORKS_H_ |
| 9 | #define _VXWORKS_H_ |
| 10 | |
Bin Meng | b90ff0f | 2015-10-07 20:19:18 -0700 | [diff] [blame] | 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 | |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 40 | int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); |
Miao Yan | 871a57b | 2013-11-28 17:51:38 +0800 | [diff] [blame] | 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); |
Niklaus Giger | e9084b2 | 2008-11-03 22:14:36 +0100 | [diff] [blame] | 44 | |
Niklaus Giger | e9084b2 | 2008-11-03 22:14:36 +0100 | [diff] [blame] | 45 | #endif |