Subject: CATS motherboard & ISA compatible registers

From: David Aparicio Campos <[email-masked]>
Date: Tue, 01 Aug 2000 12:44:34 +0200

Hello all:

I'm still trying to build a firmware of my own in order to boot Linux
from a
CATS motherboard.
-----------------------------------------------
This one is similar to an EBSA285, but it has some important
differences:

- Has a SouthBridge, this is: a PCI/ISA bridge, I/O controller, IDE
controller,
    USB and PMU funcionality.
- Has a RTC (a Dallas 1687) connected to that SouthBridge.

Less important:
- Flash is an 256 KB AMD compatible (not an 4MB Intel one like EBSA
    and NetWinder).
- It's an ATX form factor, and has standard PC connectors, like KBD, IDE

    and so on.

A NetWinder machine is closer in design, but it uses Winbond bridges, I
couldn't get useful information from "nettrom" code (firmware code of
NetWinder machines).
-----------------------------------------------
I sent a previous mail about an "IRQ7" problem when I started Linux,
something like:

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
...

Russell King suggested a problem with PIC controller (IRQ7 is something
related to bad inicialization of some ISA-related thing), and Jamey
Hicks
told me to revise external interrupts from RTC (I'm almost sure that
this is the source of the deadly interrupt). Hey guys, thank you both!!

I tried to change my code, leaving CATS in a similar state that original

firmware does, but this didn't changed anything.
(If you wonder why I am working in something that is already done, you
have not seen CATS firmware running :-). On the other hand, that is not
free
sofware).
I sweeped throught Linux kernel and tried to find some clue about this
problem.
What I have seen is that, If I comment some lines in init/main.c
(start_kernel)...

// sti()
// calibrate_delay()

...Linux does all inicialization and tries to mount root FS. So what is
happening
is that when kernel enables interrupts, timer interrupt floods the
system (Russell
and Jamey were totally right). Surely, its related with timer driving
(CATS
architecture uses RTC periodic interrupt to handle tick beats, routed
thought ISA
IRQ subsystem to the StrongArm).

The problem by now is that datasheet for my southbridge is very obscure
about
"ISA compatible registers", those related to PIC (0x20, 0x21, 0xA0 &
0xA1)
and RTC (0x70 and 0x71). I have some doubts about this specific
inicialization.

Seems like some register inicialization should be removed from Linux
kernel
and put in firmware/loader code (e.g bus master handling in
arch/arm/kernel/hw-ebsa285.c and so on). I'm trying to summarize this,
if there
is somebody interested...

Does anybody have some more information about this ISA-PC-compatible
inicialization issue??
TYIA

David Aparicio

---

From: David Aparicio Campos <[email-masked]>
Date: Tue, 01 Aug 2000 17:29:43 +0200

Hello all again:

I did some more tricks. BTW, I'm working with kernel 2.2.13. Yes, I know

of 2.3.x and 2.4.0-preX, but they are so big to me, that I prefer to do
some
training with this smaller version (oh, nice 1.0.9 :-)).
What I did was to modify:

include/asm/arch/irq.h, function "irq_init_irq":
Force "isa_irq" to -1, for a MACH_TYPE_CATS (so PIC is not used)

include/asm/arch/time.h, function "setup_timer":
Changed to use IRQ_TIMER1 instead of IRQ_ISA_TIMER (because ISA
IRQ system is now disabled).

Now Linux says:

boot no options
Linux version 2.2.13-rmk2 (root@lobos) (gcc version 2.95.1 19990816
(release)) #16 Tue Aug 1 15:52:00 CEST 2000
Usando TIMER1...
Calibrating delay loop... 214.63 BogoMIPS
Memory: 31788k/32M available (476k code, 20k reserved, 480k data, 4k
init)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
PCI: device 00:a0 has unknown irq line b
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
Starting kswapd v 1.5
Real Time Clock Driver v1.09
rtc: IRQ 8 is not free.
RAM disk driver initialized:  16 RAM disks of 4096K size
VFS: Cannot open root device 00:ff
Kernel panic: VFS: Unable to mount root fs on 00:ff

Sure, I didn't compile any network driver, so couldn't mount NFS, but...

...It worked!!.
Two minor problems, most interesting being "PCI device 00:a0 has unknown

irq line b", probably because some mistake on FW side, (sig). Some
clues?

I downloaded some (obscure to me) 8259 datasheets, and it seems like
somebody (BIOS?) has to inicialize this to 8086 operating mode, by
writing a
certain sequence, before proper operation can proceed.
Can anybody explain me better this aspect about 8259? I have an ALi
M1543
and a OKI MSM82C59A datasheet, but it still confuses me.

Thank you!

...

---

From: "Neil A. Carson" <[email-masked]>
Date: Tue, 01 Aug 2000 09:51:08 -0700

The latest CATS firmware from Simtec handles Linux booting natively. You
should be able to get an upgrade from them. Otherwise you'll probably
get into all sorts of problems with gfx cards etc.

Phil did the u/g work for you?

	Neil

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

---

From: David Aparicio Campos <[email-masked]>
Date: Wed, 02 Aug 2000 07:40:56 +0200

> Phil did the u/g work for you?

I purchased some more boards lately, FW version is 0.5 in those ones... I
loaded same kernel that I use in my FW development (but zImage in CATS
versus a bzipped Image in my own version), and I don't know what I'm
doing wrong...

When I try to "boot" it complains "no entry point". When I "load", then
"call 0x10000000", it prints some garbage to screen. I keep 38400N8 for
serial speed. You know, docs on  these boards are not dense, neither
clear... They lack a documented command set... awful.
Still lost with this, any idea about what I'm doing bad?

On the other hand, I succeed when downloaded a special image from Chalice
WEB site, but I couldn´t run any compiled on my own.
I need also to boot from an AMD PCnet network card, but I read than only
NE2000 clones works. I also wrote Chalice about a development license,
without response... seems like developing is not so bad idea :-))
And, yes, I can run on problems if I use a VGA card, but is not a point
for my requirements, so it doesn't mind...

BTW, some other people wrote:

>> New firmware for the CATS?  Cool!  We have a couple of these, but haven't

>> run Linux on them because it's such a headache.  New firmware for them
would

"...Seems I'm not alone in being alone..."  ;-)

Cheers!