arch/arm/boot/compressed/head-sharpsl.S

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

File Facts

System
Linux kernel
Corpus path
arch/arm/boot/compressed/head-sharpsl.S
Extension
.S
Size
3603 bytes
Lines
152
Domain
Architecture Layer
Bucket
arch/arm
Inferred role
Architecture Layer: arch/arm
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 <linux/linkage.h>
#include <asm/mach-types.h>

#ifndef CONFIG_PXA_SHARPSL
#error What am I doing here...
#endif

		.section        ".start", "ax"

__SharpSL_start:

/* Check for TC6393 - if found we have a Tosa */
	ldr	r7, .TOSAID
	mov	r1, #0x10000000		@ Base address of TC6393 chip
	mov 	r6, #0x03
	ldrh	r3, [r1, #8]		@ Load TC6393XB Revison: This is 0x0003
	cmp	r6, r3
	beq	.SHARPEND		@ Success -> tosa

/* Check for pxa270 - if found, branch */
	mrc p15, 0, r4, c0, c0		@ Get Processor ID
	and	r4, r4, #0xffffff00
	ldr	r3, .PXA270ID
	cmp	r4, r3
	beq	.PXA270

/* Check for w100 - if not found we have a Poodle */
	ldr	r1, .W100ADDR		@ Base address of w100 chip + regs offset

	mov r6, #0x31			@ Load Magic Init value
	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
	mov r5, #0x3000
.W100LOOP:
	subs r5, r5, #1
	bne .W100LOOP
	mov r6, #0x30			@ Load 2nd Magic Init value
	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK

	ldr	r6, [r1, #0]		@ Load Chip ID
	ldr	r3, .W100ID
	ldr	r7, .POODLEID
	cmp	r6, r3
	bne	.SHARPEND			@ We have no w100 - Poodle

/* Check for pxa250 - if found we have a Corgi */
	ldr	r7, .CORGIID
	ldr	r3, .PXA255ID
	cmp	r4, r3
	blo	.SHARPEND			@ We have a PXA250 - Corgi

/* Check for 64MiB flash - if found we have a Shepherd */
	bl	get_flash_ids
	ldr	r7, .SHEPHERDID
	cmp	r3, #0x76			@ 64MiB flash
	beq	.SHARPEND			@ We have Shepherd

/* Must be a Husky */
	ldr	r7, .HUSKYID		@ Must be Husky
	b .SHARPEND

.PXA270:
/* Check for 16MiB flash - if found we have Spitz */
	bl	get_flash_ids
	ldr	r7, .SPITZID
	cmp	r3, #0x73			@ 16MiB flash
	beq	.SHARPEND			@ We have Spitz

/* Check for a second SCOOP chip - if found we have Borzoi */
	ldr	r1, .SCOOP2ADDR
	ldr	r7, .BORZOIID

Annotation

Implementation Notes