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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69CFAC83F03 for ; Sun, 6 Jul 2025 10:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RRl/Hz0pmeAmsAzZCRyrKjK2mFOe6VRdLathsDVxRf0=; b=beOZ8OP1rVlSzn l1uzmWbebWqMA8WRVz37tiAr4XDphw9i6oDYhRgxC5fcEaZC023GP1/zlyNRAgccNSOIPZFQWr9aG J+8QsgqJtAB3KriQsfcVeM7XfZMghA4BJSvvGYYcQk+tvDAnYyGjwM0KXXRvAQn0+hFxEK/VYOMIB otIHNNs6lt9CPukPef9UwWFpGZvxbeLWAqAnRNvYWSmzT/1vXr/5avDSOUkMW0Kg7/5Es3/WsC1sC qBap6Sb6yH2Qfyd3g7tZgB2wsxpd/UusdlaileKUeqfvxRPm0xajE+qE6w3NwN051Rz38ZsHNX6qo LXmpPkM0NCZlEPO9stxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYMD8-000000006Aa-3vLi; Sun, 06 Jul 2025 10:03:02 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYM9P-000000005nH-3Tij for linux-riscv@lists.infradead.org; Sun, 06 Jul 2025 09:59:12 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-451d41e1ad1so15440035e9.1 for ; Sun, 06 Jul 2025 02:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751795950; x=1752400750; darn=lists.infradead.org; h=content-transfer-encoding:reference:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PNcWWt0/wmFdTHt0R4q28XFCfyYaQTMM9C3UysIYQmk=; b=haez4haUJFWJglu3h7gc08ELt2HmGA7cddNeTFdGh8SJNQ3bxDeYdir12vWg+QRioA CWFpHBzlpHuNkONtJ+ieEfkVw5pvmNZz7JSZF4W/tMU0uM7/B+1lo886VXFFa4k7tKf3 1pVM8te6IQj/VQgcrs0Dw77Nzc9aGUeeU9G2ozKVBQuNKVIxuB6GOY2QGvDa+FYYE1Oe T2mzGn7wVZ16+xuLF90qJ9fr8CpUdXYU068hEAdKKjUHQ0AKYfkttghRHHQ8fGgljz4b lig2QMQsVUOoNqWCbncENIGIPxuKklRBrbJOy4ZWr2NffChtsxPrnMUGGC2wnp/rSlmV BTpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751795950; x=1752400750; h=content-transfer-encoding:reference:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PNcWWt0/wmFdTHt0R4q28XFCfyYaQTMM9C3UysIYQmk=; b=UNocjhT2bGkJLXftj7lJuYAwrEnLjToYpA0Bc+JTGpIJILwVrJwA7bWD3U3bAmj182 GMc5R9djC+Uq3uBW7SLMoy9WAUCvVdFhP3XEzMLKuvAhhr6+FUgSw6V6WX7Q+gqrRrnl zhBILX3y51OXq9htmc7WM9V9Vy917F10BFtbWD0a/NuYY0XoYoWBjimaVuFXmd0PMVs4 2UXYO9bn/XZLORL0Sm1/5W66SGB+wy7NKXOSy8XPz4lGaEoNDjgjtgSFXkqF0pDVlfHm bIw+DVFaz+yax3NfiuOGEDG8Xx+PsbgxN8yL8ZWMf1xmRh/tbSQXCKjejg6Sskgl/Qw0 0n+A== X-Forwarded-Encrypted: i=1; AJvYcCV2LxEcSVFcRvcCRXA6L0n1a/00qap5IiPAQEOMRsGkP7mi6DiZu5NOHxkFqk2kPHGnqrsYh4B2thkyjA==@lists.infradead.org X-Gm-Message-State: AOJu0YwQ+QaBKybkCepvbpuuv1nk/gCYrWzcujUVpnY7NKW/IcSUgq1G KNNxIO7ftw6okicqr59XDVOFq8lI7RZEBTP5RPhoBJTKHwXZfdKXQ0uP X-Gm-Gg: ASbGncs2c1KWQNARYZSZa66JSEXUYobpCR2feam4jl/eHSOw7d+qsWRVeRfnZeIdDWY IE7r+r1iffcaD/A0dpMGvVlXn86KZ9UfuYK0CeCs2/rNU+ld83O3WdfjphOfZPf2KWXXjcBQcQl RsPBYl3TNl2xR3hILfS1CFXAypvv/wNla5LQcJo9SF1x9VDv0XPO1/ZlwpMbUzFO+spvQ7I8op4 4//rPMsBxT1rAGuxB0oRhA6sJMIq7NgdqNta3lIHdyKPWsU7mJ78L+ulo/PsP53uokeMo/rZDmg g8oq6pXt8ccgRmk4orq21cNNPGXwMuR0t7rUuDVXaq5qxS8pbfZx3tDtyJoQdmNFv/z7jTXwWlt jxQwH1mk9Jc6z X-Google-Smtp-Source: AGHT+IFMIJB+KrjRDaY4HwYLB33+4/AnB26QOAdPcOANrlvRXEwS28r6B3uldFQeQoFNTw5rs693FA== X-Received: by 2002:a05:600c:8509:b0:43b:cc42:c54f with SMTP id 5b1f17b1804b1-454bb801406mr38603945e9.14.1751795950093; Sun, 06 Jul 2025 02:59:10 -0700 (PDT) Received: from localhost.localdomain ([41.79.198.24]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b47285e236sm7103882f8f.100.2025.07.06.02.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jul 2025 02:59:09 -0700 (PDT) From: Khalid Ali X-Google-Original-From: Khalid Ali Subject: [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages Date: Sun, 6 Jul 2025 09:58:02 +0000 Message-ID: <20250706095812.1405-1-khaliidcaliy@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250706094354.1282-1-khaliidcaliy@gmail.com> References: MIME-Version: 1.0 Reference: <20250706094354.1282-1-khaliidcaliy@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250706_025911_879621_262F4C24 X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Khalid Ali Print the UEFI status code in error messages, particularly when handling return values from functions that return EFI_STATUS. This saves time, specially for debugging. It makes easy to find status code easily. Signed-off-by: Khalid Ali --- Some source files related to other architectures i changed it also. I didn't able to compile, because i don't have access to those architectures. So, i am relying test robots and reviewers for source files related to non-x86 architectures. drivers/firmware/efi/libstub/arm32-stub.c | 6 ++-- drivers/firmware/efi/libstub/efi-stub-entry.c | 4 +-- drivers/firmware/efi/libstub/efi-stub.c | 10 +++--- drivers/firmware/efi/libstub/file.c | 14 ++++---- drivers/firmware/efi/libstub/loongarch.c | 2 +- drivers/firmware/efi/libstub/pci.c | 4 +-- drivers/firmware/efi/libstub/random.c | 2 +- drivers/firmware/efi/libstub/riscv-stub.c | 2 +- drivers/firmware/efi/libstub/tpm.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 32 +++++++++---------- drivers/firmware/efi/libstub/zboot.c | 4 +-- 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/firmware/efi/libstub/arm32-stub.c b/drivers/firmware/efi/libstub/arm32-stub.c index 1073dd947516..583be54b6b1f 100644 --- a/drivers/firmware/efi/libstub/arm32-stub.c +++ b/drivers/firmware/efi/libstub/arm32-stub.c @@ -36,7 +36,7 @@ efi_status_t check_platform_features(void) sizeof(*efi_entry_state), (void **)&efi_entry_state); if (status != EFI_SUCCESS) { - efi_err("allocate_pool() failed\n"); + efi_err("allocate_pool() failed: 0x%lx\n", status); return status; } @@ -46,7 +46,7 @@ efi_status_t check_platform_features(void) status = efi_bs_call(install_configuration_table, &cpu_state_guid, efi_entry_state); if (status != EFI_SUCCESS) { - efi_err("install_configuration_table() failed\n"); + efi_err("install_configuration_table() failed: 0x%lx\n", status); goto free_state; } @@ -96,7 +96,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, */ status = efi_low_alloc_above(alloc_size, EFI_PAGE_SIZE, &alloc_base, 0x0); if (status != EFI_SUCCESS) { - efi_err("Unable to allocate memory for uncompressed kernel.\n"); + efi_err("Unable to allocate memory for uncompressed kernel: 0x%lx\n", status); return status; } diff --git a/drivers/firmware/efi/libstub/efi-stub-entry.c b/drivers/firmware/efi/libstub/efi-stub-entry.c index a6c049835190..bc98fdd5f11f 100644 --- a/drivers/firmware/efi/libstub/efi-stub-entry.c +++ b/drivers/firmware/efi/libstub/efi-stub-entry.c @@ -54,7 +54,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, status = efi_bs_call(handle_protocol, handle, &loaded_image_proto, (void *)&image); if (status != EFI_SUCCESS) { - efi_err("Failed to get loaded image protocol\n"); + efi_err("Failed to get loaded image protocol: 0x%lx\n", status); return status; } @@ -69,7 +69,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, &reserve_size, image, handle); if (status != EFI_SUCCESS) { - efi_err("Failed to relocate kernel\n"); + efi_err("Failed to relocate kernel: 0x%lx\n", status); return status; } diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c index 874f63b4a383..689a41c9ab0e 100644 --- a/drivers/firmware/efi/libstub/efi-stub.c +++ b/drivers/firmware/efi/libstub/efi-stub.c @@ -76,7 +76,7 @@ static void install_memreserve_table(void) status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), (void **)&rsv); if (status != EFI_SUCCESS) { - efi_err("Failed to allocate memreserve entry!\n"); + efi_err("Failed to allocate memreserve entry: 0x%lx\n", status); return; } @@ -87,7 +87,7 @@ static void install_memreserve_table(void) status = efi_bs_call(install_configuration_table, &memreserve_table_guid, rsv); if (status != EFI_SUCCESS) - efi_err("Failed to install memreserve config table!\n"); + efi_err("Failed to install memreserve config table: 0x%lx\n", status); } static u32 get_supported_rt_services(void) @@ -114,14 +114,14 @@ efi_status_t efi_handle_cmdline(efi_loaded_image_t *image, char **cmdline_ptr) */ cmdline = efi_convert_cmdline(image); if (!cmdline) { - efi_err("getting command line via LOADED_IMAGE_PROTOCOL\n"); + efi_err("getting command line via LOADED_IMAGE_PROTOCOL: 0x%lx\n", status); return EFI_OUT_OF_RESOURCES; } if (!IS_ENABLED(CONFIG_CMDLINE_FORCE)) { status = efi_parse_options(cmdline); if (status != EFI_SUCCESS) { - efi_err("Failed to parse EFI load options\n"); + efi_err("Failed to parse EFI load options: 0x%lx\n", status); return status; } } @@ -131,7 +131,7 @@ efi_status_t efi_handle_cmdline(efi_loaded_image_t *image, char **cmdline_ptr) cmdline[0] == 0) { status = efi_parse_options(CONFIG_CMDLINE); if (status != EFI_SUCCESS) { - efi_err("Failed to parse built-in command line\n"); + efi_err("Failed to parse built-in command line: 0x%lx\n", status); return status; } } diff --git a/drivers/firmware/efi/libstub/file.c b/drivers/firmware/efi/libstub/file.c index bd626d55dcbc..428ad4aeeb2e 100644 --- a/drivers/firmware/efi/libstub/file.c +++ b/drivers/firmware/efi/libstub/file.c @@ -54,14 +54,14 @@ static efi_status_t efi_open_file(efi_file_protocol_t *volume, status = efi_call_proto(volume, open, &fh, fi->filename, EFI_FILE_MODE_READ, 0); if (status != EFI_SUCCESS) { - efi_err("Failed to open file: %ls\n", fi->filename); + efi_err("Failed to open file: %ls (0x%lx)\n", fi->filename, status); return status; } info_sz = sizeof(struct finfo); status = efi_call_proto(fh, get_info, &info_guid, &info_sz, fi); if (status != EFI_SUCCESS) { - efi_err("Failed to get file info\n"); + efi_err("Failed to get file info: 0x%lx\n", status); efi_call_proto(fh, close); return status; } @@ -81,13 +81,13 @@ static efi_status_t efi_open_volume(efi_loaded_image_t *image, status = efi_bs_call(handle_protocol, efi_table_attr(image, device_handle), &fs_proto, (void **)&io); if (status != EFI_SUCCESS) { - efi_err("Failed to handle fs_proto\n"); + efi_err("Failed to handle fs_prot: 0x%lx\n", status); return status; } status = efi_call_proto(io, open_volume, fh); if (status != EFI_SUCCESS) - efi_err("Failed to open volume\n"); + efi_err("Failed to open volume: 0x%lx\n", status); return status; } @@ -170,7 +170,7 @@ static efi_status_t efi_open_device_path(efi_file_protocol_t **volume, status = efi_call_proto(io, open_volume, volume); if (status != EFI_SUCCESS) - efi_err("Failed to open volume\n"); + efi_err("Failed to open volume: 0x%lx\n", status); return status; } @@ -275,7 +275,7 @@ do_builtin: cmdline = builtin_cmdline; &alloc_addr, hard_limit); if (status != EFI_SUCCESS) { - efi_err("Failed to allocate memory for files\n"); + efi_err("Failed to allocate memory for files: 0x%lx\n", status); goto err_close_file; } @@ -299,7 +299,7 @@ do_builtin: cmdline = builtin_cmdline; status = efi_call_proto(file, read, &chunksize, addr); if (status != EFI_SUCCESS) { - efi_err("Failed to read file\n"); + efi_err("Failed to read file: 0x%lx\n", status); goto err_close_file; } addr += chunksize; diff --git a/drivers/firmware/efi/libstub/loongarch.c b/drivers/firmware/efi/libstub/loongarch.c index 3782d0a187d1..53b297a6613e 100644 --- a/drivers/firmware/efi/libstub/loongarch.c +++ b/drivers/firmware/efi/libstub/loongarch.c @@ -55,7 +55,7 @@ efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image, status = efi_alloc_virtmap(&priv.runtime_map, &desc_size, &desc_ver); if (status != EFI_SUCCESS) { - efi_err("Unable to retrieve UEFI memory map.\n"); + efi_err("Unable to retrieve UEFI memory map: 0x%lx\n", status); return status; } diff --git a/drivers/firmware/efi/libstub/pci.c b/drivers/firmware/efi/libstub/pci.c index 1dccf77958d3..8cfffe1942ab 100644 --- a/drivers/firmware/efi/libstub/pci.c +++ b/drivers/firmware/efi/libstub/pci.c @@ -25,7 +25,7 @@ void efi_pci_disable_bridge_busmaster(void) status = efi_bs_call(locate_handle_buffer, EFI_LOCATE_BY_PROTOCOL, &pci_proto, NULL, &pci_handle_num, &pci_handle); if (status != EFI_SUCCESS) { - efi_err("Failed to locate PCI I/O handles\n"); + efi_err("Failed to locate PCI I/O handles: 0x%lx\n", status); return; } @@ -89,6 +89,6 @@ void efi_pci_disable_bridge_busmaster(void) status = efi_call_proto(pci, pci.write, EfiPciIoWidthUint16, PCI_COMMAND, 1, &command); if (status != EFI_SUCCESS) - efi_err("Failed to disable PCI busmastering\n"); + efi_err("Failed to disable PCI busmastering: 0x%lx\n", status); } } diff --git a/drivers/firmware/efi/libstub/random.c b/drivers/firmware/efi/libstub/random.c index 7109b8a2dcba..b9849997bb28 100644 --- a/drivers/firmware/efi/libstub/random.c +++ b/drivers/firmware/efi/libstub/random.c @@ -106,7 +106,7 @@ efi_status_t efi_random_get_seed(void) struct_size(seed, bits, seed_size), (void **)&seed); if (status != EFI_SUCCESS) { - efi_warn("Failed to allocate memory for RNG seed.\n"); + efi_warn("Failed to allocate memory for RNG seed: 0x%lx\n", status); goto err_warn; } diff --git a/drivers/firmware/efi/libstub/riscv-stub.c b/drivers/firmware/efi/libstub/riscv-stub.c index e7d9204baee3..7859c950ca51 100644 --- a/drivers/firmware/efi/libstub/riscv-stub.c +++ b/drivers/firmware/efi/libstub/riscv-stub.c @@ -45,7 +45,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, kernel_size, kernel_codesize, kernel_memsize, efi_kaslr_get_phys_seed(image_handle)); if (status != EFI_SUCCESS) { - efi_err("Failed to relocate kernel\n"); + efi_err("Failed to relocate kernel: 0x%lx\n", status); *image_size = 0; } diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index a5c6c4f163fc..ea7ab420c9cf 100644 --- a/drivers/firmware/efi/libstub/tpm.c +++ b/drivers/firmware/efi/libstub/tpm.c @@ -100,7 +100,7 @@ static void efi_retrieve_tcg2_eventlog(int version, efi_physical_addr_t log_loca sizeof(*log_tbl) + log_size, (void **)&log_tbl); if (status != EFI_SUCCESS) { - efi_err("Unable to allocate memory for event log\n"); + efi_err("Unable to allocate memory for event log: 0x%lx\n", status); return; } diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index 13d8eba06e4b..aae3b7456759 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -65,7 +65,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, size, (void **)&rom); if (status != EFI_SUCCESS) { - efi_err("Failed to allocate memory for 'rom'\n"); + efi_err("Failed to allocate memory for 'rom' 0x%lx\n", status); return status; } @@ -80,7 +80,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) PCI_VENDOR_ID, 1, &rom->vendor); if (status != EFI_SUCCESS) { - efi_err("Failed to read rom->vendor\n"); + efi_err("Failed to read rom->vendor: 0x%lx\n", status); return status; } @@ -88,7 +88,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) PCI_DEVICE_ID, 1, &rom->devid); if (status != EFI_SUCCESS) { - efi_err("Failed to read rom->devid\n"); + efi_err("Failed to read rom->devid: 0x%lx\n", status); return status; } @@ -179,7 +179,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params) size + sizeof(struct setup_data), (void **)&new); if (status != EFI_SUCCESS) { - efi_err("Failed to allocate memory for 'properties'\n"); + efi_err("Failed to allocate memory for 'properties': 0x%lx\n", status); return; } @@ -254,14 +254,14 @@ static void apple_set_os(void) if (set_os->version >= 2) { status = set_os->set_os_vendor("Apple Inc."); if (status != EFI_SUCCESS) - efi_err("Failed to set OS vendor via apple_set_os\n"); + efi_err("Failed to set OS vendor via apple_set_os: 0x%lx\n", status); } if (set_os->version > 0) { /* The version being set doesn't seem to matter */ status = set_os->set_os_version("Mac OS X 10.9"); if (status != EFI_SUCCESS) - efi_err("Failed to set OS version via apple_set_os\n"); + efi_err("Failed to set OS version via apple_set_os: 0x%lx\n", status); } } @@ -283,7 +283,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start, rounded_end - rounded_start, EFI_MEMORY_RO); if (status != EFI_SUCCESS) { - efi_warn("Failed to set EFI_MEMORY_RO attribute\n"); + efi_warn("Failed to set EFI_MEMORY_RO attribute: 0x%lx\n", status); return status; } @@ -292,7 +292,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start, rounded_end - rounded_start, EFI_MEMORY_XP); if (status != EFI_SUCCESS) - efi_warn("Failed to clear EFI_MEMORY_XP attribute\n"); + efi_warn("Failed to clear EFI_MEMORY_XP attribute: 0x%lx\n", status); return status; } @@ -361,7 +361,7 @@ static void setup_unaccepted_memory(void) status = efi_call_proto(proto, allow_unaccepted_memory); if (status != EFI_SUCCESS) - efi_err("Memory acceptance protocol failed\n"); + efi_err("Memory acceptance protocol failed: 0x%lx\n", status); } static efi_char16_t *efistub_fw_vendor(void) @@ -414,7 +414,7 @@ static efi_status_t efi_allocate_bootparams(efi_handle_t handle, status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image); if (status != EFI_SUCCESS) { - efi_err("Failed to get handle for LOADED_IMAGE_PROTOCOL\n"); + efi_err("Failed to get handle for LOADED_IMAGE_PROTOCOL: 0x%lx\n", status); return status; } @@ -846,14 +846,14 @@ void __noreturn efi_stub_entry(efi_handle_t handle, status = efi_setup_5level_paging(); if (status != EFI_SUCCESS) { - efi_err("efi_setup_5level_paging() failed!\n"); + efi_err("efi_setup_5level_paging() failed: 0x%lx\n", status); goto fail; } #ifdef CONFIG_CMDLINE_BOOL status = parse_options(CONFIG_CMDLINE); if (status != EFI_SUCCESS) { - efi_err("Failed to parse options\n"); + efi_err("Failed to parse options: 0x%lx\n", status); goto fail; } #endif @@ -862,7 +862,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle, ((u64)boot_params->ext_cmd_line_ptr << 32)); status = parse_options((char *)cmdline_paddr); if (status != EFI_SUCCESS) { - efi_err("Failed to parse options\n"); + efi_err("Failed to parse options: 0x%lx\n", status); goto fail; } } @@ -872,7 +872,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle, status = efi_decompress_kernel(&kernel_entry, boot_params); if (status != EFI_SUCCESS) { - efi_err("Failed to decompress kernel\n"); + efi_err("Failed to decompress kernel: 0x%lx\n", status); goto fail; } @@ -921,7 +921,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle, status = exit_boot(boot_params, handle); if (status != EFI_SUCCESS) { - efi_err("exit_boot() failed!\n"); + efi_err("exit_boot() failed: 0x%lx\n", status); goto fail; } @@ -935,7 +935,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle, enter_kernel(kernel_entry, boot_params); fail: - efi_err("efi_stub_entry() failed!\n"); + efi_err("efi_stub_entry() failed: 0x%lx\n", status); efi_exit(handle, status); } diff --git a/drivers/firmware/efi/libstub/zboot.c b/drivers/firmware/efi/libstub/zboot.c index c47ace06f010..f7e7f68fea02 100644 --- a/drivers/firmware/efi/libstub/zboot.c +++ b/drivers/firmware/efi/libstub/zboot.c @@ -44,7 +44,7 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab) status = efi_bs_call(handle_protocol, handle, &LOADED_IMAGE_PROTOCOL_GUID, (void **)&image); if (status != EFI_SUCCESS) { - efi_err("Failed to locate parent's loaded image protocol\n"); + efi_err("Failed to locate parent's loaded image protocol 0x%lx\n", status); return status; } @@ -86,7 +86,7 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab) status = efi_random_alloc(alloc_size, min_kimg_align, &image_base, seed, EFI_LOADER_CODE, 0, EFI_ALLOC_LIMIT); if (status != EFI_SUCCESS) { - efi_err("Failed to allocate memory\n"); + efi_err("Failed to allocate memory: 0x%lx\n", status); return status; } } -- 2.49.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv