Subject: Sun3/50 bwtwo
To: Harry Schreurs <HLS@oce.nl>
From: Gordon W. Ross <gwr@jericho.mc.com>
List: port-sun3
Date: 09/27/1994 14:26:05
> From: "Harry Schreurs" <HLS@oce.nl>
> Date: Tue, 27 Sep 1994 18:14:37 GMT +0100
>
> > From: gwr@jericho.mc.com (Gordon W. Ross)
> > Date sent: Tue, 30 Aug 94 11:23:08 EDT
> > Subject: Status of Port (Sun3/50 bwtwo)
>
> > If someone would like to try it, I think it might be sufficient to
> > just permanently allocate 128k of space from the kernel_map at the
> > location of the Sun3/50 bwtwo before anything else tries to use it.
> > The Sun3/50 bwtwo will end up mapped at 0x0E100000 (in kernel).
> >
> > I am not quite sure how to make the vm code do this, but I think
> > it might look something like this:
> >
> > /* Somewhere before file-system buffer allocation... */
> >
> > if (cpu_machine_id == SUN3_MACH_50) {
> > caddr_t bwtwo_beg = 0x0E100000; /* XXX macros... */
> > caddr_t bwtwo_end = 0x0E120000; /* XXX macros... */
> > caddr_t bwtwo_off;
> > int ret;
> >
> > bwtwo_off = bwtwo_kva - VM_MIN_KERNEL_ADDRESS;
> ^
> |
> I don't quite understand what I should use for `bwtwo_kva'.
> I can nowhere find a reference to this variable. Using the values
> 0x100000 and 0x0E100000 both result in 'can not reserve bwtwo memory'
It's a typo. -- use bwtwo_beg in place of bwtwo_kva
I just typed that code into the message "off the top of my head"
(without any testing). What I intended to show was that the Sun3
will re-map physical memory address zero to kernel-virtual address
0x0E000000 and the display (at physical=0x100000) will therefore
end up at kernel-virtual address 0x0E100000 = (KERNEL_BASE + 1MB).
Save the kernel-virtual address of the frame buffer in a global.
Later, the /dev/fb driver can examine the global (say, bwtwo_kva)
and use that if it is set, otherwise map in the frame buffer.
> > vm_map_lock(kernel_map);
> > ret = vm_map_insert(kernel_map, NULL, bwtwo_off,
> > bwtwo_beg, bwtwo_end);
>
> What is vm_map_insert supposed to do?
That should allocate a segment in the map (so nothing else can).
> What are the semantics of the various vm routines?
Sorry, that's not clear to me either without spending some time
reading the VM code -- time I cannot spare right now...
Gordon