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
This commit is contained in:
Zbigniew Bodek 2014-06-05 21:35:10 +00:00
parent 43ed1d3c76
commit d0307444ed
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -54,3 +54,5 @@ Lpmureg:
.word 0xd0022124
END(mptramp)
.global _C_LABEL(mptramp_end)
_C_LABEL(mptramp_end):