Lines Matching +full:reserved +full:- +full:cpu +full:- +full:vectors

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
27 #include <asm/head-64.h>
28 #include <asm/asm-offsets.h>
41 #include <asm/ppc-opcode.h>
43 #include <asm/feature-fixups.h>
46 * spin code sits at 0x0000...0x00ff. On server, the vectors follow
47 * using the layout described in exceptions-64s.S
55 * 2. The primary CPU enters at __start.
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
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
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. */
146 /* Grab our physical cpu number */
151 /* Tell the master cpu we're here */
197 * On server, we include the exception vectors code here as it
202 #include "exceptions-64s.S"
211 * The booting_thread_hwid holds the thread id we want to boot in cpu
212 * hotplug case. It is set by cpu hotplug code, and is invalid by default.
283 * but the low bit right by two bits so that the cpu numbering is
286 * If the old value of BUCSR is non-zero, this thread has run
305 /* turn on 64-bit mode */
322 * At entry, r3 = this processor's number (physical cpu id)
333 /* turn on 64-bit mode */
387 * physical cpu id in r24, we need to search the pacas to find
397 li r5,0 /* logical cpu id */
399 sldi r9,r5,3 /* get paca_ptrs[] index from cpu id */
400 ldx r13,r9,r8 /* r13 = paca_ptrs[cpu id] */
420 /* See if we need to call a cpu state restore handler */
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
603 * real memory, which are reserved for software use.
605 * Note: This process overwrites the OF exception vectors.
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
732 /* turn on 64-bit mode */
748 /* Copy some CPU settings from CPU 0 */
759 sldi r5,r24,3 /* get paca_ptrs[] index from cpu id */
760 ldx r13,r5,r4 /* r13 = paca_ptrs[cpu id] */
780 * This function is called after the master CPU has released the
788 * r24 = cpu# (in Linux terms)
801 * Do early setup for this CPU, in particular initialising the MMU so we
837 * zero the stack back-chain pointer and get the TOC virtual address
849 * from cede in cpu offline.
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.