Subject: IRQ lock problem

From: David Aparicio Campos <[email-masked]>
Date: Wed, 19 Jul 2000 11:50:29 +0200

Hello all:

I'm developing some firmware code to run Linux on a SA110 (with
FootBridge) based
board. At this stage, I have downloaded an "vmlinux" image (e.g, a
decompressed one)
at address 0x00000000. (Entry point is at 0x00008000, right?). I have
not been lucky
when I download a "zImage", I'm not sure where in memory should I load
it.
When I call Linux, it says:

***************
call 0x8000
boot no options
Linux version 2.2.13-rmk2 (root@lobos) (gcc version 2.95.1 19990816
(release)) #4 Tue Jul 18 09:16:54
CEST 2000
Calibrating delay loop... <3>IRQ LOCK: IRQ7 is locking the system,
disabled
IRQ LOCK: IRQ7 is locking the system, disabled
IRQ LOCK: IRQ7 is locking the system, disabled
(...infinite loop, same message again and again...)
***************

Anybody can tell me any clue about what should I check?. I guess I have
left some hardware misconfigured, but I run out of ideas. What is the
meaning
of this message?. From linux source code, I guess it's something about
interrupt handler calling itself. Am I right? Is IRQ7 related to a
"PC compatible" architecture, e.g a parallel port or something like
this,
or is it related to a StrongArm architecture (IRQ 7 is TIMER4, I guess)?

I'm not very used to "arch/arm/kernel/*"... :-)
Is there any "literature" about specific Linux/ARM internals? I'm afraid

I could be asking something written somewhere...

I have "borrowed" boot.s from Compaq bootldr project (thank you Jamey &
George for your help!). I configure PCI bus, download a kernel and jump
to it (I guess MMU is disabled as it is ICACHE and DCACHE).

Some lines about my hardware environment:
Interrupts disabled at firmware level, I poll status registers instead,
but maybe I have not written every register, so I have left some
hardware
(specially for southbridge) in a unknown state. My motherboard is a
CATS,
I have revised specific inicialization in kernel, it writes some
registers
but it seems fine.
No hardware attached (no NIC, IDE or whatever). I download everything
throught footbridge serial line. Motherboard has a SA110, a 21285 and
a ALi1543 southbridge. This last one has all hardware disabled (USB,
keyboard, mouse, IDE serial ports...) as far as I know.

Thank you very much!

  David Aparicio

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 19 Jul 2000 21:19:43 +0100 (BST)

David Aparicio Campos writes:
> FootBridge) based board. At this stage, I have downloaded an
> "vmlinux" image (e.g, a decompressed one) at address 0x00000000.
> (Entry point is at 0x00008000, right?).

Err, no.  If you are refering to the linux/vmlinux file, its not a
binary-image that will execute if called.  You need to use the files
called "Image" or "zImage".

Either of these must be downloaded to 0x8000 and executed there.

> IRQ LOCK: IRQ7 is locking the system, disabled

This is the symptom of a stuck active IRQ line.  I'm just guessing,
but its probably related to the Southbridge.  Most PC PICs (programable
interrupt controllers) return IRQ7 when they don't know what the source
of the interrupt is (hence why a LOT of applications don't use IRQs with
LPTs by default).

There is another option - I hope that you've compiled up a kernel with
"CATS" support in it, and that you are calling it with the CATS
architecture number in r1?  If you're using the EBSA285 number, then
it could end up using the wrong IRQ connection to the 21285 for the PICs.

> Is IRQ7 related to a "PC compatible" architecture

Yes.  IRQs 0 through 15 are as per your normal PC.  IRQs 16 upwards refer
to the 21285 IRQs.  Check include/asm-arm/arch-ebsa285/irq*.h for more
information about these.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: David Aparicio Campos <[email-masked]>
Date: Thu, 20 Jul 2000 07:42:14 +0200

> called "Image" or "zImage".

I just tried and it seemed to me that  "vmlinux" worked, but I agree it was
a matter of luck. I dissasembled and found some "garbage" from 0x0000
to 0x8000, but as far as I jumped to 0x8000 (loading at 0x0000) everything
was fine. Now with "Image". It has been at 0x8000 and I jumped there.
Here comes what happened:

eter> call 0x8000
boot no options
Linux version 2.2.13-rmk2 (root@lobos) (gcc version 2.95.1 19990816
(release)) #5 Thu Jul 20 07:14:04 CEST 2000
initrd extends beyond end of memory (0xea000c22 > 0xc1000000) - disabling
initrd
Calibrating delay loop... <3>IRQ LOCK: IRQ7 is locking the system, disabled
IRQ LOCK: IRQ7 is locking the system, disabled
IRQ LOCK: IRQ7 is locking the system, disabled
...

Oops, something new about initrd, I will check this later...

> of the interrupt is (hence why a LOT of applications don't use IRQs with

I will study this in depth. I suppose this should be the point, simply
because
looking at other firmware code (SA110 + FootBridge) they seem so similar,
my "alien" hardware should be suspect on this. I will go throught datasheet,
disabling almost every function there (it has a lot) just to have a simple
starting point...
I was confused about meaning of IRQ7... I will be back when I have
something interesting to say on this.

> it could end up using the wrong IRQ connection to the 21285 for the PICs.

That was done, CATS support compiled, calling with r0=0, r1=6.
Good point anyway.

> to the 21285 IRQs.  Check include/asm-arm/arch-ebsa285/irq*.h for more

I am almost a newbie on ARM architecture, and I find some difficulties
guessing
about Linux running in this box, but those include files have a lot of
information
I didn't check. I will read asm-arm/arch-ebsa285/*.h to learn more.

Thank you!!

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 21 Jul 2000 00:06:38 +0100 (BST)

David Aparicio Campos writes:
> initrd extends beyond end of memory (0xea000c22 > 0xc1000000) - disabling initrd

Indeed.  I wouldn't worry about it at this point in time.
   _____