From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 5 Oct 1995 11:27:00 -0400 From: peter@plan9.com peter@plan9.com Subject: Memory on NeXT Topicbox-Message-UUID: 2b7eea22-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19951005152700.cMcibCxBiBElJU4P-l8pxwn8nKtU2BIWNqANo7237Z0@z> > It seems that Plan 9 only recognizes the first two bank of NeXT > memory. At boot time, the message: > > bank 0: 4M bank 1: 4M > appears on the screen and that's exact memory I have on the first two > simm slots. However, there are 16 simm slot on a Cube and I have totally > 40 MB on the mother board. > When I look at the source, the conf structure seems to only use the first > two banks and compute everything base on the two bank of memory. >Is there a way I can make Plan 9 recognize the rest of the memory banks? > Ta-Wei Li The architecture independent code for Plan 9 implements two memory banks, and while this can be changed for NeXT, that would likely require changes to all architecture specific code. Not advised! What would be easy to do is to change confinit in main.c so that the two banks are set up to point to the two largest contiguous blocks of memory. It sounds like in your case you have bank 0: 4 Meg, bank 1: 4 Meg, bank 2: 16 Meg bank 3: 16 Meg if you moved your memory around so that it was bank 0: 16 Meg, bank 1: 4 Meg, bank 2: 16 Meg bank 3: 4 Meg you could get all 40 Meg and still have two Plan 9 banks. (one starting at 0x4000000 and the second starting at 0x6000000.) But the easiest thing in your case is to use the 32 Meg in the upper banks. Change the hard-wired address in confinit. 0x4000000 becomes 0x6000000 and 0x50000000 becomes 0x7000000 Each of these changes must be made twice in that routine. The trickiest part of this fix, which would then only work on your machine, is to also one bit in an undocumented constant in l.s. Here is a fragment of my code: /* Changed by PGW 9/17/95 from $0x0401A020 to $0x0403A020 */ /* in order to extend the NeXT Memory from 32 Meg to 64 Meg */ MOVL $0x0403A020, R0 its the 5th line in the start routine in l.s. Another fix, not requiring any changes to the kernel is to move your memory around so that you have bank 0: 16 Meg, bank 1: 16 Meg, bank 2: 4 Meg bank 3: 4 Meg This way you get 32 Meg for Plan 9 and 40 Meg for NeXTstep. By the way, I have never had any problems rebuilding 9nextstation. Regards, Peter G. Weiner