From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oJaUf-0008UD-Sm for mharc-grub-devel@gnu.org; Thu, 04 Aug 2022 09:02:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJaUL-0008PU-Jo for grub-devel@gnu.org; Thu, 04 Aug 2022 09:02:09 -0400 Received: from mail.loongson.cn ([114.242.206.163]:52560 helo=loongson.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJaUI-000885-Sb for grub-devel@gnu.org; Thu, 04 Aug 2022 09:02:09 -0400 Received: from localhost.localdomain (unknown [192.168.200.1]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9BxoM8_w+tiM+gFAA--.23817S6; Thu, 04 Aug 2022 21:02:02 +0800 (CST) From: Xiaotian Wu To: grub-devel@gnu.org Cc: git@xen0n.name, development@efficientek.com, daniel.kiper@oracle.com, Xiaotian Wu , Zhou Yang Subject: [PATCH v7 04/10] LoongArch: Add early startup code Date: Thu, 4 Aug 2022 21:01:38 +0800 Message-Id: <20220804130143.9406-5-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220804130143.9406-1-wuxiaotian@loongson.cn> References: <20220804130143.9406-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9BxoM8_w+tiM+gFAA--.23817S6 X-Coremail-Antispam: 1UD129KBjvJXoW7CF4kJFWfur43uF4UWr15urg_yoW8Xw4xpr W3urn3KF4xGFy3Krs3GrWUZF13AF4rGFnIqFy3Gws8Jr13tF10q3ZYqF1fKayxA3yIkF4j vFnIvFZrKan3AFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAICF3QvP+i+gABsW Received-SPF: pass client-ip=114.242.206.163; envelope-from=wuxiaotian@loongson.cn; helo=loongson.cn 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Thu, 04 Aug 2022 13:02:10 -0000 Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- grub-core/kern/loongarch64/efi/startup.S | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 grub-core/kern/loongarch64/efi/startup.S diff --git a/grub-core/kern/loongarch64/efi/startup.S b/grub-core/kern/loongarch64/efi/startup.S new file mode 100644 index 000000000..fc8123f8c --- /dev/null +++ b/grub-core/kern/loongarch64/efi/startup.S @@ -0,0 +1,34 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2022 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#include + + .file "startup.S" + .text + +FUNCTION(_start) + /* + * EFI_SYSTEM_TABLE and EFI_HANDLE are passed in $a1/$a0. + */ + + la $a2, EXT_C(grub_efi_image_handle) + st.d $a0, $a2, 0 + la $a2, EXT_C(grub_efi_system_table) + st.d $a1, $a2, 0 + + b EXT_C(grub_main) -- 2.35.1