From owner-freebsd-arm@FreeBSD.ORG Tue Nov 25 21:30:07 2008 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE47F1065674 for ; Tue, 25 Nov 2008 21:30:07 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id 98E8E8FC0C for ; Tue, 25 Nov 2008 21:30:07 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id mAPKxw9Y026739; Tue, 25 Nov 2008 13:59:59 -0700 Received: from apn-77-112-253-159.gprs.plus.pl (apn-77-112-253-159.gprs.plus.pl [77.112.253.159]) by mail.semihalf.com (Postfix) with ESMTP id AA15A14857; Tue, 25 Nov 2008 22:15:45 +0100 (CET) Message-Id: <04BDAB4F-CF02-4CE6-90D8-E03EDC1CC8CC@semihalf.com> From: =?ISO-8859-2?Q?Rafa=B3_Jaworowski?= To: "M.Warner Losh" In-Reply-To: <20081125.104452.535842403.imp@bsdimp.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 25 Nov 2008 21:59:28 +0100 References: <20081125.104452.535842403.imp@bsdimp.com> X-Mailer: Apple Mail (2.929.2) Cc: arm@FreeBSD.org Subject: Re: Code review request: boards on AT91 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 21:30:07 -0000 On 2008-11-25, at 18:44, M. Warner Losh wrote: > I'm trying a little experiment. I'm moving the board support for the > different sets of boards we support to their own file. This is the > first step in moving to supporting multiple boards more easily. > There's a number of gross hacks to make this work now in at91 land, > and I'd like to clean them up. The mv port is much cleaner, but we > still likely need some way to identify boards and get the right board > support code called. In Linux land, all ARM boot loaders are expected > to pass in a machine type, which is used to do the multiplexing. > Something similar in FreeBSD would be useful (and not just for ARM). Hi Warner, While I understand your point about systems with simplistic bootloaders, which cannot provide enough config data to kernel, we should not see the machine ID model as a final solution for more capable environments. I guess we all agree that for those more capable systems we need some really extensible mechanism (device tree type), as discussed previously :-) > If anybody wants me to write up where I'm going with this, or answer > any question, please feel free to ask. Also, comments would be nice. I was dreaming once about all-generic initarm() that would have KOBJ- based dispatcher, but am not sure this wouldn't cause some chicken-and- egg issues as some parts of the infrastructure might not be available at such early stages, but didn't investigate this too close, any thoughts? But anyways, even a simple scheme with common logic and function ptrs, which each platform variation would implement their own routines (or use generic), would improve the ARM init code significantly. Rafal