Lines Matching +full:secondary +full:- +full:boot +full:- +full:reg

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
9 * Low-level exception handlers and MMU support
16 * This file contains the entry point for the 64-bit kernel along
17 * with some early initialization code common to all 64-bit powerpc
23 #include <asm/reg.h>
27 #include <asm/head-64.h>
28 #include <asm/asm-offsets.h>
41 #include <asm/ppc-opcode.h>
43 #include <asm/feature-fixups.h>
45 /* The physical memory is laid out such that the secondary processor
47 * using the layout described in exceptions-64s.S
56 * 3. If the RTAS supports "query-cpu-stopped-state", then secondary
57 * CPUs will enter as directed by "start-cpu" RTAS call, which is
59 * 4. Else the secondary CPUs will enter at secondary_hold (0x60) as
60 * directed by the "start-cpu" RTS call, with PIR in r3.
61 * -or- For OPAL entry:
63 * 2. The primary CPU enters at 0 with device-tree in r3, OPAL base
65 * 3. Secondary CPUs enter as directed by OPAL_START_CPU call, which
91 /* Secondary processors spin on this value until it becomes non-zero.
92 * When non-zero, it contains the real address of the function the cpu
100 /* Secondary processors write this value with their cpu # */
109 * is used by kexec-tools to keep the the kdump kernel in the
117 #define RUN_AT_LOAD_DEFAULT 0x72756e30 /* "run0" -- relocate to 0 by default */
120 /* Do not move this variable as kexec-tools knows about it. */
130 * The following code is used to hold secondary processors
161 /* All secondary cpus wait here until told to start. */
202 #include "exceptions-64s.S"
211 * The booting_thread_hwid holds the thread id we want to boot in cpu
286 * If the old value of BUCSR is non-zero, this thread has run
305 /* turn on 64-bit mode */
320 * On pSeries and most other platforms, secondary processors spin
333 /* turn on 64-bit mode */
348 * one we wanted to boot. If not, start the specified thread and stop the
478 * r5 != NULL -> OF entry, we go to prom_init, "legacy" parameter content
481 * r5 == NULL -> kexec style entry. r3 is a physical pointer to the
495 addis r26,r26,(_stext - 0b)@ha
496 addi r26,r26,(_stext - 0b)@l /* current runtime base addr */
499 * Are we booted from a PROM Of-type client-interface ?
503 b __boot_from_prom /* yes -> prom */
548 * Align the stack to 16-byte boundary
550 * boot binary, the stack pointer may be unaligned on PowerMac
572 /* We never return. We also hit that trap if trying to boot
657 p_end: .8byte _end - copy_to_here
662 * _end - copy_to_here to the copy limit and run again.
680 addi r5,r5,-8
681 addi r6,r6,-8
713 * On PowerMac, secondary processors starts from the reset vector, which
732 /* turn on 64-bit mode */
781 * secondary processors. The execution environment is relocation off.
837 * zero the stack back-chain pointer and get the TOC virtual address
879 * are running at the moment, using position-independent code.
882 * TOC in -mcmodel=medium mode. After we relocate to 0 but before
892 ld r2,(p_toc - 0b)(r11)
898 p_toc: .8byte __toc_start + 0x8000 - 0b
912 * to clear it now for kexec-style entry.
920 addi r8,r8,-8
952 stdu r0,-STACK_FRAME_OVERHEAD(r1)
998 * We put a few things here that have to be page-aligned.
999 * This stuff goes at the beginning of the bss, which is page-aligned.