From owner-freebsd-mips@FreeBSD.ORG Tue Jul 17 13:07:07 2007 Return-Path: X-Original-To: freebsd-mips@freebsd.org Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E2FC16A41F for ; Tue, 17 Jul 2007 13:07:07 +0000 (UTC) (envelope-from gonzo@univ.kiev.ua) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id 86B6313C481 for ; Tue, 17 Jul 2007 13:07:07 +0000 (UTC) (envelope-from gonzo@univ.kiev.ua) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1IAmlf-000D2p-17; Tue, 17 Jul 2007 06:07:07 -0700 Received: from [192.168.0.93] (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id l6HD6aQD082790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Jul 2007 06:06:43 -0700 (PDT) (envelope-from gonzo@univ.kiev.ua) Message-ID: <469CBEF1.7090900@univ.kiev.ua> Date: Tue, 17 Jul 2007 16:06:57 +0300 From: Oleksandr Tymoshenko User-Agent: Thunderbird 1.5.0.9 (X11/20070115) MIME-Version: 1.0 To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, recieved from customer server pbxpress.com or rt.portaone.com Cc: Subject: FreeBSD/MIPS platforms question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2007 13:07:07 -0000 Hi! I'm adding ADM5120 support to p4 repo right now and stumbled upon the routine of setting memory size/timer frequency parameters, implementations of platform_reset and other functions of platform_ family. For instance sentry5 uses CFM, malta and PMC boards utilize yamon and ADM5120 code gets these parameters as argc, argv of entry point. I think of moving all platform_XXX and mips_init routine to platform-related machdep file in platform dir, just like in -arm tree e.g. mips32/sentry5/setnty5_machdep.c mips32/adm5120/adm5120_machdep.c etc.. What's your opinion? -- gonzo From owner-freebsd-mips@FreeBSD.ORG Tue Jul 17 19:37:29 2007 Return-Path: X-Original-To: freebsd-mips@freebsd.org Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF56C16A407 for ; Tue, 17 Jul 2007 19:37:29 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id B8CC513C4A5 for ; Tue, 17 Jul 2007 19:37:29 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 439139E22; Tue, 17 Jul 2007 15:19:48 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 17 Jul 2007 15:19:48 -0400 X-Sasl-enc: 4fkPCwvOpx+7ujaIcEZeGk0ng/M6GcPowkIav6ICk92Q 1184699988 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id D132B1C671; Tue, 17 Jul 2007 15:19:47 -0400 (EDT) Message-ID: <469D1652.60608@incunabulum.net> Date: Tue, 17 Jul 2007 20:19:46 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.4 (X11/20070630) MIME-Version: 1.0 To: Oleksandr Tymoshenko References: <469CBEF1.7090900@univ.kiev.ua> In-Reply-To: <469CBEF1.7090900@univ.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: FreeBSD/MIPS platforms question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2007 19:37:30 -0000 Oleksandr Tymoshenko wrote: > Hi! I'm adding ADM5120 support to p4 repo right now and stumbled > upon the routine of setting memory size/timer frequency parameters, > implementations of platform_reset and other functions of platform_ > family. > For instance sentry5 uses CFM, malta and PMC boards utilize yamon and > ADM5120 code gets these parameters as argc, argv of entry point. > I think of moving all platform_XXX and mips_init routine to > platform-related machdep file in platform dir, just like in -arm tree > e.g. > mips32/sentry5/setnty5_machdep.c > mips32/adm5120/adm5120_machdep.c > etc.. > > What's your opinion? > Seems reasonable. Be aware of register arguments in locore being used differently by the various firmware. I think I dealt with this OK, let me know if I missed something. I sent a mail to the gxemul maintainer and he was happy to incorporate my patches for the YAMON sysreqs which real YAMON implementations implement for this stuff. CFE is a far more complete firmware than PMON and is generally more helpful to kernel hackers than PMON is. Sadly I haven't had any more free time to work on Sentry5 since April/May. I have chip docs, but still haven't quite got the PCI bus enumeration right. Cheers... BMS From owner-freebsd-mips@FreeBSD.ORG Wed Jul 18 00:07:54 2007 Return-Path: X-Original-To: freebsd-mips@freebsd.org Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C7EF16A405 for ; Wed, 18 Jul 2007 00:07:54 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34404.mail.mud.yahoo.com (web34404.mail.mud.yahoo.com [66.163.178.153]) by mx1.freebsd.org (Postfix) with SMTP id 1FCB413C481 for ; Wed, 18 Jul 2007 00:07:54 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: (qmail 12716 invoked by uid 60001); 18 Jul 2007 00:01:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=YUCVRuzh8JgeVkEeoPTY1tazAmQmMkd4M7yUxHsiB5NdsN3r/QfjVGXMPySUZHGXQNOogpz6TNTQ56FK1I+ktB9SPaPSyK2edHxrgxZ+iZBtaAJJc5Bzc2Hf7ZlRAemKU234QW9xBPmM4OnjpZkbnP5aF/PfAKGBcVWeJF17oAA=; X-YMail-OSG: j96jNdIVM1ncp6uKRQRGAppsy3f0uFIYFIVxGCUvmqM2UamN29pHoFEPJcNhyRs8o0bA.yzkpCt920pGaEgIXAsUWUb.Ekj_vVFkb687k8Dh24c.nOgbFVocIM2jyg-- Received: from [198.95.226.224] by web34404.mail.mud.yahoo.com via HTTP; Tue, 17 Jul 2007 17:01:12 PDT Date: Tue, 17 Jul 2007 17:01:12 -0700 (PDT) From: Neelkanth Natu To: Bruce M Simpson , Oleksandr Tymoshenko In-Reply-To: <469D1652.60608@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <345835.11930.qm@web34404.mail.mud.yahoo.com> Cc: freebsd-mips@freebsd.org Subject: Re: FreeBSD/MIPS platforms question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 00:07:54 -0000 --- Bruce M Simpson wrote: > Oleksandr Tymoshenko wrote: > > Hi! I'm adding ADM5120 support to p4 repo right now and stumbled > > upon the routine of setting memory size/timer frequency parameters, > > implementations of platform_reset and other functions of platform_ > > family. > > For instance sentry5 uses CFM, malta and PMC boards utilize yamon and > > ADM5120 code gets these parameters as argc, argv of entry point. > > I think of moving all platform_XXX and mips_init routine to > > platform-related machdep file in platform dir, just like in -arm tree > > e.g. > > mips32/sentry5/setnty5_machdep.c > > mips32/adm5120/adm5120_machdep.c > > etc.. > > > > What's your opinion? > > > > Seems reasonable. Be aware of register arguments in locore being used > differently by the various firmware. I think I dealt with this OK, let > me know if I missed something. I changed how this works in my tree. Instead of doing firmware specific stuff in locore.s, I call a function save_bootargs(a0,a1,a2,a3) the very first thing after the setting up the stack in locore.S. The save_bootargs() function is implemented in machdep.c and simply copies its arguments to a global array of type register_t. This way the code in mips_init() can interpret the register arguments passed by the firmware in whatever way it sees fit. It completely frees locore.S of knowing what firware booted it. The only tricky thing about this was making sure that 'register_t bootargs[4]' ended up in the data section. Otherwise it would be overwritten when we zero bss. If this is something we want to commit I can generate a patch. best Neel > > I sent a mail to the gxemul maintainer and he was happy to incorporate > my patches for the YAMON sysreqs which real YAMON implementations > implement for this stuff. > > CFE is a far more complete firmware than PMON and is generally more > helpful to kernel hackers than PMON is. > Sadly I haven't had any more free time to work on Sentry5 since > April/May. I have chip docs, but still haven't quite got the PCI bus > enumeration right. > > Cheers... > BMS > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/