summaryrefslogtreecommitdiff
path: root/include/vxworks.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-04-11 22:02:08 -0700
committerBin Meng <bmeng.cn@gmail.com>2018-04-16 16:54:51 +0800
commit1351700cf2eec9fd928dace86de0aabdb34dfeb5 (patch)
tree79c287a08ac20f98c01133bf0df1e6f4b4178780 /include/vxworks.h
parent2902be86c1496244800ee15a148a4907bf9a3492 (diff)
downloadu-boot-1351700cf2eec9fd928dace86de0aabdb34dfeb5.tar.gz
bootvx: x86: Explicitly clear the bootloader image size
VxWorks bootloader stores its size at a pre-defined offset @ 0x5004. Later when VxWorks kernel boots up and system memory information is retrieved from the E820 table, the bootloader size will be subtracted from the total system memory size to calculate the size of available memory for the OS. Explicitly clear the bootloader image size otherwise if memory at this offset happens to contain some garbage data, the final available memory size for the kernel is insane. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/vxworks.h')
-rw-r--r--include/vxworks.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/vxworks.h b/include/vxworks.h
index f600dfa337..d912076322 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -43,6 +43,15 @@ struct e820info {
u32 error; /* must be zero */
};
+/*
+ * VxWorks bootloader stores its size at a pre-defined offset @ 0x5004.
+ * Later when VxWorks kernel boots up and system memory information is
+ * retrieved from the E820 table, the bootloader size will be subtracted
+ * from the total system memory size to calculate the size of available
+ * memory for the OS.
+ */
+#define BOOT_IMAGE_SIZE_OFFSET 0x5004
+
int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
void boot_prep_vxworks(bootm_headers_t *images);
void boot_jump_vxworks(bootm_headers_t *images);