From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B905F3398A for ; Sun, 5 Jan 2025 07:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736061300; cv=none; b=OkhvF1/QYww0V1Ji5DSu3V4d+NAKfIntY1iA5msJDVvXqFLCvMdLfehdISBMzryYd1407tFenXDhMYQbzHeRwG1KsTT3pObizyGGgcFE98uQdwoc2G/d2Mm6PLCeT7EIMnWzSCllmFMRbw6KUSGRylodEZ6t4BEjBmlE974ijGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736061300; c=relaxed/simple; bh=mtXvMVwNI5RTcPWx9YRrRRyl1ar3NOHKGMcmnxAAfKI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KX3h3uqg+M93AZFaK3fmRXi+BQOpQyCAlFiAf/rj9+9ClnyoC+qn6qwjLO+/y7UgKYl9AzgW8WMdLdC6jQqEk2dkrGGIk254kjrlsexqrsJfk9H0mFLbck8L55V4NGzBgLzP6d0mtF+TKo+jJuS8yO0lkHQSmDisFRMqRUr6Nvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0x0f.com; spf=pass smtp.mailfrom=0x0f.com; dkim=pass (1024-bit key) header.d=0x0f.com header.i=@0x0f.com header.b=PgsYmdYt; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0x0f.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0x0f.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=0x0f.com header.i=@0x0f.com header.b="PgsYmdYt" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2164b662090so166647505ad.1 for ; Sat, 04 Jan 2025 23:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; t=1736061298; x=1736666098; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9TP/RC1+W7op7tLb9boh41q09LHWGrqC5AT8VNbl2SE=; b=PgsYmdYtRXYlDHcRrRu6vhosoB64gP+SdcwSpQujPMpVsOt9S3IpzN6wtUPH+Hr4V7 fY6i8icIbor7i92CUadwWbgWQv37w9sg7KHHtx46wJYcFAR/dqH2iNbnTmG4QS6Nd+Hs XdNyl+gHiCHgb269DWJOmjpDi/Wq8B+Fzt5Es= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736061298; x=1736666098; 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=9TP/RC1+W7op7tLb9boh41q09LHWGrqC5AT8VNbl2SE=; b=ogRTaRxceA1Gtw8/DSVa3WkvALCo5FxkubFOTPdkGCTRQ8MNlrBFjpST0DA1pon0/f EAmZLpe82ncmhbPwFTaXksywoFdptvFOHEDmg5ATQmPqWrzeV28VE41ljbaxXdrtCvi4 SRN4ofYBBQghEizOyZczjDMPrDTAW74qdo8LGuxnJOPG5jce0Cbc1hG/eAlys/QcMOy5 2OqkWCy/NP7LDZF6LTjWRWfGxPG0nNXqfDR3aLVa1lh0HsrriFMLQYTVixc0SdzH5JbY amxpo37/KhSE8LLgape4lfa1YOXqX5B9OOQrNeZR/cNX/3iVYnmdjzl9r//sevRlBOe2 bwqA== X-Gm-Message-State: AOJu0YwX3LRMQFfrT763PkLzCO99DZVrCjUylJ/A7FPA9ETNgDv+aWcU UmH8gyknnv7ZT8AsT+t3zr39GhG0bjhAFYa7LsnjoDFhzg9e6mectoM+Srq19PfLUhRRPQQ+o1y A X-Gm-Gg: ASbGncsVNa0O29FNlfuJjc9NRthCElgr21NHxGqEUwy2D9NkTwbt+0XRk5fdoPob/2D 0IiwfwwhKl1lbFdhP7iGN5yJus2G/dFqhQPO1bdxRwfRka6WUQh+GaX8iMlABtresU3wfosXr8r n0XStYaLeDeMF6Tyxw8aIVEkilN4Pd1IoWT2AuOS841BVKqDSJnnz/GBftYdD58ffqB53lSzLoB 0uekz483WrhYX0BUWGXFztUK+5erK4VlQMJJOMc6gNNburbckYtoMTRsUtr1mMznxWH X-Google-Smtp-Source: AGHT+IENsXvhSOkS/QMbySg181yJ5uh/Yt/RGgynZvVEQoc9I7ZJHIIlUGh4nluzeOlxiWDdcIxobw== X-Received: by 2002:a17:903:2449:b0:216:50fb:5dfc with SMTP id d9443c01a7336-219e6e8c3admr825594315ad.9.1736061297878; Sat, 04 Jan 2025 23:14:57 -0800 (PST) Received: from shiro.work.home.arpa. ([2400:4162:2428:2ffe:e94c:e5d:106e:3582]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-219dc9cdef7sm270007125ad.133.2025.01.04.23.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 23:14:57 -0800 (PST) From: Daniel Palmer To: geert@linux-m68k.org, fthain@linux-m68k.org, linux-m68k@lists.linux-m68k.org Cc: linux-kernel@vger.kernel.org, Daniel Palmer Subject: [RFC PATCH 0/3] m68k goes DT Date: Sun, 5 Jan 2025 16:14:30 +0900 Message-ID: <20250105071433.3943289-1-daniel@0x0f.com> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Short version: I want to start converting m68k (including nommu) to use DT for booting so I can add few cool boards I have (e.g. dual 040/060 VME board..). I need ideas, help etc. Maybe if someone converted an m68k machine they are using to DT alongside me this would have some hope of actually happening? All of my WIP in-progress very messy code etc is here: https://github.com/fifteenhex/m68kjunk Longer version: As of today I have: - Modern (2024.07) u-boot fork that works on 000/030/040 real hardware/QEMU that supports booting a Linux ELF image. For nommu a FDT blob address is passed via a regiser, for mmu the normal bootinfo is created and the FDT is passed via a bootinfo tag. nommu never used bootinfo and doesn't need to. - A Linux branch for nommu that removes most of the current DragonBall code, makes it into a devicetree based machine and adds a bunch of drivers etc. This works in a fork of QEMU I have and on the real hardware. The DragonBall even has a working 1bpp framebuffer. The nommu branch also works on 010 and better. - A Linux branch for mmu that uses the crappy patches in this series and some other bits to start moving the MVME147 board over to using DT. - A buildroot fork that can build a 000 nommu userland etc. A patch to add support for building for 030 is already in buildroot, I plan to send one for 060 later. - A bunch of DragonBall machines, an MVME147 030 machine, an Eltec E27 dual socket VME board with one 040 at the moment but I have 060s to go in it once I work out the need jumper changes, some other 060 VME boards, Amigas... What I'm thinking: - We initially add passing of an FDT via bootinfo for mmu - Add support for a generic machine that can boot almost anything so I can bring up my new (to Linux) machines. - I will migrate MVME147 to device tree. - Some like minded person migrates a machine they have to device tree. :) - Maybe embed a FDT for machines that'll never get a bootloader that supports this and use the machine type to select the embedded FDT and move all of that stuff over without needing to mess with bootloaders. Issues I have: - The head.S code is real confusing, I'm not sure how I make this support a generic machine right now. - The head.S code sometimes gets stuck setting up the mmu on my MVME147 when the kernel binary layout changes. I thought for a long time my new code was wrong but then discovered just making the kernel bigger by adding some printk()s also caused it. Sorry for the wall of text. Cheers, Daniel Daniel Palmer (3): m68k: bootinfo: Add tag for FDT address m68k: bootinfo: Add generic machine type m68k: Add dt support (proof of concept) arch/m68k/Kconfig | 2 + arch/m68k/include/uapi/asm/bootinfo.h | 4 ++ arch/m68k/kernel/setup_mm.c | 63 ++++++++++++++++++++++++++- 3 files changed, 68 insertions(+), 1 deletion(-) -- 2.45.2