From patchwork Tue Feb 12 10:30:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 158146 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3669222jaa; Tue, 12 Feb 2019 02:37:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8IeskIpmC4vfhQnL2JBM4xbkLVOusUqeSgB0irNirR/0K0PEeB8p1GPlSo0qrTBAvhKOb X-Received: by 2002:a81:2fcc:: with SMTP id v195mr2155009ywv.419.1549967826786; Tue, 12 Feb 2019 02:37:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549967826; cv=none; d=google.com; s=arc-20160816; b=J3vTdVYjJOtp6matKvyJRFV6ANMvmK0FrZjqZvUwO/PzXCppHFhXptZ9GIJFEYePGq 8ksj1v/4NeOGf+23xypJJd1TdSDkpiUs1R+2dWIFKjOiDpN/CH4+TnnDpJ5Bk9r2NaU4 w9DlHgsMZSLJ0E4DUm1+ZLuEAmiT5SR8oQbBolZzpbi/2niE7Edk8VxYUgeYEfXW9ERC 0Cy/N/xDJj+FTDWyI6BCNUegbCaODMNcZnXzcxccfGLz501xk8aYCEm0b+H44TMi8U8Y VROsdnjWWajpYUp0TdgXARbq9yLW7chTZd+gcRn7fIQFXk0vHzFPYRvWYrFey6FNx+tI /DRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from; bh=ruQ1U4HkED8ZAW2stun9RQwaXz7MtxVzx13pPN1SDls=; b=0nCFNKrjNflYUyh/m6UmuEDk/Fj0JtqKk2TbkgntZQmK39JNQI4cFrTA8HYbqs3cEK s4u4sIevfjGJA9p4AL7hRxYtyIAiM68SkxGyia1OOtkg49PodDdiUR9xQSNWK+jZkDDT eZzkiW3zNlTsNq9JxEhgLMuDrckKjI+EdbCfij5vhhy4OPInR6CQWPhwxvP/RJqPso3b lcV9K4cMkgQ1GAcjfpEzw4E49/K4EMILX8t/5YBnfOzOwiAPjCvkDsQKB+NDpbdFN6xg jd/9M7f0DgPm33oaHXR0watFZXqhj2rMmeraiwQALm8SgE29fQ5XeUpl6Tagn1T+zRGq DfYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 185si3731582ybq.202.2019.02.12.02.37.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Feb 2019 02:37:06 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Received: from localhost ([127.0.0.1]:36998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtVR4-0004LJ-3z for patch@linaro.org; Tue, 12 Feb 2019 05:37:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtVML-0000w5-BC for grub-devel@gnu.org; Tue, 12 Feb 2019 05:32:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtVMC-00049G-2U for grub-devel@gnu.org; Tue, 12 Feb 2019 05:32:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:51824 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtVM9-0002um-Tr for grub-devel@gnu.org; Tue, 12 Feb 2019 05:32:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 98EFCAF9A; Tue, 12 Feb 2019 10:31:11 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v6 01/11] efi: Rename armxx to arch Date: Tue, 12 Feb 2019 11:30:58 +0100 Message-Id: <20190212103108.56963-2-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20190212103108.56963-1-agraf@suse.de> References: <20190212103108.56963-1-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: "rickchen36 @ gmail . com" , David Abdurachmanov , schwab@suse.de, "greentime @ andestech . com" , leif.lindholm@linaro.org, atish.patra@wdc.com, Michael Chang , Alistair Francis , Lukas Auer , Paul Walmsley , Bin Meng , Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" Some architectures want to boot Linux as plain UEFI binary. Today that really only encompasses ARM and AArch64, but going forward more architectures may adopt that model. So rename our internal API accordingly. Signed-off-by: Alexander Graf Acked-by: Leif Lindholm Reviewed-by: Alistair Francis Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Daniel Kiper --- v3 -> v4: - Rebase --- grub-core/loader/arm64/linux.c | 10 +++++----- grub-core/loader/arm64/xen_boot.c | 6 +++--- include/grub/arm/linux.h | 2 +- include/grub/arm64/linux.h | 2 +- include/grub/efi/efi.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) -- 2.12.3 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c index 7c6d8daa1..ef3e9f944 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -49,7 +49,7 @@ static grub_addr_t initrd_start; static grub_addr_t initrd_end; grub_err_t -grub_armxx_efi_linux_check_image (struct linux_armxx_kernel_header * lh) +grub_arch_efi_linux_check_image (struct linux_arch_kernel_header * lh) { if (lh->magic != GRUB_LINUX_ARMXX_MAGIC_SIGNATURE) return grub_error(GRUB_ERR_BAD_OS, "invalid magic number"); @@ -110,7 +110,7 @@ failure: } grub_err_t -grub_armxx_efi_linux_boot_image (grub_addr_t addr, grub_size_t size, char *args) +grub_arch_efi_linux_boot_image (grub_addr_t addr, grub_size_t size, char *args) { grub_efi_memory_mapped_device_path_t *mempath; grub_efi_handle_t image_handle; @@ -173,7 +173,7 @@ grub_linux_boot (void) if (finalize_params_linux () != GRUB_ERR_NONE) return grub_errno; - return (grub_armxx_efi_linux_boot_image((grub_addr_t)kernel_addr, + return (grub_arch_efi_linux_boot_image((grub_addr_t)kernel_addr, kernel_size, linux_args)); } @@ -287,7 +287,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]) { grub_file_t file = 0; - struct linux_armxx_kernel_header lh; + struct linux_arch_kernel_header lh; grub_err_t err; grub_dl_ref (my_mod); @@ -307,7 +307,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), if (grub_file_read (file, &lh, sizeof (lh)) < (long) sizeof (lh)) return grub_errno; - if (grub_armxx_efi_linux_check_image (&lh) != GRUB_ERR_NONE) + if (grub_arch_efi_linux_check_image (&lh) != GRUB_ERR_NONE) goto fail; grub_loader_unset(); diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index a742868a4..22cc25ecc 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -265,7 +265,7 @@ xen_boot (void) if (err) return err; - return grub_armxx_efi_linux_boot_image (xen_hypervisor->start, + return grub_arch_efi_linux_boot_image (xen_hypervisor->start, xen_hypervisor->size, xen_hypervisor->cmdline); } @@ -469,8 +469,8 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)), if (grub_file_read (file, &sh, sizeof (sh)) != (long) sizeof (sh)) goto fail; - if (grub_armxx_efi_linux_check_image - ((struct linux_armxx_kernel_header *) &sh) != GRUB_ERR_NONE) + if (grub_arch_efi_linux_check_image + ((struct linux_arch_kernel_header *) &sh) != GRUB_ERR_NONE) goto fail; grub_file_seek (file, 0); diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h index d0b24d474..2e98a6689 100644 --- a/include/grub/arm/linux.h +++ b/include/grub/arm/linux.h @@ -36,7 +36,7 @@ struct linux_arm_kernel_header { #if defined(__arm__) # define GRUB_LINUX_ARMXX_MAGIC_SIGNATURE GRUB_LINUX_ARM_MAGIC_SIGNATURE -# define linux_armxx_kernel_header linux_arm_kernel_header +# define linux_arch_kernel_header linux_arm_kernel_header #endif #if defined GRUB_MACHINE_UBOOT diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h index 8655067e0..4269adc6d 100644 --- a/include/grub/arm64/linux.h +++ b/include/grub/arm64/linux.h @@ -38,7 +38,7 @@ struct linux_arm64_kernel_header #if defined(__aarch64__) # define GRUB_LINUX_ARMXX_MAGIC_SIGNATURE GRUB_LINUX_ARM64_MAGIC_SIGNATURE -# define linux_armxx_kernel_header linux_arm64_kernel_header +# define linux_arch_kernel_header linux_arm64_kernel_header #endif #endif /* ! GRUB_ARM64_LINUX_HEADER */ diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h index 2c6648d46..ec44aef7e 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -94,8 +94,8 @@ extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd, void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void); grub_err_t EXPORT_FUNC(grub_efi_get_ram_base)(grub_addr_t *); #include -grub_err_t grub_armxx_efi_linux_check_image(struct linux_armxx_kernel_header *lh); -grub_err_t grub_armxx_efi_linux_boot_image(grub_addr_t addr, grub_size_t size, +grub_err_t grub_arch_efi_linux_check_image(struct linux_arch_kernel_header *lh); +grub_err_t grub_arch_efi_linux_boot_image(grub_addr_t addr, grub_size_t size, char *args); #endif