Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Haojian Zhuang
Date: Monday, August 30, 2010 - 11:26 pm

On Tue, Aug 31, 2010 at 2:08 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
The reset code is in below.

	.align	5
ENTRY(cpu_mohawk_reset)
	mov	ip, #0
	mcr	p15, 0, ip, c7, c7, 0		@ invalidate I,D caches
	mcr	p15, 0, ip, c7, c10, 4		@ drain WB
	mcr	p15, 0, ip, c8, c7, 0		@ invalidate I & D TLBs
	mrc	p15, 0, ip, c1, c0, 0		@ ctrl register
	bic	ip, ip, #0x0007			@ .............cam
	bic	ip, ip, #0x1100			@ ...i...s........
	mcr	p15, 0, ip, c1, c0, 0		@ ctrl register
	mov	pc, r0

MMU is disabled at here and replace PC with r0 value. I doubt code
executed correctly at here. While MMU is disabled, the PC should be
continue in the range of 0xCxxx_xxxx (kernel space). "mov pc, r0"
shouldn't be executed. Instruction fetch failure should occurs since
there's no physical address in 0xCxxx_xxxx.

Correct me if I'm wrong.

Thanks
Haojian
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Thu Aug 26, 2:07 am)
[PATCH 1/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Thu Aug 26, 2:07 am)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Mon Aug 30, 11:02 pm)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Haojian Zhuang, (Mon Aug 30, 11:26 pm)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Mon Aug 30, 11:48 pm)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Haojian Zhuang, (Tue Aug 31, 12:02 am)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Haojian Zhuang, (Tue Aug 31, 12:21 am)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Tue Aug 31, 12:24 am)
Re: [PATCH 1/1] ARM: pxa168: fix corrected reset vector, Mark F. Brown, (Tue Aug 31, 12:28 am)