arch/mips/boot/compressed/head.S

Source file repositories/reference/linux-study-clean/arch/mips/boot/compressed/head.S

File Facts

System
Linux kernel
Corpus path
arch/mips/boot/compressed/head.S
Extension
.S
Size
1098 bytes
Lines
53
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: arch/mips
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

#include <asm/asm.h>
#include <asm/regdef.h>

	LEAF(start)
	/* Save boot rom start args */
	move	s0, a0
	move	s1, a1
	move	s2, a2
	move	s3, a3

	/* Clear BSS */
	PTR_LA	a0, _edata
	PTR_LA	a2, _end
1:	PTR_S	zero, 0(a0)
	PTR_ADDIU a0, a0, PTRSIZE
	bne	a2, a0, 1b

	PTR_LA	a0, (.heap)	     /* heap address */
	PTR_LA	sp, (.stack + 8192)  /* stack address */

	PTR_LA	t9, decompress_kernel
	jalr	t9

2:
	move	a0, s0
	move	a1, s1
	move	a2, s2
	move	a3, s3
	PTR_LI	t9, KERNEL_ENTRY
	jalr	t9

3:
	b	3b

	END(start)

	.comm .heap,BOOT_HEAP_SIZE,4
	.comm .stack,4096*2,4

Annotation

Implementation Notes