On 27 August 2015 at 15:44, Ryan Harkin <ryan.har...@linaro.org> wrote:
>
>
> On 24 August 2015 at 12:22, Ard Biesheuvel <ard.biesheu...@linaro.org>
> wrote:
>>
>> On 18 August 2015 at 16:10, Ard Biesheuvel <ard.biesheu...@linaro.org>
>> wrote:
>> > Instead of omitting some drivers that are known to break the Foundation
>> > model when ARM_FOUNDATION_FVP is defined, fix those drivers so that they
>> > simply fail to load without interfering with the boot.
>> >
>> > Changes since v1:
>> > - Print a diagnostic at EFI_D_WARN level that we are about to access the
>> >   PrimeCell ID registers. This is currently not required, since the
>> > Foundation
>> >   model deals gracefully with the reads to the unpopulated range, but
>> > this may
>> >   change in future versions
>> > - Added Leif's R-b
>> > - Rebased onto latest upstream
>> >
>>
>> @Ryan,
>>
>> Please let me know if you have any concerns regarding this series.
>
>
> Hi Ard,
>
> You'll have seen my comments on patches 1 & 2 in your inbox also.
>

Thanks.

> I am happy to accept them as they are because they are an improvement over
> what we have, however, I think the PrimeCell and peripheral identification
> code could be commoned up.
>

I'm glad since I committed them a week ago :-)

> How about having a function/macro something like:
>
>     IsPrimeCellPeripheral(UINT8 id)
>
> Then, the id passed in could be the #defines for  0x11 for PL111 and 0x81
> for PL180.
>
> Or course, then you'd have to work out where to store the function.  So
> perhaps a macro is better?
>
> If you/others think it's too much effort for little return, we could go with
> your original code.  Although I still think a mask for the PL180 revision
> would be good, even if it is unlikely that it will get up-rev'd in the near
> future.
>

I fully agree that my current solution is a bit ad-hoc. But I think
that, if we were to spend effort on improving this code, we should
actually port both the LCD and the MMC drivers to the UEFI Driver
Model, by creating a PrimeCell protocol containing only the base
address, and change the DXE driver to UEFI drivers that bind to the
protocols iff they are present.

This way, we can simply install those two protocols in the FVP
platform driver that already checks between Foundation and Base in
order to install the correct FDT. On Base, you would then only
initialize the MMC interface and card if they are in the Boot#### path
or when BdsConnectAll() is called (e.g., from the shell), and not
incur any delay otherwise. Something similar applies to the LCD.

However, doing this would make a lot more sense if there is any actual
hardware we care about that uses the IP. Is there any?

Cheers,
Ard.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to