Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2175708/?format=api
{ "id": 2175708, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2175708/?format=api", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.0/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20251218185252.957388-3-visitorckw@gmail.com>", "date": "2025-12-18T18:52:51", "name": "[2/3] m68k: Add support for M68040 CPU", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "82a731cea595b27d27a7c4c13711fb0d1776868c", "submitter": { "id": 87364, "url": "http://patchwork.ozlabs.org/api/1.0/people/87364/?format=api", "name": "Kuan-Wei Chiu", "email": "visitorckw@gmail.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/1.0/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251218185252.957388-3-visitorckw@gmail.com/mbox/", "series": [ { "id": 485900, "url": "http://patchwork.ozlabs.org/api/1.0/series/485900/?format=api", "date": "2025-12-18T18:52:49", "name": "m68k: Add support for QEMU virt machine", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/485900/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2175708/checks/", "tags": {}, "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=MLMMgmyE;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"MLMMgmyE\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=visitorckw@gmail.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dXKrt0Ng6z1y3k\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 19 Dec 2025 06:06:22 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 98B4D836AC;\n\tThu, 18 Dec 2025 20:05:57 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 206A6800AB; Thu, 18 Dec 2025 19:53:26 +0100 (CET)", "from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com\n [IPv6:2607:f8b0:4864:20::1033])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 960AC80050\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 19:53:23 +0100 (CET)", "by mail-pj1-x1033.google.com with SMTP id\n 98e67ed59e1d1-34c27d14559so814500a91.2\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 10:53:23 -0800 (PST)", "from visitorckw-work01.c.googlers.com.com\n (25.118.81.34.bc.googleusercontent.com. [34.81.118.25])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-34e70d65653sm3136275a91.5.2025.12.18.10.53.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 18 Dec 2025 10:53:21 -0800 (PST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1766084002; x=1766688802; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=cof2L7A0T9IQKfGjutM+veWcLy2zIiYHAXDLUj7rSm0=;\n b=MLMMgmyEHF8ZIFY7ahXwkU1036LKT8Nqd2wUkLZ/IJoWbYCLbVqLVyFUEIu2LxtFlQ\n 22VMhylhvJ8j/TWiN2OPKlcR6gtx+M67j508wWfTV21iImze0/sjqcjFM9xqNOF4M+TJ\n ivtqKXGNtoJ56IzicvbElgyEzK+PBCP/l40x9FB4z3cdIcsSaXnjtHZ7hY3B2ZpWX4Bj\n 4WY/VjU8qdXB4Zq/HapK9WUc8U+9jOYvIZtJ+K0cQE7iUcBTLVTOES4N/DseDzgey6JX\n REm3wJkl7fWwM7s9kCt3UvzYCScAZZyCtcYPWIRS6/y8lJJ4jPCg9t2K4qLJ9bvhnbZZ\n 3yIA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766084002; x=1766688802;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=cof2L7A0T9IQKfGjutM+veWcLy2zIiYHAXDLUj7rSm0=;\n b=Pw+UJaDynn/2R3mto2NgqP6lwN+kT/iKU5r3TVy3XFTTDleHqTstBCI2aY0wihr3aJ\n vJhZeEOFGSpq6qx56dz67ZkyqmtHrK39HJR/yBgK8k6mgiyl21wmGYG651qwpSW8EdqE\n Q1ZLPIXXkfn9KNYh1JekJ3Kqy7VXRHJu2Nuv0bfzOCnNTNcmZKvGQbdT4IUP09DPd3mz\n OoLDwK7M45TaJ/NHE5zkiGn2CjtHzA1pILwM4c7QxmFAVlfjKf4DUTtqxa7mAY9rwOuj\n T/WWtrPtkvIUuoUJeb9CBGEzCYCXmO+8I8JjguIEpvn6bFvjLl4N0g67BP4Z9a187+wa\n dIWg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCUAonhNwxnTQVaTKMU0IKs3qFPkiVgqpEf8ivc03kctQPG3l1eCdT0K7LkOq6aGurbYHKXYyv0=@lists.denx.de", "X-Gm-Message-State": "AOJu0Yx0DxpAsuKfwEDtV/pGnJA0i1Dzjv6hatknyFpUHB2QMFz+AJGZ\n XUd65k5QQqDSf2vzVBAxNVVoMiy6lKHBxERDN6j9DaoOUEKbwkTM7h38", "X-Gm-Gg": "AY/fxX7pSXJOhJIljatmfvBnUEQJRNeKkehWVDvn4RcW1wAuVhfDJhe5iv/WHg0E9Jd\n 6LD3+afr6zy1pK63wyJXXsRmHiIT/SDj8u0W2FS0urfFYaDASZ2cMa5C4wMpaIMV9N7c9gqRkce\n 8C29L2/0eOG147XhK5QQlug78phSsJJc5rGre162H7B4p9w1wk8HdswbXVnpmAWkK7E9tx91C5l\n zfjlcJVsZPqh3+M5BkdbdezpRF2BX3TaG1R87R0vcPDNUmEFHqRECSSm6fIV3YrClIQUo2B8cP/\n 8HPDEPIYLzNTfeRNcEkB+IKMnOVG1IMODfuJrIYs57uXiJBdmWQdX7QcY1lvSAaorDtEl07klB8\n GX6/n2vdbNGytW2OYMUpyCsUWZoCVl6x7OC8qVUI/ZBjD42RVcFbMqgoxt1APaMXQT9T6FG4qxP\n cqu4A6cXG1SA/xqpvDhTEtlFh3CAwiLCgY4T/DaQ/+05lyt4GpLn3t/A+SguLpO+V+jshPObfU9\n 5GASwoEm2u4g4Yb8cmUvQ==", "X-Google-Smtp-Source": "\n AGHT+IH4YPYJV6XEr93xv+a8zt160Bhm0WaDXi1LG7yWWVnKG3PAK2XanXkBhkRXnHlGHw3YaukLmw==", "X-Received": "by 2002:a17:90b:49:b0:340:ec8f:82d8 with SMTP id\n 98e67ed59e1d1-34e9212a245mr324830a91.12.1766084001892;\n Thu, 18 Dec 2025 10:53:21 -0800 (PST)", "From": "Kuan-Wei Chiu <visitorckw@gmail.com>", "To": "alison.wang@nxp.com,\n\tangelo@kernel-space.org", "Cc": "trini@konsulko.com, jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com,\n u-boot@lists.denx.de, Kuan-Wei Chiu <visitorckw@gmail.com>", "Subject": "[PATCH 2/3] m68k: Add support for M68040 CPU", "Date": "Thu, 18 Dec 2025 18:52:51 +0000", "Message-ID": "<20251218185252.957388-3-visitorckw@gmail.com>", "X-Mailer": "git-send-email 2.52.0.322.g1dd061c0dc-goog", "In-Reply-To": "<20251218185252.957388-1-visitorckw@gmail.com>", "References": "<20251218185252.957388-1-visitorckw@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Thu, 18 Dec 2025 20:05:51 +0100", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Add support for the Motorola 68040 architecture. Currently, m68k\nsupport in U-Boot is primarily focused on ColdFire (MCF5xxx) variants.\nIntroduce the necessary infrastructure to support the classic M680x0\nseries, specifically targeting the M68040 as emulated by QEMU.\n\nThe implementation includes exception vectors, early startup code, and\nminimal CPU initialization and relocation stubs. It also defines the\nstandard m68k boot information structure used for passing hardware\ninformation to the operating system. To ensure compatibility, ColdFire-\nspecific library objects such as cache and interrupt handling are\nexcluded from the build when M68040 is selected.\n\nAdditionally, apply a specific workaround during the early memory\nreservation stage. Use a manual loop to clear global data instead of\nthe standard memset() function, as utilizing memset() at this point was\nobserved to cause a hang on the QEMU platform.\n\nSigned-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>\n---\n arch/m68k/Kconfig | 15 ++++++\n arch/m68k/Makefile | 1 +\n arch/m68k/config.mk | 10 +++-\n arch/m68k/cpu/m68040/Makefile | 6 +++\n arch/m68k/cpu/m68040/cpu.c | 77 +++++++++++++++++++++++++++++\n arch/m68k/cpu/m68040/start.S | 83 ++++++++++++++++++++++++++++++++\n arch/m68k/cpu/m68040/u-boot.lds | 47 ++++++++++++++++++\n arch/m68k/include/asm/bootinfo.h | 31 ++++++++++++\n arch/m68k/lib/Makefile | 9 ++--\n 9 files changed, 271 insertions(+), 8 deletions(-)\n create mode 100644 arch/m68k/cpu/m68040/Makefile\n create mode 100644 arch/m68k/cpu/m68040/cpu.c\n create mode 100644 arch/m68k/cpu/m68040/start.S\n create mode 100644 arch/m68k/cpu/m68040/u-boot.lds\n create mode 100644 arch/m68k/include/asm/bootinfo.h", "diff": "diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig\nindex 8ade6f7b9d1..a41c375f6be 100644\n--- a/arch/m68k/Kconfig\n+++ b/arch/m68k/Kconfig\n@@ -56,6 +56,9 @@ config MCF5441x\n select DM_SERIAL\n \tbool\n \n+config M68040\n+ bool\n+\n # processor type\n config M5208\n \tbool\n@@ -178,6 +181,18 @@ config TARGET_STMARK2\n \n endchoice\n \n+config SYS_CPU\n+ string\n+ default \"mcf52x2\" if MCF52x2\n+ default \"mcf520x\" if MCF520x\n+ default \"mcf523x\" if MCF523x\n+ default \"mcf530x\" if MCF530x\n+ default \"mcf5301x\" if MCF5301x\n+ default \"mcf532x\" if MCF532x\n+ default \"mcf537x\" if MCF537x\n+ default \"mcf5441x\" if MCF5441x\n+ default \"m68040\" if M68040\n+\n source \"board/BuS/eb_cpu5282/Kconfig\"\n source \"board/cobra5272/Kconfig\"\n source \"board/freescale/m5208evbe/Kconfig\"\ndiff --git a/arch/m68k/Makefile b/arch/m68k/Makefile\nindex 4a7960bbeb4..8a1a7944443 100644\n--- a/arch/m68k/Makefile\n+++ b/arch/m68k/Makefile\n@@ -17,6 +17,7 @@ cpuflags-$(CONFIG_M5307)\t:= -mcpu=5307\n cpuflags-$(CONFIG_MCF5301x)\t:= -mcpu=53015 -fPIC\n cpuflags-$(CONFIG_MCF532x)\t:= -mcpu=5329 -fPIC\n cpuflags-$(CONFIG_MCF5441x)\t:= -mcpu=54418 -fPIC\n+cpuflags-$(CONFIG_M68040) := -mcpu=68040 -fno-pic\n \n PLATFORM_CPPFLAGS += $(cpuflags-y)\n \ndiff --git a/arch/m68k/config.mk b/arch/m68k/config.mk\nindex 643b7d1d35d..3f0ae51e75b 100644\n--- a/arch/m68k/config.mk\n+++ b/arch/m68k/config.mk\n@@ -3,8 +3,14 @@\n # (C) Copyright 2000-2002\n # Wolfgang Denk, DENX Software Engineering, wd@denx.de.\n \n-PLATFORM_CPPFLAGS += -D__M68K__ -fPIC\n+PLATFORM_CPPFLAGS += -D__M68K__\n+ifneq ($(CONFIG_M68040),y)\n+PLATFORM_CPPFLAGS += -fPIC\n+endif\n KBUILD_LDFLAGS += -n -pie\n PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections\n-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data\n+PLATFORM_RELFLAGS += -ffixed-d7\n+ifneq ($(CONFIG_M68040),y)\n+PLATFORM_RELFLAGS += -msep-data\n+endif\n LDFLAGS_FINAL += --gc-sections -pie\ndiff --git a/arch/m68k/cpu/m68040/Makefile b/arch/m68k/cpu/m68040/Makefile\nnew file mode 100644\nindex 00000000000..c65ae5381d0\n--- /dev/null\n+++ b/arch/m68k/cpu/m68040/Makefile\n@@ -0,0 +1,6 @@\n+# SPDX-License-Identifier: GPL-2.0+\n+#\n+# Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+\n+extra-y += start.o\n+obj-y += cpu.o\ndiff --git a/arch/m68k/cpu/m68040/cpu.c b/arch/m68k/cpu/m68040/cpu.c\nnew file mode 100644\nindex 00000000000..1b5e35d0a12\n--- /dev/null\n+++ b/arch/m68k/cpu/m68040/cpu.c\n@@ -0,0 +1,77 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * CPU specific code for QEMU M68040\n+ *\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ */\n+\n+#include <config.h>\n+#include <init.h>\n+#include <asm/global_data.h>\n+#include <linux/types.h>\n+#include <cpu_func.h>\n+#include <stdio.h>\n+\n+DECLARE_GLOBAL_DATA_PTR;\n+\n+void m68k_virt_init_reserve(ulong base)\n+{\n+\tstruct global_data *gd_ptr = (struct global_data *)base;\n+\tchar *p = (char *)gd_ptr;\n+\tunsigned int i;\n+\n+\t/* FIXME: usage of memset() here caused a hang on QEMU m68k virt. */\n+\tfor (i = 0; i < sizeof(*gd_ptr); i++)\n+\t\tp[i] = 0;\n+\n+\tgd = gd_ptr;\n+\n+\tgd->malloc_base = base + sizeof(*gd_ptr);\n+}\n+\n+int print_cpuinfo(void)\n+{\n+\tputs(\"CPU: M68040 (QEMU Virt)\\n\");\n+\treturn 0;\n+}\n+\n+int get_clocks(void)\n+{\n+\treturn 0;\n+}\n+\n+int cpu_init_r(void)\n+{\n+\treturn 0;\n+}\n+\n+/*\n+ * Relocation Stub\n+ * We skip actual relocation for this QEMU bring-up and jump directly\n+ * to board_init_r.\n+ */\n+\n+void relocate_code(ulong sp, struct global_data *new_gd, ulong relocaddr)\n+{\n+\tboard_init_r(new_gd, relocaddr);\n+}\n+\n+/* Stubs for Standard Facilities (Cache, Interrupts, Timer) */\n+\n+int disable_interrupts(void) { return 0; }\n+void enable_interrupts(void) { return; }\n+int interrupt_init(void) { return 0; }\n+\n+void icache_enable(void) {}\n+void icache_disable(void) {}\n+int icache_status(void) { return 0; }\n+void dcache_enable(void) {}\n+void dcache_disable(void) {}\n+int dcache_status(void) { return 0; }\n+void flush_cache(unsigned long start, unsigned long size) {}\n+void flush_dcache_range(unsigned long start, unsigned long stop) {}\n+\n+int timer_init(void) { return 0; }\n+unsigned long timer_read_counter(void) { return 0; }\n+ulong get_tbclk(void) { return 1000000; }\n+void __udelay(unsigned long usec) {}\ndiff --git a/arch/m68k/cpu/m68040/start.S b/arch/m68k/cpu/m68040/start.S\nnew file mode 100644\nindex 00000000000..3ede70863ad\n--- /dev/null\n+++ b/arch/m68k/cpu/m68040/start.S\n@@ -0,0 +1,83 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Startup code for QEMU m68k virt board\n+ *\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ */\n+\n+#include <config.h>\n+#include <linux/linkage.h>\n+#include <asm-offsets.h>\n+\n+.section .text\n+\n+/*\n+ * Vector Table\n+ * m68k uses the first 1KB for the exception vector table.\n+ */\n+.balign 4\n+.global _vectors\n+_vectors:\n+ .long CFG_SYS_INIT_SP_ADDR /* 0x00: Initial SP */\n+ .long _start /* 0x04: Initial PC (Reset) */\n+ .long _fault /* 0x08: Bus Error */\n+ .long _fault /* 0x0C: Address Error */\n+ .long _fault /* 0x10: Illegal Instruction */\n+ .long _fault /* 0x14: Zero Divide */\n+ .long _fault /* 0x18: CHK */\n+ .long _fault /* 0x1C: TRAPV */\n+ .long _fault /* 0x20: Privilege */\n+ .long _fault /* 0x24: Trace */\n+ .long _fault /* 0x28: Line 1010 */\n+ .long _fault /* 0x2C: Line 1111 */\n+ .fill 0x400 - (.-_vectors), 1, 0\n+\n+/*\n+ * Entry Point\n+ */\n+ENTRY(_start)\n+ /* Disable Interrupts */\n+ move.w #0x2700, %sr\n+\n+ /* Setup initial stack pointer */\n+ move.l #CFG_SYS_INIT_SP_ADDR, %sp\n+\n+ /*\n+ * Allocate Global Data (GD)\n+ * board_init_f_alloc_reserve(top) returns the new top of stack in %d0\n+ */\n+ move.l %sp, -(%sp)\n+ bsr.l board_init_f_alloc_reserve\n+ addq.l #4, %sp\n+\n+ /* Update Stack Pointer and set GD register */\n+ move.l %d0, %sp\n+ move.l %d0, %d7 /* %d7 is the gd register */\n+\n+ /* Initialize Reserved Memory. */\n+ move.l %d0, -(%sp)\n+ bsr.l m68k_virt_init_reserve\n+ addq.l #4, %sp\n+\n+ /* Enter board_init_f(0) */\n+ clr.l -(%sp)\n+ bsr.l board_init_f\n+ addq.l #4, %sp\n+\n+ /* Get relocaddr from GD */\n+ move.l GD_RELOCADDR(%d7), %d0\n+\n+ /* Push arguments */\n+ move.l %d0, -(%sp) /* Arg3: relocaddr */\n+ move.l %d7, -(%sp) /* Arg2: new_gd */\n+ move.l %sp, -(%sp) /* Arg1: sp (Current Stack Pointer) */\n+\n+ bsr.l relocate_code\n+\n+ /* Should not return */\n+hang:\n+ bra.s hang\n+ENDPROC(_start)\n+\n+_fault:\n+ bra.s _fault\ndiff --git a/arch/m68k/cpu/m68040/u-boot.lds b/arch/m68k/cpu/m68040/u-boot.lds\nnew file mode 100644\nindex 00000000000..e44ad4465e6\n--- /dev/null\n+++ b/arch/m68k/cpu/m68040/u-boot.lds\n@@ -0,0 +1,47 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Linker Script for QEMU m68k virt board\n+ *\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ */\n+\n+OUTPUT_ARCH(m68k)\n+ENTRY(_start)\n+\n+SECTIONS\n+{\n+\t. = 0x00000000;\n+\t__text_start = .;\n+\n+\t.text :\n+\t{\n+\t\tarch/m68k/cpu/m68040/start.o (.text*)\n+\t\t*(.text*)\n+\t}\n+\n+\t. = ALIGN(16);\n+\t.rodata : { *(.rodata*) }\n+\n+\t. = ALIGN(16);\n+\t.data : { *(.data*) }\n+\n+\t. = ALIGN(4);\n+\t.u_boot_list : {\n+\t\tKEEP(*(SORT(*u_boot_list*)));\n+\t}\n+\n+\t. = ALIGN(4);\n+\t__image_copy_end = .;\n+\t__init_end = .;\n+\n+\t. = ALIGN(16);\n+\t__bss_start = .;\n+\t.bss :\n+\t{\n+\t\t*(.bss*)\n+\t\t. = ALIGN(16);\n+\t}\n+\t__bss_end = .;\n+\n+\t_end = .;\n+}\ndiff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h\nnew file mode 100644\nindex 00000000000..14fbf62387b\n--- /dev/null\n+++ b/arch/m68k/include/asm/bootinfo.h\n@@ -0,0 +1,31 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ *\n+ * Definitions for the m68k bootinfo interface.\n+ */\n+\n+#ifndef _ASM_M68K_BOOTINFO_H\n+#define _ASM_M68K_BOOTINFO_H\n+\n+#ifndef __ASSEMBLY__\n+\n+struct bi_record {\n+\tunsigned short tag; /* tag ID */\n+\tunsigned short size; /* size of record (in bytes) */\n+\tunsigned long data[0]; /* data */\n+};\n+\n+#endif /* __ASSEMBLY__ */\n+\n+/* Bootinfo Tag IDs */\n+#define BI_LAST 0x0000\n+#define BI_MACHTYPE 0x0001\n+#define BI_CPUTYPE 0x0002\n+#define BI_FPUTYPE 0x0003\n+#define BI_MMUTYPE 0x0004\n+#define BI_MEMCHUNK 0x0005\n+#define BI_RAMDISK 0x0006\n+#define BI_COMMAND_LINE 0x0007\n+\n+#endif /* _ASM_M68K_BOOTINFO_H */\ndiff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile\nindex 6e1fd938f52..d6a1b3546c1 100644\n--- a/arch/m68k/lib/Makefile\n+++ b/arch/m68k/lib/Makefile\n@@ -7,10 +7,7 @@\n ## if the user asked for it\n lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o ashrdi3.o\n \n-obj-y\t+= bdinfo.o\n obj-$(CONFIG_CMD_BOOTM) += bootm.o\n-obj-y\t+= cache.o\n-obj-y\t+= interrupts.o\n-obj-y\t+= time.o\n-obj-y\t+= traps.o\n-obj-y += fec.o\n+ifndef CONFIG_M68040\n+obj-y += cache.o interrupts.o time.o traps.o bdinfo.o fec.o\n+endif\n", "prefixes": [ "2/3" ] }