From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kXrQD-00035q-0F for mharc-grub-devel@gnu.org; Wed, 28 Oct 2020 15:47:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXrQA-00033s-Uj for Grub-devel@gnu.org; Wed, 28 Oct 2020 15:47:46 -0400 Received: from shcp25.hosting.zen.net.uk ([82.71.204.30]:60382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXrQ9-0003Z6-5U for Grub-devel@gnu.org; Wed, 28 Oct 2020 15:47:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=monkeyircd.org; s=default; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:Reply-To:From:Subject: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YTuGS40TbnFTKoeG6oIi1PRAyfUcU/x3MYWqy+Hdd7w=; b=i4d2ieWb49wMmwSjnFHKpr4c+y 4ZJV/tzy2h65TFb76ymKK41KXPgKs1jbjpu4XnjGGmSELA0cbEVtjOcDVyrkHV1yu1zDDE48L2llI DXFOfkNsyaMeSm4ybTFi0ufmKKziQw9tEUF5hZAjRMUAtmjznvCKYF84Dlti9+OsRCC0JlX7KzLhT kDtO04EA6ma53QjT9pLMIP3KvjIRDkNjgUrJcGsFiwMKMLs7FAWZHYamWQKAAADnhJYco9Uw1b5H/ N+q7wWT1GJtfFyDDs5ZLYdE5wEj1plN+RyELfD6checYpCJcEyoc0R+0sUjood4dahSBrAslg1bL7 cutv47YQ==; Received: from [82.69.123.44] (port=45066 helo=zoidberg.local.monkeyircd.org) by shcp25.hosting.zen.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kXrQ7-002i9C-S3; Wed, 28 Oct 2020 19:47:44 +0000 Message-ID: <213d168501884ef51d2ec5dbbe0075e2bb4982cc.camel@monkeyircd.org> Subject: [PATCH 01/05] Enable multiboot2 support on arm64-efi target From: Chris Plant Reply-To: chris@monkeyircd.org To: Grub-devel@gnu.org Cc: chris@monkeyircd.org Date: Wed, 28 Oct 2020 19:47:43 +0000 In-Reply-To: <4b23bf36d0a833ff038709ae7c443647976dcd8c.camel@monkeyircd.org> References: <4b23bf36d0a833ff038709ae7c443647976dcd8c.camel@monkeyircd.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - shcp25.hosting.zen.net.uk X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - monkeyircd.org X-Get-Message-Sender-Via: shcp25.hosting.zen.net.uk: authenticated_id: chris@monkeyircd.org X-Authenticated-Sender: shcp25.hosting.zen.net.uk: chris@monkeyircd.org Received-SPF: pass client-ip=82.71.204.30; envelope-from=chris@monkeyircd.org; helo=shcp25.hosting.zen.net.uk X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/28 15:45:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 19:47:47 -0000 Define MULTIBOOT2_ARCHITECTURE_AARCH64 to support AARCH64 architecture + Define MULTIBOOT2_TAG_TYPE_ELF64_SECTIONS and struct multiboot_tag_elf64_sections as a version of elf_sections which correctly aligns the elf section headers to a 64 bit boundary Signed-off-by: Chris Plant --- include/multiboot2.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/multiboot2.h b/include/multiboot2.h index 5693923c0..e5071f6f6 100644 --- a/include/multiboot2.h +++ b/include/multiboot2.h @@ -63,6 +63,7 @@ #define MULTIBOOT_TAG_TYPE_EFI32_IH 19 #define MULTIBOOT_TAG_TYPE_EFI64_IH 20 #define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR 21 +#define MULTIBOOT_TAG_TYPE_ELF64_SECTIONS 22 #define MULTIBOOT_HEADER_TAG_END 0 #define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST 1 @@ -77,6 +78,7 @@ #define MULTIBOOT2_ARCHITECTURE_I386 0 #define MULTIBOOT2_ARCHITECTURE_MIPS32 4 +#define MULTIBOOT2_ARCHITECTURE_AARCH64 8 #define MULTIBOOT_HEADER_TAG_OPTIONAL 1 #define MULTIBOOT_LOAD_PREFERENCE_NONE 0 @@ -321,6 +323,18 @@ struct multiboot_tag_elf_sections char sections[0]; }; +struct multiboot_tag_elf64_sections +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + multiboot_uint32_t num; + multiboot_uint32_t entsize; + multiboot_uint32_t shndx; + multiboot_uint32_t reserved; + char sections[0]; +}; + + struct multiboot_tag_apm { multiboot_uint32_t type; -- 2.28.0