[lkml]   [2000]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subjecte820 memory detection (was Re: 2.4.0-test3 oops (BIOS bug))
    >>>>> "Jean" == Jean Tourrilhes <> writes:

    Jean> I spent enough hours trying to fight this bug, which is quite
    Jean> difficult to pin point, and I don't want other people to waste as much
    Jean> time as I did, especially if it is a known problem but not documented.

    Yes, I spent almost 2 months trying random 2.3 versions, and only
    found this while suspecting bad memory, and booting the machine with
    8MB, which resulted in an instant crash, while it would only crash
    under heavy load with 96MB...

    Jean> So, I guess what I'm saying is that a fix for this problem
    Jean> would be more than welcomed in the standard kernel. Maybe there should
    Jean> be a BIOS blacklist ;-)

    Here's the patch I sent to LKML back in december. I've been told by
    Nathan Zook to forget about this, since there was a better (and much
    more complete) memory detection patch under way. Alas, such patch
    hasn't made it into the kernel yet, and a whole range of systems is
    currently left in the dust for 2.4, at least without adding the
    mem=xxx option, which was not exactly easy to guess...

    --- linux/arch/i386/kernel/setup.c.orig Mon Dec 13 19:22:03 1999
    +++ linux/arch/i386/kernel/setup.c Mon Dec 13 19:22:22 1999
    @@ -406,9 +406,7 @@
    void __init setup_memory_region(void)
    #define E820_DEBUG 1
    -#ifdef E820_DEBUG
    int i;

    * If we're lucky and live on a modern system, the setup code
    @@ -421,6 +419,9 @@
    * regions: one from 0 to 640k, and one from 1mb up. (The IBM
    * thinkpad 560x, for example, does not cooperate with the memory
    * detection code.)
    + *
    + * Do not trust e820 maps telling you that there is usable RAM
    + * sitting between 640k and 1MB, this is probably a lie...
    if (E820_MAP_NR > 1) {
    /* got a memory map; copy it into a safe place.
    @@ -429,13 +430,23 @@
    if (e820.nr_map > E820MAX)
    e820.nr_map = E820MAX;
    memcpy(, E820_MAP, e820.nr_map * sizeof[0]);
    -#ifdef E820_DEBUG
    for (i=0; i < e820.nr_map; i++) {
    +#ifdef E820_DEBUG
    printk("e820: %08x @ %08x ", (int)[i].size,
    switch ([i].type) {
    - case E820_RAM: printk("(usable)\n");
    + case E820_RAM: if ((int)[i].addr >= LOWMEMSIZE() &&
    + (int)[i].addr < HIGH_MEMORY) {
    +[i].type = E820_RESERVED;
    +#ifdef E820_DEBUG
    + printk ("(was usable, forced to reserved)\n");
    + } else {
    + printk("(usable)\n");
    + }
    +#ifdef E820_DEBUG
    case E820_RESERVED:
    @@ -447,9 +458,9 @@
    default: printk("type %lu\n",[i].type);
    else {
    /* otherwise fake a memory map; one section from 0k->640k,
    Jean> Merci encore pour le tuyeau...

    De rien...

    Places change, faces change. Life is so very strange.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.023 / U:104.512 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site