From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: tbia() on DEC 3000 question
Date: Wed, 18 Aug 1999 16:49:32 -0700 [thread overview]
Message-ID: <19990818164932.C15520@twiddle.net> (raw)
In-Reply-To: <199908180936.FAA15756@neptune.phys.ufl.edu>; from Craig P Prescott on Wed, Aug 18, 1999 at 05:36:45AM -0400
On Wed, Aug 18, 1999 at 05:36:45AM -0400, Craig P Prescott wrote:
> The empty pages being what we flushed in free_area_init()...
No, free_area_init merely initializes the kernel's data structures
for managing physical memory.
> This enabling of the KSEG superpage - I am not sure how this happens,
> but it sounds like something I could check.
It's something that the PALcode is supposed to do. It's not
straightforward to check -- the kernel doesn't have direct
access to the register involved.
On EV4 it's SPE_2 (bit 5) in ABOX_CTL.
From the Avanti MILO PALcode I see that the value is saved in the
machine check logout -- it's quite possible that the value is dumped
for the 3000 as well. You'll have to find a description of the
mcheck logout area for the machine to find out what offset the value
might live at.
Also, the CSERVE_K_RD_ABOX (0x03) function of PAL_cserve returns the
value (in $0 of course) on Avanti, which also has a chance of working
on the 3000.
> Is that the significance of paging_init()'s
>
> clear_bit(PG_reserved, &mem_map[pfn++].flags);
No. That marks as reserved all the memory that the console told
us not to touch, which includes the PALcode for the system.
> Ok. removed the mapping - again, because we've flushed everything in
> free_area_init()?
No. It all happens in paging_init.
We create a new, empty set of page tables:
/* Initialize the kernel's page tables. Linux puts the vptb in
the last slot of the L1 page table. */
memset(swapper_pg_dir, 0, PAGE_SIZE);
pgd_val(swapper_pg_dir[1023]) =
(newptbr << 32) | pgprot_val(PAGE_KERNEL);
Then we take this new page table root and install it in the
not-yet-running idle task:
newptbr = ((unsigned long) swapper_pg_dir - PAGE_OFFSET) >> PAGE_SHIFT;
init_task.tss.ptbr = newptbr;
Then we switch contexts from whatever random thing the PALcode
started us off with into the new idle task:
original_pcb_ptr = load_PCB(&init_task.tss);
Now we have a new empty set of page tables, but the tlb has
yet to be flushed of its stale data, so we do that next:
tbia();
> I had sprinkled some srm_printk (is this ok to do??) calls around (I am
> working from a serial console), and just prior to paging_init()
Yes. You can't call srm_printk after that tbia above.
In theory we should be able to relocate the srm callbacks and
continue making such calls, but I never got srm_fixup working.
I thought I was following all the rules outlined in the ARM, but ...
> memory_start is 0xfffffc00004657e8
> memory_end is 0xfffffc0008000000 (the 3000/500 has 128 Megs of RAM)
>
> and inside paging_init(), just after free_area_init(),
>
> start_mem becomes 0xfffffc00005a67e8
>
> Are these starting values sensible?
Yep.
> I'm sure I'm doing something silly...
I don't think you are. This _should_ just all work. Since it
doesn't, it seems clear that there's something different about
the environment provided by the console code on the 3000, but
I have no idea what it is.
How much documentation are you working with here? Or are you
just winging it? I know NetBSD works on the 3000; you might
compare our vm startup code with theirs.
r~
next prev parent reply other threads:[~1999-08-18 23:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-16 7:24 tbia() on DEC 3000 question Craig P Prescott
1999-08-16 8:36 ` Wes Bauske
1999-08-16 8:50 ` Craig P Prescott
1999-08-16 8:37 ` Richard Henderson
1999-08-16 10:16 ` Craig P Prescott
1999-08-17 0:16 ` Richard Henderson
1999-08-18 9:36 ` Craig P Prescott
1999-08-18 9:35 ` Diagram for DEC3000 power supply Jason Irons
1999-08-18 23:49 ` Richard Henderson [this message]
1999-08-19 18:45 ` tbia() on DEC 3000 question Craig P Prescott
1999-08-19 23:02 ` Richard Henderson
1999-08-20 2:10 ` Ping all: DEC 3000 support question Ken Shiring
1999-08-20 7:11 ` Craig P Prescott
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox