11.3Sgarbled/* $NetBSD: README,v 1.3 2007/10/17 19:56:54 garbled Exp $ */ 21.2Sbriggs 31.1SbriggsOverview 41.1Sbriggs 51.1SbriggsThis is a port to the Motorola "SandPoint" evaluation system. The 61.1SbriggsSandPoint is the successor to the "Yellowknife" system. The system 71.1Sbriggscan be fitted with different PMCs (Processor Mezzanine Cards). This 81.1Sbriggsport is specifically for the rev X2 motherboard system with the PPC 91.2Sbriggs8240 PMC rev X4 installed. It also works with the Altimus X2 PMC 101.2Sbriggs(MPC7400 with MPC107). 111.1Sbriggs 121.1SbriggsAll references (cf) listed here are for the MPC8240 Integrated Processor 131.1SbriggsUser's Manual. 141.1Sbriggs 151.2SbriggsInformation on the Sandpoint can be found on Motorola's web site: 161.2Sbriggshttp://www.mot.com/SPS/PowerPC/teksupport/refdesigns/sandpoint.html 171.1Sbriggs 181.1Sbriggs 191.1SbriggsSandPoint Hardware Configuration 201.1Sbriggs 211.1SbriggsThis port was developed on a Sandpoint X2 motherboard with a Unity X4 PMC. 221.1Sbriggs 231.1SbriggsThis port assumes that the jumpers are set as follows: 241.1Sbriggs S3/S4 - Mode 1: PMC w/o IDE (switches opposite, one nearest PCI 251.1Sbriggs slot toward near edge) 261.1Sbriggs S5 - Interrupt to PMC normal (switch toward near edge) 271.1Sbriggs S6 - Local I/O shared with slot 2 (switch toward near edge) 281.1Sbriggs 291.1SbriggsMode 0 (PMC w/ IDE) does not appear to work right with ISA interrupts. The 301.1Sbriggsinterrupts from the Winbond chip do not appear at the PMC. 311.1Sbriggs 321.1SbriggsOn the PPMC, we assume a 100MHz clock. 331.1Sbriggson PPMC: (C == closed, or "on") 341.1Sbriggs SW2: 351.1Sbriggs C ROM on PCI bus (DINK32 on mainboard) 361.1Sbriggs - Map "B": CHRP 371.1Sbriggs C Motorola PPMC 381.1Sbriggs C Wait for initialization (peripheral mode) 391.1Sbriggs - Program mode: Normal mode 401.1Sbriggs - Select normal ROM 411.1Sbriggs - 33 MHz only 421.1Sbriggs - COP only resets local CPU/MPC107 431.1Sbriggs SW3: 441.1Sbriggs -C--C PCI 33, Mem 66, PPC 266 451.1Sbriggs -- 0.5 - 0.9 ns PCI hold time 461.1Sbriggs C 25 ohm PCI drive strength 471.1Sbriggs 481.1Sbriggs 491.1SbriggsAddress Map 501.1Sbriggs 511.1SbriggsFor this port, we choose the "Address Map B" (CHRP-compatible) for the 521.1Sbriggssystem (see SW2, #2, above): 531.1Sbriggs 541.1Sbriggs (Processor View) 551.1Sbriggs0000 0000 0009 FFFF System Memory 561.1Sbriggs000A 0000 000F FFFF Compatibility Hole (programmable to go to PCI space 571.1Sbriggs or system memory--programmed for system memory--cf 5.8) 581.1Sbriggs0010 0000 3FFF FFFF System memory 591.1Sbriggs4000 0000 7FFF FFFF Reserved (programmed to give a memory select 601.1Sbriggs error if accessed--cf 5.7.2) 611.1Sbriggs8000 0000 FCFF FFFF PCI memory space 621.1SbriggsFD00 0000 FDFF FFFF PCI/ISA memory space (see 5.8, CPU_FD_ALIAS_EN) 631.1SbriggsFE00 0000 FE7F FFFF PCI/ISA I/O space (Forwarded to PCI address space 641.1Sbriggs with high byte zeroed, but FE01 0000 and up are 651.1Sbriggs reserved) 661.1SbriggsFE80 0000 FEBF FFFF PCI I/O space (Forwarded to PCI I/O space with high 671.1Sbriggs byte zeroed) 681.1SbriggsFEC0 0000 FEDF FFFF PCI configuration address register (Each word in this 691.1Sbriggs range is aliased to the PCI CONFIG_ADDR register) 701.1SbriggsFEE0 0000 FEEF FFFF PCI configuration data register (Each word in this 711.1Sbriggs range is aliased to the PCI CONFIG_DATA register) 721.1SbriggsFEF0 0000 FEFF FFFF PCI interrupt acknowledge 731.1SbriggsFF00 0000 FF7F FFFF 32- or 64-bit Flash/ROM space (Can hit either local 741.1Sbriggs memory or PCI bus -- cf. 5.6) 751.1SbriggsFF80 0000 FFFF FFFF 8-, 32- or 64-bit Flash/ROM space (Can hit either 761.1Sbriggs local memory or PCI bus -- cf. 5.6) 771.1Sbriggs 781.1SbriggsThis is a host-mode port, so the inbound and output translation windows 791.1Sbriggsare unused. 801.1Sbriggs 811.1SbriggsThe Embedded Utilities Memory Block (EUMB) is set to be 1M below the end 821.2Sbriggsof the PCI memory space: FC00 0000, so EUMBBAR is FC00 0000, giving us 831.1Sbriggs 841.2SbriggsMessage unit (I2O) base : FC00 0000 (cf. 10.2, 10.2.3, 10.3) 851.2SbriggsDMA base : FC00 1000 (cf. 9.2) 861.2SbriggsATU base : FC00 2000 (cf. 4.3.3) 871.2SbriggsI2C base : FC00 3000 (cf. 11.3) 881.2SbriggsEPIC base : FC04 0000 (cf. 12.2) 891.1Sbriggs 901.1Sbriggs 911.1Sbriggs 921.1SbriggsBoot Information 931.1Sbriggs 941.1SbriggsThe SandPoint ships with the Motorola DINK32 ROM. This is a rather 951.1Sbriggsbasic ROM with only serial-download (S-Record) capability for 961.1Sbriggsloading the kernel. Basically, the kernel is loaded to a specified 971.1Sbriggsaddress and you jump to it. The ROM takes care of initializing 981.1Sbriggsthe MICRs and MCCRs. There is really no boot information to pass. 991.1Sbriggs 1001.1SbriggsIt would be nice to have a much more complete ROM interface, allowing 1011.1Sbriggssettings for, say, bootp/tftp boot, automatic boot, and persistent 1021.1Sbriggssettings (for console rate, auto boot, bootp, etc), and that might 1031.1Sbriggsbe provided at some point, but that's not available as of this 1041.1Sbriggswriting. 1051.1Sbriggs 1061.2SbriggsSo, the kernel is hard-coded to boot w/ 32MB for now. 1071.1Sbriggs 1081.1Sbriggs 1091.1Sbriggs 1101.1SbriggsInterrupt Configuration 1111.1Sbriggs 1121.1SbriggsThe 8240 has the internal EPIC. For the SandPoint, the EPIC is programmed 1131.1Sbriggsin mixed-mode (GCR) with direct interrupts (EICR). With this configuration, 1141.1Sbriggsthere are 13 available interrupts: 1151.1Sbriggs 4 global timers 1161.1Sbriggs 5 direct IRQs 1171.1Sbriggs IRQ0 - PCI Slot #0 INTA# 1181.1Sbriggs IRQ1 - PCI Slot #1 INTA# / shared with WinBond I/O 1191.1Sbriggs IRQ2 - PCI Slot #2 INTA# 1201.1Sbriggs IRQ3 - PCI Slot #3 INTA# 1211.1Sbriggs IRQ4 - On-PPMC 16552 interrupt (Unity X2) 1221.1Sbriggs IRQ4 - pulled down w/ resistor (Unity X4) 1231.1Sbriggs 4 internal interrupts 1241.1Sbriggs I2C 1251.1Sbriggs DMA Ch0 1261.1Sbriggs DMA Ch1 1271.1Sbriggs I2O message unit 1281.1Sbriggs 1291.1SbriggsThe SandPoint can run in one of 4 interrupt modes: 1301.1Sbriggs 0 - PMC host with IDE (3.3v PCI slots are unavailable) 1311.1Sbriggs 1 - PMC host w/o IDE (all PCI slots are available) 1321.1Sbriggs 2 - PMC agent, Winbond providing arbitration & interrupt to INTA# on PMC 1331.1Sbriggs 3 - Yellowknife mode--just like #2, except drives INTA# on 4th PCI slot 1341.1Sbriggs 1351.1SbriggsWe choose to run in mode 1 as Motorola recommends modes 0 or 1 for 1361.1Sbriggsall new development. Unfortunately, mode 0 does not appear to 1371.1Sbriggswork--"ISA" interrupts are lost. In this mode, with interrupts 1381.1Sbriggsrouted to PCI slot 3, we have to check for both a Winbond (ISA) 1391.1Sbriggsinterrupt, and a PCI slot interrupt. So basically, we have a 1401.1Sbriggstwo-level interrupt configuration for Winbond interrupts. The ISA 1411.1Sbriggsbus attachment registers an interrupt for PCI slot 3 with its own 1421.1Sbriggsinterrupt handler. Drivers for ISA devices on the Winbond will 1431.1Sbriggsregister interrupts with the ISA interrupt handler. The sticky 1441.1Sbriggspart of this is how to deal with one global interrupt priority. 1451.1Sbriggs 1461.1Sbriggs 1471.3Sgarbled 1481.3SgarbledSandPoint III "SP3" Interrupt Configuration 1491.3Sgarbled 1501.3SgarbledWith a help of additional logic circuit SP3 organizes external 1511.3Sgarbledinterrupt sources as EPIC serial mode interrupts. 1521.3Sgarbled 16 serial IRQs 1531.3Sgarbled IRQ0 - WinBond South bridge i8259 PIC, polarity inverted 1541.3Sgarbled IRQ1 - reserved 1551.3Sgarbled IRQ2 - PCI Slot #1, INTA# 1561.3Sgarbled IRQ3 - PCI Slot #2, INTA# 1571.3Sgarbled IRQ4 - PCI Slot #3, INTA# 1581.3Sgarbled IRQ5 - PCI Slot #4, INTA# 1591.3Sgarbled IRQ6 - WinBond INTA# 1601.3Sgarbled IRQ7 - WinBond INTB# 1611.3Sgarbled IRQ8 - WinBond INTC# 1621.3Sgarbled IRQ9 - WinBond INTD# 1631.3Sgarbled IRQ10 thru 15 - reserved 1641.3SgarbledSP3 provides switch selections to emulate SP1/2 compatible EPIC 1651.3Sgarbleddirect mode interrupt assignments. 166