summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/armadaxp
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2014-06-05 21:35:10 +0000
committerzbb <zbb@FreeBSD.org>2014-06-05 21:35:10 +0000
commitd1712dc4ffd19ec5f30bbcac47ea6c63c71d2a00 (patch)
treef8a415f0e64aa6f9096c4757e39df56cb10ec64a /sys/arm/mv/armadaxp
parent359dad8e6ca731993a69a7ca3c801b7fca24b99c (diff)
downloadFreeBSD-src-d1712dc4ffd19ec5f30bbcac47ea6c63c71d2a00.zip
FreeBSD-src-d1712dc4ffd19ec5f30bbcac47ea6c63c71d2a00.tar.gz
Fix broken SMP startup on Armada XP after r265694
During Armada's platform_mp_start_ap(), mptramp code is being copied to the specific physical location (0xffff0000). Before r265694 the address to which the code should be copied was equal to the address of mpentry routine that followed the mptramp in locore.S. Now the mptramp end address should be exported and used as a copy limit. Reviewed by: gber
Diffstat (limited to 'sys/arm/mv/armadaxp')
-rw-r--r--sys/arm/mv/armadaxp/armadaxp_mp.c5
-rw-r--r--sys/arm/mv/armadaxp/mptramp.S2
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/arm/mv/armadaxp/armadaxp_mp.c b/sys/arm/mv/armadaxp/armadaxp_mp.c
index 004f8db..1ede26f 100644
--- a/sys/arm/mv/armadaxp/armadaxp_mp.c
+++ b/sys/arm/mv/armadaxp/armadaxp_mp.c
@@ -97,8 +97,7 @@ platform_mp_init_secondary(void)
}
void mptramp(void);
-
-
+void mptramp_end(void);
void
platform_mp_start_ap(void)
@@ -116,7 +115,7 @@ platform_mp_start_ap(void)
pmap_kenter_nocache(smp_boot, 0xffff0000);
dst = (uint32_t *) smp_boot;
- for (src = (uint32_t *)mptramp; src < (uint32_t *)mpentry;
+ for (src = (uint32_t *)mptramp; src < (uint32_t *)mptramp_end;
src++, dst++) {
*dst = *src;
}
diff --git a/sys/arm/mv/armadaxp/mptramp.S b/sys/arm/mv/armadaxp/mptramp.S
index 4d657e4..768a16a 100644
--- a/sys/arm/mv/armadaxp/mptramp.S
+++ b/sys/arm/mv/armadaxp/mptramp.S
@@ -54,3 +54,5 @@ Lpmureg:
.word 0xd0022124
END(mptramp)
+ .global _C_LABEL(mptramp_end)
+_C_LABEL(mptramp_end):
OpenPOWER on IntegriCloud