summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/asm.h
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-10-16 20:15:43 +0000
committergallatin <gallatin@FreeBSD.org>2000-10-16 20:15:43 +0000
commit3ef73aae7e921343491d8ec3686cd465e190652f (patch)
tree9d487ff97ed87cf5172d395fe738f8690cd30bb9 /sys/alpha/include/asm.h
parentb0c15b2eaedc92c77692f59f2977f021dd839d45 (diff)
downloadFreeBSD-src-3ef73aae7e921343491d8ec3686cd465e190652f.zip
FreeBSD-src-3ef73aae7e921343491d8ec3686cd465e190652f.tar.gz
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
Diffstat (limited to 'sys/alpha/include/asm.h')
-rw-r--r--sys/alpha/include/asm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/alpha/include/asm.h b/sys/alpha/include/asm.h
index d46eb97..2b4efe0 100644
--- a/sys/alpha/include/asm.h
+++ b/sys/alpha/include/asm.h
@@ -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__; \
OpenPOWER on IntegriCloud