[kvm-unit-tests GIT PULL 13/17] s390x: snippets: Set stackptr and stacktop in cstart.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have a stack, so why not define it and be a step closer to include
the lib into the snippets.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
---
 s390x/snippets/c/cstart.S | 2 +-
 s390x/snippets/c/flat.lds | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/s390x/snippets/c/cstart.S b/s390x/snippets/c/cstart.S
index a1754808..031a6b83 100644
--- a/s390x/snippets/c/cstart.S
+++ b/s390x/snippets/c/cstart.S
@@ -17,7 +17,7 @@ start:
 	xgr \i,\i
 	.endr
 	/* 0x3000 is the stack page for now */
-	lghi	%r15, 0x4000 - 160
+	lghi	%r15, stackptr
 	sam64
 	brasl	%r14, main
 	/* For now let's only use cpu 0 in snippets so this will always work. */
diff --git a/s390x/snippets/c/flat.lds b/s390x/snippets/c/flat.lds
index ce3bfd69..59974b38 100644
--- a/s390x/snippets/c/flat.lds
+++ b/s390x/snippets/c/flat.lds
@@ -15,6 +15,8 @@ SECTIONS
 		 QUAD(0x0000000000004000)
 	}
 	. = 0x4000;
+	stackptr = . - 160;
+	stacktop = .;
 	.text : {
 		*(.init)
 		*(.text)
-- 
2.31.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux