From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B339C433FE for ; Thu, 9 Dec 2021 18:39:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BDD9C830C7; Thu, 9 Dec 2021 19:39:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="PuEROCdW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2821282F96; Thu, 9 Dec 2021 19:39:03 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 06477830C5 for ; Thu, 9 Dec 2021 19:38:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1639075134; bh=CcTTbnIxLjOrcklEE/3heZwWkua2IdmnSEdG+CT8EGk=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=PuEROCdWv3i9CWmg/LCF9UnoA/aUGzVsFcCyQ5AVv2ZxEXVEiYSg9vu9ds+CQ760M G3UMQZKJSq0OEQ/QPMg4KlxPzcR16K7bSp8/2qhvE/4kRL0ibILlQrxUOtCcqim7IX FoU1PBqVbwTex579iyvcNu6ZlVORlKMoTPEEalZo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [172.31.56.117] ([216.9.110.2]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9nxt-1msNVQ28CT-005sF8; Thu, 09 Dec 2021 19:38:54 +0100 Message-ID: Date: Thu, 9 Dec 2021 10:38:34 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v5 01/28] efi: Rename UCLASS_EFI and IF_TYPE_EFI Content-Language: en-US To: Simon Glass , U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Alexander Graf References: <20211204155657.2913911-1-sjg@chromium.org> <20211204085647.v5.1.I0fe54c28f143525a17746622da0465cdee6bf405@changeid> From: Heinrich Schuchardt In-Reply-To: <20211204085647.v5.1.I0fe54c28f143525a17746622da0465cdee6bf405@changeid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:kGsiPUXMV2J1CMGkBe+u3SaTUvmwvJU1RT3ZYifmdPEaMZ8qI3C G9NCnBmFWrRxYx9rAoR2U6qBfbqXL+ZCLS69Ef/5S+DB3nCQTTzzqVDoNftOPgQ7ATqcLCp tofeSffA4Dfg4vY4L07fpnPjFwiDMy5kU9wgn8w+eSfkaFluI/t6BtymLMCTMxf/FnM20NM StwA6cid42A2oiY148OyA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7pfSQG3eqnU=:KEgUd1oPgsJcPzAdm0E314 Flj2mXu7JQyo576mQXCSTNr5TxlEYmmWRMuegeitaAO/PSZrfKnHDR2sLHd3XdZJQKrjDKy/u jveIPvpMlUXZ88hoJDsqAYDOJrw2dHO4j5nqIrR6jnEgBT+1VyDEtkh9atwtkFTeEbRTi8e4z RhIV+f5AktyFHdCgWpmqT+8tGWToG9nQW9duXzVDmFUn7LRuKtF6wXH1WgGhDry6JtiTTFihB u1zUp+8Bpk9/ZWMRKXwDRdvi7g9w6bngUVUQT3FJFewy2p7l4SAOiWhgGXtkgkWDu5NNy48bA hlQkvinWYePJTLDnWtF3rx1OjbBZULLXPmNTvQR6FSsoSnC4mK2ajqUOMeQgSPqTkscNfMcRU IUJeqRuK0oE3esSoR7sFFou45CoZyxUJWkEDKJ3LymdqwQGRQZTg4Zhs1dMrfmS7AiJISy+0y +var7vLtbLmlLwv9nLhAieAJ+a+rxgnIoSyvD04Z0lbLtsgtZBzoOC4KQQP67yewbsa5ccn8S 4sl5+i/yLSWl3LA4zsxDhW6bSVhln7cr4U8gOMGX6JJdr9YP/t1QAsOzfsl96t3d3Calo3SB8 4U+/HxxHBXNAPdBbvp00cAn6e01WTACj4rw5xiFKZQ6QO/sbc28ieN6Z2tJjDz2YlrA6RaiX9 koaJZa+V3fTjQKpf1dcnfK/OowpKT7NECkp+SYtldiLDEfZa9A5q5B1GumQPOPeLnpjtYlOYx ZOw9QqZJHsYtgCYAOmMkjAr6InYNtLnGGRetKUc4JvRKPlLtcGXfIr/uf9rugdUMSDwEEzbfL +0qhnOeqQ3+nxAeUGJNEQ06rYnRnz+mYqveHLsHtYqpciN4qmUIVGkqg1PawcMUYrB4WFtNTH xgD2VrnrDYu2vhv8Yh7CkeRbCTfdhes6/kNr3Mayu0J2hKvsTZOREaw1h5UoDe99aV6Fqyu66 eqFv61l3iT8BSS5Ll/44X915ZBG/OEH5omc/W5tiXXDjvDrt5ioJEJA79Y7hLEGxMKNeWvMXH WmiqY6H/ez2I7fAA9Tj1MYx5K4E7DChbsp0AppPMD3xIqxqavQhuPM93ogwYOgbPd13GPyOiL L3/bLBtNsZsjt8= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 12/4/21 07:56, Simon Glass wrote: > These names are better used for access to devices provided by an EFI > layer. Use EFI_LOADER instead here, since these are only available in > U-Boot's EFI_LOADER layer. > > Signed-off-by: Simon Glass > --- > > Changes in v5: > - Add new patch to resolve EFI/EFI_LOADER conflict > > doc/develop/uefi/uefi.rst | 8 ++++---- > drivers/block/blk-uclass.c | 4 ++-- > include/blk.h | 2 +- > include/dm/uclass-id.h | 2 +- > lib/efi_driver/efi_block_device.c | 8 ++++---- > lib/efi_driver/efi_uclass.c | 8 ++++---- > 6 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst > index f17138f5c76..a3e2656ab81 100644 > --- a/doc/develop/uefi/uefi.rst > +++ b/doc/develop/uefi/uefi.rst > @@ -620,12 +620,12 @@ EFI_DRIVER_BINDING_PROTOCOL implementation for the= UEFI drivers. > > A linker created list is used to keep track of the UEFI drivers. To cr= eate an > entry in the list the UEFI driver uses the U_BOOT_DRIVER macro specify= ing > -UCLASS_EFI as the ID of its uclass, e.g:: > +UCLASS_EFI_LOADER as the ID of its uclass, e.g:: > > /* Identify as UEFI driver */ > U_BOOT_DRIVER(efi_block) =3D { > .name =3D "EFI block driver", > - .id =3D UCLASS_EFI, > + .id =3D UCLASS_EFI_LOADER, > .ops =3D &driver_ops, > }; > > @@ -651,8 +651,8 @@ UEFI block IO driver > The UEFI block IO driver supports devices exposing the EFI_BLOCK_IO_PR= OTOCOL. > > When connected it creates a new U-Boot block IO device with interface = type > -IF_TYPE_EFI, adds child controllers mapping the partitions, and install= s the > -EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on these. This can be used together wit= h the > +IF_TYPE_EFI_LOADER, adds child controllers mapping the partitions, and = installs > +the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on these. This can be used together= with the > software iPXE to boot from iSCSI network drives [4]. > > This driver is only available if U-Boot is configured with:: > diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c > index 83682dcc181..a7470ae28d5 100644 > --- a/drivers/block/blk-uclass.c > +++ b/drivers/block/blk-uclass.c > @@ -28,7 +28,7 @@ static const char *if_typename_str[IF_TYPE_COUNT] =3D = { > [IF_TYPE_SATA] =3D "sata", > [IF_TYPE_HOST] =3D "host", > [IF_TYPE_NVME] =3D "nvme", > - [IF_TYPE_EFI] =3D "efi", > + [IF_TYPE_EFI_LOADER] =3D "efiloader", > [IF_TYPE_VIRTIO] =3D "virtio", > [IF_TYPE_PVBLOCK] =3D "pvblock", > }; > @@ -44,7 +44,7 @@ static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT]= =3D { > [IF_TYPE_SATA] =3D UCLASS_AHCI, > [IF_TYPE_HOST] =3D UCLASS_ROOT, > [IF_TYPE_NVME] =3D UCLASS_NVME, > - [IF_TYPE_EFI] =3D UCLASS_EFI, > + [IF_TYPE_EFI_LOADER] =3D UCLASS_EFI_LOADER, > [IF_TYPE_VIRTIO] =3D UCLASS_VIRTIO, > [IF_TYPE_PVBLOCK] =3D UCLASS_PVBLOCK, > }; > diff --git a/include/blk.h b/include/blk.h > index f0cc7ca1a28..f0835c3fed5 100644 > --- a/include/blk.h > +++ b/include/blk.h > @@ -34,7 +34,7 @@ enum if_type { > IF_TYPE_SATA, > IF_TYPE_HOST, > IF_TYPE_NVME, > - IF_TYPE_EFI, > + IF_TYPE_EFI_LOADER, > IF_TYPE_PVBLOCK, > IF_TYPE_VIRTIO, > > diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h > index fd139b9b2a0..5e503960aa7 100644 > --- a/include/dm/uclass-id.h > +++ b/include/dm/uclass-id.h > @@ -48,7 +48,7 @@ enum uclass_id { > UCLASS_DMA, /* Direct Memory Access */ > UCLASS_DSA, /* Distributed (Ethernet) Switch Architecture */ > UCLASS_ECDSA, /* Elliptic curve cryptographic device */ > - UCLASS_EFI, /* EFI managed devices */ > + UCLASS_EFI_LOADER, /* Devices managed by EFI_LOADER */ "managed by EFI_LOADER" does not catch it. I will change this to "devices created by UEFI applications and drivers" when merging. Reviewed-by: Heinrich Schuchardt > UCLASS_ETH, /* Ethernet device */ > UCLASS_ETH_PHY, /* Ethernet PHY device */ > UCLASS_FIRMWARE, /* Firmware */ > diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_bloc= k_device.c > index 0937e3595a4..04cb3ef0d4e 100644 > --- a/lib/efi_driver/efi_block_device.c > +++ b/lib/efi_driver/efi_block_device.c > @@ -147,7 +147,7 @@ static int efi_bl_bind(efi_handle_t handle, void *in= terface) > if (!obj) > return -ENOENT; > > - devnum =3D blk_find_max_devnum(IF_TYPE_EFI); > + devnum =3D blk_find_max_devnum(IF_TYPE_EFI_LOADER); > if (devnum =3D=3D -ENODEV) > devnum =3D 0; > else if (devnum < 0) > @@ -159,8 +159,8 @@ static int efi_bl_bind(efi_handle_t handle, void *in= terface) > sprintf(name, "efiblk#%d", devnum); > > /* Create driver model udevice for the EFI block io device */ > - ret =3D blk_create_device(parent, "efi_blk", name, IF_TYPE_EFI, devnum= , > - io->media->block_size, > + ret =3D blk_create_device(parent, "efi_blk", name, IF_TYPE_EFI_LOADER, > + devnum, io->media->block_size, > (lbaint_t)io->media->last_block, &bdev); > if (ret) > return ret; > @@ -209,6 +209,6 @@ static const struct efi_driver_ops driver_ops =3D { > /* Identify as EFI driver */ > U_BOOT_DRIVER(efi_block) =3D { > .name =3D "EFI block driver", > - .id =3D UCLASS_EFI, > + .id =3D UCLASS_EFI_LOADER, > .ops =3D &driver_ops, > }; > diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c > index 382c2b477f4..b01ce89c84e 100644 > --- a/lib/efi_driver/efi_uclass.c > +++ b/lib/efi_driver/efi_uclass.c > @@ -308,7 +308,7 @@ efi_status_t efi_driver_init(void) > log_debug("Initializing EFI driver framework\n"); > for (drv =3D ll_entry_start(struct driver, driver); > drv < ll_entry_end(struct driver, driver); ++drv) { > - if (drv->id =3D=3D UCLASS_EFI) { > + if (drv->id =3D=3D UCLASS_EFI_LOADER) { > ret =3D efi_add_driver(drv); > if (ret !=3D EFI_SUCCESS) { > log_err("Failed to add EFI driver %s\n", > @@ -328,7 +328,7 @@ efi_status_t efi_driver_init(void) > */ > static int efi_uc_init(struct uclass *class) > { > - log_debug("Initializing UCLASS_EFI\n"); > + log_debug("Initializing UCLASS_EFI_LOADER\n"); > return 0; > } > > @@ -340,13 +340,13 @@ static int efi_uc_init(struct uclass *class) > */ > static int efi_uc_destroy(struct uclass *class) > { > - log_debug("Destroying UCLASS_EFI\n"); > + log_debug("Destroying UCLASS_EFI_LOADER\n"); > return 0; > } > > UCLASS_DRIVER(efi) =3D { > .name =3D "efi", > - .id =3D UCLASS_EFI, > + .id =3D UCLASS_EFI_LOADER, > .init =3D efi_uc_init, > .destroy =3D efi_uc_destroy, > }; >