密级

Similar documents
华恒家庭网关方案

密级

自由軟體教學平台

Abstract arm linux tool-chain root NET-Start! 2

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def

<4D F736F F D20C7B6C8EBCABD6C696E7578BBF9B4A1CAB5D1E92E646F63>

1

ARM JTAG实时仿真器安装使用指南

Windows 2000 Server for T100

Microsoft Word - PS2_linux_guide_cn.doc

一个开放源码的嵌入式仿真环境 ― SkyEye

IP505SM_manual_cn.doc

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

ebook70-22

Simulator By SunLingxi 2003

ch08.PDF

RTX3.2.0标准版 - 技术白皮书

Microsoft Word - 正文.doc

EK-STM32F

Windows 2000 Server for T100

USB解决方案.ppt

目 录

ICD ICD ICD ICD ICD

P4VM800_BIOS_CN.p65

epub

CC213

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

P4V88+_BIOS_CN.p65

AL-M200 Series

PCM-3386用户手册.doc

中文手册

ebook62-1

untitled

ebook140-9

TCA Linux 相容性認證測試流程步驟

Data Server_new_.doc

华恒家庭网关方案

51 C 51 isp 10 C PCB C C C C KEIL

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

ebook140-8

untitled

Microsoft Word - linux命令及建议.doc

<4D F736F F D20C7B6C8EBCABDCFB5CDB3C9E8BCC6CAA6BFBCCAD4B4F3B8D92E646F63>

untitled

目录

專業式報告

C语言的应用.PDF

Microsoft Word - InoTouch Editor编程软件手册 doc

audiogram3 Owners Manual

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

Serial ATA ( Nvidia nforce430)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Microsoft Win

05_資源分享-NFS及NIS.doc

Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Micro

宏电文档

Red Flag Linux Desktop 4.0 Red Flag Linux Desktop 4.0 1

Microsoft Word - 第5章.doc

RAID RAID 0 RAID 1 RAID 5 RAID * ( -1)* ( /2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( )

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

SPHE8202R Design Guide Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provi

bingdian001.com

K7VT2_QIG_v3

《计算机应用基础》学习材料(讲义)

Bus Hound 5

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

逢 甲 大 學

untitled

Microsoft Word htm

untitled

<4D F736F F F696E74202D20A1B6CFEEC4BFD2BB20B3F5CAB6BCC6CBE3BBFACDF8C2E7A1B7C8CECEF1C8FD20CAECCFA A1A24950D0ADD2E9BACD4950B5D8D6B72E707074>

68369 (ppp quickstart guide)

.. 3 N

典型自编教材

声 明 Copyright 2010 杭 州 华 三 通 信 技 术 有 限 公 司 及 其 许 可 者 版 权 所 有, 保 留 一 切 权 利 未 经 本 公 司 书 面 许 可, 任 何 单 位 和 个 人 不 得 擅 自 摘 抄 复 制 本 书 内 容 的 部 分 或 全 部, 并 不 得

untitled

2004 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A. Sun Sun Berkeley BSD University of California UNIX X/Open Company, Ltd.

ATMEL AT90S8515 AVR CPU AVR AVR AVR ATMEL RISC 32 8 r0 r X Y Z R0 R1 R2 R13 R14 R15 R16 R17 R26 R27 R28 R29 R30 R31 0x00 0x

C/C++ - 文件IO

ebook71-13

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

Cygwin Cygwin windows Linux Cygwin.dll Windows Linux API Linux Windows Linux 2

untitled

QL1880new2.PDF

工程师培训


LSI U320 SCSI卡用户手册.doc


本文由筱驀釹贡献

lect03.ppt

Guide to Install SATA Hard Disks

PowerPoint Presentation

RunPC2_.doc

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

自由軟體社群發展經驗與 Linux認證介紹

Transcription:

PPC82

2006-11-23 V1.0.1 2

...3...4...8 1.1 WINDOWS...8 2.2 REDHAT LINUX...12 2.2.1...12 2.2.2 LINUX uimgae ramdisk...12...14 3.1...15 3.1.1...15 3.2...40 3.3...41 3.4 uboot...43 3.5 Linux MTD...44...45 4.1...45 4.2...45 4.3...47 4.4...48 4.5...48 4.5.1...48 4.5.2...51...52 5.1...52 5.2...53 5.3...54 5.4 MPC8280...55 5.5...55 5.6...56 5.7...56 5.8 GPIO...56 5.9 4 8 LED...57 5.10 FCC1 FCC2 FCC3...58 5.11...58 5.12...60...61 6.1...61 6.2...61...61...62 3

PPC82 MPC82 PPC82 PowerPC PCI PPC82 PPC82 128M SDRAM 8M FLASH NAND FLASH 10M/100M RS-232 (COM1) Linux PPC82 PPC82 PPC82 LINUX PPC82 PPC8260/8270/8280 PPC8270 603e core with 16K inst and 16K data caches 64-bit 60x bus 32-bit PCI bus 128K ROM 32K IRAM 32K DPRAM Three FCCs for 10/100 Ethernet 128 HDLC channels 4 TDMs 4 SCCs 2 SMCs SPI I2C Memory controller built from SDRAM UPM GPCM machines New features -- USB RMII Performance 333 MHz CPU 250 MHz CPM 83 MHz bus 450 MHz CPU 300 MHz CPM 100 MHz bus Less than 2W @ full performance 1.5V Technology HIP7AP 3.3V I/O 1.5V Core 480 TBGA 37.5x37.5mm 1.27mm ball pitch PPC82xx + ATX 4

CPU MPC8270 SDRAM K4S561632 x4(128mbyte) BOOT FLASH AM29LV640(8MByte) Nand FLASH K9F FLASH CPU JTAG SMC1 SMC2 SCC1 3 SMC1 3 FCC1 FCC2 FCC3 6 1 4 1 5V 5V/3A ATX BOOTLOADER U-BOOT Motavista Linux 2.4.18 DENX Linux 2.4.18 123mm x 86mm 178mm x 134mm MPC8270 MPC8270 DB9 5V/3A 1 5

6

4 PCB RedHat Linux90 3 bootloader for MPC8270 linux Linux pdf ProtelDXP2004 PCB pdf ProtelDXP2004 PCB PCB 1 WINDOWS PC 1 > > > COM1 9600 5V uboot Linux 010-62233778 13683665548 13811399616 7

1.1 WINDOWS MPC8250 8

9600 8 1 1 PC 1 LINUX 9

login eth0 status root ls LINUX ifconfig ppc82 eth0 FCC0 eth1 FCC1 eth2 FCC2 ifconfig eth IPADDR root@(none):/# ifconfig eth0192.168.0.107 root@(none):/# ifconfig eth1 192.168.1.107 10

root@(none):/# ifconfig eth2 192.168.2.107 PC IP PC IP IP IP ping eth1 IP 192.168.1.107 PC IP 192.168.1.103 ping 192.168.1.103 ping telnet PC 11

2.2 REDHAT LINUX 2.2.1 PC REDHAT LINUX CDROM mount /dev/cdrom /mnt/cdrom cd /mnt/cdrom CDROM./inst y 2.2.2 LINUX uimgae ramdisk LINUX uimage cd /PPC8270/usr/src/linux make uimage make dep LINUX uimage /tftpbootboot date ls uimage date ls -la /tftpbootboot/uimage ramdisk /PPC8270/usr/src/ramdisk/ramdisk.image.gz cd /PPC8270/usr/src/ramdisk tar zxf ramdisk.image.gz ramdisk.image mount test mkdir test( test ) mount o loop ramdisk.image test test bin hello bin cp /PPC8270/usr/src/application/hello/hello /PPC8270/usr/src/ramdisk/test/bin test umount umount test./image.sh ramdisk.img /tftpbootboot /tftpbootboot ramdisk.img uimage ramdisk uboot sdram ram 12

flash tftpboot tftpboot minicom ( 9600 8N1 ) minicom uboot uboot uboot flash Linux 3 uboot tftpboot 800000 uimage /tftpboot/uimage 800000 tftpboot a00000 ramdisk.img /tftpboot/ramdisk.img a00000 flash ram Linux bootm 800000 a00000 ( ) flash tftpboot 800000 uimage erase 0xfff40000 0xffffffff cp.b 0x800000 0xfff400000 SIZE tftpboot a00000 uimage erase 0xff810000 0xffcfffff cp.b 0x800000 0xff810000 SIZE SIZE uboot tftpboot printenv/setenv/saveenv uboot doc DENX PPCBoot and Linux Guide 13

PPC82 MOTOROLA PPC8270 RS232 LINUX REDHAT LINUX PC PPC8270 FLASH PC FLASH PC PPC8270 PPC8270 PC CPU Vxwork psos Neculeus Windows CE LINUX Linux Linux Internet 14

linux Linux Linux Linux TCP/IP Linux Linux Linux Linux UNIX LINUX LINUX PC linux forpowerpc www.ppc8270.org lists.ppc8270.org. 3.1 3.1.1 Linux native HOST PC 15

1 NFS 2 JTAG JTAG JTAG Abatron BDI2000 FLASH INTEL PPC8270 MOTOROLA PowerPC 8270 GNU PC LINUX REDHAT LINUX REDHAT 9.0 PC NFS mount FTP TFTP RedHat9.0 l PC LINUX RedHat9.0 Custom Package everything Linux Linux Linux No firewall 2 TFTP FTP Enable Running RTL8139 REDHAT9.0 IP ifconfig eth0 192.168.1.107 TFTP RedHat9.0 /etc/xinetd.d/tftp disable no 16

service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s/tftpboot disable = no per_source = 11 cps = 1002 flags = IPv4 } /etc/xinetd.d/telnet /etc/xinetd.d/rsh setup [system service] tftp xinetd /etc/init.d/xinet.d restart service xinet.d restart tftpboot FTP RedHat9.0 /etc/vsftpd.ftpusers /etc/vsftpd.user_list nobody /etc/vsftpd.ftpusers # Users that are not allowed to login via ftp root bin daemon adm lp sync shutdown halt mail news uucp operator games root service vsftpd restart CDROM mount /dev/cdrom /mnt /dev/cdrom CDROM /dev/hdb mount t iso9660 /dev/hdb /mnt 17

cd /mnt mount./inst y y /PPC8270 /PPC8270/usr/src/ramdisk ramdisk /PPC8270/usr/src/application/ /PPC8270/usr/src/tarballs/ LINUX /PPC8270/usr/src/ linux-2.4.20_mvl31 LINUX /opt/ LINUX /PPC8270/usr/src/ u-boot-1.1.1 uboot PPC8270 root@(none):/# ls bin dev home lost+found myapp proc sbin usr boot etc lib mnt opt root tmp var /PPC8270/usr/src/ramdisk root.ext2 /bin/ /dev/ uboot 3 Linux Linux uboot Linux ppc_82xx-gcc -o hello_world hello_world.c file hello_world hello_world: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV),for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped PowerPC linux PPC82 JTAG JTAG Abatron BDI2000 FLASH BDI2000 8270.cfg bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI 18

Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end 19

WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 [FLASH] CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 FILE 0x00000000 reg8260.def 20

reg8260.def PPC82 Register definition for MPC8260 =============================== name: user defined name of the register type: the type of the register GPR general purpose register SPR special purpose register MM memory mapped register DMMx direct memory mapped register with offset x = 1..4 the base is defined in the configuration file e.g. DMM1 0x02200000 addr: the number, adddress or offset of the register size the size of the register (8,16 or 32) name type addr size ------------------------------------------- sp GPR 1 xer SPR 1 lr SPR 8 ctr SPR 9 dsisr SPR 18 dar SPR 19 dec SPR 22 sdr1 SPR 25 srr0 SPR 26 srr1 SPR 27 tbl SPR 268 tbu SPR 269 sprg0 SPR 272 sprg1 SPR 273 sprg2 SPR 274 sprg3 SPR 275 ear SPR 282 pvr SPR 287 ibat0u SPR 528 ibat0l SPR 529 ibat1u SPR 530 ibat1l SPR 531 21

ibat2u SPR 532 ibat2l SPR 533 ibat3u SPR 534 ibat3l SPR 535 dbat0u SPR 536 dbat0l SPR 537 dbat1u SPR 538 dbat1l SPR 539 dbat2u SPR 540 dbat2l SPR 541 dbat3u SPR 542 dbat3l SPR 543 dmiss SPR 976 dcmp SPR 977 imiss SPR 980 icmp SPR 981 rpa SPR 982 hid0 SPR 1008 hid1 SPR 1009 hid2 SPR 1011 DMM1 must be set to the internal memory base address General SIU siumcr DMM1 0x10000 32 sypcr DMM1 0x10004 32 swsr DMM1 0x1000e 16 bcr DMM1 0x10024 32 ppc_acr DMM1 0x10028 8 ppc_alrh DMM1 0x1002c 32 ppc_alrl DMM1 0x10030 32 lcl_acr DMM1 0x10034 8 lcl_alrh DMM1 0x10038 32 lcl_alrl DMM1 0x1003c 32 tescr1 DMM1 0x10040 32 l_tescr1 DMM1 0x10048 32 l_tescr2 DMM1 0x1004c 32 pdtea DMM1 0x10050 32 pdtem DMM1 0x10054 bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System 22

Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 23

WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 [FLASH] CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) 24

FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 0x00000000 FILE reg8260.def8 ldtea DMM1 0x10058 32 ldtem DMM1 0x1005c 8 Memory Controller br0 DMM1 0x10100 32 or0 DMM1 0x10104 32 br1 DMM1 0x10108 32 or1 DMM1 0x1010c 32 br2 DMM1 0x10110 32 or2 DMM1 0x10114 32 br3 DMM1 0x10118 32 or3 DMM1 0x1011c 32 br4 DMM1 0x10120 32 or4 DMM1 0x10124 32 br5 DMM1 0x10128 32 or5 DMM1 0x1012c 32 br6 DMM1 0x10130 32 or6 DMM1 0x10134 32 br7 DMM1 0x10138 32 or7 DMM1 0x1013c 32 br8 DMM1 0x10140 32 or8 DMM1 0x10144 32 br9 DMM1 0x10148 32 or9 DMM1 0x1014c 32 br10 DMM1 0x10150 32 or10 DMM1 0x10154 32 br11 DMM1 0x10158 32 or11 DMM1 0x1015c 32 mar DMM1 0x10168 32 mamr DMM1 0x10170 32 mbmr DMM1 0x10174 32 mcmr DMM1 0x10178 32 mptpr DMM1 0x10184 16 mdr DMM1 0x10188 32 25

psdmr DMM1 0x10190 32 lsdmr DMM1 0x10194 bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 26

WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 [FLASH] 27

CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 0x00000000 FILE reg8260.def 32 purt DMM1 0x10198 8 psrt DMM1 0x1019c 8 lurt DMM1 0x101a0 8 lsrt DMM1 0x101a4 8 immr DMM1 0x101a8 32 System Integration Timers tmcntsc DMM1 0x10220 16 tmcnt DMM1 0x10224 32 tmcntal DMM1 0x1022c 32 piscr DMM1 0x10240 16 pitc DMM1 0x10244 32 pitr DMM1 0x10248 32 Interrupt Controller sicr DMM1 0x10c00 16 sivec DMM1 0x10c04 32 sipnr_h DMM1 0x10c08 32 sipnr_l DMM1 0x10c0c 32 siprr DMM1 0x10c10 32 scprr_h DMM1 0x10c14 32 scprr_l DMM1 0x10c18 32 simr_h DMM1 0x10c1c 32 simr_l DMM1 0x10c20 32 siexr DMM1 0x10c24 32 Clocks and Reset sccr DMM1 0x10c80 32 scmr DMM1 0x10c88 32 rsr DMM1 0x10c90 32 rmr DMM1 0x10c94 32 28

Input/Output Port pdira DMM1 0x10d00 32 ppara DMM1 0x10d04 32 psora DMM1 0x10d08 32 podra DMM1 0x10d0c 32 pdata DMM1 0x10d10 32 pdirb DMM1 0x10d20 32 pparb DMM1 0x10d24 32 psorb DMM1 0x10d28 32 podrb DMM1 0x10d2c 32 pdatb DMM1 0x10d30 32 pdirc DMM1 0x10d40 32 pparc DMM1 0x10d44 32 psorc DMM1 0x10d48 bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 29

SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation 30

POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 [FLASH] CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 0x00000000 FILE reg8260.def 32 podrc DMM1 0x10d4c 32 pdatc DMM1 0x10d50 32 pdird DMM1 0x10d60 32 ppard DMM1 0x10d64 32 psord DMM1 0x10d68 32 podrd DMM1 0x10d6c 32 pdatd DMM1 0x10d70 32 CPM Timers tgcr1 DMM1 0x10d80 8 tgcr2 DMM1 0x10d84 8 tmr1 DMM1 0x10d90 16 tmr2 DMM1 0x10d92 16 trr1 DMM1 0x10d94 16 trr2 DMM1 0x10d96 16 tcr1 DMM1 0x10d98 16 tcr2 DMM1 0x10d9a 16 tcn1 DMM1 0x10d9c 16 31

tcn2 DMM1 0x10d9e 16 tmr3 DMM1 0x10da0 16 tmr4 DMM1 0x10da2 16 trr3 DMM1 0x10da4 16 trr4 DMM1 0x10da6 16 tcr3 DMM1 0x10da8 16 tcr4 DMM1 0x10daa 16 tcn3 DMM1 0x10dac 16 tcn4 DMM1 0x10dae 16 ter1 DMM1 0x10db0 16 ter2 DMM1 0x10db2 16 ter3 DMM1 0x10db4 16 ter4 DMM1 0x10db6 16 SDMA-General sdsr DMM1 0x11018 8 sdmr DMM1 0x1101c 8 IDMA idsr1 DMM1 0x11020 8 idmr1 DMM1 0x11024 8 idsr2 DMM1 0x11028 8 idmr2 DMM1 0x1102c 8 idsr3 DMM1 0x11030 8 idmr3 DMM1 0x11034 bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR 32

WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) 33

JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 [FLASH] CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 0x00000000 FILE reg8260.def 8 idsr4 DMM1 0x11038 8 idmr4 DMM1 0x1103c 8 FCC1 gfmr1 DMM1 0x11300 32 fpsmr1 DMM1 0x11304 32 ftodr1 DMM1 0x11308 16 fdsr1 DMM1 0x1130c 16 34

fcce1 DMM1 0x11310 32 fccm1 DMM1 0x11314 32 fccs1 DMM1 0x11318 8 ftirr1_phy0 DMM1 0x1131c 8 ftirr1_phy1 DMM1 0x1131d 8 ftirr1_phy2 DMM1 0x1131e 8 ftirr1_phy3 DMM1 0x1131f 8 FCC2 gfmr2 DMM1 0x11320 32 fpsmr2 DMM1 0x11324 32 ftodr2 DMM1 0x11328 16 fdsr2 DMM1 0x1132c 16 fcce2 DMM1 0x11330 32 fccm2 DMM1 0x11334 32 fccs2 DMM1 0x11338 8 ftirr2_phy0 DMM1 0x1133c 8 ftirr2_phy1 DMM1 0x1133d 8 ftirr2_phy2 DMM1 0x1133e 8 ftirr2_phy3 DMM1 0x1133f 8 FCC3 gfmr3 DMM1 0x11340 32 fpsmr3 DMM1 0x11344 32 ftodr3 DMM1 0x11348 16 fdsr3 DMM1 0x1134c 16 fcce3 DMM1 0x11350 32 fccm3 DMM1 0x11354 32 fccs3 DMM1 0x11358 8 BRGs 5-8 brgc5 DMM1 0x115f0 32 brgc6 DMM1 0x115f4 32 brgc7 DMM1 0x115f8 32 brgc8 DMM1 0x115fc 32 I2C i2mod DMM1 0x11860 8 i2add DMM1 0x11864 8 i2brg DMM1 0x11868 8 i2com DMM1 0x1186c 8 i2cer DMM1 0x11870 8 i2cmr DMM1 0x11874 8 35

Communication Processor cpcr DMM1 0x119c0 32 rccr DMM1 0x119c4 32 rter DMM1 0x119d6 16 rtmr DMM1 0x119da 16 rtscr DMM1 0x119dc 16 rtsr DMM1 0x119e0 32 BRGs 1-4 brgc1 DMM1 0x119f0 32 brgc2 DMM1 0x119f4 32 brgc3 DMM1 0x119f8 32 brgc4 DMM1 0x119fc 32 SCC1 gsmr_l1 DMM1 0x11a00 32 gsmr_h1 DMM1 0x11a04 32 psmr1 DMM1 0x11a08 16 todr1 DMM1 0x11a0c 16 dsr1 DMM1 0x11a0e 16 scce1 DMM1 0x11a10 16 sccm1 DMM1 0x11a14 16 sccs1 DMM1 0x11a17 8 SCC2 gsmr_l2 DMM1 0x11a20 32 gsmr_h2 DMM1 0x11a24 32 psmr2 DMM1 0x11a28 16 todr2 DMM1 0x11a2c 16 dsr2 DMM1 0x11a2e 16 scce2 DMM1 0x11a30 16 sccm2 DMM1 0x11a34 16 sccs2 DMM1 0x11a37 8 SCC3 gsmr_l3 DMM1 0x11a40 32 gsmr_h3 DMM1 0x11a44 32 psmr3 DMM1 0x11a48 16 todr3 DMM1 0x11a4c 16 dsr3 DMM1 0x11a4e 16 scce3 DMM1 0x11a50 16 sccm3 DMM1 0x11a54 16 sccs3 DMM1 0x11a57 8 36

SCC4 gsmr_l4 DMM1 0x11a60 32 gsmr_h4 DMM1 0x11a64 32 psmr4 DMM1 0x11a68 16 todr4 DMM1 0x11a6c 16 dsr4 DMM1 0x11a6e 16 scce4 DMM1 0x11a70 16 sccm4 DMM1 0x11a74 16 sccs4 DMM1 0x11a77 8 SMC1 smcmr1 DMM1 0x11a82 16 smce1 DMM1 0x11a86 8 smcm1 DMM1 0x11a8a 8 SMC2 smcmr2 DMM1 0x11a92 16 smce2 DMM1 0x11a96 8 smcm2 DMM1 0x11a9a 8 SPI spmode DMM1 0x11aa0 16 spie DMM1 0x11aa6 8 spim DMM1 0x11aaa 8 spcom DMM1 0x11aad 8 CPM Mux cmxsi1cr DMM1 0x11b00 8 cmxsi2cr DMM1 0x11b02 8 cmxfcr DMM1 0x11b04 32 cmxscr DMM1 0x11b08 32 cmxsmr DMM1 0x11b0c 8 cmxuar DMM1 0x11b0e 16 SI1 Registers si1amr DMM1 0x11b20 16 si1bmr DMM1 0x11b22 16 si1cmr DMM1 0x11b24 16 si1dmr DMM1 0x11b26 16 si1gmr DMM1 0x11b28 8 si1cmdr DMM1 0x11b2a 8 si1str DMM1 0x11b2c 8 si1rsr DMM1 0x11b2e 16 37

MCC1 Registers mcce1 DMM1 0x11b30 16 mccm1 DMM1 0x11b34 16 mccf1 DMM1 0x11b38 8 bdigdb Configuration File For NPW755 (MPC755 + MPC8250) System Shen Rong <rshen@udtech.com.cn> [INIT] init core register WREG MSR 0x00003002 MSR -- ME, RI,FP WREG MSR 0x00001002 MSR -- FP, RI Chip select FLASH (16bit 8MB) WM32 0x00010100 0xFF801001 BR0 WM32 0x00010104 0xFF800Cf6 OR0 WM32 0x00010004 0xFFFFFF03 SYPCR WM32 0x00010024 0x00008000 BCR WM32 0x00010000 0x4224C000 SIUMCR WM16 0x0001000E 0x556C SWSR WM16 0x0001000E 0xAA39 SWSR >> should be confirmed WM32 0x000101a8 0xF0000000 change immr WM32 0xF0010110 0x00000041 BR2 WM32 0xF0010114 0xF8002AC0 OR2 SDRAM init(sdram machine) WM16 0xF0010184 0x2000 MPTPR WM8 0xF001019C 0x32 PSRT WM32 0xF0010190 0x832DA46E PSDMR1 -- normal opt, disable refresh WM32 0xF0010190 0xAB2DA46E PSDMR2 -- precharge WM8 0x00000000 0xFF MEM1 -- a write following the precharge WM32 0xF0010190 0x8B2DA46E PSDMR3 -- CBR refresh WM8 0x00000000 0xFF MEM2 38

WM8 0x00000001 0xFF MEM3 WM8 0x00000002 0xFF MEM4 WM8 0x00000003 0xFF MEM5 WM8 0x00000004 0xFF MEM6 WM8 0x00000005 0xFF MEM7 WM8 0x00000006 0xFF MEM8 WM8 0x00000007 0xFF MEM9 WM32 0xF0010190 0x9B2DA46E PSDMR4 -- mode register write WM8 0x00000110 0xFF MEM10 -- mode value WM32 0xF0010190 0xDB2DA46E PSDMR5 -- enable auto refresh WM32 0xF0010190 0xC32DA46E PSDMR6 -- normal opt, auto refresh enabled SDRAM init end WM32 0x0 0x11223344 WM32 0x4 0x55667788 [TARGET] CPUTYPE 8260 the CPU type (603EV,750,8240,8260) JTAGCLOCK 0 use 16 MHz JTAG clock WORKSPACE 0x800000 workspace for fast download and cache flush BDIMODE AGENT the BDI working mode (LOADONLY AGENT GATEWAY) BREAKMODE SOFT SOFT or HARD, HARD uses PPC hardware breakpoint MMU XLAT translate effective to physical address PTBASE 0x000000f0 here is the pointer to the page table pointers DCACHE FLUSH VECTOR CATCH catch unhandled exceptions MEMDELAY 2000 additional memory access delay PARITY ON enable data parity generation POWERUP 200 WAKEUP 200 [HOST] IP 192.168.2.100 FILE E:\bdi2000\powerpc\ppcboot.bin FORMAT BIN LOAD MANUAL load code MANUAL or AUTO after reset DEBUGPORT 2001 39

[FLASH] CHIPTYPE AM29BX16 Flash type AMD29LV640 CHIPSIZE 0x800000 The size of one flash chip in bytes: 8M(e.g. AM29F010 = 0x20000) BUSWIDTH 16 The width of the flash memory bus in bits (8 16 32 64) FILE 8250_head.bin FORMAT BIN 0xFFE00000 ERASE 0XFE000000 BLOCK ERASE 0XFFE00000 BLOCK WORKSPACE 0x800000 workspace in target RAM for fast download [REGS] DMM1 0x00000000 FILE reg8260.def SI2 Registers si2amr DMM1 0x11b40 16 si2bmr DMM1 0x11b42 16 si2cmr DMM1 0x11b44 16 si2dmr DMM1 0x11b46 16 si2gmr DMM1 0x11b48 8 si2cmdr DMM1 0x11b4a 8 si2str DMM1 0x11b4c 8 si2rsr DMM1 0x11b4e 16 MCC2 Registers mcce2 DMM1 0x11b50 16 mccm2 DMM1 0x11b54 16 mccf2 DMM1 0x11b58 8 BDI2000 telnet BDI2000 3.2 LINUX / PPC8270/usr/src/ linux-2.4.20_mvl31 LINUX a) make mrproper b) make pegasus_config PPC82 make menuconfig make xconfig c) make dep d) make uimage uboot 40

PPC8270/usr/src/ linux-2.4.20_mvl31.config arch/ppc/configs/ uimage PPC8270/usr/src/ linux-2.4.20_mvl31 arch/ppc/boot/images/ copy /tftpboot FLASH Linux make depmake uimage &>log log vi log 3.3 Linux Linux / root root=/dev/nfs root=/dev/mtdblock/1 mtd root=/dev/ram Ramdisk ext2 ext3 jffs jffs2 romfs(uclinux) cramfs nfs ext2 ext3 Linux FLASH ext2/ext3 Ramdisk jffs jffs2 FLASH romfs cramfs cramfs nfs nfs Linux Linux FLASH FLASH Linux Ram Ramdisk Ramdisk FLASH FLASH U-Boot Linux FLASH ( mkimage ) Ram Ramdisk Ramdisk FLASH Ram FLASH Ramdisk Ram FLASH Ramdisk Ramdisk a) Linux Ramdisk initrd Linux ramdisk PPC8270 Block Device 41

PPC82 10Mbytes ramdisk ramdisk b) Linux Ramdisk FLASH c) U-Boot initrd_high Ramdisk Ramdisk Ramdisk Linux U-Boot Linux Linux mem=48m initrd_high 0x3000000 Linux Ramdisk FLASH d) bootm bootm 0xfff40000 0xff810000 Linux Kernel Image RootFS Image Image FLASH PPC82 MontaVista Linux 100 FLASH 1) Linux 2) 3) MontaVista Devrocket MontaVista Linux kernel Bug 10M Bytes ext2 dd if=/dev/zero of=./root bs=11264k count=1 2>/dev/null mke2fs -F -m0./root tune2fs -c 0./root root 10M Byte 42

ext2 mount PPC82 uboot Linux a) mkdir /mnt/ext2 b) mkdir /mnt/root c) mount -o loop /ppc8270/usr/src/ramdisk/root.ext2 /mnt/ext2 d) mount -o loop /ppc8270/usr/src/ramdisk/root /mnt/root e) cd /mnt/ext2 f) tar -cf /tmp/root.tar./* g) cd /mnt/root h) rm -rf * i) tar -xf /tmp/root.tar j) cd /ppc8270/usr/src/ramdisk/ k) umount /mnt/root l) umount /mnt/ext2 m) gzip -9 root n) /ppc8270/usr/src/u-boot-1.1.1/tools/mkimage -A ppc -O Linux -T /ppc8270/usr/src/ramdisk/ramdisk -C gzip -n Pegasus ramdisk image' -d root.gz /ppc8270/usr/src/ramdisk/ramdisk.img n mkimage uboot uboot PPC82 mount./image.sh uboot 3.4 uboot PPC8270 uboot FLASH JTAG FLASH uboot FLASH 0xfff00000 uboot LINUX LINUX 3.1.6 LINUX TFTP RedHat9.0 LINUX TFTP Windows tools tftpd32 tftp Uboot Linux uboot doc PPC8270 FLASH 43

3.5 Linux MTD MTD Memory Technology Device PC FLASH FLASH MTD MTD.name = RootFS.offset = 1024 << 10.len = 1024 << 10.mask = fs_writable FLASH 1M Byte 1M Byte RootFS RootFS FLASH MTD JFFS2 MTD /dev/mtdblock/0,1,2 root /dev/mtdblock/n n+1 MTD RootFS PPC8270 MTD /ppc8270/usr/src/linux-2.4.20_mvl31/drivers/mtd/maps/pegasus_partition.c Linux 44

static struct mtd_partition partition_info[] = { {.name = "initrd(ext2)",.size = 5056 << 10, /* 5MB - 16KB */.offset = 64<<10,.mask_flags = MTD_WRITEABLE, }, {.name = "driver(jffs2)",.size = 2048 << 10, /* 2MB */.offset = 5120 << 10, }, {.name = "uboot,env,linux",.size = 1024 << 10, /* 1MB */.offset = 7168 << 10,.mask_flags = MTD_WRITEABLE, } } FLASH 16K HRCW 4.1 LINUX PC PPC8270 1. Intel CPU PPC8270 2. PC minicom ftp jffs2 4.2 UNIX B UNIX LINUX man Makefile /PPC8270/usr/src/application/ Makefile 45

/PPC8270/usr/src/application/hello Makefile GCC_FLAGS = -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wcast-qual\ -Wtraditional\ -Wshadow\ -Wconversion\ -Waggregate-return\ -Wmissing-prototypes\ -Wnested-externs\ -Wall # Add -DNO_DAEMON if you do not want the server to fork upon launch # Add -lefence to LDFLAGS to link with ElectricFence # Add -pg to CFLAGS and LDFLAGS to get profiling output with gcc/gprof LDFLAGS = LIBS = CFLAGS = -g -O2 -Wall -I. # Change these if necessary YACC = bison -y LEX = flex CC = ppc_82xx-gcc CPP = ppc_82xx-g++ SOURCES = hello.c OBJS = hello.o #${SOURCES:.c=.o}.PHONY: clean mrclean distclean depend all dist hello: ${OBJS} ${CC} -o $@ hello.o ${LDFLAGS} ${LIBS} clean: rm -f ${OBJS} distclean: mrclean mrclean: clean rm -f Makefile put hello SOURCES = hello.c 46

OBJS = hello.o hello: ${OBJS} ${CC} -o $@ hello.o ${LDFLAGS} ${LIBS} make hello hello LINUX FLASH FTP jffs2 PPC8270 /dev/mtdblock/1 /etc/rc.d/rc.local /myapp 4.3 /PPC8270/usr/src/ramdisk/ root.ext2 4.2 ramdisk cd /PPC8270/usr/src/ramdisk/ramdisk mkdir ramdisk root.ext2 mount ramdisk mount o loop root.ext2 ramdisk/ cd ramdisk/ ls bin etc linux mnt sbin usr dev lib lost+found proc tmp LINUX hello cd /ramdisk mkdir application ( ) cd application mkdir hello cd hello cp /PPC8270/usr/src/application/hello/hello. ( hello hello hello / ) cd /PPC8270/usr/src/ramdisk umount ramdisk./image.sh FLASH, : ls application bin etc linuxrc mnt sbin usr dev lib lost+found proc tmp map application cd application cd hello hello hello : 47

./hello 4.4 LINUX ppclinux PC LINUX REDHAT LINUX FOR MMU libc glibc.so FOR PC LINUX REDHAT ppclinux 1. microwin boa 2. Makefile CC PC gcc ppc_82xx-** iptables gcc C ar Makefile KERNEL_DIR=/PPC8270/usr/src/linux-2.4.20_mvl31 CC = ppc_82xx-gcc AR = ppc_82xx-ar 4.5 4.5.1 linux MMU IO ioremap IO PC8 IO 0 1 IO 2 write_gpio.c gpio_test.c 1 linux/driver/char/ linux/driver/char/ Makefile obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o raw.o pty.o misc.o random.o ppcflash.o gpio_test.o 2 ramdisk dev gpiotest mknod gpiotest c 220 0 3 /* driver/char/gpio_test.c * * This file provide IO reading and writing from user space. * Pls create some device file in diretory /dev/gpiotest whose major is 220. 48

* This driver support 0-255 devices. In user space user can read and write * IO through open and ioctl function provided by glibc. * */ #include <linux/fs.h> #include <linux/iobuf.h> #include <linux/major.h> #include <linux/blkdev.h> #include <linux/capability.h> #include <linux/smp_lock.h> #include <asm/uaccess.h> #include "gpio_test.h" #include <asm/io.h> #include <linux/vmalloc.h> #define dprintk(x...) #define IOPORT_MAJOR 220 typedef char ioport_device_t static ioport_device_t gpio_devices[256] int gpio_open(struct inode *, struct file *) int gpio_release(struct inode *, struct file *) int gpio_ctl_ioctl(struct inode *, struct file *, unsigned int, unsigned long) static struct file_operations gpio_fops = { open: gpio_open, release: gpio_release, } static struct file_operations gpio_ctl_fops = { ioctl: gpio_ctl_ioctl, open: gpio_open, release: gpio_release, } int init gpio_init(void) { int i register_chrdev(ioport_major, "gpiotest", &gpio_ctl_fops) return 0 } initcall(gpio_init) /* * Open/close code for raw IO. */ int gpio_open(struct inode *inode, struct file *filp) { int minor minor = MINOR(inode->i_rdev) 49

/* if (ioport_devices[minor].io_lock) { printk("device is busy\n") return -1 }*/ *(volatile unsigned short*)(0xfff00000+0x962)&=~0x0080 *(volatile unsigned short*)(0xfff00000+0x960) =0x0080 gpio_devices[minor]++ return 0 } // ioremap int gpio_release(struct inode *inode, struct file *filp) { int minor minor = MINOR(inode->i_rdev) if (gpio_devices[minor]) gpio_devices[minor]-- *(volatile unsigned short*)(0xfff00000+0x960)&=~0x0080 *(volatile unsigned short*)(0xfff00000+0x962) =0x0080 return 0 } /* * Deal with ioctls against the raw-device control interface, to bind * and unbind other raw devices. */ int gpio_ctl_ioctl(struct inode *inode,struct file *flip,unsigned int command,unsigned long arg) { int err = 0 int minor = MINOR(inode->i_rdev) switch (command) { case IOWRITE: *(volatile unsigned short*)(0xfff00000+0x966)&=~0x0080 return 0 case IOCLEAR: *(volatile unsigned short*)(0xfff00000+0x966) =0x0080 return 0 default: err = -EINVAL } return err } #define DEVICE_PPCFLASH "/dev/gpiotest" int main() { 50

} int fd int val=-1 if((fd=open(device_ppcflash,o_rdonly O_NONBLOCK))<0) { perror("can not open device") exit(1) } while(1){ printf("0:set,1:clear,2: quit :") scanf("%d",&val) if(val==0) ioctl(fd,iowrite,0) else if(val==1) ioctl(fd,ioclear,0) else if(val==2){ close(fd) return 0 } else{ printf("val is %d\n",val) continue } } return 0 4.5.2 linux linux linux insmod modprobe rmmod linux.config y m linux/include/linux/autoconf.h 51

5.1 1. + 2. 3. 5V 5V 4. JTAG 5. MPC82xx Motorola PowerQuicII 6. CPU 7. 5V ATX 8. 52

5.2 53

5.3 54

5.4 MPC8280 5.5 Flash Flash Nor Flash Nand Flash 60x Nor Flash AMD AM29LV064 8MB Flash AMD Flash 16bit Nand Flash PCB Samsung K9Fxx08 Nand Flash 8bit. SDRAM 4 32MB SDRAM 16bit 64bit MPC8280 60x 133MHz Mixim MAX708 66MHz CPU SDRAM 55

SMC1 DB9 RTC MPC8280 RTC RTC DS1307RTC CPU IIC CPU SCL SDA GPIO PA22 PA23 GPIO IIC 5.6 CS0 BootFlash 0xFF800000 : 8MB CS1 Nand Flash Nand Flash CS2 SDRAM 0x00000000 128MB CS9 8 LED 0xE0000000 16Byte 5.7 4 J7 J8 J9 J10 CPU : J7->EINT1 J8->EINT2 J9->EINT3 J10->EINT4 5.8 GPIO 6 LED CPU GPIO CPU GPIO LED GPIO LED GPIO LED CPU CPU GPIO LED 56

DS13 PA0 DS14 PA1 DS15 PA2 DS16 PA3 DS17 PA4 DS18 PA5 5.9 4 8 LED 4 8 LED CS CPU CS9 :0xE0000000 LED 3.3V 5V R84 R85 5V LED R85 R84 3.3V LED MD[23..20]4bit 74LS373 4 LED 0 CPU CS9 CPU CS LED 57

5.10 FCC1 FCC2 FCC3 CPU FCC1 FCC2 FCC3 MII MDIO MDCLK MDINT 1 MII TX PC22 MII RX PC23 MDIO PA7 MDCLK PA6 MDINT PC11 2 MII TX PC18 MII RX PC19 MDIO PA11 MDCLK PA10 MDINT PC12 3 MII TX PC16 MII RX PC17 MDIO PA12 MDCLK PA13 MDINT PC13 5.11 P1 58

P2 59

5.12 CPU CPU MPC8280 MPC8280EC.pdf 7.1 0x08843242 4bit 0B0010 CPU MPC8280EC.pdf Bit[28..31] 60

6.1 6.2 1. VCC5 4.3V 18V 4.7V 5.5V 2. 5V 220uF 0.1uF 0.1uF 3. LocalBus 16245 4. SMC1RXD (PD8) SMC1TXD (PD9) COM_T COM_R COM_T COM_R RS232 SMC1RXD SMC1TXD TTL COM_T COM_R 61

5. /RESET_IN 6. 7. ATX 8. 9. PC HUB PC 62