@@ -50,7 +50,7 @@ FLATLIBS = $(libcflat)
%.elf: %.o $(FLATLIBS) $(SRCDIR)/s390x/flat.lds $(cstart.o)
$(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) \
$(SRCDIR)/lib/auxinfo.c -DPROGNAME=\"$@\"
- $(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds -Ttext=0x10000 \
+ $(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \
$(filter %.o, $^) $(FLATLIBS) $(@:.elf=.aux.o)
$(RM) $(@:.elf=.aux.o)
@chmod a-x $@
@@ -14,7 +14,13 @@
.section .init
-/* entry point - for KVM + TCG we directly start in 64 bit mode */
+/*
+ * Short init between 0x10000 and 0x10480 and then jump to 0x11000.
+ * 0x10480 - 0x11000 are written to by bootloader.
+ *
+ * For KVM and TCG kernel boot we are in 64 bit z/Arch mode.
+ * When booting from disk the initial short psw is in 31 bit mode.
+ */
.globl start
start:
/* setup stack */
@@ -1,10 +1,21 @@
SECTIONS
{
+ /*
+ * Initial short psw for disk boot, with 31 bit addressing for
+ * non z/Arch environment compatibility and the instruction
+ * address 0x10000 (cstart64.S .init).
+ */
+ .lowcore : {
+ . = 0;
+ LONG(0x00080000)
+ LONG(0x80010000)
+ }
+ . = 0x10000;
.text : {
*(.init)
. = 0x480;
ipl_args = .;
- . = 0x600;
+ . = 0x1000;
*(.text)
*(.text.*)
}