From patchwork Sat Apr 20 05:52:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1088285 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="Or5PEou5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44mMSh6m1fz9s5c for ; Sat, 20 Apr 2019 15:52:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0DD97C21E35; Sat, 20 Apr 2019 05:52:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7FA00C21D72; Sat, 20 Apr 2019 05:52:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6E217C21D65; Sat, 20 Apr 2019 05:52:39 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lists.denx.de (Postfix) with ESMTPS id DBBF1C21C8B for ; Sat, 20 Apr 2019 05:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555739557; bh=Lni0QsPhOVR2Ewtpss70W3DGhtmohfFVpiCxSJtR04c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Or5PEou5jqJcfbuHpnB86Ags6ZViU6gBKozmIHU4T6ORjJ59tC3amGBMeQRi6LIg/ TabtWnfRkEH7NbzKvRXYj9dVbnMMaNwJnWjENexoIbFtIwYEYQbNI9uwPHqiuus+fM a5Bn20A68+17+VBIxv2UHXSVtpIHZJWcfjZ84okU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MO7Ca-1hEPXl0ukG-005b9z; Sat, 20 Apr 2019 07:52:37 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Sat, 20 Apr 2019 07:52:28 +0200 Message-Id: <20190420055228.17272-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:YDYN6H8cOqM11rz4TP7NC5Mso8x/9INfOeGo74HJN6eHpdGOqI0 f3zZDA7tKomxSP9ZkMbcxla5mmOm4LeERU/NpKJ3O+OsOi676ItY2QDEvaIaWwCzZ0iDLB9 oGZyusPeAkh7HG/GeQBbgu3U/5Gc5WoPVaSOf0Ucxw+mye4Yyg1eIrMxLZhxasJGM7qghIK 4cpH0yW1GIbL6256eSQUQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:o0pgY+7MJ2U=:/gh4phncV5GuusPvariFgC a1UnlC3A5CP2zgTeYyP+eGhZD7JFHF96irqkE+c2+Cmc6oqYfF/2IBPJhgdyh+7eRnjBk1fp0 PL57e9XE6rbkVtJRA15Ja90MxX8HP4kMbuYm+RtNfOO4xT95F/zQQ6+eBgUl6EokNwXS9w8T1 WjZgtX/N0812zXOcFPOefU6cqEInaoNVEzuNjmfg2syUp4up+mU2Md3PiYhPIoD9JzTwuFaqc qZceWm4GawVpMHsCKnD9Ts9PVI7Ti+PdxjN+Vy36Y8X9gKjYPLa0nFePixpcZhDv89Z4BvBMg rfRcSxGLvng0k+7m4gfwptDyWX7FJtSqvPC80AjPS5Dm1wyCfqgMJyfObO25i+uOkupx0y+kV XN3MeWUTn0Pum5r2qel01B/GhjQbHdyFZL4cvoI3Rkv2R4+XO4Va6DZV4TnNuIYmPh1vZfLzz OW1g+i5kwkPirzVyiRyqptDtvPChRHmFwjjai+ppF6mYPUfqivMvYFrgq3kXH2gdSVNVykNux GPzuUnLZyCkHsrhAky7O6ieS/AzIH3foiqvo/+Flj3Hgr+/xKAE8tLI3Uehxl+i4O6nfgst31 dHUfhd3IF6oMOwVonCgfjCjM0me+C/AxPfuWkrItK9tgcaEqDjWPOaGJkzfAk8ESCMYzczlkZ vrr53iKFdrWaEXBpPBWcBhimRS/DVAigtYZVcLI3AepOaLD0V61bNl29ax9IS/+6CsV3zaNsa QbZQDoBApuUswGKTjnihHNkUW6CRbbFmJYwvsGyvCfYbu1T3NDl6JSAU3x0E4qbygRD5nPeTW CRAijygFwJFi/aYwdqIt/LusA/Mab6UAm11JHYHVsLXUCW1BW4smVfFpbRQwFcKW57UYSP69R jlvqQNG6YY6Fa8IkHd7AwdlCAgvmDTcYefnaresShtx74aj+jeMkWtrrRdfHh9 Cc: Heinrich Schuchardt , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/1] efi_loader: consistent naming of protocol GUIDs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" We should consistently use the same name for protocol GUIDs as defined in the UEFI specification. Not adhering to this rule has led to duplicate definitions for the EFI_LOADED_IMAGE_PROTOCOL_GUID. Adjust misnamed protocol GUIDs. Adjust the text for the graphics output protocol in the output of the `efidebug dh` command. Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 10 +++++----- include/efi_api.h | 18 +++++++----------- lib/efi/efi.c | 2 +- lib/efi/efi_stub.c | 2 +- lib/efi_loader/efi_disk.c | 2 +- lib/efi_loader/efi_gop.c | 2 +- lib/efi_loader/efi_image_loader.c | 8 ++++---- lib/efi_loader/efi_net.c | 4 ++-- lib/efi_loader/helloworld.c | 2 +- lib/efi_selftest/efi_selftest_bitblt.c | 2 +- lib/efi_selftest/efi_selftest_block_device.c | 4 ++-- lib/efi_selftest/efi_selftest_devicepath.c | 2 +- lib/efi_selftest/efi_selftest_gop.c | 2 +- lib/efi_selftest/efi_selftest_loadimage.c | 2 +- lib/efi_selftest/efi_selftest_miniapp_exit.c | 2 +- lib/efi_selftest/efi_selftest_snp.c | 2 +- 16 files changed, 31 insertions(+), 35 deletions(-) -- 2.20.1 diff --git a/cmd/efidebug.c b/cmd/efidebug.c index db96682c5a..4bf91ed248 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -185,7 +185,7 @@ static const struct { } guid_list[] = { { "Device Path", - DEVICE_PATH_GUID, + EFI_DEVICE_PATH_PROTOCOL_GUID, }, { "Device Path To Text", @@ -217,7 +217,7 @@ static const struct { }, { "Block IO", - BLOCK_IO_GUID, + EFI_BLOCK_IO_PROTOCOL_GUID, }, { "Simple File System", @@ -225,11 +225,11 @@ static const struct { }, { "Loaded Image", - LOADED_IMAGE_PROTOCOL_GUID, + EFI_LOADED_IMAGE_PROTOCOL_GUID, }, { - "GOP", - EFI_GOP_GUID, + "Graphics Output", + EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID, }, }; diff --git a/include/efi_api.h b/include/efi_api.h index 5b0a100635..472160cb30 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -290,10 +290,6 @@ struct efi_runtime_services { EFI_GUID(0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, \ 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c) -#define LOADED_IMAGE_PROTOCOL_GUID \ - EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, 0x8e, 0x3f, \ - 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) - #define EFI_FDT_GUID \ EFI_GUID(0xb1b621d5, 0xf19c, 0x41a5, \ 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0) @@ -329,11 +325,11 @@ struct efi_system_table { struct efi_configuration_table *tables; }; -#define LOADED_IMAGE_GUID \ +#define EFI_LOADED_IMAGE_PROTOCOL_GUID \ EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, \ 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) -#define LOADED_IMAGE_DEVICE_PATH_GUID \ +#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ EFI_GUID(0xbc62157e, 0x3e33, 0x4fec, \ 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf) @@ -355,7 +351,7 @@ struct efi_loaded_image { unsigned long unload; }; -#define DEVICE_PATH_GUID \ +#define EFI_DEVICE_PATH_PROTOCOL_GUID \ EFI_GUID(0x09576e91, 0x6d3f, 0x11d2, \ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) @@ -478,7 +474,7 @@ struct efi_device_path_file_path { u16 str[]; } __packed; -#define BLOCK_IO_GUID \ +#define EFI_BLOCK_IO_PROTOCOL_GUID \ EFI_GUID(0x964e5b21, 0x6459, 0x11d2, \ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) @@ -1123,7 +1119,7 @@ struct efi_hii_config_access_protocol { efi_browser_action_request_t *action_request); }; -#define EFI_GOP_GUID \ +#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \ 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a) @@ -1175,7 +1171,7 @@ struct efi_gop { struct efi_gop_mode *mode; }; -#define EFI_SIMPLE_NETWORK_GUID \ +#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ EFI_GUID(0xa19832b9, 0xac25, 0x11d3, \ 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d) @@ -1268,7 +1264,7 @@ struct efi_simple_network { struct efi_simple_network_mode *mode; }; -#define EFI_PXE_GUID \ +#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \ EFI_GUID(0x03c4e603, 0xac28, 0x11d3, \ 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d) diff --git a/lib/efi/efi.c b/lib/efi/efi.c index 2c6a50824f..7cba57b131 100644 --- a/lib/efi/efi.c +++ b/lib/efi/efi.c @@ -53,7 +53,7 @@ void efi_puts(struct efi_priv *priv, const char *str) int efi_init(struct efi_priv *priv, const char *banner, efi_handle_t image, struct efi_system_table *sys_table) { - efi_guid_t loaded_image_guid = LOADED_IMAGE_PROTOCOL_GUID; + efi_guid_t loaded_image_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID; struct efi_boot_services *boot = sys_table->boottime; struct efi_loaded_image *loaded_image; int ret; diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 12e3d637dd..6dd93ff435 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -278,7 +278,7 @@ efi_status_t EFIAPI efi_main(efi_handle_t image, struct efi_gop *gop; struct efi_entry_gopmode mode; struct efi_entry_systable table; - efi_guid_t efi_gop_guid = EFI_GOP_GUID; + efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; efi_uintn_t key, desc_size, size; efi_status_t ret; u32 version; diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index c037526ad2..7a6b06821a 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -12,7 +12,7 @@ #include #include -const efi_guid_t efi_block_io_guid = BLOCK_IO_GUID; +const efi_guid_t efi_block_io_guid = EFI_BLOCK_IO_PROTOCOL_GUID; /** * struct efi_disk_obj - EFI disk object diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index d62ce45912..e003823b60 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -14,7 +14,7 @@ DECLARE_GLOBAL_DATA_PTR; -static const efi_guid_t efi_gop_guid = EFI_GOP_GUID; +static const efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; /** * struct efi_gop_obj - graphical output protocol object diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 93feefd366..f8092b6202 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -12,10 +12,10 @@ #include const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID; -const efi_guid_t efi_guid_device_path = DEVICE_PATH_GUID; -const efi_guid_t efi_guid_loaded_image = LOADED_IMAGE_GUID; -const efi_guid_t efi_guid_loaded_image_device_path - = LOADED_IMAGE_DEVICE_PATH_GUID; +const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID; +const efi_guid_t efi_guid_loaded_image = EFI_LOADED_IMAGE_PROTOCOL_GUID; +const efi_guid_t efi_guid_loaded_image_device_path = + EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID; const efi_guid_t efi_simple_file_system_protocol_guid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; const efi_guid_t efi_file_info_guid = EFI_FILE_INFO_GUID; diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index c7d9da8521..e0e222a70b 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -9,8 +9,8 @@ #include #include -static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_GUID; -static const efi_guid_t efi_pxe_guid = EFI_PXE_GUID; +static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID; +static const efi_guid_t efi_pxe_guid = EFI_PXE_BASE_CODE_PROTOCOL_GUID; static struct efi_pxe_packet *dhcp_ack; static bool new_rx_packet; static void *new_tx_packet; diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c index 426f276361..9ae2ee3389 100644 --- a/lib/efi_loader/helloworld.c +++ b/lib/efi_loader/helloworld.c @@ -12,7 +12,7 @@ #include #include -static const efi_guid_t loaded_image_guid = LOADED_IMAGE_GUID; +static const efi_guid_t loaded_image_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID; static const efi_guid_t fdt_guid = EFI_FDT_GUID; static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID; static const efi_guid_t smbios_guid = SMBIOS_TABLE_GUID; diff --git a/lib/efi_selftest/efi_selftest_bitblt.c b/lib/efi_selftest/efi_selftest_bitblt.c index 9033109807..fb33150c4b 100644 --- a/lib/efi_selftest/efi_selftest_bitblt.c +++ b/lib/efi_selftest/efi_selftest_bitblt.c @@ -23,7 +23,7 @@ static const struct efi_gop_pixel DARK_BLUE = {128, 0, 0, 0}; static const struct efi_gop_pixel LIGHT_BLUE = {255, 192, 192, 0}; static struct efi_boot_services *boottime; -static efi_guid_t efi_gop_guid = EFI_GOP_GUID; +static efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static struct efi_gop *gop; static struct efi_gop_pixel *bitmap; static struct efi_event *event; diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c index 21409aed6f..29ac0ce651 100644 --- a/lib/efi_selftest/efi_selftest_block_device.c +++ b/lib/efi_selftest/efi_selftest_block_device.c @@ -24,8 +24,8 @@ static struct efi_boot_services *boottime; -static const efi_guid_t block_io_protocol_guid = BLOCK_IO_GUID; -static const efi_guid_t guid_device_path = DEVICE_PATH_GUID; +static const efi_guid_t block_io_protocol_guid = EFI_BLOCK_IO_PROTOCOL_GUID; +static const efi_guid_t guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID; static const efi_guid_t guid_simple_file_system_protocol = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; static const efi_guid_t guid_file_system_info = EFI_FILE_SYSTEM_INFO_GUID; diff --git a/lib/efi_selftest/efi_selftest_devicepath.c b/lib/efi_selftest/efi_selftest_devicepath.c index 105ce2c92b..4ce3fad895 100644 --- a/lib/efi_selftest/efi_selftest_devicepath.c +++ b/lib/efi_selftest/efi_selftest_devicepath.c @@ -20,7 +20,7 @@ struct interface { void (EFIAPI * inc)(void); } interface; -static efi_guid_t guid_device_path = DEVICE_PATH_GUID; +static efi_guid_t guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID; static efi_guid_t guid_device_path_to_text_protocol = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID; diff --git a/lib/efi_selftest/efi_selftest_gop.c b/lib/efi_selftest/efi_selftest_gop.c index 5b0e2a9605..4ad043c597 100644 --- a/lib/efi_selftest/efi_selftest_gop.c +++ b/lib/efi_selftest/efi_selftest_gop.c @@ -10,7 +10,7 @@ #include static struct efi_boot_services *boottime; -static efi_guid_t efi_gop_guid = EFI_GOP_GUID; +static efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static struct efi_gop *gop; /* diff --git a/lib/efi_selftest/efi_selftest_loadimage.c b/lib/efi_selftest/efi_selftest_loadimage.c index 96faa67a15..449b6bfcac 100644 --- a/lib/efi_selftest/efi_selftest_loadimage.c +++ b/lib/efi_selftest/efi_selftest_loadimage.c @@ -27,7 +27,7 @@ static struct efi_boot_services *boottime; static efi_handle_t handle_image; static efi_handle_t handle_volume; -static const efi_guid_t guid_device_path = DEVICE_PATH_GUID; +static const efi_guid_t guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID; static const efi_guid_t guid_simple_file_system_protocol = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; static const efi_guid_t guid_file_info = EFI_FILE_INFO_GUID; diff --git a/lib/efi_selftest/efi_selftest_miniapp_exit.c b/lib/efi_selftest/efi_selftest_miniapp_exit.c index d63b9e3add..b3ca109d81 100644 --- a/lib/efi_selftest/efi_selftest_miniapp_exit.c +++ b/lib/efi_selftest/efi_selftest_miniapp_exit.c @@ -11,7 +11,7 @@ #include #include -static efi_guid_t loaded_image_protocol_guid = LOADED_IMAGE_GUID; +static efi_guid_t loaded_image_protocol_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID; /** * check_loaded_image_protocol() - check image_base/image_size diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c index f1e23c4921..d7350e2158 100644 --- a/lib/efi_selftest/efi_selftest_snp.c +++ b/lib/efi_selftest/efi_selftest_snp.c @@ -66,7 +66,7 @@ struct dhcp { static struct efi_boot_services *boottime; static struct efi_simple_network *net; static struct efi_event *timer; -static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_GUID; +static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID; /* IP packet ID */ static unsigned int net_ip_id;