Booting questions ....

From: Willem Jan Withagen (wjw_at_withagen.nl)
Date: 11/04/04

  • Next message: Julian Elischer: "Re: Booting questions ...."
    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"
    

  • Next message: Julian Elischer: "Re: Booting questions ...."

    Relevant Pages

    • Re: ASUS P5N32 SLI E and RAM errors
      ... RAM with another set of RAM. ... Also checked- my RAM is on the QVL ... Just to be sure, did you install just one stick, run Memtest on it, then ... - does this mean the memory is OK and I should be looking at the ...
      (alt.comp.periphs.mainboard.asus)
    • Re: sarge dist-upgrade "Package is in a very bad inconsistent state"
      ... I did a memtest check today, and the results were the same as two years ... cannot compile kernels or glibc on the box (I first became aware of this ... I suspect the root problem affecting memtest is not the memory, ... The number of reported errors varies every time I run memtest, ...
      (Debian-User)
    • Re: ASUS P5N32 SLI E and RAM errors
      ... replacing all RAM with another set of RAM. ... Also checked- my RAM is on the QVL ... Just to be sure, did you install just one stick, run Memtest on it, ... or point to a bad memory stick. ...
      (alt.comp.periphs.mainboard.asus)
    • Re: Help needed to troubleshoot
      ... tried running memtest after reseating the memory modules (perhaps ... running memtest which can take an age if ever to discover a memory ... 'cured' simply by reseating the module (suggesting it would be worth ... be memory modules since reliable memory is a key component for stable ...
      (uk.comp.homebuilt)
    • Re: Mac Memory tester?
      ... I would also expect memtest to be a better memory tester than the Apple ... if you have the Apple Hardware Test available, ... case where Apple Hardware Test failed to spot a fault and memtest caught ...
      (comp.sys.mac.system)