All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] efi disks in u-boot
       [not found] <20181106031545.GU11663@linaro.org>
@ 2018-11-13 18:51 ` Simon Glass
  2018-11-15  6:57   ` AKASHI, Takahiro
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2018-11-13 18:51 UTC (permalink / raw)
  To: u-boot

Hi Akahsi,

On 5 November 2018 at 20:15, AKASHI Takahiro <takahiro.akashi@linaro.org> wrote:
> Hello Simon,
>
> You said, in efi/lib_loader/efi_disk.c,
>
> ===8<===
>  * TODO(sjg at chromium.org): Actually with CONFIG_BLK, U-Boot does have this.
>  * Consider converting the code to look up devices as needed. The EFI device
>  * could be a child of the UCLASS_BLK block device, perhaps.
>  *
>  * This gets called from do_bootefi_exec().
>  */
> efi_status_t efi_disk_register(void)
> {
> ===>8===
>
> What do you mean by this statement?
> Is it different from the code under "#if CONFIG_BLK"?
>
> I guess that you would suggest that some hook function be called
> in blk_create_device() and blk_unbind_all(). No?

I would actually like EFI to use the U-Boot DM devices directly, with
just the minimal amount of plumbing. Perhaps an EFI child device that
gets created for each block device?

Regards,
Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] efi disks in u-boot
  2018-11-13 18:51 ` [U-Boot] efi disks in u-boot Simon Glass
@ 2018-11-15  6:57   ` AKASHI, Takahiro
  2018-11-15 19:45     ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: AKASHI, Takahiro @ 2018-11-15  6:57 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Wed, 14 Nov 2018 at 03:52, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Akahsi,
>
> On 5 November 2018 at 20:15, AKASHI Takahiro <takahiro.akashi@linaro.org> wrote:
> > Hello Simon,
> >
> > You said, in efi/lib_loader/efi_disk.c,
> >
> > ===8<===
> >  * TODO(sjg at chromium.org): Actually with CONFIG_BLK, U-Boot does have this.
> >  * Consider converting the code to look up devices as needed. The EFI device
> >  * could be a child of the UCLASS_BLK block device, perhaps.
> >  *
> >  * This gets called from do_bootefi_exec().
> >  */
> > efi_status_t efi_disk_register(void)
> > {
> > ===>8===
> >
> > What do you mean by this statement?
> > Is it different from the code under "#if CONFIG_BLK"?
> >
> > I guess that you would suggest that some hook function be called
> > in blk_create_device() and blk_unbind_all(). No?
>
> I would actually like EFI to use the U-Boot DM devices directly, with
> just the minimal amount of plumbing.

Under the current implementation, any u-boot disk device is statically
associated with device path proctocol as well as block io protocol & file
system protocol only once in efi_init_obj_list().
If I understand you correctly, you're suggesting that, for example,
efi_disk_from_path() should directly search for a u-boot device
instead of look into a pre-created list of device path protocol objects
with efi_search_protocol(). Right?

It sounds reasonable and quite straight forward, but I wonder why Alex
and Rob didn't take this approach. Was there any discussion in the past?

Thanks,
-Takahiro Akashi


> Perhaps an EFI child device that
> gets created for each block device?
>
> Regards,
> Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] efi disks in u-boot
  2018-11-15  6:57   ` AKASHI, Takahiro
@ 2018-11-15 19:45     ` Simon Glass
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2018-11-15 19:45 UTC (permalink / raw)
  To: u-boot

Hi Akashi-san,

On 14 November 2018 at 22:57, AKASHI, Takahiro
<takahiro.akashi@linaro.org> wrote:
> Hi Simon,
>
> On Wed, 14 Nov 2018 at 03:52, Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Akahsi,
>>
>> On 5 November 2018 at 20:15, AKASHI Takahiro <takahiro.akashi@linaro.org> wrote:
>> > Hello Simon,
>> >
>> > You said, in efi/lib_loader/efi_disk.c,
>> >
>> > ===8<===
>> >  * TODO(sjg at chromium.org): Actually with CONFIG_BLK, U-Boot does have this.
>> >  * Consider converting the code to look up devices as needed. The EFI device
>> >  * could be a child of the UCLASS_BLK block device, perhaps.
>> >  *
>> >  * This gets called from do_bootefi_exec().
>> >  */
>> > efi_status_t efi_disk_register(void)
>> > {
>> > ===>8===
>> >
>> > What do you mean by this statement?
>> > Is it different from the code under "#if CONFIG_BLK"?
>> >
>> > I guess that you would suggest that some hook function be called
>> > in blk_create_device() and blk_unbind_all(). No?
>>
>> I would actually like EFI to use the U-Boot DM devices directly, with
>> just the minimal amount of plumbing.
>
> Under the current implementation, any u-boot disk device is statically
> associated with device path proctocol as well as block io protocol & file
> system protocol only once in efi_init_obj_list().
> If I understand you correctly, you're suggesting that, for example,
> efi_disk_from_path() should directly search for a u-boot device
> instead of look into a pre-created list of device path protocol objects
> with efi_search_protocol(). Right?
>
> It sounds reasonable and quite straight forward, but I wonder why Alex
> and Rob didn't take this approach. Was there any discussion in the past?

Yes, Alex did not want to limit this to only DM boards. That was an
unfortunate mistake, IMO. We are now starting to get rid of non-DM
boards.

>
> Thanks,
> -Takahiro Akashi
>
>
>> Perhaps an EFI child device that
>> gets created for each block device?
>>
>> Regards,
>> Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-15 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181106031545.GU11663@linaro.org>
2018-11-13 18:51 ` [U-Boot] efi disks in u-boot Simon Glass
2018-11-15  6:57   ` AKASHI, Takahiro
2018-11-15 19:45     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.