Port-sparc archive

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

fpstate stack alignment

Hey folks,

"recently" (probably after the last compiler update) my krups kernel
started to fail early during boot when initializing the fpu.

I needed this patch to get past this:

Index: cpu.c
RCS file: /cvsroot/src/sys/arch/sparc/sparc/cpu.c,v
retrieving revision 1.250
diff -u -p -r1.250 cpu.c
--- cpu.c	2 Dec 2017 00:48:05 -0000	1.250
+++ cpu.c	11 Jan 2018 19:12:41 -0000
@@ -956,7 +956,7 @@ mp_resume_cpus_ddb(void)
 fpu_init(struct cpu_info *sc)
-	struct fpstate fpstate;
+	struct fpstate fpstate __aligned(16);
 	int fpuvers;

savefpstate(&fpstate) uses std to store %f0 to the pointer passed, and this
is where it fails for me w/o that alignement.

I guess we have been lucky before - or did we bork stack alignment recently?

With this applied the kernel gets to mounting root, but then just resets
w/o any problem indication - need to investigate that in more detail
another day.


Home | Main Index | Thread Index | Old Index