4058d7b9d4
In order to more easily bring up the 2nd core refactor the cpu startup logic. A common 32bit_entry.S is compiled both for romstage and ramstage to provide the common 32-bit entry point. BUG=chrome-os-partner:31545 BRANCH=None TEST=Built and booted ryu to the kernel. Also, can get the 2nd core up out of reset. Change-Id: I0c2c9f637189009767e8d5510732678c64e62a2a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 7394b271bf67dfad8a601f41faaac8f07ae6d4a5 Original-Change-Id: Id810df95c53d3dc8b36d8bd21851d3b0006a8bc2 Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/213850 Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9001 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
41 lines
1.3 KiB
ArmAsm
41 lines
1.3 KiB
ArmAsm
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright 2014 Google Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
/*
|
|
* This code is compiled for both arm64 and arm4, however the code is only
|
|
* executed by the armv8 cores coming out of reset.
|
|
*/
|
|
|
|
#if !defined(__PRE_RAM__)
|
|
#define INST .inst
|
|
#else
|
|
#define INST .word
|
|
#endif
|
|
|
|
/*
|
|
* The Denver cores come up in aarch32 mode. In order to transition to
|
|
* 64-bit mode a write to the RMR (reest mangement register) with the
|
|
* AA64 bit (0) set while setting RR (reset request bit 1).
|
|
*/
|
|
.align 6
|
|
.global reset_entry_32bit
|
|
reset_entry_32bit:
|
|
INST 0xe3a00003 /* mov r0, #3 */
|
|
INST 0xee0c0f50 /* mcr 15, 0, r0, cr12, cr0, {2} */
|
|
INST 0xeafffffe /* b . */
|