2000-11-24 15:35:03

by Joan Bertran

[permalink] [raw]
Subject: Booting AMD Elan520 without BIOS

Hi,

I'm trying to boot an AMD Elan520 board without bios
with kernel 2.4.0-test10 configured for i486 and PCI direct access.
This kernel boots correctly from HD using the bios provided with the
evaluation board but kernel 2.4.0-test8 and previous hang
after "Ok booting the kernel".
Currently I have the SDRam configured, the PCI peripherals
initialized (with AMD code), the GDT loaded in RAM and the CPU
in 32 bit mode. The empty_zero_page is configured with the RAM
and a command line (using code from LinuxBios and kernel startup).
I decompress directly from rom to 0x100000 the
kernel image and then I jump there.
The last message I see is "Calibrating delay loop"
(I see this thaks to the Jtag debugger for Elan520 because
I haven't configured the VGA board yet).

May somebody enumerate the requirements to boot the kernel
I mean the peripherals,system configuration etc.

Thankyou.


2000-11-24 16:11:25

by Jon Burgess

[permalink] [raw]
Subject: Re: Booting AMD Elan520 without BIOS



> The last message I see is "Calibrating delay loop"
>(I see this thaks to the Jtag debugger for Elan520 because
>I haven't configured the VGA board yet).

I've seen this on a board with a BIOS problem. I think it is caused because the
Kernel is in a loop waiting for a timer interrupt to occur. If the interrupt
never arrives it loops forever.

Jon




PLANET PROJECT will connect millions of people worldwide through the combined
technology of 3Com and the Internet. Find out more and register now at
http://www.planetproject.com


2000-11-24 16:29:18

by Joan Bertran

[permalink] [raw]
Subject: RE: Booting AMD Elan520 without BIOS



> -----Mensaje original-----
> De: Jon Burgess [mailto:[email protected]]
> Enviado el: viernes 24 de noviembre de 2000 16:40
> Para: joan_bertran%[email protected]
> Cc: '[email protected]'; '[email protected]'
> Asunto: Re: Booting AMD Elan520 without BIOS
>
>
>
> I've seen this on a board with a BIOS problem. I think it is
> caused because
> the
> Kernel is in a loop waiting for a timer interrupt to occur. If the
> interrupt
> never arrives it loops forever.
>
> Jon
>
>
I think so, because I've read somewhere the kernel needs interrupts
configured, but as kernel configures i8259 I don't know what is necessary,
the IDT with interrupt service routines ?, sommething special about the chipset ?

Joan Bertran.


2000-11-24 16:50:19

by Ronald G Minnich

[permalink] [raw]
Subject: Re: Booting AMD Elan520 without BIOS

On Fri, 24 Nov 2000, I+D wrote:

> I'm trying to boot an AMD Elan520 board without bios
> with kernel 2.4.0-test10 configured for i486 and PCI direct access.
> This kernel boots correctly from HD using the bios provided with the
> evaluation board but kernel 2.4.0-test8 and previous hang
> after "Ok booting the kernel".

well, first I want your code for linuxbios :-)

> The last message I see is "Calibrating delay loop"
> (I see this thaks to the Jtag debugger for Elan520 because
> I haven't configured the VGA board yet).

you don't have clock interrupts on. If you are able to single step you'll
probably see it in the loop spinning on jiffies. This is one of our
regular problems with a new mainboard.

Also do you have serial console up? in many cases we have found that
having serial up eliminates about 50% of the things you do with a jtag
debugger.

ron

2000-11-24 16:54:19

by Ronald G Minnich

[permalink] [raw]
Subject: RE: Booting AMD Elan520 without BIOS

On Fri, 24 Nov 2000, Joan Bertran wrote:

> I think so, because I've read somewhere the kernel needs interrupts
> configured, but as kernel configures i8259 I don't know what is necessary,
> the IDT with interrupt service routines ?, sommething special about the chipset ?

I put the following familiar-looking code at the head of linuxbios for
mainboards that need to boot 2.2.x. It should look familiar, except of
course this is 32-bit gas-compatible code.


#define i8259delay jmp 1f ; 1:

movb $0x11,%al /*! initialization sequence*/
outb %al,$0x20 /*! send it to 8259A-1*/
i8259delay
outb %al,$0xA0 /*! and to 8259A-2*/
i8259delay
movb $0x20,%al /*! start of hardware int's
(0x20)*/
outb %al,$0x21
i8259delay
movb $0x28,%al /*! start of hardware int's 2
(0x28)*/
outb %al,$0xA1
i8259delay
movb $0x04,%al /*! 8259-1 is master*/
outb %al,$0x21
i8259delay
movb $0x02,%al /*! 8259-2 is slave*/
outb %al,$0xA1
i8259delay
movb $0x01,%al /*! 8086 mode for both*/
outb %al,$0x21
i8259delay
outb %al,$0xA1
i8259delay
movb $0xFF,%al /*! mask off all interrupts for
now*/
outb %al,$0xA1
i8259delay
movb $0xFB,%al /*! mask all irq's but irq2
which*/
outb %al,$0x21 /*! is cascaded*/



2000-11-25 00:48:28

by Eric W. Biederman

[permalink] [raw]
Subject: Re: Booting AMD Elan520 without BIOS

Ronald G Minnich <[email protected]> writes:

> On Fri, 24 Nov 2000, I+D wrote:
>
> > I'm trying to boot an AMD Elan520 board without bios
> > with kernel 2.4.0-test10 configured for i486 and PCI direct access.
> > This kernel boots correctly from HD using the bios provided with the
> > evaluation board but kernel 2.4.0-test8 and previous hang
> > after "Ok booting the kernel".
>
> well, first I want your code for linuxbios :-)
>
> > The last message I see is "Calibrating delay loop"
> > (I see this thaks to the Jtag debugger for Elan520 because
> > I haven't configured the VGA board yet).
>
> you don't have clock interrupts on. If you are able to single step you'll
> probably see it in the loop spinning on jiffies. This is one of our
> regular problems with a new mainboard.

This can also easily be a misconfiguration of the local apic.
I might need to be put into virtual wire mode.

Eric