From cse.psu.edu!owner-9fans Sun Nov 3 13:38:54 1996 Received: from cse.psu.edu ([130.203.3.50]) by cannon.ecf.toronto.edu with SMTP id <2108>; Sun, 3 Nov 1996 13:38:50 -0500 Received: from localhost (majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) with SMTP id NAA04284; Sun, 3 Nov 1996 13:39:10 -0500 (EST) Received: by claven.cse.psu.edu (bulk_mailer v1.5); Sun, 3 Nov 1996 13:36:29 -0500 Received: (from majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) id NAA04212 for 9fans-outgoing; Sun, 3 Nov 1996 13:36:13 -0500 (EST) Received: from mcp.csh.rit.edu (mcp.csh.rit.edu [129.21.60.9]) by cse.psu.edu (8.7.5/8.7.3) with SMTP id NAA04207 for <9fans@cse.psu.edu>; Sun, 3 Nov 1996 13:36:02 -0500 (EST) Received: from elwood.csh.rit.edu (elwood.csh.rit.edu [129.21.60.3]) by mcp.csh.rit.edu (8.6.10/8.6.10) with SMTP id NAA25084; Sun, 3 Nov 1996 13:31:17 -0500 Message-Id: <199611031831.NAA25084@mcp.csh.rit.edu> X-Authentication-Warning: mcp.csh.rit.edu: Host elwood.csh.rit.edu didn't use HELO protocol To: tad@mail.csh.rit.edu, 9fans@cse.psu.edu Subject: DEC pmax support in vl (W/O broken attachments) In-reply-to: Your message of "Sat, 02 Nov 1996 18:33:11 EST." <199611022333.SAA22306@mcp.csh.rit.edu> Reply-To: tad@mail.csh.rit.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <21904.847045875.0@elwood-low.csh.rit.edu> Date: Sun, 3 Nov 1996 13:31:16 -0500 From: Tad Hunt Sender: owner-9fans@cse.psu.edu Reply-To: 9fans@cse.psu.edu Precedence: bulk Status: R ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21904.847045875.1@elwood-low.csh.rit.edu> Looks like I screwed up the attachments. This is attempt number 2. I'm working on porting plan9 to the DEC pmax. The pmax is a little endian based mips port. Step one was to make the plan9 mips toolset output little endian code. The following 3 diffs patch vl(1) to make bootable pmax code. -Tad ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21904.847045875.2@elwood-low.csh.rit.edu> Content-Description: "vl/asm.c.diff" 373a wput(short s) { WPUT(s); } void .. 350a case 6: /* struct filehdr */ wput(0x162); /* f_magic (MIPSELMAGIC) */ wput(3); /* f_nscns */ lput(time(0)); /* f_timdat */ lput(0); /* f_symptr */ lput(0); /* f_nsyms */ wput(56); /* f_opthdr */ wput(7); /* f_flags */ /* struct aouthdr */ wput(0407); /* magic (OMAGIC) */ wput(0x300); /* vstamp */ lput(rnd(textsize,INITRND)); /* tsize */ lput(rnd(datsize,INITRND)); /* dsize */ lput(rnd(bsssize,INITRND)); /* bsize */ lput(entryvalue()); /* entry */ lput(INITTEXT); /* text_start */ lput(INITDAT); /* data_start */ lput(rnd(INITDAT+datsize, INITRND)); /* bss_start */ lput(~0L); /* gp reg mask */ lput(0L); /* cprmask[0] */ lput(~0L); /* cprmask[1] */ lput(0L); /* cprmask[2] */ lput(0L); /* cprmask[3] */ lput(~0L); /* gp value */ /* section header: text */ strnput(".text", 8); /* s_name: text segment */ lput(INITTEXT); /* s_paddr: phys addr */ lput(INITTEXT); /* s_vaddr: virt addr */ lput(rnd(textsize,INITRND)); /* s_size: section size */ lput(rnd(HEADR,INITRND)); /* s_scnptr: filep offset */ lput(0L); /* s_relptr: filep to reloc */ lput(0L); /* s_lnnoptr: unused */ wput(0); /* s_nreloc */ wput(0); /* s_nlnno: unused */ lput(0x20); /* s_flags: TEXT */ /* section header: data */ strnput(".data", 8); /* s_name: data segment */ lput(INITDAT); /* s_paddr: phys addr */ lput(INITDAT); /* s_vaddr: virt addr */ lput(rnd(datsize,INITRND)); /* s_size: section size */ lput(rnd(HEADR,INITRND) +rnd(textsize,INITRND)); /* s_scnptr: filep offset */ lput(0L); /* s_relptr: filep to reloc */ lput(0L); /* s_lnnoptr: unused */ wput(0); /* s_nreloc */ wput(0); /* s_nlnno: unused */ lput(0x40); /* s_flags: DATA */ /* section header: bss */ strnput(".bss", 8); /* s_name: bss segment */ lput(rnd(INITDAT+ datsize,INITRND)); /* s_paddr: phys addr */ lput(rnd(INITDAT+ datsize,INITRND)); /* s_vaddr: virt addr */ lput(rnd(bsssize,INITRND)); /* s_size: section size */ lput(0L); /* s_scnptr: filep to section */ lput(0L); /* s_relptr: filep to reloc */ lput(0L); /* s_lnnoptr: unused */ wput(0); /* s_nreloc */ wput(0); /* s_nlnno: unused */ lput(0x80); /* s_flags: BSS */ .. 132a case 6: OFFSET=rnd(HEADR,INITRND) +rnd(HEADR+textsize,INITRND) +rnd(datsize,INITRND); seek(cout, OFFSET, 0); break; .. 105a case 6: OFFSET = rnd(HEADR,INITRND)+rnd(textsize,INITRND); seek(cout, OFFSET, 0); break; .. 64c switch(HEADTYPE) { case 0: case 1: case 2: case 3: case 4: case 5: OFFSET = HEADR; break; case 6: OFFSET = rnd(HEADR,INITRND); break; } .. 27a #define WPUT(c) { if(endian == 'B') { cbp[0] = (c)>>8; cbp[1] = (c); } else { cbp[0] = (c); cbp[1] = (c)>>8; } cbp += 2; cbc -= 2; if(cbc <= 0) cflush(); } .. 18,21c if(endian == 'B') { \ cbp[0] = (c)>>24;\ cbp[1] = (c)>>16;\ cbp[2] = (c)>>8;\ cbp[3] = (c);\ } else { \ cbp[0] = (c);\ cbp[1] = (c)>>8;\ cbp[2] = (c)>>16;\ cbp[3] = (c)>>24;\ } \ .. 2a extern char endian; .. ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21904.847045875.3@elwood-low.csh.rit.edu> Content-Description: "vl/obj.c.diff" 1220c c = find1(order, i+1); .. 1218a long order; if(endian == 'B') order = 0x01020304L; else order = 0x04030201L; .. 151a case 6: /* boot for dec pmax */ HEADR = 20L+56L+3*40L; if(INITTEXT == -1) INITTEXT = 0x80020000L; if(INITDAT == -1) INITDAT = 0; if(INITRND == -1) INITRND = 16; endian = 'L'; break; .. 125c case 3: /* boot for sgi 4k */ .. 107c case 1: /* boot for sgi 3k */ .. 19a * -H6 -T0x80030000 -R16 is dec pmax boot coff executable .. 17c * -H3 -T0x80020000 -R8 is bootp() format for sgi 4k .. 15c * -H1 -T0x80020000 -R4 is bootp() format for sgi 3k .. 12a char endian = 'B'; .. ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21904.847045875.4@elwood-low.csh.rit.edu> Content-Description: "vl/l.h" 273a void wput(short); .. ------- =_aaaaaaaaaa0-- From cse.psu.edu!owner-9fans Sun Nov 3 13:45:09 1996 Received: from cse.psu.edu ([130.203.3.50]) by cannon.ecf.toronto.edu with SMTP id <2039>; Sun, 3 Nov 1996 13:44:59 -0500 Received: from localhost (majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) with SMTP id NAA04354; Sun, 3 Nov 1996 13:42:41 -0500 (EST) Received: by claven.cse.psu.edu (bulk_mailer v1.5); Sun, 3 Nov 1996 13:42:29 -0500 Received: (from majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) id NAA04317 for 9fans-outgoing; Sun, 3 Nov 1996 13:42:21 -0500 (EST) Received: from mcp.csh.rit.edu (mcp.csh.rit.edu [129.21.60.9]) by cse.psu.edu (8.7.5/8.7.3) with SMTP id NAA04313 for <9fans@cse.psu.edu>; Sun, 3 Nov 1996 13:42:16 -0500 (EST) Received: from elwood.csh.rit.edu (elwood.csh.rit.edu [129.21.60.3]) by mcp.csh.rit.edu (8.6.10/8.6.10) with SMTP id NAA25117 for <9fans@cse.psu.edu>; Sun, 3 Nov 1996 13:37:34 -0500 Message-Id: <199611031837.NAA25117@mcp.csh.rit.edu> X-Authentication-Warning: mcp.csh.rit.edu: Host elwood.csh.rit.edu didn't use HELO protocol To: 9fans@cse.psu.edu Subject: Re: DEC pmax support in vl (W/O broken attachments) In-reply-to: Your message of "Sun, 03 Nov 1996 13:31:16 EST." <199611031831.NAA25084@mcp.csh.rit.edu> Reply-To: tad@mail.csh.rit.edu MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21960.847046253.1@elwood-low.csh.rit.edu> Date: Sun, 3 Nov 1996 13:37:34 -0500 From: Tad Hunt Sender: owner-9fans@cse.psu.edu Reply-To: 9fans@cse.psu.edu Precedence: bulk Status: R In message <199611031831.NAA25084@mcp.csh.rit.edu>, you said: ;------- =_aaaaaaaaaa0 ;Content-Type: text/plain; charset="us-ascii" ;Content-ID: <21904.847045875.1@elwood-low.csh.rit.edu> ; ; Looks like I screwed up the attachments. This is attempt number 2. ; ; ; I'm working on porting plan9 to the DEC pmax. The pmax is a little ; endian based mips port. Step one was to make the plan9 mips toolset outpu ;t ; little endian code. The following 3 diffs patch vl(1) to make bootable ; pmax code. ; ; -Tad Ok, the attachments are still a bit broken. I thought the '.'s in the first column were screwing my mailer up, so I doubled them... guess what, that doesn't seem to have been the problem. So just do this little sed(1)ism on the diffs: 's/^\.\.$/\./' -Tad