Re: [SOLVED + PATCH] Re: Anybody got 2.4.0 running on a 386 ?
On Mon, 15 Jan 2001, Robert Kaiser wrote: > > I finally found the reason why 386es have trouble booting the 2.4.0 kernel: Good job. > Pentiums are only lucky to not crash because they have a bigger TLB than 386s. Actually, with the 4M pages, it's not a question of luck any more - they just don't _have_ this bug, because on a machine with 4M pages the "cpu_has_pse" case handles this all and the buggy code is never actually entered. Which explains why you'd only see this on a 386 (and I suspect your TLB size explanation is what saved some i486-class machines, although later i486 machines will have PSE as well). Thanks, Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[SOLVED + PATCH] Re: Anybody got 2.4.0 running on a 386 ?
Hi everybody, I finally found the reason why 386es have trouble booting the 2.4.0 kernel: In routine pagetable_init() in arch/i386/mm/init.c, a pte gets installed before it actually has been filled with valid entries. This causes the kernel text segment to be temporarily unmapped. Pentiums are only lucky to not crash because they have a bigger TLB than 386s. Here is a patch to fix this: --- init.c.orig Wed Nov 29 07:43:39 2000 +++ init.c Mon Jan 15 18:36:08 2001 @@ -317,7 +317,7 @@ pgd_t *pgd, *pgd_base; int i, j, k; pmd_t *pmd; - pte_t *pte; + pte_t *pte, *pte_base; /* * This can be zero as well - no problem, in that case we exit @@ -366,11 +366,7 @@ continue; } - pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); - set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte))); - - if (pte != pte_offset(pmd, 0)) - BUG(); + pte_base = pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); for (k = 0; k < PTRS_PER_PTE; pte++, k++) { vaddr = i*PGDIR_SIZE + j*PMD_SIZE + k*PAGE_SIZE; @@ -378,6 +374,10 @@ break; *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); } + set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte_base))); + if (pte_base != pte_offset(pmd, 0)) + BUG(); + } } Thanks to everybody who helped with ideas and suggestions, especially Ingo Molnar! Cheers Rob Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > The one I'm currently using is an old Olivetti 386SX with 5 MB, I also > tried two more boards, one 386SX, one 386DX, both with 8MB. All showed > the same behavior. I tested 2.4.0 on probably the exact same box - an Olivetti M300-05 386sx with 5MB and it came up ok, except that memory detection is off by a MB. (to be fixed in 2.4.1 or boot with mem= argument in 2.4.0) What might be important here is your gcc & binutils (as/gas) version, combined with a miscompile in something like __verify_write that doesn't get used on anything but 386 (and hence went undetected). Only thing strange on my box is that the kernel is compiled with gcc-2.7.2 which is officially unsupported but can be managed if you know what the gcc bugs are. Paul. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Tue, Jan 09, 2001 at 10:17:47PM +0100, Robert Kaiser wrote: > On Die, 09 Jan 2001 you wrote: > > Robert Kaiser wrote: > > > if someone had pressed the reset button. The same kernel boots fine on > > > 486 and Pentium Systems. > > > > > > Any ideas/suggestions ? > > > > > > is "Checking if this processor honours the WP bit even in supervisor > > mode... " the last thing you see before the reset? > > > > No, I don't see _any_ messages from the kernel. The last thing I see is > "Uncompressing Linux... Ok, booting the kernel." I have added some > quick and dirty debug code that writes messages directly to the VGA > screen buffer. According to that, execution seems to get as far as the > statement > > *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > Changing the if( end && (vaddr >= end)) break; just before that snippet of yours (I believe it's on lines 379-380) into if (vaddr >= end) break; or alternatively adding if (!end) break; between if(end &&...) break; and *pte = mk_...; produces a kernel bootable on 386. With kind regards, Sven Joos -- If the odds are a million to one against something occurring, chances are 50-50 it will. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, Jan 10, 2001 at 03:18:41PM -0500, Brian Gerst wrote: > > move up to 2.4.0-testX kernels I just tested 2.4.0-test1, it doesn't boot on the 386 with the same symptoms as 2.4.0. 2.3.99-pre9 same. 2.3.99-pre8 is the last one that boots correctly. There is one weird thing I notice, the vga-bios-screen at boot-up is monochrome every other automatic reboot. with kind regards, Sven -- If the odds are a million to one against something occurring, chances are 50-50 it will. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Robert Kaiser wrote: > In the meantime, it would be helpful if anyone who has successfully > booted a 2.4.0 kernel on a 386 could report this to the list. > I had no problems booting an AMD 386DX/40 with 32 megs of RAM. I just dumped a bzImage (703K) to a floppy and it booted on that just fine. Kernel was built using egcs-1.1.2 from RH 6.2 If I build the same kernel on a RH7 system using gcc 2.96 (gcc-2.96-69) the machine reboots after "Uncompressing Linux... Ok, boot the kernel" no more text is printed. .config is available on request. -tgc -- Tom G. Christensen, Denmark <[EMAIL PROTECTED]> Homepage: http://hjem.get2net.dk/tgc Linux 2.2.16-3 on an i586 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: >> I have periodically built kernels that crashed >> immediately at the point you mention. Usually this >> was due to me choose configuration options that >> were incompatible with my machine's hardware. > > > You mean they crashed at the exact same statement ? > That would be an interesting hint, can you confirm it ? I sent the "possible config problem" list mostly as a warning about what can cause kernels to lock up early in the boot cycle. Some of the problems I ] mentioned will cause a lock up immediately after the "Uncompressing kernel... OK Booting Linux" message. I doubt that these problems are causing your problem and so I really doubt that these crashes are occuring in the same function that yours is. Mostly, I thought you might want to double-check your configuration options and make sure that you are using none of these broken configuration combinations. Good luck! I wish I could be of more help. Miles - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
mo6 wrote: > I dug up an old amd 386 and started compiling kernels for it with gcc 2.95.2: > > 2.4.0 : doesn't boot, same symptoms as you, Robert, so you're not imagining > things :-) > 2.2.19pre6 : compiles, boots and runs poifectly > 2.3.51 : doesn't compile > 2.3.99-pre1 : hrm, *cough* > 2.3.99-pre2 : *tsjoum* > 2.3.39: compiles and boots okay > > here is where I got bored :-) > > okay, anyone, which 2.3.x kernels should compile okay ? move up to 2.4.0-testX kernels -- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Tue, Jan 09, 2001 at 10:17:47PM +0100, Robert Kaiser wrote: > On Die, 09 Jan 2001 you wrote: > > Robert Kaiser wrote: > > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > > I tried three different 386 boards. Execution seems to get as far as > > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > > if someone had pressed the reset button. The same kernel boots fine on > > > 486 and Pentium Systems. > > > > > > Any ideas/suggestions ? > > > > > > is "Checking if this processor honours the WP bit even in supervisor > > mode... " the last thing you see before the reset? > > > > No, I don't see _any_ messages from the kernel. The last thing I see is > "Uncompressing Linux... Ok, booting the kernel." I dug up an old amd 386 and started compiling kernels for it with gcc 2.95.2: 2.4.0 : doesn't boot, same symptoms as you, Robert, so you're not imagining things :-) 2.2.19pre6 : compiles, boots and runs poifectly 2.3.51 : doesn't compile 2.3.99-pre1 : hrm, *cough* 2.3.99-pre2 : *tsjoum* 2.3.39: compiles and boots okay here is where I got bored :-) okay, anyone, which 2.3.x kernels should compile okay ? With kind regards, Sven -- If the odds are a million to one against something occurring, chances are 50-50 it will. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On 10 Jan 01 at 17:00, Robert Kaiser wrote: > > not really. Could you write a small function that just reads the kernel > > image from the first symbol to the last one, and see whether it crashes? > > (read it into a volatile variable to make sure GCC reads it.) > > I tried this: Reading the entire image never caused any crashes. > > However, I did have some (rare) instances of the kernel booting > successfully. Then it would fail again, booting the very same image > that had worked before. > > I am beginning to suspect that I may be dealing with flaky hardware. > (I'm working from home today and I only have access to one of my 386 > specimen here). > > I guess I'll better shut up until I can double check on > some other 386 boards tomorrow Could you try to remove 'inb $0x92,%al','orb $02,%al','outb %al,$0x92' from arch/i386/boot/setup.S ? Maybe it causes something to your A20. For example A20 through KBC and bit 1 of port 0x92 are wired together with XOR, and port 0x92 acts immediately, while KBC acts with delay. So test for a20 succeeds, as KBC did not turned its A20 yet, but then after KBC gets done its job, it dies... (eventually overwritting kernel itself; do you use zImage or bzImage? with bzImage at odd megabyte it should die almost immediately) But it is pure speculation. Value of %ax after a20_wait loop finishes could be interesting too - is it zero (no loop), one (0:210 contained 0), or something higher (we had to wait for KBC)? You can also try loading with loadlin from DOS with XMS manager, instead of through LILO, as if you'll load DOS=HIGH, it will enable A20 for you. And temporary remove whole A20 game from boot.S. Best regards, Petr Vandrovec [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Alan Cox wrote: > > > So called 'sigma sigma' 386 and higher. Ie we dont support the 386 with the > > > 32bit mul bugs. > > > > Is this a new thing in 2.4.0 ? Could it possibly cause a crash as > > early as pagetable_init() ? > > We've never supported pre sigmasigma cpus although someone posted a patch to > Linux 1.2 once. You won't find many of the cpus before that. At the time 386 > was priced like a Xeon is now and most were recalled/pulled when the mul bug > came out. > Ok, in that case it can't be related to the problem I am seeing. Thanks for the info. Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14 D-55270 Klein-Winternheim / Germanyfax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Ingo Molnar wrote: > math-FPU emulation takes up quite some space in the kernel image, so this > could indeed be the case. Could you disable any non-boot-essential > subsystem (networking, or the serial driver, or anything else), to > significantly reduce the image size? > I tried this: apparently no effect. However, there may be hardware issues involved (see below). > not really. Could you write a small function that just reads the kernel > image from the first symbol to the last one, and see whether it crashes? > (read it into a volatile variable to make sure GCC reads it.) I tried this: Reading the entire image never caused any crashes. However, I did have some (rare) instances of the kernel booting successfully. Then it would fail again, booting the very same image that had worked before. I am beginning to suspect that I may be dealing with flaky hardware. (I'm working from home today and I only have access to one of my 386 specimen here). I guess I'll better shut up until I can double check on some other 386 boards tomorrow In the meantime, it would be helpful if anyone who has successfully booted a 2.4.0 kernel on a 386 could report this to the list. Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14 D-55270 Klein-Winternheim / Germanyfax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
> > So called 'sigma sigma' 386 and higher. Ie we dont support the 386 with the > > 32bit mul bugs. > > Is this a new thing in 2.4.0 ? Could it possibly cause a crash as > early as pagetable_init() ? We've never supported pre sigmasigma cpus although someone posted a patch to Linux 1.2 once. You won't find many of the cpus before that. At the time 386 was priced like a Xeon is now and most were recalled/pulled when the mul bug came out. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Anuradha Ratnaweera wrote: > > I was just wondering if the kernel size has got to do anything to do with > this. Did you try a very very small kernel with the minimal features > anyway? > I tried this: kernel is now 277KB compressed, 725KB uncomressed. Still no effect :-( Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14 D-55270 Klein-Winternheim / Germanyfax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Hi Miles, Thanks very much for your suggestions! On Tue, 9 Jan 2001, Miles Lane wrote: > Just out of curiosity, did you use a 2.2 series > .config file and then run make oldconfig or did > you build a new .config file from scratch? No, I built it from scratch with make xconfig. > > I have periodically built kernels that crashed > immediately at the point you mention. Usually this > was due to me choose configuration options that > were incompatible with my machine's hardware. You mean they crashed at the exact same statement ? That would be an interesting hint, can you confirm it ? > > Another time, the machine wouldn't boot because > I needed a new version of LILO. I also have seen > at least one machine where I needed to specify > "linear" as one of the options in lilo.conf. > If you aren't specifying "linear" now, give it > a try. I am not using LILO (yet). I tried booting with SYSLINUX or by dumping the kernel binary to floppy and booting from it. Both showed the same result. Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14 D-55270 Klein-Winternheim / Germanyfax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Alan Cox wrote: > > Does linux cater of all the old 386 chip bugs - especially the memory > > management oddities? > > So called 'sigma sigma' 386 and higher. Ie we dont support the 386 with the > 32bit mul bugs. Is this a new thing in 2.4.0 ? Could it possibly cause a crash as early as pagetable_init() ? Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14 D-55270 Klein-Winternheim / Germanyfax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
> Does linux cater of all the old 386 chip bugs - especially the memory > management oddities? So called 'sigma sigma' 386 and higher. Ie we dont support the 386 with the 32bit mul bugs. Also a lot of 386's crash if you abuse popad instructions from user space and there is no fix - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Does linux cater of all the old 386 chip bugs - especially the memory management oddities? Richard Moore - RAS Project Lead - Linux Technology Centre (PISC). http://oss.software.ibm.com/developerworks/opensource/linux Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183 IBM UK Ltd, MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > Hi list, > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > The kernel was built for a 386 Processor, Math emulation has been enabled. > I tried three different 386 boards. Execution seems to get as far as > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > if someone had pressed the reset button. The same kernel boots fine on > 486 and Pentium Systems. ^^^ > > Any ideas/suggestions ? > > Rob > This may be off the wall, but since the 386 is diskless the kernel was obviously built elsewhere. Had that tree previously been used for a 486 build? You might decompile vmlinux and look for non-386 instructions at or prior to the crash point. It might be faster to recompile from 'make mrproper' and see if it works then. Tom - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Hi Rob, Just out of curiosity, did you use a 2.2 series .config file and then run make oldconfig or did you build a new .config file from scratch? I have periodically built kernels that crashed immediately at the point you mention. Usually this was due to me choose configuration options that were incompatible with my machine's hardware. Another time, the machine wouldn't boot because I needed a new version of LILO. I also have seen at least one machine where I needed to specify "linear" as one of the options in lilo.conf. If you aren't specifying "linear" now, give it a try. IIRC, here's my litany of goofed configurations: Building support for multiple framebuffer devices. Apparently, the kernel would hang in the chip detection process. Wrong CPU architecture. Wrong IDE chipset specified. Built EXT2 as a module, but / was on an EXT2 partition. I may have hit some other bogus configurations over the last two years, but these are ones that come to mind. Miles - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
you should also try to access the mem_map variable directly, in some simple way. Could you print out the value of mem_map btw.? [This should rule out any compiler interaction.] Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Robert Kaiser wrote: > Sorry, no ext2fs in this kernel (it is for a diskless embedded > system). I seem to recall though that the problem at one point > magically went away when I disabled the FPU emulation, but I have not > been able to reproduce this recently, so I'm not sure. Making minor > changes to the kernel code (such as adding/removing some test-prints) > certainly does not affect the behavior. math-FPU emulation takes up quite some space in the kernel image, so this could indeed be the case. Could you disable any non-boot-essential subsystem (networking, or the serial driver, or anything else), to significantly reduce the image size? > > Or if that part is not mapped > > correctly (which does happen sometimes as well). > > What could I do to check/fix this ? i had this a couple of times while doing the 3-level pagetables and related highmem stuff (and i might even have added this bug ...), and typically i just printed out the pagetables to a serial console and analyzed them manually :-| > > and are you sure it crashes there? [are you putting delays between your > > printouts?] > > I have put a "halting statement" (i.e. "while(1);") after my printouts to make > sure execution does not go any further than that point. I moved this halting > statement ahead in the code line by line until the crash would occur again. > So, yes, I am pretty sure. (okay, that certainly is a proof. I had to ask.) > > it accesses mem_map variable, which is near to the end of the kernel > > image, so it could indeed something of that sort. An uncompressed kernel > > image (including the data area) must not be bigger than 4MB (IIRC). > > According to my System.map file, mem_map is at 0xc0244f78. Does that help ? not really. Could you write a small function that just reads the kernel image from the first symbol to the last one, and see whether it crashes? (read it into a volatile variable to make sure GCC reads it.) Kernel image goes from _stext to _end - you can access it with something like this: void test_image (void) { extern char _stext; extern char _end; volatile char data; char *ptr = &_stext; while (ptr < _end) data = *ptr++; } another problem could be if the kernel image is in a place that is somehow invalid physical RAM. We uncompress it into address 1MB physical (and assume there is enough space from that point on to uncompress successfully, without actually checking it), which should work on all 'PC architecture compatible' systems. (other bootloaders use this method frequently as well.) Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Wed, 10 Jan 2001, Robert Kaiser wrote: > I have put a "halting statement" (i.e. "while(1);") after my printouts > to make sure execution does not go any further than that point. I > moved this halting statement ahead in the code line by line until the > crash would occur again. So, yes, I am pretty sure. Here's a tip for anyone who has to track down bugs of this nature. To greatly speed up work, just use a binary search technique. That is, go to the section of code that's causing problem, put a breakpoint or similiar half-way. If it dies before that point, move it back half way, after that point, move it forwards half way. Iterate until you find the place. Cheers, Alex -- If PacMan had affected us as kids we'd be running around in dark rooms, munching pills and listening to electronic music. http://www.tahallah.clara.co.uk - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Die, 09 Jan 2001 you wrote: > On Tue, 9 Jan 2001, Robert Kaiser wrote: > > > Now comes the amazing (to me) part: I split the above statement up into: > > > > temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > > *pte = temp; > > this is almost impossible (except some really weird compiler bug) - unless > the mem_map address is invalid. This could happen if your kernel image is > *just* too large. Do things improve if you disable eg. ext2fs support (i > know, but should be enough to boot). Sorry, no ext2fs in this kernel (it is for a diskless embedded system). I seem to recall though that the problem at one point magically went away when I disabled the FPU emulation, but I have not been able to reproduce this recently, so I'm not sure. Making minor changes to the kernel code (such as adding/removing some test-prints) certainly does not affect the behavior. > Or if that part is not mapped > correctly (which does happen sometimes as well). What could I do to check/fix this ? > > and are you sure it crashes there? [are you putting delays between your > printouts?] I have put a "halting statement" (i.e. "while(1);") after my printouts to make sure execution does not go any further than that point. I moved this halting statement ahead in the code line by line until the crash would occur again. So, yes, I am pretty sure. > > > where temp is declared "volatile pte_t". I inserted test-prints between the > > above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the > > mk_pte_phys() macro is causing the crash! > > it accesses mem_map variable, which is near to the end of the kernel > image, so it could indeed something of that sort. An uncompressed kernel > image (including the data area) must not be bigger than 4MB (IIRC). According to my System.map file, mem_map is at 0xc0244f78. Does that help ? Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Mit, 10 Jan 2001 you wrote: > How big is the kernel image? Are you making a zImage or bzImage? > I'm using bzImage. It's size is 566964 bytes. According to System.map, Symbol _end is 0xc0252cf0. That would mean the uncompressed kernel size would be 1387760 bytes (0xc0252cf0-0xc010), right ? Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
How big is the kernel image? Are you making a zImage or bzImage? Anuradha On Wed, 10 Jan 2001, Robert Kaiser wrote: > On Mit, 10 Jan 2001 you wrote: > > > > How much physical memory does this box really have? > > > > The one I'm currently using is an old Olivetti 386SX with 5 MB, I also tried two > more boards, one 386SX, one 386DX, both with 8MB. All showed the same behavior. > > > Robert Kaiser email: [EMAIL PROTECTED] > SYSGO RTS GmbH > Am Pfaffenstein 14phone: (49) 6136 9948-762 > D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > Please read the FAQ at http://www.tux.org/lkml/ > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Mit, 10 Jan 2001 you wrote: > > How much physical memory does this box really have? > The one I'm currently using is an old Olivetti 386SX with 5 MB, I also tried two more boards, one 386SX, one 386DX, both with 8MB. All showed the same behavior. Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > On Die, 09 Jan 2001 you wrote: > > Robert Kaiser wrote: > > > > > > On Die, 09 Jan 2001 you wrote: > > > > Robert Kaiser wrote: > > > > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > > > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > > > > I tried three different 386 boards. Execution seems to get as far as > > > > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > > > > if someone had pressed the reset button. The same kernel boots fine on > > > > > 486 and Pentium Systems. > > > . The last thing I see is > > > "Uncompressing Linux... Ok, booting the kernel." I have added some > > > quick and dirty debug code that writes messages directly to the VGA > > > screen buffer. According to that, execution seems to get as far as the > > > statement > > > > > > *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > > > > > > > Could it be possible that memory size is being misdetected? Try mem=8M > > (or less) on the command line. Try to catch the value of pte when it > > crashes. > > I tried "mem=4M" -- no effect. The value of pte is 0xc0001000, so it seems > to be the first invocation of that statement in the for() loop. > > Now comes the amazing (to me) part: I split the above statement up into: > > temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > *pte = temp; > > where temp is declared "volatile pte_t". I inserted test-prints between the > above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the > mk_pte_phys() macro is causing the crash! > > I am still trying to figure out what mk_pte_phys() does. Apparently it involves > an access to the kernel's data section. My current guess is that the data > section is not correctly mapped at this point. Would that be possible ? How much physical memory does this box really have? -- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Tue, 9 Jan 2001, Robert Kaiser wrote: > Now comes the amazing (to me) part: I split the above statement up into: > > temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > *pte = temp; this is almost impossible (except some really weird compiler bug) - unless the mem_map address is invalid. This could happen if your kernel image is *just* too large. Do things improve if you disable eg. ext2fs support (i know, but should be enough to boot). Or if that part is not mapped correctly (which does happen sometimes as well). and are you sure it crashes there? [are you putting delays between your printouts?] > where temp is declared "volatile pte_t". I inserted test-prints between the > above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the > mk_pte_phys() macro is causing the crash! it accesses mem_map variable, which is near to the end of the kernel image, so it could indeed something of that sort. An uncompressed kernel image (including the data area) must not be bigger than 4MB (IIRC). Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
** Reply to message from Robert Kaiser <[EMAIL PROTECTED]> on Tue, 9 Jan 2001 23:17:11 +0100 > temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > *pte = temp; > > where temp is declared "volatile pte_t". I inserted test-prints between the > above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the > mk_pte_phys() macro is causing the crash! In that case, it's either a compiler bug or a race condition. Compiling this source file with the -S option will generate an assembly output. The output should be the same regardless of whether you use the temp variable or not. That will answer the question as to what the cause is. If you're lucky, it's a compiler bug, because they're easier to fix. -- Timur Tabi - [EMAIL PROTECTED] Interactive Silicon - http://www.interactivesi.com When replying to a mailing-list message, please direct the reply to the mailing list only. Don't send another copy to me. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Die, 09 Jan 2001 you wrote: > Robert Kaiser wrote: > > > > On Die, 09 Jan 2001 you wrote: > > > Robert Kaiser wrote: > > > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > > > I tried three different 386 boards. Execution seems to get as far as > > > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > > > if someone had pressed the reset button. The same kernel boots fine on > > > > 486 and Pentium Systems. > > . The last thing I see is > > "Uncompressing Linux... Ok, booting the kernel." I have added some > > quick and dirty debug code that writes messages directly to the VGA > > screen buffer. According to that, execution seems to get as far as the > > statement > > > > *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > > > > Could it be possible that memory size is being misdetected? Try mem=8M > (or less) on the command line. Try to catch the value of pte when it > crashes. I tried "mem=4M" -- no effect. The value of pte is 0xc0001000, so it seems to be the first invocation of that statement in the for() loop. Now comes the amazing (to me) part: I split the above statement up into: temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); *pte = temp; where temp is declared "volatile pte_t". I inserted test-prints between the above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the mk_pte_phys() macro is causing the crash! I am still trying to figure out what mk_pte_phys() does. Apparently it involves an access to the kernel's data section. My current guess is that the data section is not correctly mapped at this point. Would that be possible ? Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > On Die, 09 Jan 2001 you wrote: > > Robert Kaiser wrote: > > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > > I tried three different 386 boards. Execution seems to get as far as > > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > > if someone had pressed the reset button. The same kernel boots fine on > > > 486 and Pentium Systems. > > > > > > Any ideas/suggestions ? > > > > > > is "Checking if this processor honours the WP bit even in supervisor > > mode... " the last thing you see before the reset? > > > > No, I don't see _any_ messages from the kernel. The last thing I see is > "Uncompressing Linux... Ok, booting the kernel." I have added some > quick and dirty debug code that writes messages directly to the VGA > screen buffer. According to that, execution seems to get as far as the > statement > > *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); How about this patch (untested)? max_low_pfn should be a global var... diff -urN linux-2.4.0/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c --- linux-2.4.0/arch/i386/kernel/setup.cSun Dec 31 13:26:18 2000 +++ linux/arch/i386/kernel/setup.c Tue Jan 9 17:59:00 2001 @@ -598,7 +598,7 @@ void __init setup_arch(char **cmdline_p) { unsigned long bootmap_size; - unsigned long start_pfn, max_pfn, max_low_pfn; + unsigned long start_pfn, max_pfn; int i; #ifdef CONFIG_VISWS -- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > On Die, 09 Jan 2001 you wrote: > > Robert Kaiser wrote: > > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > > I tried three different 386 boards. Execution seems to get as far as > > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > > if someone had pressed the reset button. The same kernel boots fine on > > > 486 and Pentium Systems. > > > > > > Any ideas/suggestions ? > > > > > > is "Checking if this processor honours the WP bit even in supervisor > > mode... " the last thing you see before the reset? > > > > No, I don't see _any_ messages from the kernel. The last thing I see is > "Uncompressing Linux... Ok, booting the kernel." I have added some > quick and dirty debug code that writes messages directly to the VGA > screen buffer. According to that, execution seems to get as far as the > statement > > *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); > Could it be possible that memory size is being misdetected? Try mem=8M (or less) on the command line. Try to catch the value of pte when it crashes. -- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
On Die, 09 Jan 2001 you wrote: > Robert Kaiser wrote: > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > > The kernel was built for a 386 Processor, Math emulation has been enabled. > > I tried three different 386 boards. Execution seems to get as far as > > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > > if someone had pressed the reset button. The same kernel boots fine on > > 486 and Pentium Systems. > > > > Any ideas/suggestions ? > > > is "Checking if this processor honours the WP bit even in supervisor > mode... " the last thing you see before the reset? > No, I don't see _any_ messages from the kernel. The last thing I see is "Uncompressing Linux... Ok, booting the kernel." I have added some quick and dirty debug code that writes messages directly to the VGA screen buffer. According to that, execution seems to get as far as the statement *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Anybody got 2.4.0 running on a 386 ?
Robert Kaiser wrote: > > Hi list, > > I can't seem to get the new 2.4.0 kernel running on a 386 CPU. > The kernel was built for a 386 Processor, Math emulation has been enabled. > I tried three different 386 boards. Execution seems to get as far as > pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as > if someone had pressed the reset button. The same kernel boots fine on > 486 and Pentium Systems. > > Any ideas/suggestions ? is "Checking if this processor honours the WP bit even in supervisor mode... " the last thing you see before the reset? -- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Anybody got 2.4.0 running on a 386 ?
Hi list, I can't seem to get the new 2.4.0 kernel running on a 386 CPU. The kernel was built for a 386 Processor, Math emulation has been enabled. I tried three different 386 boards. Execution seems to get as far as pagetable_init() in arch/i386/mm/init.c, then it falls back into the BIOS as if someone had pressed the reset button. The same kernel boots fine on 486 and Pentium Systems. Any ideas/suggestions ? Rob Robert Kaiser email: [EMAIL PROTECTED] SYSGO RTS GmbH Am Pfaffenstein 14phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/