[PATCH 3/5] arm: initial support for Marvell Dove SoCs
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Mon May 13 13:42:22 EDT 2013
On 05/13/13 19:14, Thomas Petazzoni wrote:
>> Turned out to be easier than I thought!
>>
>> You can always read from 0xd0020080 (REG_BASE_REMAP) without lockup.
>>
>> So if that what you read equals 0xd0000000, you are still on boot-up
>> reg bases. If not, and as long as we only remap to 0xf1000000 you are
>> remapped to 0xf1000000.
>
> Are you sure this is safe? Imagine you have 4 GB of RAM. Once registers
> are remapped to 0xf1000000, what you read at 0xd0020080 is RAM.
Well, no it is not "safe" in a way you know what you get back from that
read. But it is "safe" in a way it does not kill axi or mbus.
> And, what happens if by chance (or lack therefore), what the RAM
> contains at 0xd0020080 is 0xd0000000 ? You'll believe you're still
> mapped at the old location.
If it is RAM and if it contains 0xd0000000 you are fooled and assume
you are not remapped.
> Now that I think of it, not sure of what will happen though, you will
> write 0xf1000000 at this address, and then continue with the rest of
> boot. Would that be a problem?
Well, I can think of some dirty tricks to raise chances it is the remap
register:
1. Read 0xd0020080
2. if it is not 0xd0000000 you are remapped to something
3. if it is 0xd0000000, remap internal registers to 0xf1000000
4. Read 0xf1020080
5. if it is not 0xf1000000 you are remapped to something you can
only guess.
6. if it is 0xf1000000, the chances you are on 0xf1000000 are
quite good
Sebastian
More information about the barebox
mailing list