summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2008-08-27 12:43:56 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 20:22:38 -0700
commit56ce5adc402b046a8531047f48d2aef778baebd1 (patch)
tree8a9fa85c69950d6424b3f066b00c3317f68b503e
parentb7b3000b47443bd625f6bad0a89ce5b86d2b5b3d (diff)
downloadbootstub-56ce5adc402b046a8531047f48d2aef778baebd1.tar.gz
Modify destination address above 16MB
-rw-r--r--Makefile6
-rw-r--r--bootstub.h12
-rw-r--r--bootstub.lds2
-rw-r--r--head.S14
4 files changed, 17 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 2e366a1..0c89f9c 100644
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,13 @@ bootstub.bin:bootstub.elf
bootstub.elf:bootstub.lds $(OBJ)
ld -m elf_i386 -T bootstub.lds $(OBJ) -o $@
-bootstub.o:bootstub.c
+bootstub.o:bootstub.c bootstub.h
gcc -Wall -c bootstub.c
-spi-uart.o:spi-uart.c
+spi-uart.o:spi-uart.c spi-uart.h
gcc -Wall -c spi-uart.c
-head.o:head.S
+head.o:head.S bootstub.h
gcc -Wall -c head.S
clean:
diff --git a/bootstub.h b/bootstub.h
index 53a12bf..44af1b2 100644
--- a/bootstub.h
+++ b/bootstub.h
@@ -4,12 +4,12 @@
#ifndef _BOOT_STUB_HEAD
#define _BOOT_STUB_HEAD
-#define CMDLINE_OFFSET 0x100000
-#define BZIMAGE_SIZE_OFFSET 0x100100
-#define INITRD_SIZE_OFFSET 0x100104
-#define SPI_UART_SUPPRESSION 0x100108
-#define STACK_OFFSET 0x101000
-#define BZIMAGE_OFFSET 0x102000
+#define CMDLINE_OFFSET 0x1100000
+#define BZIMAGE_SIZE_OFFSET 0x1100100
+#define INITRD_SIZE_OFFSET 0x1100104
+#define SPI_UART_SUPPRESSION 0x1100108
+#define STACK_OFFSET 0x1101000
+#define BZIMAGE_OFFSET 0x1102000
#define SETUP_HEADER_OFFSET (BZIMAGE_OFFSET + 0x1F1)
#define SETUP_HEADER_SIZE (0x0202 + *(unsigned char*)(0x0201+BZIMAGE_OFFSET))
diff --git a/bootstub.lds b/bootstub.lds
index 4248c54..80c8771 100644
--- a/bootstub.lds
+++ b/bootstub.lds
@@ -3,7 +3,7 @@ OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
- . = 0x101000; /* bootstub entry in DRAM */
+ . = 0x1101000; /* bootstub entry in DRAM */
.text.head : {
_head = . ;
*(.text.head)
diff --git a/head.S b/head.S
index 3b3731b..bb51a2c 100644
--- a/head.S
+++ b/head.S
@@ -27,24 +27,24 @@
*
* When bootstub get control, the memory map in DRAM is like:
* ~ ~
- * 0x102000 | initrd | initrd will move to highest memory otherwise
+ * 0x1102000 | initrd | initrd will move to highest memory otherwise
*+bzImage size +-----------------------+ bzImage uncompressing will destory it
* | bzImage |
- * 0x102000 +-----------------------+
+ * 0x1102000 +-----------------------+
* | boot stub |
- * 0x101000 +-----------------------+
+ * 0x1101000 +-----------------------+
* | free space |
* | used as stack |
* +-----------------------+
* | boot stub spi uart | MIC need to fill it:
* | suppression flag | 0x1 suppression, 0x0 default
- * 0x100108 +-----------------------+
+ * 0x1100108 +-----------------------+
* | initrd size | MIC need to fill it: initrd file size
- * 0x100104 +-----------------------+
+ * 0x1100104 +-----------------------+
* | bzImage size | MIC need to fill it: bzImage file size
- * 0x100100 +-----------------------+
+ * 0x1100100 +-----------------------+
* | kernel cmdline | MIC need to fill it
- * 0x100000 +-----------------------+
+ * 0x1100000 +-----------------------+
*/
#include "bootstub.h"