Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1paQBJ-0003Mz-2m for mharc-grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paQBA-0002vn-88 for grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:12 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paQB7-0000M6-H9 for grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:11 -0500 Received: by mail-pj1-x102d.google.com with SMTP id m8-20020a17090a4d8800b002377bced051so8068108pjh.0 for ; Thu, 09 Mar 2023 16:00:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678406407; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1zemMQPRUNdaFlMJBANjS8bVSKf+xhkV0WCMI8C0+Ag=; b=Ic58hQ66mC8LfDDrZCTGRWYXU7QNuTCFBHA+IZNDHDJsP9i5SYdDF+N9/M2vPhDtJG Uke3jpIQ3xHXcf+o4hyIXb83t0sUooWG5vK42y66g5m+roDclWdaiwLhCj7n4stfEbM4 8wZQ7X+/Mp/+dVWEHPdcqSeYKUHmOLULz+28avsEjbJXA8OJWt03nkyDdyZALGDcNbHc y0aylhbjkitz+vNdrE39IgY06cRX6ghqbv99D3dqOlIX+f/I8NjDqMnOSZEa83B/3aKj ODTsIaq3FjEVqYJMBnA9bZkwpezc5IE/xZ92solxP5QXn4g08Tu1g5wRVRNxGa97EL8/ hrNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678406407; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1zemMQPRUNdaFlMJBANjS8bVSKf+xhkV0WCMI8C0+Ag=; b=yGzs1ED3+GE6U/OCZWLlzKcKRXQ/+IcXUkQ5J9+JgkliikJeePuK90RpLxUGMgH0Oy F70NA5i3/RKt4zpstfGxdsPn1o6VpOGqQAarb0CNnhfVY3HCTAUMySpetUKAgScE/d7r 8bYwNLOxn97Y/fSUtzYeVzGf3U17fx/VBBL4wd1n++h+xH5ma5h3Z6I8naJPqohupZP3 KiFXGzXrsxjpd49BFJaO9gm/z312TaOtbMDkKp7j03CmeYT7xIqS/acbOguf9py7xKrO OseE/DdrR/mWMscX1AFZMkvE0YWFX4qBJoJ0dS1h7rTwiC8vY7WgX/K/ln2eeaDSJfFt IR2A== X-Gm-Message-State: AO0yUKVw7sHqHSMB+FNfRUzwOXwyNCznU2Et9CXciNLJuYs9H+ex1+hR NTaTekh3wTeIsZJ4S4BcIYXEP0TZ+UP4QmWHVYQ= X-Google-Smtp-Source: AK7set++UlFHetKPvgMzAzddSePW23eRkfKSgV/5qekw+rddoIvXhx72BfmMq/YKsv/Y06mWY/9/rw== X-Received: by 2002:a17:903:1d2:b0:19c:d97f:5d1a with SMTP id e18-20020a17090301d200b0019cd97f5d1amr30442579plh.55.1678406406909; Thu, 09 Mar 2023 16:00:06 -0800 (PST) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id kb4-20020a170903338400b0019ee0afcc24sm193725plb.94.2023.03.09.16.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 16:00:06 -0800 (PST) From: Atish Patra To: grub-devel@gnu.org Cc: Atish Patra , Ard Biesheuvel , Daniel Kiper , Fu Wei , Leif Lindholm , Nikita Ermakov , Atish Patra , Heinrich Schuchardt , Julian Andres Klode , Ilias Apalodimas , fvogt@suse.de, mchang@suse.com, Robbie Harwood Subject: [v8 PATCH 0/3] Unify ARM64 & RISC-V Linux Loader Date: Thu, 9 Mar 2023 15:59:50 -0800 Message-Id: <20230309235953.1882811-1-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=atishp@rivosinc.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2023 00:00:12 -0000 This series unifies the linux loader for ARM64 & RISC-V. The linux loader for ARM64 is pretty much arch independent. Thus, this series just moves it to the common directory and update the make files. This series also removes the arch specific kernel image haders for ARM64, RISC-V, ARM as suggested on v6[1].I have verified with coreboot, efi platform options for ARM. I am not that well versed with ARM options. If it causes any more build failure, please scream at me again :). This series has been tested with OpenSuse image in Qemu for RISC-V. For ARM64,ARM it has been compile tested only. It would be good to get more testing on ARM64 and real RISC-V boards as well. [1] https://lists.gnu.org/archive/html/grub-devel/2022-11/msg00042.html @Daniel: I have not added your RB tag in PATCH 2 as it is changed a bit after the last round of discussion around ARM headers. Changes from v7->v8: 1. Removed the arch specific header for ARM as well. 2. Fixed ARM64 load image header with random COFF header placement. 3. Added few grub distro folks for more visibility. Sorry for spam :). Changes from v6->v7: 1. Rebased on top of the latest upstream. 2. Addressed all the comments on v6. 3. Removed arch specific image header files for ARM64 & RISC-V. Changes from v5->v6: 1. Rebased on top of Ard's latest LoadFile2 series. Changes from v4->v5: 1. Removed redundant macros from header file and updated the rv32 kernel header structure. Changes from v3->V4: 1. Added all the comments on v3. 2. Dropped LoadFile2 patches as Ard's series[1] updated those patches Atish Patra (3): loader: Move arm64 linux loader to common code efi: Remove arch specific image headers for RISC-V, ARM64, ARM RISC-V: Use common linux loader grub-core/Makefile.core.def | 8 ++-- grub-core/commands/file.c | 23 +++++++--- grub-core/loader/arm/linux.c | 3 +- grub-core/loader/arm64/xen_boot.c | 3 +- grub-core/loader/{arm64 => efi}/linux.c | 1 - grub-core/loader/riscv/linux.c | 59 ------------------------- include/grub/arm/linux.h | 20 --------- include/grub/arm64/linux.h | 48 -------------------- include/grub/efi/efi.h | 13 +++++- include/grub/riscv32/linux.h | 41 ----------------- include/grub/riscv64/linux.h | 43 ------------------ 11 files changed, 37 insertions(+), 225 deletions(-) rename grub-core/loader/{arm64 => efi}/linux.c (99%) delete mode 100644 grub-core/loader/riscv/linux.c delete mode 100644 include/grub/arm64/linux.h delete mode 100644 include/grub/riscv32/linux.h delete mode 100644 include/grub/riscv64/linux.h -- 2.25.1