Hi Michal,

> On 17 Jul 2025, at 14:00, Orzel, Michal <michal.or...@amd.com> wrote:
> 
> 
> 
> On 17/07/2025 14:58, Hari Limaye wrote:
>> Hi Michal,
>> 
>>> On 17 Jul 2025, at 13:54, Orzel, Michal <michal.or...@amd.com> wrote:
>>>> +    /*
>>>> +     * DTB starting at a different address has been mapped, so destroy 
>>>> this
>>>> +     * before continuing.
>>> I don't understand this scenario. Can you describe it in more details?
>>> I know that early_fdt_map will be called twice. First time, mapped_fdt_base 
>>> ==
>>> INVALID_PADDR and second time, mapped_fdt_base == fdt_paddr. What's the 
>>> other
>>> option?
>>> 
>>> ~Michal
>>> 
>> 
>> This was intended as more of a sanity check than a situation that was 
>> expected to occur. Maybe you think it makes more sense to remove this and 
>> just add an assert that `mapped_fdt_base == INVALID_PADDR` here?
> Yes, assert would be much better here. I can't think of a scenario, where
> fdt_paddr would differ depending on the call.

so you are right it can’t happen today, this was put in place in case between 
two different call the DTB was relocated somewhere else in the future.
It’s not the case right now, but we thought about that when doing this function.

Anyway if you think the complexity is not worth we can add just an assert there.

Cheers,
Luca

Reply via email to