1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 /* 1 /* 3 * arch/alpha/kernel/head.S 2 * arch/alpha/kernel/head.S 4 * 3 * 5 * initial boot stuff.. At this point, the boo 4 * initial boot stuff.. At this point, the bootloader has already 6 * switched into OSF/1 PAL-code, and loaded us 5 * switched into OSF/1 PAL-code, and loaded us at the correct address 7 * (START_ADDR). So there isn't much left for 6 * (START_ADDR). So there isn't much left for us to do: just set up 8 * the kernel global pointer and jump to the k 7 * the kernel global pointer and jump to the kernel entry-point. 9 */ 8 */ 10 9 11 #include <linux/init.h> 10 #include <linux/init.h> 12 #include <asm/asm-offsets.h> 11 #include <asm/asm-offsets.h> 13 #include <asm/pal.h> 12 #include <asm/pal.h> 14 #include <asm/setup.h> 13 #include <asm/setup.h> 15 14 16 __HEAD 15 __HEAD 17 .globl _stext 16 .globl _stext 18 .set noreorder 17 .set noreorder 19 .globl __start 18 .globl __start 20 .ent __start 19 .ent __start 21 _stext: 20 _stext: 22 __start: 21 __start: 23 .prologue 0 22 .prologue 0 24 br $27,1f 23 br $27,1f 25 1: ldgp $29,0($27) 24 1: ldgp $29,0($27) 26 /* We need to get current_task_info lo 25 /* We need to get current_task_info loaded up... */ 27 lda $8,init_thread_union 26 lda $8,init_thread_union 28 /* ... and find our stack ... */ 27 /* ... and find our stack ... */ 29 lda $30,0x4000 - SIZEOF_PT_REGS($8 28 lda $30,0x4000 - SIZEOF_PT_REGS($8) 30 /* ... and then we can start the kerne 29 /* ... and then we can start the kernel. */ 31 jsr $26,start_kernel 30 jsr $26,start_kernel 32 call_pal PAL_halt 31 call_pal PAL_halt 33 .end __start 32 .end __start 34 33 35 #ifdef CONFIG_SMP 34 #ifdef CONFIG_SMP 36 .align 3 35 .align 3 37 .globl __smp_callin 36 .globl __smp_callin 38 .ent __smp_callin 37 .ent __smp_callin 39 /* On entry here from SRM console, the 38 /* On entry here from SRM console, the HWPCB of the per-cpu 40 slot for this processor has been lo 39 slot for this processor has been loaded. We've arranged 41 for the UNIQUE value for this proce 40 for the UNIQUE value for this process to contain the PCBB 42 of the target idle task. */ 41 of the target idle task. */ 43 __smp_callin: 42 __smp_callin: 44 .prologue 1 43 .prologue 1 45 ldgp $29,0($27) # First order 44 ldgp $29,0($27) # First order of business, load the GP. 46 45 47 call_pal PAL_rduniq # Grab the tar 46 call_pal PAL_rduniq # Grab the target PCBB. 48 mov $0,$16 # Install it. 47 mov $0,$16 # Install it. 49 call_pal PAL_swpctx 48 call_pal PAL_swpctx 50 49 51 lda $8,0x3fff # Find "curren 50 lda $8,0x3fff # Find "current". 52 bic $30,$8,$8 51 bic $30,$8,$8 53 52 54 jsr $26,smp_callin 53 jsr $26,smp_callin 55 call_pal PAL_halt 54 call_pal PAL_halt 56 .end __smp_callin 55 .end __smp_callin 57 #endif /* CONFIG_SMP */ 56 #endif /* CONFIG_SMP */ 58 57 59 # 58 # 60 # The following two functions are need 59 # The following two functions are needed for supporting SRM PALcode 61 # on the PC164 (at least), since that 60 # on the PC164 (at least), since that PALcode manages the interrupt 62 # masking, and we cannot duplicate the 61 # masking, and we cannot duplicate the effort without causing problems 63 # 62 # 64 63 65 .align 3 64 .align 3 66 .globl cserve_ena 65 .globl cserve_ena 67 .ent cserve_ena 66 .ent cserve_ena 68 cserve_ena: 67 cserve_ena: 69 .prologue 0 68 .prologue 0 70 bis $16,$16,$17 69 bis $16,$16,$17 71 lda $16,52($31) 70 lda $16,52($31) 72 call_pal PAL_cserve 71 call_pal PAL_cserve 73 ret ($26) 72 ret ($26) 74 .end cserve_ena 73 .end cserve_ena 75 74 76 .align 3 75 .align 3 77 .globl cserve_dis 76 .globl cserve_dis 78 .ent cserve_dis 77 .ent cserve_dis 79 cserve_dis: 78 cserve_dis: 80 .prologue 0 79 .prologue 0 81 bis $16,$16,$17 80 bis $16,$16,$17 82 lda $16,53($31) 81 lda $16,53($31) 83 call_pal PAL_cserve 82 call_pal PAL_cserve 84 ret ($26) 83 ret ($26) 85 .end cserve_dis 84 .end cserve_dis 86 85 87 # 86 # 88 # It is handy, on occasion, to make ha 87 # It is handy, on occasion, to make halt actually just loop. 89 # Putting it here means we dont have t 88 # Putting it here means we dont have to recompile the whole 90 # kernel. 89 # kernel. 91 # 90 # 92 91 93 .align 3 92 .align 3 94 .globl halt 93 .globl halt 95 .ent halt 94 .ent halt 96 halt: 95 halt: 97 .prologue 0 96 .prologue 0 98 call_pal PAL_halt 97 call_pal PAL_halt 99 .end halt 98 .end halt
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.