⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proc-sa110.s

📁 是关于linux2.5.1的完全源码
💻 S
📖 第 1 页 / 共 2 页
字号:
 * mappings, they will be consistent at the time that they are created. * * Note: *  1. we don't need to flush the write buffer in this case. *  2. we don't invalidate the entries since when we write the page *     out to disk, the entries may get reloaded into the cache. */	.align	5ENTRY(cpu_sa110_dcache_clean_page)ENTRY(cpu_sa1100_dcache_clean_page)	mov	r1, #PAGESIZE1:	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry	add	r0, r0, #DCACHELINESIZE	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry	add	r0, r0, #DCACHELINESIZE	subs	r1, r1, #2 * DCACHELINESIZE	bne	1b	mov	pc, lr/* * cpu_sa110_dcache_clean_entry(addr) * * Clean the specified entry of any caches such that the MMU * translation fetches will obtain correct data. * * addr: cache-unaligned virtual address */	.align	5ENTRY(cpu_sa110_dcache_clean_entry)ENTRY(cpu_sa1100_dcache_clean_entry)	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry	mcr	p15, 0, r0, c7, c10, 4		@ drain WB	mov	pc, lr/* ================================ I-CACHE =============================== *//* * cpu_sa110_icache_invalidate_range(start, end) * * invalidate a range of virtual addresses from the Icache * * start: virtual start address * end:   virtual end address */	.align	5ENTRY(cpu_sa110_icache_invalidate_range)ENTRY(cpu_sa1100_icache_invalidate_range)	bic	r0, r0, #DCACHELINESIZE - 11:	mcr	p15, 0, r0, c7, c10, 1		@ Clean D entry	add	r0, r0, #DCACHELINESIZE	cmp	r0, r1	blo	1b	mov	r0, #0	mcr	p15, 0, r0, c7, c10, 4		@ drain WBENTRY(cpu_sa110_icache_invalidate_page)ENTRY(cpu_sa1100_icache_invalidate_page)	mcr	p15, 0, r0, c7, c5, 0		@ invalidate I cache	mov	pc, lr/* =============================== PageTable ============================== *//* * cpu_sa110_set_pgd(pgd) * * Set the translation base pointer to be as described by pgd. * * pgd: new page tables */	.align	5ENTRY(cpu_sa110_set_pgd)	flush_110_dcache	r3, ip, r1	mov	r1, #0	mcr	p15, 0, r1, c7, c5, 0		@ invalidate I cache	mcr	p15, 0, r1, c7, c10, 4		@ drain WB	mcr	p15, 0, r0, c2, c0, 0		@ load page table pointer	mcr	p15, 0, r1, c8, c7, 0		@ invalidate I & D TLBs	mov	pc, lr/* * cpu_sa1100_set_pgd(pgd) * * Set the translation base pointer to be as described by pgd. * * pgd: new page tables */	.align	5ENTRY(cpu_sa1100_set_pgd)	flush_1100_dcache	r3, ip, r1	mov	ip, #0	mcr	p15, 0, ip, c7, c5, 0		@ invalidate I cache	mcr	p15, 0, ip, c9, c0, 0		@ invalidate RB	mcr	p15, 0, ip, c7, c10, 4		@ drain WB	mcr	p15, 0, r0, c2, c0, 0		@ load page table pointer	mcr	p15, 0, ip, c8, c7, 0		@ invalidate I & D TLBs	mov	pc, lr/* * cpu_sa110_set_pmd(pmdp, pmd) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry * pmd:  PMD value to store */	.align	5ENTRY(cpu_sa110_set_pmd)ENTRY(cpu_sa1100_set_pmd)	str	r1, [r0]	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry	mcr	p15, 0, r0, c7, c10, 4		@ drain WB	mov	pc, lr/* * cpu_sa110_set_pte(ptep, pte) * * Set a PTE and flush it out */	.align	5ENTRY(cpu_sa110_set_pte)ENTRY(cpu_sa1100_set_pte)	tst	r0, #2048	streq	r0, [r0, -r0]			@ BUG_ON	str	r1, [r0], #-2048		@ linux version	eor	r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY	bic	r2, r1, #0xff0	bic	r2, r2, #3	orr	r2, r2, #PTE_TYPE_SMALL	tst	r1, #L_PTE_USER | L_PTE_EXEC	@ User or Exec?	orrne	r2, r2, #PTE_SMALL_AP_URO_SRW	tst	r1, #L_PTE_WRITE | L_PTE_DIRTY	@ Write and Dirty?	orreq	r2, r2, #PTE_SMALL_AP_UNO_SRW	tst	r1, #L_PTE_PRESENT | L_PTE_YOUNG	@ Present and Young?	movne	r2, #0	str	r2, [r0]			@ hardware version	mov	r0, r0	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry	mcr	p15, 0, r0, c7, c10, 4		@ drain WB	mov	pc, lrcpu_manu_name:	.asciz	"Intel"cpu_sa110_name:	.asciz	"StrongARM-110"cpu_sa1100_name:	.asciz	"StrongARM-1100"cpu_sa1110_name:	.asciz	"StrongARM-1110"	.align	.section ".text.init", #alloc, #execinstr__sa1100_setup:	@ Allow read-buffer operations from userland	mcr	p15, 0, r0, c9, c0, 5	mrc	p15, 0, r0, c1, c0		@ get control register v4	bic	r0, r0, #0x0e00			@ ..VI ZFRS BLDP WCAM	bic	r0, r0, #0x0002			@ .... 000. .... ..0.	orr	r0, r0, #0x003d	orr	r0, r0, #0x3100			@ ..11 ...1 ..11 11.1	b	__setup_common__sa110_setup:	mrc	p15, 0, r0, c1, c0		@ get control register v4	bic	r0, r0, #0x2e00			@ ..VI ZFRS BLDP WCAM	bic	r0, r0, #0x0002			@ ..0. 000. .... ..0.	orr	r0, r0, #0x003d	orr	r0, r0, #0x1100			@ ...1 ...1 ..11 11.1__setup_common:	mov	r10, #0	mcr	p15, 0, r10, c7, c7		@ invalidate I,D caches on v4	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer on v4	mcr	p15, 0, r10, c8, c7		@ invalidate I,D TLBs on v4	mcr	p15, 0, r4, c2, c0		@ load page table pointer	mov	r10, #0x1f			@ Domains 0, 1 = client	mcr	p15, 0, r10, c3, c0		@ load domain access register	mov	pc, lr	.text/* * Purpose : Function pointers used to access above functions - all calls *	     come through these */	.type	sa110_processor_functions, #objectENTRY(sa110_processor_functions)	.word	v4_early_abort	.word	cpu_sa110_check_bugs	.word	cpu_sa110_proc_init	.word	cpu_sa110_proc_fin	.word	cpu_sa110_reset	.word	cpu_sa110_do_idle	/* cache */	.word	cpu_sa110_cache_clean_invalidate_all	.word	cpu_sa110_cache_clean_invalidate_range	/* dcache */	.word	cpu_sa110_dcache_invalidate_range	.word	cpu_sa110_dcache_clean_range	.word	cpu_sa110_dcache_clean_page	.word	cpu_sa110_dcache_clean_entry	/* icache */	.word	cpu_sa110_icache_invalidate_range	.word	cpu_sa110_icache_invalidate_page	/* pgtable */	.word	cpu_sa110_set_pgd	.word	cpu_sa110_set_pmd	.word	cpu_sa110_set_pte	.size	sa110_processor_functions, . - sa110_processor_functions	.type	cpu_sa110_info, #objectcpu_sa110_info:	.long	cpu_manu_name	.long	cpu_sa110_name	.size	cpu_sa110_info, . - cpu_sa110_info/* * SA1100 and SA1110 share the same function calls */	.type	sa1100_processor_functions, #objectENTRY(sa1100_processor_functions)	.word	armv4_early_abort	.word	cpu_sa1100_check_bugs	.word	cpu_sa1100_proc_init	.word	cpu_sa1100_proc_fin	.word	cpu_sa1100_reset	.word	cpu_sa1100_do_idle	/* cache */	.word	cpu_sa1100_cache_clean_invalidate_all	.word	cpu_sa1100_cache_clean_invalidate_range	/* dcache */	.word	cpu_sa1100_dcache_invalidate_range	.word	cpu_sa1100_dcache_clean_range	.word	cpu_sa1100_dcache_clean_page	.word	cpu_sa1100_dcache_clean_entry	/* icache */	.word	cpu_sa1100_icache_invalidate_range	.word	cpu_sa1100_icache_invalidate_page	/* pgtable */	.word	cpu_sa1100_set_pgd	.word	cpu_sa1100_set_pmd	.word	cpu_sa1100_set_pte	.size	sa1100_processor_functions, . - sa1100_processor_functionscpu_sa1100_info:	.long	cpu_manu_name	.long	cpu_sa1100_name	.size	cpu_sa1100_info, . - cpu_sa1100_infocpu_sa1110_info:	.long	cpu_manu_name	.long	cpu_sa1110_name	.size	cpu_sa1110_info, . - cpu_sa1110_info	.type	cpu_arch_name, #objectcpu_arch_name:	.asciz	"armv4"	.size	cpu_arch_name, . - cpu_arch_name	.type	cpu_elf_name, #objectcpu_elf_name:	.asciz	"v4"	.size	cpu_elf_name, . - cpu_elf_name	.align	.section ".proc.info", #alloc, #execinstr	.type	__sa110_proc_info,#object__sa110_proc_info:	.long	0x4401a100	.long	0xfffffff0	.long	0x00000c0e	b	__sa110_setup	.long	cpu_arch_name	.long	cpu_elf_name	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT	.long	cpu_sa110_info	.long	sa110_processor_functions	.long	v4wb_tlb_fns	.long	v4_user_fns	.size	__sa110_proc_info, . - __sa110_proc_info	.type	__sa1100_proc_info,#object__sa1100_proc_info:	.long	0x4401a110	.long	0xfffffff0	.long	0x00000c0e	b	__sa1100_setup	.long	cpu_arch_name	.long	cpu_elf_name	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT	.long	cpu_sa1100_info	.long	sa1100_processor_functions	.long	v4wb_tlb_fns	.long	v4_mc_user_fns	.size	__sa1100_proc_info, . - __sa1100_proc_info	.type	__sa1110_proc_info,#object__sa1110_proc_info:	.long	0x6901b110	.long	0xfffffff0	.long	0x00000c0e	b	__sa1100_setup	.long	cpu_arch_name	.long	cpu_elf_name	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT	.long	cpu_sa1110_info	.long	sa1100_processor_functions	.long	v4wb_tlb_fns	.long	v4_mc_user_fns	.size	__sa1110_proc_info, . - __sa1110_proc_info

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -