==========
  NOTES
  NSLU2
==========

2005.May.12

  o think we've found the problem with PCI and, therefore, USB on the
    slug.  the PCI controller need to be initialized in the boot
    loader.
  o Here's the PCI dump from the slug with redboot.

    # cat pci
    PCI devices found:
      Bus  0, device   0, function  0:
	Co-processor: PCI device 8086:8500 (Intel Corp.) (rev 1).
	  Prefetchable 32 bit memory at 0x0 [0xffffff].
	  Prefetchable 32 bit memory at 0x1000000 [0x1ffffff].
	  Prefetchable 32 bit memory at 0x2000000 [0x2ffffff].
	  Prefetchable 32 bit memory at 0x3000000 [0x3ffffff].
	  Prefetchable 32 bit memory at 0xff000000 [0xffffffff].
	  I/O at 0xffffff00 [0xffffffff].
      Bus  0, device   1, function  0:
	USB Controller: NEC Corporation USB (rev 67).
	  IRQ 28.
	  Master Capable.  Latency=128.  Min Gnt=1.Max Lat=42.
	  Non-prefetchable 32 bit memory at 0x4bfff000 [0x4bffffff].
      Bus  0, device   1, function  1:
	USB Controller: NEC Corporation USB (#2) (rev 67).
	  IRQ 27.
	  Master Capable.  Latency=128.  Min Gnt=1.Max Lat=42.
	  Non-prefetchable 32 bit memory at 0x4bffe000 [0x4bffefff].
      Bus  0, device   1, function  2:
	USB Controller: NEC Corporation USB 2.0 (rev 4).
	  IRQ 26.
	  Master Capable.  Latency=128.  Min Gnt=16.Max Lat=34.
	  Non-prefetchable 32 bit memory at 0x4bffdf00 [0x4bffdfff].

And the dmesg's.

    # dmesg
    Linux version 2.4.22-xfs (root@sure_linux) (gcc version 3.2.1) #377 Fri Jul 2 09:02:32 CST 2004
    CPU: XScale-IXP425/IXC1100 revision 1
    Machine: Intel IXDP425 Development Platform
    Warning: bad configuration page, trying to continue
    Security risk: creating user accessible mapping for 0x60000000 at 0xff00f000
    Security risk: creating user accessible mapping for 0x51000000 at 0xf1000000
    On node 0 totalpages: 8192
    zone(0): 8192 pages.
    zone(1): 0 pages.
    zone(2): 0 pages.
    Kernel command line: console=ttyS0,115200 root=/dev/ram0 initrd=0x01000000,10M mem=32M@0x00000000
    Relocating machine vectors to 0xffff0000
    Calibrating delay loop... 131.48 BogoMIPS
    Memory: 32MB = 32MB total
    Memory: 20204KB available (1454K code, 244K data, 236K init)
    Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
    Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
    Mount cache hash table entries: 512 (order: 0, 4096 bytes)
    Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
    Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
    POSIX conformance testing by UNIFIX
    PCI Autoconfig: Found Bus 0, Device 1, Function 0
    PCI Autoconfig: BAR 0, Mem, size=0x1000, address=0x4bfff000
    PCI Autoconfig: Found Bus 0, Device 1, Function 1
    PCI Autoconfig: BAR 0, Mem, size=0x1000, address=0x4bffe000
    PCI Autoconfig: Found Bus 0, Device 1, Function 2
    PCI Autoconfig: BAR 0, Mem, size=0x100, address=0x4bffdf00
    PCI: bus0: Fast back to back transfers disabled
    Linux NET4.0 for Linux 2.4
    Based upon Swansea University Computer Society NET3.039
    Initializing RT netlink socket
    Starting kswapd
    VFS: Disk quotas vdquot_6.5.1
    Journalled Block Device driver loaded
    i2c-core.o: i2c core module
    i2c-dev.o: i2c /dev entries driver module
    i2c-core.o: driver i2c-dev dummy driver registered.
    i2c-algo-bit.o: i2c bit algorithm module version 2.6.1 (20010830)
    pty: 256 Unix98 ptys configured
    Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI en
    abled
    ttyS00 at 0xff000003 (irq = 15) is a XScale UART
    ttyS01 at 0xff001003 (irq = 13) is a XScale UART
    RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
    SCSI subsystem driver Revision: 1.00
    * host:<NULL>
    IXP425 Flash: Found an alias at 0x800000 for the chip at 0x0
    cfi_cmdset_0001: Erase suspend on write enabled
    0: offset=0x0,size=0x20000,blocks=64
    Using buffer write method
    Using static MTD partitions.
    Creating 4 MTD partitions on "IXP425 Flash":
    0x00000000-0x00040000 : "RedBoot "
    0x00040000-0x00060000 : "System Configuration"
    0x00060000-0x00160000 : "Kernel"
    0x00160000-0x00800000 : "Ramdisk"
    usb.c: registered new driver hub
    pci probe begin
    ehci_hcd 00:01.2: NEC Corporation USB 2.0
    ehci_hcd 00:01.2: irq 26, pci mem c3801f00
    usb.c: new USB bus registered, assigned bus number 1
    PCI: 00:01.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW.
    PCI: 00:01.2 PCI cache line size corrected to 32.
    ehci_hcd 00:01.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Jun-19/2.4
    hub.c: USB hub found
    hub.c: 5 ports detected
    pci probe ok
    host/usb-uhci.c: $Revision: 1.1 $ time 09:03:03 Jul  2 2004
    host/usb-uhci.c: High bandwidth mode enabled
    host/usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
    host/usb-ohci.c: USB OHCI at membase 0xc3809000, IRQ 28
    host/usb-ohci.c: usb-00:01.0, NEC Corporation USB
    usb.c: new USB bus registered, assigned bus number 2
    hub.c: USB hub found
    hub.c: 3 ports detected
    host/usb-ohci.c: USB OHCI at membase 0xc380f000, IRQ 27
    host/usb-ohci.c: usb-00:01.1, NEC Corporation USB (#2)
    usb.c: new USB bus registered, assigned bus number 3
    hub.c: USB hub found
    hub.c: 2 ports detected
    Initializing USB Mass Storage driver...
    usb.c: registered new driver usb-storage
    USB Mass Storage support registered.
    i2c-dev.o: Registered 'IXP425 I2C Adapter' as minor 0
    i2c-core.o: adapter IXP425 I2C Adapter registered as adapter 0.
    NET4: Linux TCP/IP 1.0 for NET4.0
    IP Protocols: ICMP, UDP, TCP, IGMP
    IP: routing cache hash table of 512 buckets, 4Kbytes
    TCP: Hash tables configured (established 2048 bind 4096)
    IP-Config: No network devices available.
    NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
    NetWinder Floating Point Emulator V0.97 (double precision)
    RAMDISK: Compressed image found at block 0
    Freeing initrd memory: 10240K
    VFS: Mounted root (ext2 filesystem) readonly.
    Freeing init memory: 236K
    Module init.
    ixp425_eth: 
    Initializing IXP425 NPE Ethernet driver software v. 1.1 
    ixp425_eth: CPU clock speed (approx) = 0 MHz
    [error] ixEthMiiPhyScan : unexpected Mii PHY ID 00008201
    ixp425_eth: ixp0 is using the PHY at address 0
    ixp425_eth: ixp1 is using the PHY at address 1
    ixp425_eth: ixEthMiiLinkStatus failed on PHY0.
	    Can't determine
    the auto negotiated parameters. Using default values.
    enable_irq(22) unbalanced from c38b11bc
    X1226: I2C based RTC driver.
    i2c-core.o: driver X1226 registered.
    X1226: found X1226 on IXP425 I2C Adapter
    i2c-core.o: client [X1226] registered to adapter [IXP425 I2C Adapter](pos. 0).
    atr is 1f
    download uses obsolete (PF_INET,SOCK_PACKET)
    ixp425_eth: ixp0: Entering promiscuous mode
    device ixp0 entered promiscuous mode



2005.Apr.14

  o I found one initialization I wasn't making, CS4, CS5, and CS7
    inits.  Seems unlikely that they're a problem, but there's no way
    to know until it is tested.

  o Working with g2 to get the network working.

  He sees:
apex> dump 0xc8004000
c8004000: 00 00 00 04 00 00 1f 30  00 00 1e 04 00 00 3f ff  .......0 ......??
c8004010: 00 00 92 40 00 00 02 49  01 ff 01 ff 00 00 00 00  ...@...I .?.?....
c8004020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
c8004030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........

  I see:
RedBoot>  x -b 0xc8004000 -l 64
C8004000: 00 00 20 C3 00 00 1F 3C  00 00 FE CF 00 00 31 F3  |.. ....<......1.|
C8004010: 00 00 92 40 00 00 02 49  01 FF 01 FF 00 00 00 00  |...@...I........|
C8004020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C8004030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|


  He sees zeroes at 0xc8009000.
  I see:
RedBoot> x -b 0xc8009000 -l 256
C8009000: 00 00 00 3F 00 00 00 0F  00 00 00 00 00 00 00 00  |...?............|
C8009010: 00 00 00 21 00 00 00 00  00 00 00 00 00 00 00 00  |...!............|
C8009020: 00 00 00 08 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C8009030: 00 00 00 12 00 00 00 00  00 00 00 20 00 00 00 00  |........... ....|
C8009040: 00 00 00 08 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C8009050: 00 00 00 10 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C8009060: 00 00 00 08 00 00 00 07  00 00 00 00 00 00 00 00  |................|
C8009070: 00 00 00 80 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C8009080: 00 00 00 00 00 00 00 00  00 00 00 31 00 00 00 00  |...........1....|
C8009090: 00 00 00 C0 00 00 00 01  00 00 00 00 00 00 00 00  |................|
C80090A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C80090B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C80090C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C80090D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C80090E0: 00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00  |................|
C80090F0: 00 00 00 00 00 00 00 0F  00 00 00 66 00 00 00 7D  |...........f...}|


2005.Feb.24

  o Some improvement to the SDRAM init selection.  I think it might be
    better to config the number of bits per chip since that's
    something clear from the chip datasheet.

2005.Feb.16

  o There appears to be an unresolved issue with the boot process.  In
    one case, a user found that the startup copy command was copying
    the kernel to RAM incorrectly.  There has been no resolution of
    the issue, but it turns out that copying a second time works
    correctly.  

2005.Feb.14

  o Need to tell people how to download the intel libraries to link in
    the NPE code.

2005.Feb.03

  o Byte accesses to flash will generate an unaligned access fault
    o I haven't looked into whether or not there is a CPU flag to fix
      this.  
    o Even redboot has this problem.  (Actually, it doesn't)
  o There is a bit in the UART interrupt enable register to active the
    UART.  Kinda sucky place for it.
  o The IXP420 will thrown an exception if SDRAM is accessed outside
    of the available region.
    o We may be able to probe the space if we install an exception
      handler.
  o Discovered that redboot was leaving the MMU on when it jumped to
    APEX.   APEX will now disable the MMU when it starts. 
    o This fixes the problem of not being able to download APEX to low
      memory and jump to it.
    o This does *not* fix the fact that flash needs to be read 16 bits
      at a time.
  o Booting looks like we need to copy the kernel to low memory:
    o Simple enough.  Added to the standard config paths. 
    o Handling the ramdisk, too
  o Fixed the alignment problem with flash.  A typo in the register
    macros meant that a wrong bit was being set and an important one
    was missing.
  o APEX will now boot the kernel.  It copies the kernel and ramdisk
    down to RAM and then jumps to the kernel.
    o There is an apparent problem in the startup.  The kernel dumps
      registers early on. 
	Uncompressing Linux........................................................... done, booting the kernel.
	690541F1:000000F5:00001AF8
	000F4E24-002B30A4>00008000
	002B30A4
	00008000: E1A0C000 E3A000D3 E121F000 EB000048  E33A0000 03A00070 0A000043 EB000058
	00008020: E3370000 03A00061 0A00003F EB00001F  E28FE01C E28AF00C C0008080 C01C6280
	00008040: C01EBC34 C01C6FEC C01C6FE0 C01BAD14  C01BA000 E51FE024 EE010F10 EE110F10
	00008060: E1A00000 E1A00000 E1A0F00E 00000000  00000000 00000000 00000000 00000000
	00008080: E24F304C E89321F0 E3A0B000 E1540005  3484B004 3AFFFFFC E5869000 E5871000
	000080A0: E3800002 E3C02002 E8880005 EA000132  E24F40B8 E2444901 E1A00004 E3A03000
	000080C0: E2802901 E4803004 E4803004 E4803004  E4803004 E1300002 1AFFFFF9 E3C42AFF
	000080E0: E0883002 E7843922 E2840A03 E3C3260F  E5802000 E2800000 E4803004 E2833601
	Linux version 2.4.22-xfs (root@sure_linux) (gcc version 3.2.1) #377 Fri Jul 2 09:02:32 CST 2004
	CPU: XScale-IXP425/IXC1100 revision 1
	Machine: Intel IXDP425 Development Platform

Here is another example.

apex> boot -g 0x300000
Booting kernel at 0x00300000...
Uncompressing Linux........................................................... .

690541F1:000000F5:00001AFA
003ECE24-005AB0A4>00008000
005AB0A4
00008000: E1A0C000 E3A000D3 E121F000 EB000048  E33A0000 03A00070 0A000043 EB0008
00008020: E3370000 03A00061 0A00003F EB00001F  E28FE01C E28AF00C C0008080 C01C60
00008040: C01EBC34 C01C6FEC C01C6FE0 C01BAD14  C01BA000 E51FE024 EE010F10 EE1100
00008060: E1A00000 E1A00000 E1A0F00E 00000000  00000000 00000000 00000000 000000
00008080: E24F304C E89321F0 E3A0B000 E1540005  3484B004 3AFFFFFC E5869000 E58710
000080A0: E3800002 E3C02002 E8880005 EA000132  E24F40B8 E2444901 E1A00004 E3A030
000080C0: E2802901 E4803004 E4803004 E4803004  E4803004 E1300002 1AFFFFF9 E3C42F
000080E0: E0883002 E7843922 E2840A03 E3C3260F  E5802000 E2800000 E4803004 E28331
Linux version 2.4.22-xfs (root@sure_linux) (gcc version 3.2.1) #377 Fri Jul 2 04
CPU: XScale-IXP425/IXC1100 revision 1
Machine: Intel IXDP425 Development Platform


    o I'm guessing that there is something small wrong with the
      startup.  Linux runs OK.  I can send and receive network frames.

  o We could add a switch to the copy command that reads the image
    headers and copies only that much data on startup.  It would
    improve the boot-up time slightly.

