Subject: netbsd 1.2alpha
To: None <port-pmax@NetBSD.ORG>
From: Tad Hunt <tad@jake.csh.rit.edu>
List: port-pmax
Date: 07/05/1996 02:09:06
	Greetings.  I am working from relatively recent -current sources,
And I have noticed a small problem on the 3MIN I'm working on.  When
I fill the last memory bank, it fails to find all the memory.  Now,
I don't have any hardware manuals lying around that explain the
pmax architecture (at least not yet anyway), so I'm a bit confused by
the comment in the section of code in machdep.c that says something like
"we have to be careful here -- data may persist on the bus".

Thoughts:
    I assumed since it was using uncached memory, that any store will stall
the pipeline (or at least the next load)  until that data is actually stored
into memory, but then why the comment?

Bug?
    Looking closely at the memory sizing code I notice that it saves the
word at offset 0 from the beginning of the page, then shoves 0xa5a5a5a5
into that spot, then shoves 0x5a5a5a5a into the 4th word on the page
without saving it's value.  I thought this might be the problem, at the
very least it seems to be a bug.  So, I added a bit of code to save
and restore this value.... Wouldn't you know, but the kernel got through
the memsize code w/o hanging!  Unfortunatly, it thought I had 32768 pages
of memory in my 32mb machine... If pages were 1k in size, this would
make sense, but NBPG is 4096 which means I should have 8192 pages of
memory...  Does anyone else see this problem?

-Tad (Glad to be working on kernel stuff instead of getting my tools
      into shape!)

P.S. I'm new to this list, so I apologize if this has already been covered.
I looked through some of the archives, so I don't think this has been brought
up before.
    On a related note, I'm doing my development under Ultrix using gcc
2.7.2 configured to build netbsd-pmax elf binaries.  I disliked
(ie: didn't compile out of the box, and the hacks I had to do to make it
compile made me believe the best solution was to write my own) the
elf2ecoff converter from the "elfutils" package, so I wrote my own.  My
version uses the gnu bfd library, so I think it will actually convert
binaries from anything you can make libbfd.a understand to ultrix-ecoff.
If anyone is interested in this tool, I've already posted it to
comp.unix.bsd.netbsd, or I can send it to you directly or post it here
if there is enough interest.  It's also on my ftp site:
ftp://ftp.csh.rit.edu/pub/csh/tad/src/unix/obj2ecoff.c  I don't know
who to approach about this, but feel free to include it in the
elftools distribution should it prove useful to others.