From owner-svn-src-all@FreeBSD.ORG Thu Jun 5 21:35:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1AF2B23; Thu, 5 Jun 2014 21:35:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF5FA2D0A; Thu, 5 Jun 2014 21:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55LZAL5097498; Thu, 5 Jun 2014 21:35:10 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55LZAEv097496; Thu, 5 Jun 2014 21:35:10 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201406052135.s55LZAEv097496@svn.freebsd.org> From: Zbigniew Bodek Date: Thu, 5 Jun 2014 21:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267129 - head/sys/arm/mv/armadaxp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 21:35:11 -0000 Author: zbb Date: Thu Jun 5 21:35:10 2014 New Revision: 267129 URL: http://svnweb.freebsd.org/changeset/base/267129 Log: 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 Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/mv/armadaxp/mptramp.S Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Jun 5 21:12:41 2014 (r267128) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Jun 5 21:35:10 2014 (r267129) @@ -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; } Modified: head/sys/arm/mv/armadaxp/mptramp.S ============================================================================== --- head/sys/arm/mv/armadaxp/mptramp.S Thu Jun 5 21:12:41 2014 (r267128) +++ head/sys/arm/mv/armadaxp/mptramp.S Thu Jun 5 21:35:10 2014 (r267129) @@ -54,3 +54,5 @@ Lpmureg: .word 0xd0022124 END(mptramp) + .global _C_LABEL(mptramp_end) +_C_LABEL(mptramp_end):