Linux-kernel mailing list archive 1999-36,: The other half of the patch to the fancy memory patch

# The other half of the patch to the fancy memory patch

david parsons (orc@pell.portland.or.us)
Thu, 9 Sep 1999 10:40:24 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Martin Andersen: "Re: NFS: can't silly-delete anubis.nooft.abb.no/.nfs00c87b6f00000005,"
- Previous message: Alan Cox: "Re: Adding Serial Drivers to Linux Kernels"
- Next in thread: david parsons: "Re: The other half of the patch to the fancy memory patch"
- Reply: david parsons: "Re: The other half of the patch to the fancy memory patch"

I didn't include the differences against arch/i386/kernel/setup.c in
the patch I mailed last night. This means that Pavel's tweak for
not applying the e820 memory map unless we read it correctly (and
the verbosity explaining what the full memory map is like) wouldn't
actually work with that patch.

ObSigh: Sigh.

____
david parsons \bi/ Dilute! Dilute! OK!
\/

403a404,408
> #define E820_DEBUG 1
> #ifdef E820_DEBUG
> int i;
> #endif
>
407a413,419
> *
> * We check to see that the memory map contains at least 2 elements
> * before we'll use it, because the detection code in setup.S may
> * not be perfect and most every PC known to man has two memory
> * 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.)
409c421
< if (E820_MAP_NR) {

    ---
    > 	if (E820_MAP_NR > 1) {
    415a428,446
    > #ifdef E820_DEBUG
    > 		for (i=0; i < e820.nr_map; i++) {
    > 			printk("e820: %ld @ %08lx ",
    > 				(unsigned long)(e820.map[i].size),
    > 				(unsigned long)(e820.map[i].addr));
    > 			switch (e820.map[i].type) {
    > 			case E820_RAM:	printk("(usable)\n");
    > 					break;
    > 			case E820_RESERVED:
    > 					printk("(reserved)\n");
    > 					break;
    > 			case E820_ACPI:
    > 					printk("(ACPI data)\n");
    > 					break;
    > 			default:	printk("type %lu\n", e820.map[i].type);
    > 					break;
    > 			}
    > 		}
    > #endif
    425,426c456,457
    < 		add_memory_region(0, LOWMEMSIZE(), 1);
    < 		add_memory_region(HIGH_MEMORY, mem_size << 10, 1);

    ---
    > 		add_memory_region(0, LOWMEMSIZE(), E820_RAM);
    > 		add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
    506c537
    < 					add_memory_region(0, LOWMEMSIZE(), 1);

    ---
    > 					add_memory_region(0, LOWMEMSIZE(), E820_RAM);
    515c546
    < 				add_memory_region(start_at, mem_size, 1);

    ---
    > 				add_memory_region(start_at, mem_size, E820_RAM);
    534c565
    < 		if (e820.map[i].type == 1) {

    ---
    > 		if (e820.map[i].type == E820_RAM) {

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

     Next message: Martin Andersen: "Re: NFS: can't silly-delete anubis.nooft.abb.no/.nfs00c87b6f00000005,"
     Previous message: Alan Cox: "Re: Adding Serial Drivers to Linux Kernels"

     Next in thread: david parsons: "Re: The other half of the patch to the fancy memory patch"
     Reply: david parsons: "Re: The other half of the patch to the fancy memory patch"