arch/loongarch/kernel/head.S

Source file repositories/reference/linux-study-clean/arch/loongarch/kernel/head.S

File Facts

System
Linux kernel
Corpus path
arch/loongarch/kernel/head.S
Extension
.S
Size
2908 bytes
Lines
139
Domain
Architecture Layer
Bucket
arch/loongarch
Inferred role
Architecture Layer: arch/loongarch
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

bl		start_kernel
	ASM_BUG()

SYM_CODE_END(kernel_entry)

#ifdef CONFIG_SMP

/*
 * SMP slave cpus entry point.	Board specific code for bootstrap calls this
 * function after setting up the stack and tp registers.
 */
SYM_CODE_START(smpboot_entry)
	UNWIND_HINT_END_OF_STACK

	SETUP_TWINS
	SETUP_MODES	t0
	JUMP_VIRT_ADDR	t0, t1
	SETUP_DMWINS	t0

#ifdef CONFIG_PAGE_SIZE_4KB
	LONG_LI		t0, 0
	LONG_LI		t1, CSR_STFILL
	csrxchg		t0, t1, LOONGARCH_CSR_IMPCTL1
#endif
	la.pcrel	t0, cpuboot_data
	ld.d		sp, t0, CPU_BOOT_STACK
	ld.d		tp, t0, CPU_BOOT_TINFO

	bl		start_secondary
	ASM_BUG()

SYM_CODE_END(smpboot_entry)

#endif /* CONFIG_SMP */

Annotation

Implementation Notes