Subject: Re: so what's happening...
To: Anders Magnusson <ragge@ludd.luth.se>
From: Johnny Billquist <bqt@update.uu.se>
List: port-pdp10
Date: 07/05/2002 21:45:46
On Fri, 5 Jul 2002, Anders Magnusson wrote:

> There are some interesting aspects of how the memory management will
> interact with the rest of the system though. Simple explanation:
> 
> The pdp10 can only address 36-bit words in memory in normal sense. There
> are byte instructions that can address parts of a word, but they require
> one (or two) extra words of address and also have a slightly different
> format compared to normal words. Now, uvm wants to deal with memory in
> bytes stored in vaddr_t/paddr_t, which should be a long or similar. 
> 
> Using byte addresses in vaddr_t will cause problems because
> vaddr_t foo; struct bar *ka = (struct bar *)foo;
> won't do any conversion and set ka to a funny pointer.

Hmmm. Reading my C ref manual (Harbison & Steele 2:nd ed) you could very
well have special handling of conversions between different pointer types.

> Using word addresses in vaddr_t will cause other problems, it will then
> get funny sizes in things like:
> vaddr_t a, b, c; a = b + c + sizeof(struct foo);
> (sizeof() gives number of bytes, vaddr_t's are in words).

sizeof should return storage units. That *could* mean words on a PDP-10.
If so, this would work just fine.

How does KCC do it?

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol