Booting questions ....
From: Willem Jan Withagen (wjw_at_withagen.nl)
Date: 11/04/04
- Previous message: Brooks Davis: "Re: VIA c3 support"
- Next in thread: Julian Elischer: "Re: Booting questions ...."
- Reply: Julian Elischer: "Re: Booting questions ...."
- Reply: Scott Long: "Re: Booting questions ...."
- Reply: John Baldwin: "Re: Booting questions ...."
- Reply: John Baldwin: "Re: Booting questions ...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 04 Nov 2004 23:47:18 +0100 To: "arch@freebsd.org" <arch@freebsd.org>
Hi,
I'm looking for a place to sensibly insert memorytest routines....
Currently I'd like to do that not in the loader, but in the kernel where
memory is already setup to be one flat address space. This makes programming a
lot simpler.
A sensible place, from what I can deduct, would be before the vm_ksubmap_init
in the chunck from machdep.c:
----
/*
* Display any holes after the first chunk of extended memory.
*/
if (bootverbose) {
int indx;
printf("Physical memory chunk(s):\n");
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
vm_paddr_t size;
size = phys_avail[indx + 1] - phys_avail[indx];
printf(
"0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n",
(uintmax_t)phys_avail[indx],
(uintmax_t)phys_avail[indx + 1] - 1,
(uintmax_t)size, (uintmax_t)size / PAGE_SIZE);
}
}
#ifdef MEMTEST
if (bootmemtest) {
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
vm_paddr_t size;
size = phys_avail[indx + 1] - phys_avail[indx];
memtest (
/* start */ (uintmax_t)phys_avail[indx],
/* end */ (uintmax_t)phys_avail[indx + 1] - 1,
/*size */ (uintmax_t)size
);
}
}
#endif MEMTEST
vm_ksubmap_init(&kmi);
----
And in memtest I can just linearly iterate over the memory between these
pointers without getting pagefaults....
Next question is where to watch for already taken memory:
- code
- data
- stack
What modules are already setup by the time we enter the code above???
Or the alternative would be to just exclude for the code and data of the
memtests routines them selves. But then printf would probably be destroyed as
well, and there would be no "tracing" of memtest activity.
Thanx,
--WjW
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Brooks Davis: "Re: VIA c3 support"
- Next in thread: Julian Elischer: "Re: Booting questions ...."
- Reply: Julian Elischer: "Re: Booting questions ...."
- Reply: Scott Long: "Re: Booting questions ...."
- Reply: John Baldwin: "Re: Booting questions ...."
- Reply: John Baldwin: "Re: Booting questions ...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|