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/