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