> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 13, 2001 5:08 AM > To: Tyson D Sawyer > Cc: [EMAIL PROTECTED] > Subject: Re: initrd success! > > > > > > The last issue I ran into before a sucessful boot was that linuxbios > > seems to shave a Meg off the top of RAM causing the kernel > to think that > > my ramdisk image extended beyond the end of RAM. This says > to me that > > either the comment that goes with the adjustment to > totalram size before > > passing it to the kernel is wrong or some of the kernel > source doesn't > > know that this is the case. From linuxbiosmain.c: > > > > > > /* the ram address should be the last mbyte, AFAIK. > Subtract one > > for the > > * low 1 MB. So subtract 2K total > > */ > > set_memory_size(empty_zero_page, 0x3c00, totalram - 2048); > > > > I haven't checked the details on this, but based on the > behavior I saw > > trying to load the initrd image, either you don't subtract > the low 1MB > > or you don't point to the last MB. > > You do pass the memory size less 1MB to the kernel. I don't know why > we are subtracting off 2MB here. This wouldn't be an artifact of bad > AGP window handling would it? The memory size passed to the kernel (on x86)is the extended memory size that is the from the second Megabyte to the end, the first Megabyte is the real-mode accesible memory. As the value is in 512 bytes you have to subtract 2048. If you use the 2.4.x kernel you can try using the e820 memory map, I thing is much clearer and flexible, the only inconvinient is that the kernel adjusts your values if they won't work on a standard PC, and if you have an embedded device without the 640-1Meg hole you have to patch the kernel to use this memory. from linux sources: include/asm-i386/e820.h #define E820MAP 0x2d0 /* our map */ #define E820MAX 32 /* number of entries in E820MAP */ #define E820NR 0x1e8 /* # entries in E820MAP */ #define E820_RAM 1 #define E820_RESERVED 2 #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */ #define E820_NVS 4 --------------- #define E820_MAP_NR (*(char*) (PARAM+E820NR)) #define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) #define E820_MAP_LAST ((struct e820entry *) (PARAM + E820MAP \ + sizeof(struct e820entry) * (E820MAX -1) )) --------------- void set_memory_size(unsigned long total_memory_size) { E820_MAP_NR = 2; E820_MAP[0].addr = 0; // start of memory segment: unsigned long long E820_MAP[0].size = 0xA0000; // size of memory segment: unsigned long long E820_MAP[0].type = E820_RAM; // type of memory segment: unsigned long E820_MAP[1].addr = 0x100000; E820_MAP[1].size = total_memory_size - 0x100000; E820_MAP[1].type = E820_RAM; }