/* SPDX-License-Identifier: GPL-2.0 */1/*2* arch/alpha/kernel/head.S3*4* initial boot stuff.. At this point, the bootloader has already5* switched into OSF/1 PAL-code, and loaded us at the correct address6* (START_ADDR). So there isn't much left for us to do: just set up7* the kernel global pointer and jump to the kernel entry-point.8*/910#include <linux/init.h>11#include <asm/asm-offsets.h>12#include <asm/pal.h>13#include <asm/setup.h>1415__HEAD16.globl _stext17.set noreorder18.globl __start19.ent __start20_stext:21__start:22.prologue 023br $27,1f241: ldgp $29,0($27)25/* We need to get current_task_info loaded up... */26lda $8,init_thread_union27/* ... and find our stack ... */28lda $30,0x4000 - SIZEOF_PT_REGS($8)29/* ... and then we can start the kernel. */30jsr $26,start_kernel31call_pal PAL_halt32.end __start3334#ifdef CONFIG_SMP35.align 336.globl __smp_callin37.ent __smp_callin38/* On entry here from SRM console, the HWPCB of the per-cpu39slot for this processor has been loaded. We've arranged40for the UNIQUE value for this process to contain the PCBB41of the target idle task. */42__smp_callin:43.prologue 144ldgp $29,0($27) # First order of business, load the GP.4546call_pal PAL_rduniq # Grab the target PCBB.47mov $0,$16 # Install it.48call_pal PAL_swpctx4950lda $8,0x3fff # Find "current".51bic $30,$8,$85253jsr $26,smp_callin54call_pal PAL_halt55.end __smp_callin56#endif /* CONFIG_SMP */5758#59# The following two functions are needed for supporting SRM PALcode60# on the PC164 (at least), since that PALcode manages the interrupt61# masking, and we cannot duplicate the effort without causing problems62#6364.align 365.globl cserve_ena66.ent cserve_ena67cserve_ena:68.prologue 069bis $16,$16,$1770lda $16,52($31)71call_pal PAL_cserve72ret ($26)73.end cserve_ena7475.align 376.globl cserve_dis77.ent cserve_dis78cserve_dis:79.prologue 080bis $16,$16,$1781lda $16,53($31)82call_pal PAL_cserve83ret ($26)84.end cserve_dis8586#87# It is handy, on occasion, to make halt actually just loop.88# Putting it here means we dont have to recompile the whole89# kernel.90#9192.align 393.globl halt94.ent halt95halt:96.prologue 097call_pal PAL_halt98.end halt99100101