From owner-freebsd-mips@FreeBSD.ORG Tue Jun 8 10:52:04 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 624AC16A4D0; Tue, 8 Jun 2004 10:52:04 +0000 (GMT) Date: Tue, 8 Jun 2004 00:52:04 -1000 From: juli mallett To: freebsd-mips@FreeBSD.org Message-ID: <20040608105204.GA58638@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. Subject: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 10:52:04 -0000 Heyo folks, I had a quantity of free time dumped on me late last week, and I've gotten back up to speed on MIPS stuff. I've done basic interrupting working (clock interrupts), and I'm working out detailf of threads. Namely I have to figure out how to keep the status register consistent. I also only tonight *got* the difference between the different parts of a context switch... The kernel thread, and the userland thread. For me, the former is associated with a PCB, the latter with a trapframe. This may not be correct, but it's a convenient enough way of looking at it to make some progress. Some strange stuff with callouts, perhaps. I've seen many context switches happen now, it's kind of neat. What's really helped me make progress is the excellent mips64emul emulator. It's pretty cool, and in very early stages of development. But it's enough to cut some of the overhead of rebooting a real Indigo2, etc. It's also representative of someone who took the time to understand the hardware interfaces enough to implement something to pretend to be them, and this can be very nice to read and look at to understand how stuff works, if you just can't wrap your brain around why someone used 1-space indents and seeems to have rot13'd all the function names as to make it wholly impossible to make sense of... And I won't even talk about the Sprite-derived code! I made a port of mips64emul, ports/emulators/mips64emul. I didn't do x11 support because I didn't want to get into too much of the messy parts of ports, but patches are welcome, and I'll probably get around to it some day. Here's a um, textshot of a MIPS kernel booting in mips64emul... Note that in testing without setting to use 128 megs of ram, spooky stuff happened, so all I can vouch for is that. That's the -M 128... The -q turns off some of the very heavy debugging output (it means quiet), and the -G 22 means to emulate an SGI, more specifically, an IP-22. Other interesting options are -C to emulate a specific CPU, -N to watch instruction interpretation speed/progress, and -s to get a nice summary of instruction use at the end of execution. %%% (juli@oingo:~)3% mips64emul -M 128 -qG 22 mips.build/sgimips/usr/people/juli/p4/mips/sys/INDY/kernel IOC rev 1, machine Indy (Guiness), board rev 3 [ sgi_ip22: unimplemented write to address 0x20, data=0x00 ] [ sgi_ip22: unimplemented write to address 0x4, data=0x00 ] [ sgi_ip22: unimplemented write to address 0xc, data=0x00 ] [ sgi_ip22: unimplemented write to address 0x14, data=0x00 ] [ sgi_ip22: unimplemented write to address 0x18, data=0x00 ] Timer calibration, got 40000 cycles (40000, 40000, 40000) CPU clock speed = 8.00Mhz SGI-IP22 (IP22), subtype 18, board rev. 3 at 3MHz ARCS MEM 0x1000000 -> 0x8000000 Kernel page table maps 28672 4K pages and is 224K Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2-CURRENT #63: Mon Jun 7 23:56:06 HST 2004 juli@oingo:/usr/people/juli/mips.build/sgimips/usr/people/juli/p4/mips/sys/INDY WARNING: WITNESS option enabled, expect reduced performance. elf_cpu_load_file unimplemented at /usr/people/juli/p4/mips/sys/mips/mips/elf_machdep.c:37, returning error. MIPS R4000 CPU (0x400) Rev. 0.0 with MIPS R4010 FPC Rev. 0.0 cpu0: 32KB/32B direct-mapped L1 Instruction cache, 48 TLB entries cpu0: 32KB/32B direct-mapped write-back L1 Data cache machine: SGI-IP22 ARCS memory = 0 (0 KB) Loaded program memory = 0 (0 KB) avail memory = 117440512 (112 MB) real memory = 117440512 (112 MB) null: random: imc0 imc0: revision 3, EISA present [ sgi_ip22_memctl: unimplemented write to address 0xec, data=0x00000000 ] [ sgi_ip22_memctl: unimplemented write to address 0xfc, data=0x00000000 ] [ sgi_ip22_memctl: unimplemented read from address 0xc, data=0x00000000 ] [ sgi_ip22_memctl: unimplemented write to address 0xc, data=0x00000000 ] [ sgi_ip22_memctl: unimplemented read from address 0x84, data=0x00000000 ] [ sgi_ip22_memctl: unimplemented write to address 0x84, data=0x00000000 ] procfs registered Timecounter "SGI IP22" frequency 8000000 Hz quality 1000 Timecounters tick every 10.000 msec warning: cpu0 exception while EXL is set, not setting EPC! Fatal trap type 13 in kernel mode: (Tr) Trap program counter = 0xc000000002221658 return address = 0xc000000002221658 bad virtual address = 0 cause = 0x34 status = 0x20008083 current thread = 0xffffffffa8216638 current process = 0 (swapper) Stopped at 0xc000000002221658: invalid address. db> ps pid proc uarea uid ppid pgrp flag stat wmesg wchan cmd 17 ffffffffa796d2d0 c000000005cab000 0 0 0 0000204 [IWAIT] swi6:+ 16 ffffffffa796d5a0 c000000005cac000 0 0 0 0000204 [IWAIT] swi7: task queue 15 ffffffffa796d870 c000000005cbf000 0 0 0 0000204 [IWAIT] swi5:+ 5 ffffffffa796db40 c000000005cc0000 0 0 0 0000204 [SLPQ - 0xffffffffa1055200][SLP] taskqueue 14 ffffffffa7955000 c000000005cc1000 0 0 0 0000204 [SLPQ - 0xffffffffa823ba80][SLP] yarrow 4 ffffffffa79552d0 c000000005cc2000 0 0 0 0000204 [SLPQ - 0xffffffffa8215940][SLP] g_down 3 ffffffffa79555a0 c000000005cc3000 0 0 0 0000204 [SLPQ - 0xffffffffa8215938][SLP] g_up 2 ffffffffa7965000 c000000005c81000 0 0 0 0000204 [SLPQ - 0xffffffffa8215928][SLP] g_event 13 ffffffffa79652d0 c000000005ca6000 0 0 0 0000204 [IWAIT] swi4: vm 12 ffffffffa79655a0 c000000005ca7000 0 0 0 000020c [LOCK Giant ffffffffa1054200] swi8: clock 11 ffffffffa7965870 c000000005ca8000 0 0 0 0000204 [IWAIT] swi1: net 10 ffffffffa7965b40 c000000005ca9000 0 0 0 000020c [Can run] idle 1 ffffffffa796d000 c000000005caa000 0 0 0 0000200 [INACTIVE] swapper 0 ffffffffa8216368 ffffffffa82348c8 0 0 0 0000200 [CPU 0] swapper db> %%% My goal is to fix whatever's breaking now, and implement bus resource stuff and more interrupt stuff, then once I have some interesting devices working, I'll move on with making all the threading and VM stuff just right. Or, y'know, I might get distracted by a shiny thing and start working on something random! As always, questions, no matter how dumb you may think they are (such as asking why the formatting of addresses is the ps output sucks so hard) are encouraged. Thanx, juli. PS: I haven't forgotten about setting up a SUP server or something... But I'm not sure if I should actually make it a prioritity to set up, as it's going to mean using my home bandwidth, etc... How much interest is there actually? If you're interested in having access to the source, toss me an email. FreeBSD developers, I'll walk you through getting P4 going. -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Wed Jun 9 14:19:37 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03C4D16A4CE for ; Wed, 9 Jun 2004 14:19:37 +0000 (GMT) Received: from mbox2.netikka.net (mbox2.netikka.net [213.250.81.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF79843D58 for ; Wed, 9 Jun 2004 14:19:36 +0000 (GMT) (envelope-from markus.niemisto@iki.fi) Received: from petuh.dielocalwarez.com (fl40.netikka.fi [81.209.127.40]) by mbox2.netikka.net (Postfix) with SMTP id DD7A635C089 for ; Wed, 9 Jun 2004 17:19:25 +0300 (EEST) Date: Wed, 9 Jun 2004 17:19:23 +0300 From: Markus =?ISO-8859-1?Q?Niemist=F6?= To: freebsd-mips@freebsd.org Message-Id: <20040609171923.69932ccd.markus.niemisto@iki.fi> Organization: -=Die LocalWarez=- X-Mailer: Sylpheed version 0.9.11 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 14:19:37 -0000 Hi Juli! I've been reading this quite quiet list for a while, becouse I plan to buy a MIPS machine next year and I'd really like to see my favourite OS running on it. I'd like to help with the porting, tough I know nothing about MIPS internals and I won't have that much time. I'd appreciate if you could give me some pointers where to get some info. NetBSD would probably be useful. Any way, I could look at the source every now and then if you get the SUP server running. Keep up the good work! Markus PS Please CC me, I am not on the list. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 08:48:24 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3228F16A4CE for ; Thu, 10 Jun 2004 08:48:24 +0000 (GMT) Received: from servww6.ww.uni-erlangen.de (servww6.ww.uni-erlangen.de [131.188.238.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 970AD43D1F for ; Thu, 10 Jun 2004 08:48:22 +0000 (GMT) (envelope-from ardelean@ww.uni-erlangen.de) Received: from localhost (ardelean@localhost)ESMTP id i5A8lkh02987 for ; Thu, 10 Jun 2004 10:47:46 +0200 Date: Thu, 10 Jun 2004 10:47:46 +0200 (CEST) From: Gheorghe Ardelean To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 08:48:24 -0000 Hi Juli! I am reading this list from time to time, as I am also looking in p4-projects archive to see how the project goes on. I have at home an Indigo2 R10k (IP28) and I like to see one day my favorite OS running on it. Unfortunately at this time I can't do much for this. I can do tests and I can help with web page changes for the project (if this is needed). Keep up the good work! Johny. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 09:07:12 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id A00E116A4D0; Thu, 10 Jun 2004 09:07:12 +0000 (GMT) Date: Wed, 9 Jun 2004 23:07:12 -1000 From: juli mallett To: Gheorghe Ardelean Message-ID: <20040610090712.GA71925@FreeBSD.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. cc: freebsd-mips@freebsd.org Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 09:07:12 -0000 Hi! * Gheorghe Ardelean [ Date: 2004-06-09 ] [ w.r.t. Re: Some MIPS status goodies. ] > I have at home an Indigo2 R10k (IP28) and I like to see one day my > favorite OS running on it. R10K and IP28 support are probably a ways away, but I'm interested in supporting these systems and more. Right now it's easiest to start with the, much simpler, R4400 Indigo2 I have here, and get a good base of this stuff, then move into supporting the more modern and complex CPUs and machines - but be assured I am taking them into account! > Unfortunately at this time I can't do much for this. I can do tests and I > can help with web page changes for the project (if this is needed). That's fine. When I have something for you to test you will know, and you can definitely be helpful in testing, at that point. I have an Octane here which will help me with R10K/R12K stuff! > Keep up the good work! Thanx much, I appreciate it greatly! juli. -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 09:58:47 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D69E616A4CE for ; Thu, 10 Jun 2004 09:58:47 +0000 (GMT) Received: from useful.dataloss.nl (useful.dataloss.nl [80.84.249.161]) by mx1.FreeBSD.org (Postfix) with SMTP id 92A5D43D46 for ; Thu, 10 Jun 2004 09:58:44 +0000 (GMT) (envelope-from boelaars@graphicscave.com) Received: (qmail 42144 invoked from network); 10 Jun 2004 09:58:31 -0000 Received: from useful.dataloss.nl (HELO webmail.dataloss.nl) (webmail@80.84.249.161) by useful.dataloss.nl with SMTP; 10 Jun 2004 09:58:31 -0000 Received: from 217.68.50.10 (proxying for 172.23.100.15) (SquirrelMail authenticated user whiter) by webmail.dataloss.nl with HTTP; Thu, 10 Jun 2004 11:58:31 +0200 (CEST) Message-ID: <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> In-Reply-To: <20040610090712.GA71925@FreeBSD.org> References: <20040610090712.GA71925@FreeBSD.org> Date: Thu, 10 Jun 2004 11:58:31 +0200 (CEST) From: "Steffen M. Boelaars" To: freebsd-mips@freebsd.org User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: boelaars@graphicscave.com List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 09:58:47 -0000 Hey there, I'm on this list for a while and nice to see some activity. I have a shitload of SGI gear ranging from IP7 (Personal Iris 4D/35) to IP30 (Octane r12k) and about everything inbetween (Indy's, Indigo's, Indigo2's, Onyx, Power Series, Origin). I would love to help out here but got no idea where to start. cheers, Steffen > Hi! > > * Gheorghe Ardelean [ Date: 2004-06-09 ] > [ w.r.t. Re: Some MIPS status goodies. ] >> I have at home an Indigo2 R10k (IP28) and I like to see one day my >> favorite OS running on it. > > R10K and IP28 support are probably a ways away, but I'm interested > in supporting these systems and more. Right now it's easiest to start > with the, much simpler, R4400 Indigo2 I have here, and get a good base > of this stuff, then move into supporting the more modern and complex > CPUs and machines - but be assured I am taking them into account! > >> Unfortunately at this time I can't do much for this. I can do tests and >> I >> can help with web page changes for the project (if this is needed). > > That's fine. When I have something for you to test you will know, and > you can definitely be helpful in testing, at that point. I have an > Octane here which will help me with R10K/R12K stuff! > >> Keep up the good work! > > Thanx much, I appreciate it greatly! > juli. > -- > juli mallett. jmallett@freebsd.org. adrift in the pacific. > _______________________________________________ > 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" > From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 10:18:01 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id EC41C16A4D1; Thu, 10 Jun 2004 10:18:01 +0000 (GMT) Date: Thu, 10 Jun 2004 00:18:01 -1000 From: juli mallett To: "Steffen M. Boelaars" Message-ID: <20040610101801.GA75709@FreeBSD.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. cc: freebsd-mips@freebsd.org Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 10:18:02 -0000 Hi Steffen, Well, it depends on what you mean by help. If you need pointers to grokking the guts of MIPS, I'm more than willing to help point you in the right direction and help you understand whatever you need there. If you're past that and need help understanding FreeBSD, again, I'm willing to help try to point you in the right direction. If you're already there in terms of understanding this stuff, then you've got me beat, and I'm very excited. :) If you want to start lending a hand immediately... I would love to talk to you (with attachments and examples and URLs, hehe) about some problems I'm finding myself running into, and we can go from there. Right now I gotta say that Elf64-requiring systems are out. I can't get the toolchain to behave enough. Once I can get loader going, I can probably deal with the pain a lot more easily, because we can just default to Elf64 and make Elf32 a second-class citizen. IP22s are well on the track to being... Interesting. Thanx, juli. * "Steffen M. Boelaars" [ Date: 2004-06-09 ] [ w.r.t. Re: Some MIPS status goodies. ] > Hey there, > > I'm on this list for a while and nice to see some activity. I have a > shitload of SGI gear ranging from IP7 (Personal Iris 4D/35) to IP30 > (Octane r12k) and about everything inbetween (Indy's, Indigo's, Indigo2's, > Onyx, Power Series, Origin). I would love to help out here but got no idea > where to start. > > cheers, > > Steffen > > > > Hi! > > > > * Gheorghe Ardelean [ Date: 2004-06-09 ] > > [ w.r.t. Re: Some MIPS status goodies. ] > >> I have at home an Indigo2 R10k (IP28) and I like to see one day my > >> favorite OS running on it. > > > > R10K and IP28 support are probably a ways away, but I'm interested > > in supporting these systems and more. Right now it's easiest to start > > with the, much simpler, R4400 Indigo2 I have here, and get a good base > > of this stuff, then move into supporting the more modern and complex > > CPUs and machines - but be assured I am taking them into account! > > > >> Unfortunately at this time I can't do much for this. I can do tests and > >> I > >> can help with web page changes for the project (if this is needed). > > > > That's fine. When I have something for you to test you will know, and > > you can definitely be helpful in testing, at that point. I have an > > Octane here which will help me with R10K/R12K stuff! > > > >> Keep up the good work! > > > > Thanx much, I appreciate it greatly! > > juli. > > -- > > juli mallett. jmallett@freebsd.org. adrift in the pacific. > > _______________________________________________ > > 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" > > > > _______________________________________________ > 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" -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 12:37:31 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 602BD16A4CE; Thu, 10 Jun 2004 12:37:31 +0000 (GMT) Received: from mail.linux-mips.net (p508B6474.dip.t-dialin.net [80.139.100.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8100443D41; Thu, 10 Jun 2004 12:37:27 +0000 (GMT) (envelope-from ralf@linux-mips.org) Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.11/8.12.8) with ESMTP id i5ACbMB2001766; Thu, 10 Jun 2004 14:37:22 +0200 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.11/8.12.11/Submit) id i5ACbIb6001759; Thu, 10 Jun 2004 14:37:18 +0200 Date: Thu, 10 Jun 2004 14:37:18 +0200 From: Ralf Baechle To: juli mallett Message-ID: <20040610123718.GA32315@linux-mips.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> <20040610101801.GA75709@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610101801.GA75709@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: freebsd-mips@FreeBSD.org cc: "Steffen M. Boelaars" Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 12:37:31 -0000 On Thu, Jun 10, 2004 at 12:18:01AM -1000, juli mallett wrote: > Right now I gotta say that Elf64-requiring systems are out. I can't > get the toolchain to behave enough. Once I can get loader going, I > can probably deal with the pain a lot more easily, because we can > just default to Elf64 and make Elf32 a second-class citizen. 64-bit ELF requires very recent GNU tools and even in those it cannot be considered of prime quality. 64-bit code is so much larger that it often delivers just half the performance of 32-bit code. Ralf From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 16:02:59 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A94AE16A4CE; Thu, 10 Jun 2004 16:02:59 +0000 (GMT) Received: from mail.linux-mips.net (p508B6474.dip.t-dialin.net [80.139.100.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09EFF43D1F; Thu, 10 Jun 2004 16:02:58 +0000 (GMT) (envelope-from ralf@linux-mips.org) Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.11/8.12.8) with ESMTP id i5AG28nP005813; Thu, 10 Jun 2004 18:02:08 +0200 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.11/8.12.11/Submit) id i5AG27Sa005811; Thu, 10 Jun 2004 18:02:07 +0200 Date: Thu, 10 Jun 2004 18:02:07 +0200 From: Ralf Baechle To: juli mallett Message-ID: <20040610160207.GB32315@linux-mips.org> References: <20040610090712.GA71925@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610090712.GA71925@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: Gheorghe Ardelean cc: freebsd-mips@FreeBSD.org Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 16:02:59 -0000 On Wed, Jun 09, 2004 at 11:07:12PM -1000, juli mallett wrote: > R10K and IP28 support are probably a ways away, but I'm interested > in supporting these systems and more. Right now it's easiest to start > with the, much simpler, R4400 Indigo2 I have here, and get a good base > of this stuff, then move into supporting the more modern and complex > CPUs and machines - but be assured I am taking them into account! R10000 in non-coherent systems (Indigo 2 R10000, O2) is a rather hard to use processor due to unwanted behaviour of speculative execution that leads to memory corruption. The workarounds are fairly complex; efficient solutions involve compiler modifications. That said, the R10000's is resolving all hazards in hardware and does almost the entire coherency in software so in a saner system such as the Origin it's a breeze. Ralf From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 22:14:30 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 8C72C16A4D0; Thu, 10 Jun 2004 22:14:30 +0000 (GMT) Date: Thu, 10 Jun 2004 12:14:30 -1000 From: juli mallett To: Ralf Baechle Message-ID: <20040610221430.GA26579@FreeBSD.org> References: <20040610090712.GA71925@FreeBSD.org> <20040610160207.GB32315@linux-mips.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610160207.GB32315@linux-mips.org> User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. cc: Gheorghe Ardelean cc: freebsd-mips@FreeBSD.org Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 22:14:30 -0000 * Ralf Baechle [ Date: 2004-06-10 ] [ w.r.t. Re: Some MIPS status goodies. ] > On Wed, Jun 09, 2004 at 11:07:12PM -1000, juli mallett wrote: > > > R10K and IP28 support are probably a ways away, but I'm interested > > in supporting these systems and more. Right now it's easiest to start > > with the, much simpler, R4400 Indigo2 I have here, and get a good base > > of this stuff, then move into supporting the more modern and complex > > CPUs and machines - but be assured I am taking them into account! > > R10000 in non-coherent systems (Indigo 2 R10000, O2) is a rather hard to > use processor due to unwanted behaviour of speculative execution that > leads to memory corruption. The workarounds are fairly complex; efficient > solutions involve compiler modifications. Yeah, I read about the compiler mods SGI had to make, with accessing the stack as a barrier... It sounded like that was only for the kernel though, yeah? > That said, the R10000's is resolving all hazards in hardware and does > almost the entire coherency in software so in a saner system such as > the Origin it's a breeze. Right. juli. -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 22:17:46 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id DAA3D16A4D0; Thu, 10 Jun 2004 22:17:46 +0000 (GMT) Date: Thu, 10 Jun 2004 12:17:46 -1000 From: juli mallett To: Ralf Baechle Message-ID: <20040610221746.GB26579@FreeBSD.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> <20040610101801.GA75709@FreeBSD.org> <20040610123718.GA32315@linux-mips.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610123718.GA32315@linux-mips.org> User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. cc: freebsd-mips@FreeBSD.org cc: "Steffen M. Boelaars" Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 22:17:47 -0000 * Ralf Baechle [ Date: 2004-06-10 ] [ w.r.t. Re: Some MIPS status goodies. ] > On Thu, Jun 10, 2004 at 12:18:01AM -1000, juli mallett wrote: > > > Right now I gotta say that Elf64-requiring systems are out. I can't > > get the toolchain to behave enough. Once I can get loader going, I > > can probably deal with the pain a lot more easily, because we can > > just default to Elf64 and make Elf32 a second-class citizen. > > 64-bit ELF requires very recent GNU tools and even in those it cannot > be considered of prime quality. Right now I'm struggling with the more loathsome problem of elf-{,trad}{big,little}mips ... Just where do you and don't you need the "trad" -- this seems to be a painful thing, certainly it has been for me, and I'm hoping that BU (namely BFD) will grow some more friendly compilation conditionals in the future, but I'm not going out of my way for that... Certainly I'm happy with my working elf32-tradbigmips toolchain. > 64-bit code is so much larger that it often delivers just half the > performance of 32-bit code. FreeBSD/MIPS is definably 64-bit code, just 32-bit ELF for now. Thanx, juli. -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 22:33:37 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A55A16A4CE; Thu, 10 Jun 2004 22:33:37 +0000 (GMT) Received: from mail.linux-mips.net (p508B6474.dip.t-dialin.net [80.139.100.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69BAB43D49; Thu, 10 Jun 2004 22:33:35 +0000 (GMT) (envelope-from ralf@linux-mips.org) Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.11/8.12.8) with ESMTP id i5AMXHuC017156; Fri, 11 Jun 2004 00:33:17 +0200 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.11/8.12.11/Submit) id i5AMXHhs017155; Fri, 11 Jun 2004 00:33:17 +0200 Date: Fri, 11 Jun 2004 00:33:17 +0200 From: Ralf Baechle To: juli mallett Message-ID: <20040610223317.GA16814@linux-mips.org> References: <20040610090712.GA71925@FreeBSD.org> <20040610160207.GB32315@linux-mips.org> <20040610221430.GA26579@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610221430.GA26579@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: Gheorghe Ardelean cc: freebsd-mips@FreeBSD.org Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 22:33:37 -0000 On Thu, Jun 10, 2004 at 12:14:30PM -1000, juli mallett wrote: > > > R10K and IP28 support are probably a ways away, but I'm interested > > > in supporting these systems and more. Right now it's easiest to start > > > with the, much simpler, R4400 Indigo2 I have here, and get a good base > > > of this stuff, then move into supporting the more modern and complex > > > CPUs and machines - but be assured I am taking them into account! > > > > R10000 in non-coherent systems (Indigo 2 R10000, O2) is a rather hard to > > use processor due to unwanted behaviour of speculative execution that > > leads to memory corruption. The workarounds are fairly complex; efficient > > solutions involve compiler modifications. > > Yeah, I read about the compiler mods SGI had to make, with accessing > the stack as a barrier... It sounded like that was only for the > kernel though, yeah? Yes. The CPU can't speculate memory access for virtual addresses that aren't mapped, so for usermode the trick is to keep every page unmapped while doing DMA on it. Ralf From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 23:19:07 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6C2B16A4CE; Thu, 10 Jun 2004 23:19:07 +0000 (GMT) Received: from mail.linux-mips.net (p508B6474.dip.t-dialin.net [80.139.100.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF8F943D55; Thu, 10 Jun 2004 23:19:06 +0000 (GMT) (envelope-from ralf@linux-mips.org) Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.11/8.12.8) with ESMTP id i5ANJ4vM018075; Fri, 11 Jun 2004 01:19:04 +0200 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.11/8.12.11/Submit) id i5ANJ4l4018074; Fri, 11 Jun 2004 01:19:04 +0200 Date: Fri, 11 Jun 2004 01:19:04 +0200 From: Ralf Baechle To: juli mallett Message-ID: <20040610231904.GB16814@linux-mips.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> <20040610101801.GA75709@FreeBSD.org> <20040610123718.GA32315@linux-mips.org> <20040610221746.GB26579@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610221746.GB26579@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: freebsd-mips@FreeBSD.org cc: "Steffen M. Boelaars" Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 23:19:07 -0000 On Thu, Jun 10, 2004 at 12:17:46PM -1000, juli mallett wrote: > > 64-bit ELF requires very recent GNU tools and even in those it cannot > > be considered of prime quality. > > Right now I'm struggling with the more loathsome problem of > elf-{,trad}{big,little}mips ... Just where do you and don't > you need the "trad" -- this seems to be a painful thing, certainly > it has been for me, and I'm hoping that BU (namely BFD) will grow > some more friendly compilation conditionals in the future, but I'm > not going out of my way for that... Certainly I'm happy with my > working elf32-tradbigmips toolchain. >From my experience forget about the non-trad variant. trad*mips is ABI ELF (or rather ABI ELF with GNU breakage); the non-trad variants are IRIX ELF with it's undocumented differences compared to ABI ELF. The nasty stuff about IRIX ELF is that some of it's difference also affect generic ELF. We used to use non-trad ELF for Linux until we hit a problem with modutils which was explained by the difference between non-trad ELF and trad ELF, so we switched. I think this is the only time the difference between the two actually did matter to us. > > 64-bit code is so much larger that it often delivers just half the > > performance of 32-bit code. > > FreeBSD/MIPS is definably 64-bit code, just 32-bit ELF for now. Ah, that sounds like the hack which I'm using also. Initially born due to the complete unusability of NABI ELF this code model turned into the code model of choice because it's so much more efficient and smaller - the difference is in the range of hundreds of kB for an IP27 kernel. The problem is this may become impossible with later GNU tools but let's see what can be done about that. Ralf From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 23:24:57 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id E774D16A4D0; Thu, 10 Jun 2004 23:24:57 +0000 (GMT) Date: Thu, 10 Jun 2004 13:24:57 -1000 From: juli mallett To: Ralf Baechle Message-ID: <20040610232457.GA31150@FreeBSD.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> <20040610101801.GA75709@FreeBSD.org> <20040610123718.GA32315@linux-mips.org> <20040610221746.GB26579@FreeBSD.org> <20040610231904.GB16814@linux-mips.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610231904.GB16814@linux-mips.org> User-Agent: Mutt/1.4.1i X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb X-Disclaimer: Opinions expressed about the deliciousness of eating brains are my own unless expressed by my employer. cc: freebsd-mips@FreeBSD.org cc: "Steffen M. Boelaars" Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 23:24:58 -0000 * Ralf Baechle [ Date: 2004-06-10 ] [ w.r.t. Re: Some MIPS status goodies. ] > On Thu, Jun 10, 2004 at 12:17:46PM -1000, juli mallett wrote: > > > > 64-bit ELF requires very recent GNU tools and even in those it cannot > > > be considered of prime quality. > > > > Right now I'm struggling with the more loathsome problem of > > elf-{,trad}{big,little}mips ... Just where do you and don't > > you need the "trad" -- this seems to be a painful thing, certainly > > it has been for me, and I'm hoping that BU (namely BFD) will grow > > some more friendly compilation conditionals in the future, but I'm > > not going out of my way for that... Certainly I'm happy with my > > working elf32-tradbigmips toolchain. > > >From my experience forget about the non-trad variant. trad*mips is ABI > ELF (or rather ABI ELF with GNU breakage); the non-trad variants are > IRIX ELF with it's undocumented differences compared to ABI ELF. The > nasty stuff about IRIX ELF is that some of it's difference also affect > generic ELF. > > We used to use non-trad ELF for Linux until we hit a problem with modutils > which was explained by the difference between non-trad ELF and trad ELF, > so we switched. I think this is the only time the difference between the > two actually did matter to us. non-trad elf has a lot of problems. But just having trad stuff, while fine for config.bfd, seems to cause havoc with the BU build environment FreeBSD uses and I can't figure out what's up. I get some of BU's lovely obscure messages there which make me think something is very borked. The non-trad stuff, in 64 bit mode, also wants stuff like rld_map which I am fundamentally opposed to adding. > > > 64-bit code is so much larger that it often delivers just half the > > > performance of 32-bit code. > > > > FreeBSD/MIPS is definably 64-bit code, just 32-bit ELF for now. > > Ah, that sounds like the hack which I'm using also. Initially born due > to the complete unusability of NABI ELF this code model turned into the > code model of choice because it's so much more efficient and smaller - > the difference is in the range of hundreds of kB for an IP27 kernel. > The problem is this may become impossible with later GNU tools but let's > see what can be done about that. Works well enough as long as you have CKSEG around :( (or a sufficiently complex bootloader and simple enough system that you can cheat and run it out of user address space.) -- juli mallett. jmallett@freebsd.org. adrift in the pacific. From owner-freebsd-mips@FreeBSD.ORG Thu Jun 10 23:58:52 2004 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71C4716A4CE; Thu, 10 Jun 2004 23:58:52 +0000 (GMT) Received: from mail.linux-mips.net (p508B6474.dip.t-dialin.net [80.139.100.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id E59D443D4C; Thu, 10 Jun 2004 23:58:46 +0000 (GMT) (envelope-from ralf@linux-mips.org) Received: from fluff.linux-mips.net (fluff.linux-mips.net [127.0.0.1]) by mail.linux-mips.net (8.12.11/8.12.8) with ESMTP id i5ANwi7d018897; Fri, 11 Jun 2004 01:58:44 +0200 Received: (from ralf@localhost) by fluff.linux-mips.net (8.12.11/8.12.11/Submit) id i5ANwi6q018896; Fri, 11 Jun 2004 01:58:44 +0200 Date: Fri, 11 Jun 2004 01:58:44 +0200 From: Ralf Baechle To: juli mallett Message-ID: <20040610235844.GA18661@linux-mips.org> References: <20040610090712.GA71925@FreeBSD.org> <4038.217.68.50.10.1086861511.squirrel@webmail.dataloss.nl> <20040610101801.GA75709@FreeBSD.org> <20040610123718.GA32315@linux-mips.org> <20040610221746.GB26579@FreeBSD.org> <20040610231904.GB16814@linux-mips.org> <20040610232457.GA31150@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040610232457.GA31150@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: freebsd-mips@FreeBSD.org cc: "Steffen M. Boelaars" Subject: Re: Some MIPS status goodies. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 23:58:52 -0000 On Thu, Jun 10, 2004 at 01:24:57PM -1000, juli mallett wrote: > Works well enough as long as you have CKSEG around :( (or a sufficiently > complex bootloader and simple enough system that you can cheat and run it > out of user address space.) That's the problem I'm now facing for the R8000 - it doesn't have the compatibility segments - nor many other things one would expect from a processor claiming to be MIPS IV ... Ralf