Fix problems booting large kernels on alphas. The symptom is that the kernel

loads, prints the copyright, and either hangs or locks solid.  The
PC tends to be in the data segment and the RA is in XentMM

Doug really came up with the fix, I'm just the monkey typing.  Doug says:
	The alpha can only support 64k of globals with $gp pointing at
	base+32k so that the code can use 16bit signed offsets from $gp to
	access it. ....  it is possible to have multiple .got subsections
	and the linker handles this with the relocations for 'ldgp' pseudo
	instructions.  [Without this patch] the code in exception.s has been
	linked  to use a different gp from locore.s (where pal_kgp is set).

Reviewed by: dfr
This commit is contained in:
Andrew Gallatin 2000-10-16 20:15:43 +00:00
parent 0d409bfdac
commit 1e78526274
2 changed files with 8 additions and 1 deletions

View File

@ -124,6 +124,8 @@
/* syscall number, passed in v0, is first arg, frame pointer second */
mov v0,a0
mov sp,a1 ; .loc 1 __LINE__
br pv,XentSys1
XentSys1: LDGP(pv)
CALL(syscall)
jmp zero, exception_return
@ -147,6 +149,8 @@ LEAF(XentUna, 3) /* XXX should be NESTED */
/* a0, a1, & a2 already set up */
ldiq a3, ALPHA_KENTRY_UNA
mov sp, a4 ; .loc 1 __LINE__
br pv, XentUna1
XentUna1: LDGP(pv)
CALL(trap)
jmp zero, exception_return

View File

@ -250,7 +250,10 @@
#define PALVECT(_name_) \
ESETUP(_name_); \
ERSAVE()
ERSAVE(); \
br pv, _name_##lgp; \
_name_##lgp:; \
LDGP(pv)
#define ESETUP(_name_) \
.loc 1 __LINE__; \