From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 0/3] dm, efi: integrate efi_disk into DM
Date: Wed, 30 Jan 2019 14:18:03 +0900 [thread overview]
Message-ID: <20190130051801.GW20286@linaro.org> (raw)
In-Reply-To: <f8f6cfc5-7cbc-a7e1-32e9-240ef5edfba0@gmx.de>
Heinrich,
On Tue, Jan 29, 2019 at 11:48:37PM +0100, Heinrich Schuchardt wrote:
> On 1/29/19 5:20 PM, Alexander Graf wrote:
> > On 01/29/2019 03:59 AM, AKASHI Takahiro wrote:
> >> This patch set came from the past discussion[1] on my "removable device
> >> support" patch and is intended to be an attempt to integrate efi_disk
> >> (more precisely, EFI_BLOCK_IO_PROTOCOL-capable efi object) into u-boot's
> >> Driver Model as much seamlessly as possible
> >>
> >> [1] https://lists.denx.de/pipermail/u-boot/2019-January/354010.html
> >>
> >> Basic idea is
> >> * create UCLASS_PARTITION
> >> * enumerate all the partitions when a block device is probed
> >> * hook up a creation of UCLASS_BLK or UCLASS_PARTITION device
> >> to efi handler for efi_disk attributes to be properly set up
> >>
> >> Since this patch is a prototype (or POC, proof-of-concept), the aim here
> >> is to discuss further about how in a better shape we will be able to
> >> merge the two worlds.
> >
> > I like the approach. It seems pretty clean and gives us a smooth
> > transition from the split world to a unified all-dm world. Eventually
> > the efi object list will just naturally disappear and we can drop all
> > calls to add efi object handles.
> >
> >
> > Alex
> >
> >
>
> Thanks Takahiro, it is good to have a reference to work on to bring the
> worlds together.
>
> I still have some issues:
>
> The implementation lacks the driver binding protocol to handle block
> devices that are not discovered by U-Boot but supplied by an EFI driver
> or application. I would prefer if the block uclass would provide this
> protocol.
I don't yet have deep understandings of DM, but I believe that any
UCLASS_BLK instance should have a backing block device, blk_desc, which is
pointed to by uclass_platdata.
But your efi block device, UCLASS_BLK/IF_TYPE_EFI, does never initialize
this structure, in particular "ops," and so it won't work as a block device
on u-boot side.
I guess that it is one of reasons that EFI block driver doesn't work
with my patch.
If you agree with me, it would be much easier for you to modify
EFI block driver :)
> In EFI a handle can always be deleted by first stopping all controllers
> and then removing all protocols.
What do you mean by "delete?"
Some efi object will directly use efi_add_handle().
Efi object is solely responsible for maintaining a handle.
> The current implementation of partitions tries to use a struct efi_obj
> instead of a handle. This is incompatible to the rest of the EFI subsystem.
How incompatible?
A handle is always a pointer to opaque data outside the implementation.
struct efi_obj in blk_desc is explicitly handled only in efi_disk.c.
What's wrong with that?
-Takahiro Akashi
> Best regards
>
> Heinrich
>
>
prev parent reply other threads:[~2019-01-30 5:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-29 2:59 [U-Boot] [RFC 0/3] dm, efi: integrate efi_disk into DM AKASHI Takahiro
2019-01-29 2:59 ` [U-Boot] [RFC 1/3] dm: blk: add UCLASS_PARTITION AKASHI Takahiro
2019-01-29 3:17 ` Sergey Kubushyn
2019-01-29 15:37 ` Alexander Graf
2019-01-29 17:46 ` Sergey Kubushyn
2019-01-29 18:02 ` Philipp Tomsich
2019-01-29 22:20 ` Heinrich Schuchardt
2019-01-30 5:28 ` AKASHI Takahiro
2019-01-31 1:00 ` Simon Glass
2019-01-29 2:59 ` [U-Boot] [RFC 2/3] efi_loader: associate BLK/PARTITION device to efi_disk AKASHI Takahiro
2019-01-29 22:33 ` Heinrich Schuchardt
2019-01-30 5:48 ` AKASHI Takahiro
2019-01-30 6:49 ` Heinrich Schuchardt
2019-01-30 7:26 ` AKASHI Takahiro
2019-01-31 1:22 ` Simon Glass
2019-02-01 5:54 ` AKASHI Takahiro
2019-02-02 14:15 ` Simon Glass
2019-02-06 3:15 ` AKASHI Takahiro
2019-02-06 7:54 ` AKASHI Takahiro
2019-01-29 2:59 ` [U-Boot] [RFC 3/3] drivers: align block device drivers with DM-efi integration AKASHI Takahiro
2019-01-29 16:19 ` Alexander Graf
2019-01-30 0:40 ` AKASHI Takahiro
2019-01-29 16:20 ` [U-Boot] [RFC 0/3] dm, efi: integrate efi_disk into DM Alexander Graf
2019-01-29 22:48 ` Heinrich Schuchardt
2019-01-30 5:18 ` AKASHI Takahiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190130051801.GW20286@linaro.org \
--to=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox