Home

MIPS32 Malta Linux - Open Virtual Platforms

image

Contents

1. Generic Driver Options CONFIG_NET_PKTGEN is not set Wireless CONFIG_CFG80211 is not set CONFIG _WIRELESS_EXT y CONFIG_MAC80211 is not set CONFIG_IEEE80211 m CONFIG_IEEE80211 DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP m CONFIG_IEEE80211_CRYPT_CCMP m CONFIG_IEEE80211_CRYPT_TKIP is not set CONFIG_IEEE80211_SOFTMAC m CONFIG_IEEE80211_ SOFTMAC_DEBUG is not set CONFIG_RFKILL is not set CONFIG_NET_9P is not set Device Drivers CONF IG_STANDALONE y CONF IG_PREVENT_FIRMWARE_BUILD y CONF IG_FW_LOADER y CONFIG_SYS_HYPERVISOR is not set CONF IG_CONNECTOR m CONF IG_MTD y CONFIG_MTD_DEBUG is not set CONFIG_MTD_CONCAT is not set CONF IG_MTD_PARTITIONS y CONFIG _MTD_REDBOOT_PARTS is not set CONFIG _MTD_CMDLINE_PARTS is not set CONF IG_MTD_CHAR y CONF IG_MTD_BLKDEVS y CONF IG_MTD_BLOCK y CONFIG_FTL is not set CONFIG_NFTL is not set CONFIG_INFTL is not set CONFIG_RFD_FTL is not set CONFIG_SSFDC is not set RAM ROM Flash chip drivers 2010 Imperas Software Limited User Modules And Translation Layers www OVPworld
2. CONFIG_BLK_ DEV_CY82C693 is not set CONFIG_BLK_DEV_CS5520 is not set CONFIG_BLK_DEV_CS5530 is not set CONFIG_BLK DEV_HPT34X is not set CONFIG_BLK_DEV_HPT366 is not set CONFIG _BLK_ DEV_JMICRON is not set CONFIG_BLK_DEV_SC1200 is not set CONF IG_BLK_DEV_PIIX y CONFIG_BLK_ DEV_IT8213 is not set CONFIG_BLK_ DEV_IT821X is not set CONFIG _BLK_ DEV_NS87415 is not set CONFIG_BLK_ DEV_PDC202XX_OLD is not set CONFIG_BLK_ DEV_PDC202XX_NEW is not set CONFIG_BLK_ DEV_SVWKS is not set CONFIG _BLK_DEV_SIIMAGE is not set CONFIG_BLK_DEV_SLC90E66 is not set CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_ DEV_VIA82CXXX is not set CONFIG_BLK_DEV_TC86C0O01 is not set CONFIG_IDE_ARM is not set CONF IG_BLK_DEV_IDEDMA y CONFIG_IDEDMA_IVB is not set CONFIG _BLK_DEV_HD is not set SCSI device support CONF IG_RAID_ATTRS m CONF IG_SCSI m CONF IG_SCSI_DMA y CONFIG_SCSI_TGT is not set CONF IG_SCSI_NETLINK y CONF IG_SCSI_PROC_FS y disk CD ROM SCSI support type tape CONFIG _BLK_D CONF IG_CHR_D CONF IG_CHR_D CONFIG _BLK_D CONF IG_BLK_DEV_SR_VENDOR y CONF IG_CHR_DEV_SG m CONF IG_CHR_DEV_SC EV_SD m EV_ST m EV_OSST m EV_SR m H is not set Some SCSI devices e g CD jukebox support m
3. Please s Documentation ide txt for help info on IDE drives CONFIG_B DEV_IDE_SATA is not set CONF IG_BLK_DEV_IDEDISK y CONFIG_IDEDISK_MULTI_MODE is not set CONF IG_BLK_DEV_IDECD y EV_IDETAPE is not set D _DEV_IDEFLOPPY is not set _DEV_IDESCSI is not set _TASK_IOCTL is not set ROC_FS y CONFIG_ID CONF IG_IDE Q O 2 rj H Q w vTARRRUMOUN IDE chipset support bugfixes CONF IG_IDE_GENERIC y CONF IG_BLK_DEV_IDEPCI y CONFIG_IDEPCI_SHARE IRQ is not set CONF IG_IDEPCI_PCIBUS_ORDER y CONFIG_BLK_ DEV_OFFBOARD is not set CONF IG_BLK_DEV_GENERIC y CONFIG_BLK_ DEV_OPTI621 is not set CONF IG_BLK_DEV_IDEDMA_PCI y CONFIG _BLK_DEV_IDEDMA FORCED is not set CONFIG_IDEDMA ONLYDISK is not set CONFIG _BLK_ DEV_AFC62XX is not set CONFIG_BLK_DEV_ALI15X3 is not set CONFIG _BLK_DEV_AMD74XX is not set CONFIG_BLK_ DEV_CMD64X is not set CONFIG _BLK_DEV_TRIFLEX is not set 2010 Imperas Software Limited www OVPworld org Page 101 of 115 MIPS32 Malta Linux Platform
4. T 2010 Imperas Software Limited www OVPworld org Page 92 of 115 MIPS32 Malta Linux Platform CONFIG_BASE_SMALL 0 CONF IG_MODULES y CONF IG_MODULE_UNLOAD y CONF IG_MODULE_FORCE_UNLOAD is not set CONF IG_MODVERS IONS y CONF IG_MODULE_SRCVERSION_ALL y CONF IG_KMOD y CONF IG_STOP_MACHINE y CONF IG_BLOCK y CONFIG_LBD is not set CONFIG _BLK_DEV_IO_TRACE is not set CONFIG_LSF is not set CONFIG BLK DEV_BSG is not set IO Schedulers CONF IG_IOSCHED_NOOP y CONF IG_IOSCHED_AS y CONF IG_IOSCHED_DEADLINE y CONF IG_IOSCHED_CFQ y CONF IG_DEFAULT_AS y CONFIG_DEFAULT_DEADLINE is not set F CONFIG _DEFAULT_CFQ is not set CONFIG _DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED anticipatory T Bus options PCI PCMCIA EISA ISA TC CONFIG_HW_HAS_PCI y CONFIG_PCI y CONFIG_ARCH_SUPPORTS_MSI is not set CONF IG_MMU y PCCARD PCMCIA CardBus support CONFIG _PCCARD is not set CONFIG_HOTPLUG_PCI is not set Executable file formats CONF IG_BINFMT_ELF y CONFIG_BINFMT_MISC is not set CONF IG_TRAD_SIGNALS y
5. Bridge Netfilter Configuration CONFIG _BRIDGE_EBT MARK m CONFIG _BRIDGE_EBT PKTTYPE m CONFIG BRIDGE _EBT STP m CONFIG _BRIDGE_EBT_ VLAN m CONFIG _BRIDGE_EBT_ ARPREPLY m CONFIG _BRIDGE_EBT DNAT m CONF IG_BRIDGE_EBT_MARK_T m CONFIG _BRIDGE_EBT REDIRECT m CONFIG _BRIDGE_EBT_ SNAT m CONFIG BRIDGE _EBT LOG m CONFIG _BRIDGE_EBT ULOG m CONFIG_IP_DCCP is not set CONF IG_IP_SCTP m CONFIG_SCTP_DBG_ MSG is not set CONFIG_SCTP_DBG OBJCNT is not set CONFIG_SCTP_HMAC_NONE is not set CONFIG_SCTP_HMAC_SHA1 is not set CONF IG_SCTP_HMAC_MD5 y CONFIG_TIPC is not set CONFIG_ATM is not set CONF IG_BRIDGE y CONFIG_VLAN_80210 y CONFIG _DECNET is not set CONFIG_LLC y CONFIG_LLC2 is not set CONFIG_IPX is not set CONF IG_ATALK m CONF IG_DEV_APPLETALK m CONF IG_IPDDP m CONF IG_IPDDP_ENCAP y 2010 Imperas Software Limited www OVPworld org Page 97 of 115 MIPS32 Malta Linux Platform CONF IG_IPDDP_DECAP y CONFIG_X25 is not set CONFIG_LAPB is not set CONFIG_ECONET is not set CONFIG _WAN ROUTER is not set QoS and or fair queueing CONF IG_NET_SCHED y CONF IG_NET_SCH_FIFO y Queueing Scheduling CONF IG_
6. CONF IG_USB_G CONFIG_MMC i ORAGI GI enables SCSI and SCSI disk support upport ADGET is not set s not set EDS is not set CONFIG_NEW_L CONFIG_INFIN 2010 Imperas Software Limited IBAND is not set www OVPworld org Page 109 of 115 CONF IG_DMA _ MIPS32 Malta Linux Platform CONFIG_RTC_CLASS is not set DMA Engine support ENGINE is not set DMA Clients DMA Devices I O Userspac File systems CONFIG_UIO is not set CONFIG_EXT2_FS y CONFIG_EXT2_FS_XATTR is not set CONFIG_EXT2_FS_XIP is not set CONFIG_EXT3_FS y CONF IG_EXT3_FS_XATTR y CONFIG_EXT3_FS_POSIX_ACL is not set CONFIG_EXT3_FS_SECURITY is not set CONFIG_EXT4DEV_FS is not set CONFIG_JBD y CONFIG_JBD_DEBUG is not set CONF IG_FS_MBCACHE y CONF IG_REISERFS_FS m T CONFIG_REIS CONFIG_REISERFS_CHECK is not set RES_PROC_INFO y CONFIG_REIS T CONFIG_REIS RFS_FS_XATTR y RFS_FS_POSIX_ACL y CONFIG_REIS T CONF IG_JFS_FS m RFS_FS_SECURITY y CONFIG_JFS_POSIX_ACL y CONFIG_JFS_SECURI TY y CONFIG_JFS_DEBUG is not set CONFIG_JFS_STAT ISTICS
7. Power management options CONFIG_PM is not set Networking CONF IG_NET y 2010 Imperas Software Limited www OVPworld org Page 93 of 115 MIPS32 Malta Linux Platform Networking options CONF IG_PACK CONFIG_PACK CONFIG_UNIX y CONF IG_XFRM y CONF IG_XFRM_USER m CONFIG_XFRM_SUB_POLICY is not set CONFIG_XFRM_MIGRATE is not set CONFIG_NET_KEY y CONFIG_NET_KEY_MIGRATE is not set CONFIG_INET y CONFIG_IP_MULTICAST y CONF IG_IP_ADVANCED_ROUTER y CONFIG_ASK_IP_FIB_HASH y CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH y CONFIG_IP_MULTIPLE_TABLES y CONFIG_IP_ROUTE_MULTIPATH y CONF IG_IP_ROUTE_VERBOSE y CONFIG_IP_PNP y CONFIG_IP_PNP_DHCP y CONFIG_IP_PNP_BOOTP y CONFIG_IP_PNP_RARP is not set i MMAP y EAE CONF IG_NET_IPIP m CONF IG_NET_IPGRE CONF IG_NET_IPGRE_BROADCAST y CONF IG_IP_MROUTE y CONFIG_IP_PIMSM_Vl y CONFIG_IP_PIMSM_V2 y CONFIG_ARPD is not set CONF IG_SYN_COOKIES y CONF IG_INET_AH m CONF IG_INET_ESP m CONF IG_INET_IPCOMP m CONF IG_INET_XFRM_TUNNEL m CONF IG_INET_TUNNEL m CONF IG_INET_XFRM_MODE_TRANSPORT m CONF IG_INET_XFRM_MODE_TUNNEL m CONF IG_INET_
8. CONF IG_MOU CONF IG_M CONF IG_M USE_SERIAL CONF IG_M CONF IG_MOUS CONFIG_INPUT_JOYSTICK CONF IG_INPU Fi is not set CONFIG_KEYBOARD_NEWTON is not set CONFIG_KEYBOARD_STOWAWAY is not set _PS2_LOGIPS2PP y E_PS2_SYNAPTICS y E_PS2_LIFEBOOK y E_PS2_TRACKPOINT y USE_PS2_TOUCHKIT is not set F is not set USE_APPLETOUCH is not set VSXXXAA is not set is not set _TABLET is not set CONFIG_INPU OUCHSCRE EN is not set Hardware I O ports CONFIG_SERIO y CONFIG_SERIO_I8042 y 2010 Imperas Software Limited CONFIG_INPUT_MISC is not set www OVPworld org Page 106 of 115 MIPS32 Malta Linux Platform CONF IG_SERIO_SERPORT y CONF IG_ S ERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2 y CONFIG_SERIO_RAW y CONFIG_GAMEPORT is not set Character devices CONFIG_VT y CONFIG_VT_CONSOLE y CONFIG_HW_CONSOLE y CONFIG_VT CONFIG_SI HW_CONSOLE_BINDING y ERIAL_NONSTANDARD is not set Serial drivers CONFIG_SERIAL_8250 y CONFIG_SERIAL_8250_CONSOLE y CONFIG_SERIAL_8250_PCI y CONFIG_SERIAL_8250_NR_UARTS 4 CONFIG_SERIAL_8250_RUNTIME_UARTS 4 F CONFIG_SI ERIAL_8250_EXTENDED
9. Profiling support CONFIG _PROFILING is not set Kernel hacking CONF IG_TRACE_IRQFLAGS_SUPPORT y CONFIG _PRINTK_TIME is not set CONF IG_ENABLE_MUST_CHECK y CONFIG _MAGIC_SYSRQ is not set CONFIG _UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS is not set CONFIG _HEADERS_ CHECK is not set CONFIG _DEBUG_KERNEL is not set CONF IG_CROSSCOMP ILE y CONF IG_CMDLINE Security options CONFIG_KEYS is not set CONFIG_SECURITY is not set CONF IG_XOR_BLOCKS m CONF IG_ASYNC_CORE m 2010 Imperas Software Limited www OVPworld org Page 113 of 115 CONFIG_A CONFIG_A CONFIG_C CONF IG_C CONFIG_C CONF IG_C CONFIG_C CONF IG_C CONF IG_C CONF IG_C CONFIG_C CONFIG_C CONF IG_C CONFIG_C CONF IG_C CONFIG_C CONF IG_C CONF IG_C CONF IG_C CONF IG_C CONF IG_C CONF IG_C CONF IG_C CONF IG_C CONFIG_C CONF IG_C CONF IG_C CONFIG_C CONF IG_C CONFIG_C CONF IG_C CONF IG_C CONFIG_C CONF IG_C CONF IG_C CONF IG_ CONF IG_ CONF IG_ CONF IG_ CONF IG_ CONF IG_ CONF IG_ MIPS32 Malta Linux Platform T SYNC_MEMCPY m SYNC_XOR m RYPTO y RYPTO_ALGAPI y RYPTO_BLKCIPHER m RYPTO_HASH y RYPTO_MANAGER y RYPTO_HMAC y CRYPTO_XCBC is not set RYPTO
10. 7 4 5 4 Choose Partitioning Choose the partitioning of the disk Unless you have specific requirements please select the default option Ml VGA OVPsim MIPS32 Malta Partition disks Selected for partitioning IDE1 master hda IDE MODEL HARDDISK 4 3 GB The disk can be partitioned using one of several different schemes If you are unsure choose the first one Partitioning scheme ALl es in one partition Separate home partition Separate home usr zvar and tmp partitions lt GO Back gt selects lt Enter gt activates buttons 2010 Imperas Software Limited www OVPworld org Page 34 of 115 MIPS32 Malta Linux Platform 7 4 5 5 Finish Partitioning of Disk Ml VGA OVPsim MIPS32 Malta Partition disks This is an overview of your currently configured partitions and mount points Select a partition to modify its settings file system mount point etc a free space to create partitions or a device to initialise its partition table Guided partitioning Help on partitioning IDE1 master hda 4 DE MODEL HARDDISK 1 primary 4 Z 5 logical 246 swap Undo changes to partitions FAinisn lt GO Back gt 7 4 5 6 Write Changes to Disk Until this option there have been no changes written to the disk image Ml VGA OVPsim MIPS32 Malta Partition disks If you continue the changes listed below will be written to the disks Otherwise you will be able to make further changes ma
11. The Imperas Professional tools provide the VAP Verification Analysis and profiling Tools which provide extensive tools useful for debugging a Linux kernel including e Logging of all exceptions including TLB e Simulation termination on a kernel panic e Simulation termination on a defined kernel execution event for example exec of sbin halt e Visibility of kernel execution without console mips32 linux kernel To find out more about the Imperas Professional tools please contact www imperas com 10 2 Attaching the Debugger See the OVP documents available at www ovpworld org to guide the use of a debugger with the MipsMalta platform e OVP Debugging Applications with GDB User Guide e OVP Debugging Applications with Eclipse User Guide 10 2 1 Starting the Platform Simulation The MipsMalta platform should be started with an additional command line argument to open a port to connect a debugger to A batch file provided with the MIPS Malta Platform demonstration should be modified to add port 9998 that is used to specify an arbitrary port to be opened for connection to a debugger The Windows batch file RUN_BootLinux bat for Windows users is shown modified below SPLATFORM_VLNV S verbose SS ramdisk initrd gz rinis Nonhalt kernel vmlinux console ttyl console Eby 0 gt override MipsMalta mipslel variant 34Kc output imperas log port 9998 Aa A end pause 2010 Imperas Software
12. apt get install gdb eading package lists Done uilding dependency tree Done gdb doc we following NEW packages will be installed gdb upgraded 1 newly installed to remove and not upgraded eed to get 3491kB of archives After unpacking 9681kB of additional disk space will be used zet 1 http mirror ox ac uk etch main gdb 6 4 94 dfsg 1 3491kB Fetched 3491kB in 6s 538kB s Selecting previously deselected package gdb Reading database 15755 files and directories currently installed npacking gdb from gdb_6 4 98 dfsg 1_mipsel deb Setting up gdb 6 4 94 dfsg 1 ebian now logout as root using the exit command 12 6 Remote Debug using GDBserver 12 6 1 Starting GDB Server Run the program under gdbserver using the port on the localhost that has been mapped onto the host machine port of the same number o gdbserver localhost 11001 linpack exe 2010 Imperas Software Limited www OVPworld org Page 66 of 115 MIPS32 Malta Linux Platform useri debian 9 gdbserver localhost 11861 linpack exe amp 1 2281 useri debian Process linpack exe created pid 2282 Listening on port 11661 12 6 2 Connecting to GDB Server 12 6 2 1 Using Eclipse TBA 12 6 2 2 Using DDD from a Linux Host In this example we are using a version of mips gdb built for a Linux host to connect to the gdbserver running in the OVPsim simulated Linux environment on a Windows based PC On any Linux mach
13. CONFIG_FIREWIRE is not set CONFIG_IEEE1394 is not set CONFIG_I20 is not set CONF IG_NETDEVICES y CONFIG_NETDEVICES_MULTIQUEUE is not set CONFIG_IFB is not set CONF ITG_DUMMY m CONF IG_BONDING m CONFIG _MACVLAN is not set CONF IG_EQUALIZER m CONF IG_TUN m CONFIG_ARCNET is not set CONFIG _PHYLIB m MII PHY device drivers CONF IG_MARVELL_ PHY m CONF IG_DAVICOM_PHY m CONF IG_OSEMI_PHY m CONF IG_LXT_PHY m CONF IG_CICADA_PHY m CONFIG_VITESSE_PHY m CONF IG_SMSC_PHY m CONFIG_BROADCOM_PHY is not set E qd CONFIG_ICPLUS_PHY is not set CONFIG_FIXED_PHY is not set CONF IG_NET_ETHERNET y CONF IG_MII y CONFIG_AX88796 is not set CONFIG_HAPPYMEAL is not set CONFIG_SUNGEM is not set CONFIG_CASSINI is not set CONFIG_NET_VENDOR_3COM is not set CONFIG_DM9000 is not set CONFIG_NET_TULIP is not set CONFIG_HP100 is not set CONF IG_NET_PCI y CONF IG_PCNET32 y CONFIG_PCNET32_NAPI y GI 2010 Imperas Software Limited www OVPworld org Page 104 of 115 MIPS32 Malta Linux Platform CONFIG_AMD8111_ETH is not set CONFIG_ADAPTEC_STARFIRE is not set CONFIG_B44 is not set CONFIG_FORCEDETH is not set CONFIG_TC35815 is not set CONFIG _DGRS is not set CONFIG_EEPRO100 y CONFIG_E100 is not set CONFIG_FEALNX is not set CONFIG_NATSEMI i
14. Open Virtual Platforms MIPS32 Malta Linux Imperas Software Limited Imperas Buildings North Weston Thame Oxfordshire OX9 2HA UK docs imperas com E MULTICORE DESIGN SIMPLIFIED imperas OVP_MIPS_Linux_Platform_User_Guide doc MIPS32 Malta Linux Platform June 12 2015 OVP MIPS Malta Linux 2010 Imperas Software Limited www OVPworld org Page 1 of 115 MIPS32 Malta Linux Platform Copyright Notice Copyright 2015 Imperas Software Limited All rights reserved This software and documentation contain information that is the property of Imperas Software Limited The software and documentation are furnished under a license agreement and may be used or copied only in accordance with the terms of the license agreement No part of the software and documentation may be reproduced transmitted or translated in any form or by any means electronic mechanical manual optical or otherwise without prior written permission of Imperas Software Limited or as expressly provided by the license agreement Right to Copy Documentation The license agreement with Imperas permits licensee to make copies of the documentation for its internal use only Each copy shall include all copyrights trademarks service marks and proprietary rights notices if any Destination Control Statement All technical data contained in this publication is subject to the export control laws of the United States of America Disclosure to nationals of
15. The disk image will be written by the disk controller at regular intervals However to ensure that everything on the disk is in the correct state the simulation should be stopped using the halt command when logged in as root This will ensure all data is flushed to the disk image and that no corruption will occur When logged in as root issue the command gt halt Ml VGA OVPsim MIPS32 Malta The system is going down for system halt NOW INIT Switching to runlevel INIT Sending processes the TERM signal Stopping deferred execution scheduler atd Stopping periodic command scheduler crond Stopping MTA exim4_listener Stopping internet superserver inetd Saving the system clock Stopping NFS common utilities statd Stopping kernel log daemon klogd Stopping system log daemon syslogd Asking all remaining processes to terminate done Killing all remaining processes done Deconf iguring network interfaces There is already a pid file var run dhclient eth pid with pid 1997 removed stale PID file Internet Systems Consortium DHCP Client V3 8 4 Copyright 2664 2066 Internet Systems Consortium All rights reserved For info please visit http wwa isc org sw dhcp Listening on LPF eth 52 54 68 12 34 56 Sending on LPF eth 52 54 68 12 34 56 Sending on Socket fallback DHCPRELEASE on eth to 18 6 2 2 port 67 done Cleaning up ifupdown Deactivating swap done Will now halt The halt command w
16. dev hdal And add drive redirection and directory information override MipsMalta PIIX4 IDE Drive0Name mipsel_hda override MipeMalta PEI NET redir Heco 5901 LON On 2 los L590 repel LOOM sO Ome Loerie Ol em override MipsMalta PCI_NET tftpPrefix lt path to driver working directory gt 15 2 2 Invoking from ICM Platform The same ICM C platform can be loaded into Imperas as a shared object Linux or Dynamic Link Library Windows When the platform source file is built to an executable using the standard build system it also produces the shared object The shared object is loaded by the argument icmobject and the arguments are passed by the argument icmargv This is loaded into the Imperas executable and the same arguments are passed imperas ex verbose icmobject OVPsim_linux_MipsMalta dll icmargv vmlinux icmargv finishonhalt icmargv wallclock icmargv tftp icmargv C workspace output imperas log approxtimer wallclockFactor 3 extlib MipsMalta mipslel mips32CpuHelper extlib MipsMalta mipslel vapHelper 2010 Imperas Software Limited www OVPworld org Page 82 of 115 MIPS32 Malta Linux Platform extlib MipsMalta mipslel vapTools extlib MipsMalta mipslel linuxOsHelper A idebug Note that when loading an ICM object the Imperas simulator cannot initially determine the components it contains This means that the
17. SMA EIleS uesye ciao cid cca cd A dass R em cet T 76 12 52 Buldi sepbesaatcitpieatiat sa tuminiescatentoeinincaterad coven mdi ant A casita T11 12 6 Installing the Kernel Module s cc iis ssscveseccteasasescsaavecaets sstcaedaaccoaseesededeceanncceae ses 11 12 7 Kernel Module Test Application sssssesesesssesessseesseesseessessseeessseesseesseesseesseee 78 13 Debugging a Statically Linked Linux Kernel Module eee eeeeceeeeeeeeeereeeneeeees 80 14 Debugging a Dynamically loaded Linux Kernel Module eee eeeeeseeeeteeeeeeeees 81 t4 WPre RR CQUISIIES neea aeetuat icc anasuadths vacealiancettal EAN 81 14 2 Starting the Platform Simulation sui eceectsea een opel etek eed tad 81 14 2 1 Invoking with VLNV Library 00 eee ee ceeeeseeeeneecnneceseeeseeseneecsaeenseeesees 81 14 22 Invoking from ICM Platform oc eicsteceostscecte fees bead i ccescitanazs paseo dtage tunel aes 82 14 23 Debus SEAM cass patie ues ea hata ao E aR 83 14 3 Registering Kernel Module with Debugger 0 eee eee eeseeeeeeeeeeeeeeeneeenseenenes 83 144 Debugging the Kernel Modtle s cciiccissasccasedessees scndebsdadayiueacsuanesgueeacascadetedadenncs 84 14 4 1 Register Kernel Module for Debugging eee eeeeeeeeeseeeeeteeeenteeeenaees 84 14 4 2 Installing the Kernel Module ceeeeceesseeeeseceseceeeeeeaeecsaeeneesseeeenees 84 1443 Adding Breakpoiitsic wissen einen ele ee 85 L444 Source Level DeDUS wiiccissepisssscesdaccisutece sss iesatasagecens sted cats
18. gnu by Dorothea L tkehaus and Andreas Zeller Copyright 1995 1999 Technische Universitat Braunschweig Germany Copyright 1999 2001 Universitat Passau Germany Copyright 2001 Universitat des Saarlandes Germany Copyright 2001 2004 Free Software Foundation Inc aa ce fhome moore MipsCompi ler helloworld linpack exe g We should now be able to connect to the port on the Windows host on which the simulation is running 12 6 2 3 Using GDB from local Windows Host In this example we are using a version of mips gdb built for a Windows host to connect to the gdbserver running in the OVPsim simulated Linux environment on a Windows based PC On the local Windows machine start a debug session using command line gdb This will start the GDB command line debugger 2010 Imperas Software Limited www OVPworld org Page 68 of 115 MIPS32 Malta Linux Platform In the command prompt the file to be debugged should be loaded using the command We should now be able to connect to the port on the Windows host on which the simulation is running MINGW32 MipsMaltal inux DER K graham WIN23 MipsMaltaLinux mipsel linux gnu gdb exe GNU gdb 6 4 Copyright 2005 Free Software Foundation Inc GDB is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions Type show copying to see the conditions There is absolutely no
19. s not set not set not set CONF IG_MARK EINS is not set CONFIG _MACH VR41XX is not set CONFIG_PNX8550_JBS is not set CONFIG _PMC_MSP is not set CONFIG_PNX8550_STB810 is not set CONF IG_PMC_YOSEMITE is not set CONFIG_OEMU is not set CONFIG_SGI_IP22 is not set CONFIG_SGI_IP27 is not set CONFIG_SGI_IP32 is not set CONFIG_SIBY E_CRHINE is not set CONF IG_SIBY E CARMEL is not set CONFIG_SIBY RHONE is not set CONF IG_SIBY HONE is not set CONFIG_SIBY CONF IG_SIBY LITTLESUR is not set R E_SWARM is not set I S T ENTOSA is not set CONFIG_SIBY CONFIG_SIBY _PTSWARM is not set j E CONFIG_SIBY E_BIGSUR is not set CONFIG_SNI_RM is not set CONFIG_TOSHIBA_JMR3927 is not set CONFIG_TOSHIBA RBTX4927 is not set CONFIG_TOSHIBA_ RBTX4938 is not set CONFIG_WR_PPMC is not set CONF IG_RWSEM_GEN T RIC_SPINLOCK y CONF IG_ARCH HAS ILOG2_U32 is not set CONF IG_ARCH HAS ILOG2_U64 is not set CONF IG_GENERIC_FIND_NEXT_BIT CONF IG_GENERIC_HWEIGHT y 2010 Imperas Software Limited y www OVPworld org Page 89 of 115 MIPS32 Malta Linux Platform
20. 07070707 fFFFFFffF s8 si s2 s3 s4 s5 s6 s7 84688080063 41245855 60532808 HHHAHOHO 46466e18 B4406e7c 00532808 HAAHBBAA t8 t9 k k1 gp sp s8 ra 86880008 H0425f74 HAHHHHHA BHABHA HA489b10 7ffc77a 7ffc77a 0040Z2bf8 sr lo hi bad cause pe 8668a413 BBBBHHHH HAHOHHHO B447bf46 BHSHHH24 44462494 fsr fir OOHAHHHA HAAHAAABA 2010 Imperas Software Limited www OVPworld org Page 72 of 115 MIPS32 Malta Linux Platform 13 Creating an Example Linux Kernel Module 13 1 Introduction This section provides some information to help with the creation of new kernel driver modules and how these can be developed on the simulated platform The example in this section is a character device driver for the 8 character LED that is defined as part of the Malta FPGA device 13 2 Pre Requsites There are pre requisites to being able to build a driver kernel module namely e source of the linux kernel e cross compiler for building the linux kernel These were previously discussed in the section 9 2 1 Building the Cross Compiler and section 9 2 2 Building the Linux Kernel Please see these sections for instructions if they have not already been performed 13 3 Starting the Platform Simulation The MipsMalta platform should be started with additional command line arguments as used previously to export a TCP port redir and tftp root tftp to allow easy transfer of files into the Guest Operating System and run in real time wallclock Using
21. 0x80442aac 0x00001310 COR_SD kerctab a 0x80443dbc 0x000024b8 kerctab_gp a 0x80446274 0x00000988 _ksymtab_strings a 0x80446bfc 0x0000d5c8 param a ing prom memory 956k freed data wa 0x80456000 0x0001b220 0 gt n 196k freed data cacheline_aligned wa i 5 sinit text ax init data wa amt satup YET 3 ebian 1 1 1 3 3 Built in shell ash con_initcall init HE help for a list of built in commands exit text ax init ramfs a bin ss can t ac s tty job control turned off Info OR_SD data percpu wa r t oc cpuinfo j Ve te te te te Ye de te ve ve We ve ve we ve te we s pe Malta Starting Sim Fe e Ve de ve Ve de Fe ve We vede e dede dete arning CIDE ide Failed to open file mipsel_hda S ikee v0 0 arning IDE ide Failed to open file mipsel_hdb arning CIDE ide Failed to open file mipsel_cd arning DMA_UNS ide PCI DMA ch 1 1 0x14 lt 0x0 mic Info MIPS32_IAS_COPO_READ 0x8010ad10 read from unsupported COMBEN _entri Info VGA vga writing PCI config GPIO Base 0x1a000000 this software world since GNU created GDB Fast Free Open Virtual Platforms If you are developing embedded software then virtual platforms will be incr fone istadas lable y aspecially gt W signs with more th 1e process S RA you pecial y if you are wor ing on sign vith more than one processor ff a B not available will become an important resourc
22. 2010 Imperas Software Limited www OVPworld org Page 48 of 115 MIPS32 Malta Linux Platform 8 3 3 Modifying the boot sequence The boot sequence is controlled by a single script in sbin init With the files from the initrd gz file extracted it is simple to edit this file 8 3 4 Example Operations When Running from Initial RAM Disk There is very limited functionality when running from the initial ram disk However the following are useful operations that can be performed 8 3 4 1 Make a writeable directory When booted from an initrd image the root FS is read only To make a read write directory Now t2 is a writable directory on the ram disk gt Any files written here will be lost when simulation is terminated 8 3 4 2 Configure the NIC The following commands will enable the Ethernet NIC on the simulated Malta platform We can now access out into the real world Example using nc to fetch a page from google com Notes 1 nslookup was used on a Linux machine to get the ip address for google com 2 There is no further prompt after the nc command 3 Two lt Carriage Returns gt are required after the GET command 2010 Imperas Software Limited www OVPworld org Page 49 of 115 MIPS32 Malta Linux Platform In the shell use the nc command and enter the following tne 64 233 167 99 S0 CET HETE 1 0 The result of this command provides information from the www google com website as shown in the
23. 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 BusyBox v1 1 3 Debian 1 1 1 3 3 Built in shell Cash Enter help for a list of built in commands Ybin sh can t access tty job control turned off ee Figure 5 Booting to Shell from Initial Ram Disk SMP 2010 Imperas Software Limited www OVPworld org Page 23 of 115 MIPS32 Malta Linux Platform 6 4 2 Terminating the Simulation We can terminate the simulator using CTRL C This should be done in the window from which the simulation was originally invoked i e not the simulated console window Alternatively the simulated console window can simply be closed which will also terminate the simulation The two windows that will be present during the simulation are shown in Figure 6 Execution and Simulated Console Windows OxL OxL xxxxxxxx unmapped xxxxxxxx Info MIPS32_VM_VMIINIT Setting up Virtual Mapping Info MIPS32 TLBTLBH2 Using 128 hidden TLB entries Info OR_OF Target cpul Bes object file read from vmlinux Info COR_SH Section flg sect addr size load addr file offset Info OR_SD etext ax 0x80100000 0x002d6564 0x80100000 0x00002000 Info COR_SD __ex_table a Ox803d6570 Ox00001950 0 5 Info COR_SD rodata a 0x803d8000 0x0006Sbe4 Ei VGA OVPsim MIPS32 Malta Info COR_SD pci_fixup a O0x8043dbe4 0x00000558 OR_SD ksymtab a 0x8043e13c 0x00004970 OR_SD _ksymtab_gpl a
24. Aa The supplied disk image performs a full Linux operating system boot E VGA CL GD54xx STATUS will be enab Commit interval 5 seconds ory INIT version 2 86 booting 2010 Imperas Software Limited www OVPworld org Page 57 of 115 MIPS32 Malta Linux Platform 11 2 2 Adding Additional Linux Components The ftp component is required in the Linux operating system to allow the easy transfer of user programs into the simulated Linux environment This additional component may be installed using apt get and will require root login in the simulated Linux environment Login as root and install the ftp package gt apt get install ftp E VGA Imperas MIPS32 Malta useri debian S su root Password debian home user1 apt get install ftp Reading package lists Done Building dependency tree Done The following NEW packages will be installed ftp O upgraded 1 newly installed B to remove and not upgraded Need to get 6B 59 6kB of archives After unpacking 193kB of additional disk space will be used Selecting previously deselected package ftp Reading database 15813 files and directories currently installed Unpacking ftp from ftp_ 17 16_mipsel deb Setting up ftp 4 17 16 debian home user1 Now logout as root using the exit command gt exit 11 2 3 Transfer Files The simulation was executed using the additional command line argument redir This caused a re direction command of
25. Bed ol Kernel Build Script cesena eresse e N ese 53 8 2 2 2 Kernel Build Configuration eessseeesseesseesseesserssseresseessressersseresseeessees 54 8 3 Building on a Windows Platform sseessesssesseessseeesseesseesssesseesseresseeesseesseesse 54 2010 Imperas Software Limited www OVPworld org Page 4 of 115 MIPS32 Malta Linux Platform 9 Debugging the Linux Kemel sei sc cccsssccisecsdenstavcvccciesssvecsdavesaasede denusadsavaatesecsaceaanaeceaetts 55 9 1 Non Intrusive Instrumentation sseeseseseeeeeseeeseseeestesstsersstessrseresressesererressessresees 55 9 2 Attaching the Debug rer orici oiia a ae a a ai 55 9 2 1 Starting the Platform Simulation esseeeseseeeseesesesesresseseresressessresrensessresees 55 10 Transferring Files to Guest Linux sssesesssessssseesseesseesseesseeessstesseesseesseresseeessresseesse 57 LOU Introduction nesnanssnnirniei iiaeia ns ea ia ei RS 57 1KO A OTTE A M SSI CT A E E E E 57 102 1 Starting the Sim latioN n 2p a ea e PAu i a E E 57 10 2 2 Adding Additional Linux Components seseseeeeeseeeseeseeeessressereresreesersresees 58 0 2 3 Transfet Piles 2 2255 ce ccsicenet s E aa ETEEN 58 10 3 Sie TEPP pe e E EEA EA aA 59 10 3 1 Starting the Simulation iss ecsccissgcadsavcavcaaiesosecessncceasnascadasscssbeessavaceesdeceueases 60 10 3 2 Adding Additional Linux Components essseeeseseeeseeseeerseressereresrerseesresees 60 10 3 3 Transfer Files into Guest Opera
26. CONF IG_GENERIC_CALIBRATE_DELAY y CONF IG_GENERIC_TIME y CONF IG_SCHED_NO_NO CONF IG_GENERIC_HA CONF IG_ARCH_MAY_HAVE_PC_FDC y CONF IG_DMA_NONCOHERENT y CONF IG_DMA_NEED_PCI_MAP_STATE y CONF IG_EARLY_PRINTK y CONFIG_SYS_HAS_ EARLY _PRINTK y CONFIG_HOTPLUG_CPU is not set CONFIG_1I8259 y CONFIG_MIPS_BONITO64 y CONF IG_MIPS_MSC y CONFIG_NO_IOPORT is not set CONF IG_GENERIC_ISA_DMA y CONF IG_CPU_BIG_E CONF IG_CPU_LITTLE_ CONF IG_SYS_SUPPORT CONF IG_SYS_SUPPOR CONF IG_IRQ_CPU y CONF IG_MIPS_BOARDS_GEN y CONF IG_PCI_GT64XXX_PCI0 y CONF IG_SWAP_TIO_SPACE y CONFIG _BOOT_ELF32 y CONFIG_MIPS_L1 CACHE SHIFT 5 O ew re NDIAN y BIG_ENDIAN y PS SL CPU selection CONFIG _CPU_LOONGSON2 is not set CONFIG_CPU_MIPS32_ Rl is not set CONF IG_CPU_MIPS32_R2 y CONFIG_CPU_MIPS64_R1 is not set CONFIG_CPU_MIPS64_R2 is not set CONFIG_CPU_R3000 is not set CONFIG_CPU_TX39XX is not set CONFIG_CPU_VR41XX is not set CONFIG_CPU_R4300 is not set CONFIG_CPU_R4X00 is not set CONFIG_CPU_TX49XX is not set CONFIG_CPU_R5000 is not set CONFIG_CPU_R5432 is not set CONFIG_CPU_R6000 is not set CONFIG _CPU_NEVADA is not set
27. CONFIG_CPU_R8000 is not set CONFIG_CPU_R10000 is not set CONFIG_CPU_RM7000 is not set CONFIG_CPU_RM9000 is not set CONFIG_CPU_SBl is not set CONFIG_SYS_HAS_CPU_MIPS32_Rl y CONFIG_SYS_HAS_CPU_MIPS32_R2 y CONFIG_SYS_HAS_CPU_MIPS64_Rl y CONFIG_SYS_HAS_CPU_NEVADA y CONFIG_SYS_HAS_CPU_RM7000 y CONF IG_CPU_MIPS32 y CONF IG_CPU_MIPSR2 y CONFIG_SYS_SUPPORTS_32BIT_KERNEL y DIAN is not set ITTLE_ENDIAN y MIT_FRAME_ POINTER y DIRQS_NO__DO_IRQ is not set 2010 Imperas Software Limited www OVPworld org Page 90 of 115 MIPS32 Malta Linux Platform CONF IG_SYS_SUPPORTS_64BIT_KERNEL y CONF IG_CPU_SUPPORTS_32BIT_KERNEL y Kernel typ CONF IG_32BIT y CONFIG_64BIT is not set CONFIG _PAGE_SIZE_4KB y CONFIG _PAGE SIZE _8KB is not set CONFIG _PAGE SIZE_16KB is not set CONFIG _PAGE SIZE _64KB is not set CONF IG_BOARD_SCACHE y CONF IG_MIPS_CPU_SCACHE y CONF IG_CPU_HAS_PREFETCH y CONFIG _MIPS_ MT DISABLED is not set CONF IG_MIPS_MT_SMP y CONFIG_MIPS_MT_SMTC is not set CONFIG_MIPS_MT y CONFIG_SYS_SUPPORTS_MULTITHREADING y CONFIG_MIPS_MT_FPAFF y CONFIG _MIPS_VPE_ LOADER is not set CONF IG_CPU_HAS_LLSC y CONFIG _CPU_HAS SMARTMIPS is not set CONF IG_CPU_MIPSR2_IRQ_VI y CONF IG_CPU_MIPSR2_IRQ_EI y CONF IG_CPU_HAS_SYNC y CONF IG_GENERIC_HARDIRQS y CONF IG_GENERIC_IRQ_PROBE y CONFIG_IRQ_PER_CPU y CONF IG_CPU_SU
28. Limited www OVPworld org Page 55 of 115 MIPS32 Malta Linux Platform the same modification can be made to the equivalent Linux shell script or to any of the other scripts provided in the demo directory The debugger is then attached to this port as described in one of the debugging documents referenced above The kernel can be thought of as an application running directly on the processor 2010 Imperas Software Limited www OVPworld org Page 56 of 115 MIPS32 Malta Linux Platform 11 Transferring Files to Guest Linux 11 1 Introduction The ability to transfer files compiled on the host system into the Guest simulated Linux system is crucial to provide an efficient development environment This section provides two methods provided by the MipsMalta platform for transferring files It assumes you have already set up a full Linux Install as explained in section 7 Installing Full Linux Distribution 11 2 Using an FTP Server 11 2 1 Starting the Simulation Run the platform with the script RUN_BootLinuxVNC provided in the demo directory OVPsim_linux_MipsMalta_install to pass an additional parameter redir to set redirection of the tcp port 11001 that will be used for the connection between the gdb server and a gdb instance later For example on Windows SPLATFORM_VLNV S verbose rameisk tntird z finishonhalt kernel rml Console tty output imperas log S wallcloek lt redir a
29. a ddd gdb debugging instance on a Host machine In order to export additional ports the platform c file will need to be modified to change the attribute passed to the Ethernet NIC peripheral This is passed using the icm function in the platform as shown below LCmAJASEEINGAECE NICACCro Sredair y Misepisl dl OOM OO al Sim A OOM ec icmPseP nic icmNewPSE PCI_NET nicPse nicAttrs nicIntercept modelAttrs To add additional ports the string is constructed as provided in the following example that exports two ports PeMAC Stara g Attra MnO Eiger Tredie ECP TOOT SOR iOr yi le Selene TeiSjoy 8 IL AON TO Oak lear SALA ee 2010 Imperas Software Limited www OVPworld org Page 70 of 115 MIPS32 Malta Linux Platform 12 7 Debug using Simulated GDB Debugging can also be carried out using a GDB session running within the simulated Guest Linux In this case the source code should also be transferred onto the simulated platform using the FTP or TFTP methods described earlier Start GDB using the command gt gdb linpack exe ebian home useri1 Is 1 otal 672 rw r r 1 root root 22340 2068 85 25 17 46 linpack c ruxr xr x 1 root root 655574 2068 85 25 17 47 linpack exe ebian home user1 gdb linpack exe SNU gdb 6 4 98 debian opyright C 2066 Free Software Foundation Inc SDB is free software covered by the GNU General Public License and you are elcome to change it and or distribute copies of it under certain
30. address range from the System bus to PCI bus and bridges a different range from PCI bus to the System bus This allows the CPU to access part of the PCI address range and for PCI bus masters to DMA data directly into the main memory OVPsim models address spaces rather than physical busses Therefore there is no bridge from PCI to system bus all devices share the same address space When a PCI device is programmed 2010 Imperas Software Limited www OVPworld org Page 17 of 115 MIPS32 Malta Linux Platform to decode a particular address range it adjusts the range according to the base address of the bridge The net effect is the same but the model can allow mappings which are not possible in the hardware Similarly the ISA bus is not modeled explicitly its devices appear on the PCI bus according to PCI configuration 2010 Imperas Software Limited www OVPworld org Page 18 of 115 MIPS32 Malta Linux Platform 6 Booting the pre built Linux Kernel 6 1 Introduction The MipsMalta platform is designed to boot a Linux kernel from a number of sources The OVPsim_demo_linux_MipsMalta demo provides everything necessary to boot a pre built Linux kernel using a simple ram disk also provided The Debian linux kernel is built for the Malta platform and the MIPS32 little endian device using a distribution available from Debian and can be found in the file named vmlinux This image is built as a standard image and the same file runs on the vir
31. be at least 1 Giga Byte Figure 9 shows the creation of a 4GB disk image e C WINDOWS system32 cmd exe E x First create an empty disk to Install Linux l Enter the size in GigaBytes you wish to create Disk Size in GB 4 Figure 9 Create 4GB blank Disk Image The halt command actually invokes a write with a special value to a register in the Malta FPGA It is this write that causes the simulation to finish 2010 Imperas Software Limited www OVPworld org Page 26 of 115 MIPS32 Malta Linux Platform 7 3 Starting the Linux Kernel Boot Once the disk is created the script will start the simulation of the Malta platform The initial boot sequence is the same as the other example with the output from the kernel logged to the console as shown in Figure 10 Kernel Booting from Install INITRD Ml VGA OVPsim MIPS32 Malta oo hda max request s 512KiB hda 8388608 sectors 4294 MB w 256KiB Cache CH5 8322 255 63 UDMAC33 hda cache flus supported hda unknown partition table physmap platform flash device 00400000 at 1000000 physmap flash physmap flash 0 map_probe failed serio i8042 KBD port at 0x60 0x64 irg 1 serio i8042 AUX port at 0x60 0x64 irq 12 mice P5 2 mouse device common for all mice input AT Raw Set 2 keyboard as class input inputdO TCP cubic registered NET Registered protocol family 1 NET Registered protocol family 1 NET Registered protocol family 15 Bridge firewalling regis
32. conditions ype show copying to see the conditions rere is absolutely no warranty for GDB Type show warranty for details 1is GDB was configured as mipsel linux gnu Using host libthread_db library lib slibthread_db so 1 gdb We are now ready to start debugging the application We shall set a breakpoint on main and run the application reakpoint 1 at 6x482934 file linpack c line 742 gdb run reakpoint 1 main at linpack c 742 REAL cray ops total 4 4 norma normx int main static REAL aal2661 2661 a 2861 2611 b 266 x 2001 REAL cray ops total 4 norma normx REAL resid 8 8 residn 8 8 eps 8 8 REAL epslon kf static int ipvt 2061 n i ntimes info lda ldaa kf lops We can use all the expected GDB commands for example add breakpoints single step examine registers etc 2010 Imperas Software Limited www OVPworld org Page 71 of 115 MIPS32 Malta Linux Platform xinfo 6 dgefa a x4826cc Ilda 261 n 1800 ipvt 4 x48id6c info x481id5c at linpack c 689 Ox8H462bf8 in main at linpack c 765 gdb list gaussian elimination with partial pivoting if DEBUG printf gt dgefam endif xinfo 8 LLL a i if nmi gt 8 for k 8 k lt nmi k kpi k 1 at vo v1 a al aZ a3 86880008 Zaaa8 13 86480006 HHHAHACI B464826cc HAHHHAcI BHBHHH64 HA481d6c t t1 LA t3 t4 t5 t6 t7 fffFfFFFFfF FFLLLLFL fFffFfFfFfff BOHHHHHA HAOHAHHAA4 HOOHHAAF
33. following figure E VGA OVPsim MIPS32 Malta Me nc 64 233 167 99 80 GET HTTP71 0 HTTP71 0 302 Found Location http www google co uk Cache Control private Content Type text html charset UTF 8 Set Cookie PREF ID 28ef53e0b6504b6b TN 1221724960 LM 1221724960 S CUSA74CUTUTt SoL expires Sat 18 Sep 2010 08 02 40 GMT path domain google com Date Thu 18 Sep 2008 08 02 40 GMT Server gus Content Length 221 Connection Close lt HTML gt lt HEAD gt lt meta http equiv content type content text html charset utf 8 gt lt TITLE gt 302 Moved lt TITLE gt lt HEAD gt lt BODY gt lt H1 gt 302 Moved lt H1 gt The document has moved lt A HREF http wuu google co uk gt here lt A gt lt BODY gt lt HTML gt 2010 Imperas Software Limited www OVPworld org Page 50 of 115 MIPS32 Malta Linux Platform 9 Re building the Debian Linux Kernel 9 1 Introduction This section provides some example instructions to re build the vmlinux kernel from a Debain distribution The build is carried out on a Linux platform In order to rebuild the Linux kernel it is first necessary to build the Cross Compiler 9 2 Building on a Linux Platform 9 2 1 Building the Cross Compiler To build a cross compiler it is first required to obtain binutils and compiler source In this example we have used binutils 2 16 1 and gcc 3 4 4 The version of gcc used is dependent upon the support for th
34. image can be created using standard Linux tools The following example command creates a disk image called newDisk that is an empty file with 1024 blocks of 1024 bytes We may now copy files into the mounted disk image When complete unmount the directory we used 2010 Imperas Software Limited www OVPworld org Page 47 of 115 MIPS32 Malta Linux Platform 8 2 2 Accessing If we have a diskimage that we have been using and we wish to access files on the disk we can use standard Linux tools List the partitions and note the offset of the partition you want to access Use the offset to calculate an offset in bytes for example offset of 63 would yield a byte offset of 63 512 32256 Make a directory to which the disk can be mounted and mount the disk You will need to be root to perform the mount operation It is now possible to access the partition in the disk image through the mount point mnt 8 3 Initial RAM Disk 8 3 1 Extract Files from an initrd gz This sequence of commands will allow access to the files in an initial ramdisk Move files from romfs to use in a new file system Now the files are available in lt destination gt This can be used as the source for creating a new variant of the initial ram disk 8 3 2 Building an initrd gz Create a directory into which your files can be written mkdir ramfs copy your files into ramfs you might want to start by extracting an existing initrd
35. init void 117 118 int ret 119 120 printk LED driver hello n 121 ret register_chr dev CLED_MAJOR DEVICE_NAME amp ops jidebug mipslel gt m We have stopped at the start of the init function We are now able to debug the init function and also add breakpoints to other functions of interest watchpoints on variables etc 15 4 3 Adding Breakpoints The example application that uses the led_drv driver module writes values to the LED We can apply a breakpoint on the led_write function in the driver to debug this debug m psle1 gt b led_write i reated breakpoint 5 at 0xc00390f0 file home graham playground kernelModule ledDriver ledDrvModule led_drv c line 102 idebug mipslel gt m We can use all the standard debug features to debug the kernel module for example breakpoints watchpoints single stepping examining registers etc 15 4 4 Source Level Debug We are able to debug the kernel driver at source level When we continue the simulation with the breakpoint set on led_write we hit a breakpoint as soon as the led_flash exe test application is executed Breakpoint 5 at led_write triggered for processor mipslel led_write file 0x81laba40 buffer 0x811aba40 367c 207 220h 354 207 3374022 201 024 004 254 206 260 2 314003 5 Length 1 offset 0x8641bF18 at fhome gr aham playground kerne Module ledDriver ledDrvModule led_ drv c 102 102 printk C led_write n ee Grinsted gt list t loff _
36. is built MINGW 32 cAworkspace kernelModule ledFlashApp graham WIN23 c workspace kernelModule ledFlashApp make mips linux gnu gec EL msoft float static g o led_flash exe led_flash c lm mips linux gnu nmn n led_flash exe gt led_flash exe nm mips linux gnu objdump D led_flash exe gt led_flash exe od aa AN c workspace kernelModule ledFlash pp This application can now be transferred into the MIPS Malta Linux simulation and executed See the following section that takes you through this process 12 5 Adding Additional Linux Components The gdb component is required in the Linux operating system to enable debugging of the user application This includes gdb server to allow the connection of a debugger running on the native host This component will be installed using apt get and will require root login in the simulated Linux environment 2010 Imperas Software Limited www OVPworld org Page 65 of 115 MIPS32 Malta Linux Platform Login as root z EE VGA CL GD54xx STATUS has x ebian login root assword Last login Sun May 25 87 12 51 2888 on tty1 Linux debian 2 6 23 11 1 SMP Fri Apr 18 11 83 23 BST 2888 mips he programs included with the Debian GNU Linux system are free software he exact distribution terms for each program are described in the individual files in usr share doc copur ight Debian GNU Linux comes with ABSOLUTELY NO WARRANTY to the extent permitted by applicable law ebian
37. is not set CONFIG_PPP is not set CONFIG_SLIP is not set CONFIG_NET_FC is not set 2010 Imperas Software Limited www OVPworld org Page 105 of 115 CONFIG_SHAPER is not set CONFIG_NETCONSOLE is not CONFIG_NETPOLL is not se CONF IG_NET POLL CONTROLL CONFIG_ISDN is not set CONFIG PHONE is not set Input device support CONF IG_INPUT y CONF IG_INPUT_FF_MEMLESS MIPS32 Malta Linux Platform set ct ER is not set is not set CONFIG_INPUT_POLLDEV is Userland interfaces CONF IG_INPUT_MOUSEDEV y CONF IG_INPUT_MOUSEDEV_PSAU not set X y CONF IG_INPUT_MOUSEDEV_SCRE EN_X 1024 CONF IG_INPUT_MOUSEDEV_SCR T EN_Y 768 CONFIG_INPU CONFIG_INPU F CONFIG_INPU CONFIG_INPU _JOYDEV is not set _TSDEV is not set _EVDEV is not set EVBUG is not set Input Device Drivers CONFIG_INPUT_KEYBOARD y CONFIG_KEYBOARD_ATKBD y CONFIG_KEYBOARD_LKKBD CONFIG_KEYBOARD_SUNKBD is not set is not set CONF IG_KEYBOARD_XTKBD CONFIG_INPUT_MOUSE y CONFIG_MOUSE_PS2 y CONFIG_MOUSE_PS2_ALPS y CONFIG_MOUS CONFIG_MOUS CONF IG_MOUS S O O O w m m
38. manually with the kernel on partition fdev hdat and root dev hdal passed as a kernel argument activates buttons 2010 Imperas Software Limited www OVPworld org Page 41 of 115 MIPS32 Malta Linux Platform 7 4 8 Complete Installation Ml VGA OVPsim MIPS32 Malta At this point the installer will make a request to reboot the system The simulation platform is set up so that it does not perform a reboot but finishes the simulation with the statistics of the simulator run being displayed on exit ERANA EEA E lolx Info PSC_PFIN Platform simulation terminated by bhmFinish call in maltaFpga CPU cpul STATISTICS Type Nominal MIPS Final program counter 0x801016d4 Simulated instructions 270 648 357 591 Simulated MIPS SIMULATION TIME STATISTICS Simulated time 3970 57 seconds User time 6416 14 seconds System time 414 70 seconds Elapsed time 9017 29 seconds Host utilization 82 8 wallclock enabled OUPsim finished Fri Aug 08 10 48 34 2008 Visit www imperas com for multicore debug verification and analysis solutions OUPsim v20080807 0 Open Virtual Platform simulator from www OUPworld org Press any key to continue 4 2010 Imperas Software Limited www OVPworld org Page 42 of 115 MIPS32 Malta Linux Platform 7 5 Re Start System 7 5 1 Boot directly from Disk Image Run the platform by executing the batch file RUN_BootLinux bat or shell script RUN_BootLinux sh that is provide
39. one of the devices contains the file system for booting the SmartProm root attribute should be specified accordingly 2010 Imperas Software Limited www OVPworld org Page 14 of 115 MIPS32 Malta Linux Platform Attribute Platform Model Description Default PCIslot 10 None Set the PCI Slot for the PCIFunction 1 None Set the PCI Function number DriveOName mipsel_hda None The name of the file for the first drive DrivelName mipsel_hdb None The name of the file for the second drive Drive2Name mipsel_cd None The name of the file for the third drive Drive3Name None None The name of the file for the fourth drive Table 5 IDE Attributes 5 6 USB PciUSB The USB model does not provide USB functionality This model provides the PCI interface necessary to register the device and provides NULL data when any register is read Attribute Platform Model Description Default PCIslot 10 None Set the PCI Slot for the PCIFunction 2 None Set the PCI Function number Table 6 PIIX4 USB Attributes 5 7 Power management PciPM The power management model does not provide power management functionality This model provides the PCI interface necessary to register the device and provides NULL data when any register is read Attribute Platform Model Description Default PCIslot 10 None Set the PCI Slot for the PCIFunction 3 None Set the PCI Function number Table 7 PITX4 Power Management Attributes 5 8 Interrupt Controller IntPlIIX4E825
40. platform in the same way as a user application is transferred as described in section 11 Transferring Files to Guest Linux We can now test our application and driver in conjunction with the peripheral device When running the application it first opens the device and then writes characters The device driver has been written including with debug printf statements which are seen in the console useri debian useri debian led_flash exe led_open 42 6 led_write led_write led_write done led_write led_write 1 led_write led_write led_write led_write done led_write led_write 88 led_write done When complete the device is closed led_write led_write led_write led_write led_write done led_write led_write 1 led_write done led_release useri debian rey 2010 Imperas Software Limited www OVPworld org Page 79 of 115 MIPS32 Malta Linux Platform 14 Debugging a Statically Linked Linux Kernel Module As the kernel module is statically linked into the kernel all symbolic information for the kernel module will be available This allows the module to be debugged in the same way as a kernel can be debugged see section 10 Debugging the Linux Kernel 2010 Imperas Software Limited www OVPworld org Page 80 of 115 MIPS32 Malta Linux Platform 15 Debugging a Dynamically loaded Linux Kernel Module It is difficult to debug a Linux Kernel Module LKM especially when it is
41. the command with the keyword tcl or the tcl global namespace prefix tcl lkmbreakonload module led_drv or lkmbreakonload module led_drv The command has two arguments the module name and the file containing the module If the file argument is omitted it is assumed the file is called lt module name gt ko 15 4 2 Installing the Kernel Module Here we will look at what happens now when we install the led_drv kernel module example in the guest linux operating simulation Use the same commands as previously used to install the kernel module when logged in as root in the guest operating system mknod dev led c 42 0 chmod 666 dev led insmod led_drv ko This time the insmod command does not return to the prompt This is because the debugger has detected the loading of the kernel module led_drv that was previously registered for debugging and stopped the simulation You will notice also that the symbol table is generated 2010 Imperas Software Limited www OVPworld org Page 84 of 115 MIPS32 Malta Linux Platform jidebug mipslel gt add symbol table from file led_drv ko at text_addr 0xc0039000 ksymtab_addr 0x0 Breakpoint 4 at 0xc0039184 triggered for processor mipslel led_init at home graham playground kernelModule ledDr iver ledDrvModule led_drv c 117 117 idebug mipslel gt list 112 113 114 as the driver Register the character device 115 116 static int led
42. to at nas 45 6 5 4 TORU es scat 2 EE E EA E ao meena E 45 6 6 Stopping he Systemsa ata nsns ome Melisa iat td a ea eetwntase saaaet 46 7 Disk Image Files and Initial RAM DISKS oo eee eee eeseceseeeeeeeeaeecaeceseenseeesneessaeenes 47 7 1 Tntrod ction si oiya e re eioi irige tatsi e at egiri 47 T2 Hard ISAS secrets a uanseesan a a a E E Mee ecg 47 7 2 1 Creation eannan n N a a a RN 47 T22 PRC CES IN ir ara a a a a aes ea E aes 48 To Intal RAM Disk cis sssseiiees vovasaessene Sa ensateasapndeassasatsain toda ap thea oar eeceneee aan 48 7 3 1 Extract Files from an initrd OZ ey dati ce vaso ac saacaneeadasov caaeetsecossnccteebecs 48 Toe Building AN TM Zi claws eee ans ge E KE RE E ce ai es 48 1 3 3 Modifying the boot sequence is lt ssicsistecdsarssesdas Wersegdsasereaedscusdeaea neeeda tens jocetenes 49 7 3 4 Example Operations When Running from Initial RAM Disk 000 49 Doel Make a writeable directory csc tecad i e E E omer ees 49 T342 Connie ure the NIG sacs os see a a lesa Sac ae Bale a les ec ads 49 8 Re building the Debian Linux Kernel 0 eee eeececeeneeceseeeceeeeeceeeeeceeeeceseeeeseeeesaes 51 8 1 TNtPOCUCHON insis yada dete Ade aaa eee eee ed 51 8 2 Building on a Linux Plato oi cc ccs stati oseedecialasaaeatetidteacioteiadialcealaants 51 8 2 1 Building the Cross Compiler 223 cisidstecamad aces neduntastteavesl 51 8 2 2 Building the Linux Kernel i isscisassacciaassacciseacacsashevattalocsecessaveerescevedvasons 53
43. warranty for GDB Type show warranty for details This GDB was configured as host i686 pc mingw32 target mipsel linux gnu gdb file linpack exe Reading symbols from C msys 1 O0 home graham MipsMaltaLinux linpack exe done gdb gdb target remote localhost 11001 Remote debugging using localhost 11001 Ox00400170 in _ftext gdb O 2010 Imperas Software Limited www OVPworld org Page 69 of 115 MIPS32 Malta Linux Platform We can now carry out normal debugging operations such as creating and running to breakpoints MINGW 32 MipsMaltal inux B gdb file linpack exe Reading symbols from C msys 1 O0 home graham MipsMaltaLinux linpack exe done gdb target remote localhost 11001 Remote debugging using localhost 11001 Ox00400170 in _ftext gdb list 3 ipyt n 1 n 1 if a lda n 1 n 1 ZERO info n 1 int main static REAL aa 200 200 a 200 201 b 200 200 REAL cray ops total 0 0 norma normx gdb warning Source file is more recent than executable b 741 Breakpoint 1 at 0 402934 file linpack c line 741 gdb c Continuing Breakpoint 1 main at linpack c 742 742 REAL cray ops total 0 0 norma normx gdb E 12 6 3 Debugging Multiple Applications in Parallel Each application instance to be debugged will require 1 a port to be exported from the simulation 2 a gdb server instance in the simulated Linux environment 3
44. 9 The interrupt controller used in the platform is contained within the PIIX4E device but is modeled as a discrete device It comprises of two individual Intel 8259 interrupt controller models that are cascaded A single interrupt is generated to MIPS32 processor which in turn causes a PCI Interrupt Acknowledge cycle that provides a vector indicating the interrupting device with the highest priority Attribute Platform Model Description Default There are no user definable attributes for this model Table 8 Interrupt Controller Attributes 2010 Imperas Software Limited www OVPworld org Page 15 of 115 MIPS32 Malta Linux Platform 5 9 VGA VgaCLGD54xx This model creates a Cirrus CL GD 54xx and utilizes SDL to create an output window to which the VGA is generated Attribute Platform Model Description Default PCIslot 18 None Set the PCI Slot for the scanDelay 50000 200 This is the rate at which the frame data is displayed frame rate noGraphics 0 0 When set the SDL interface is disabled and no display is created Title OVPsim CL This is the title displayed on the graphic screen MIPS32 GDS54xx Malta Table 9 VGA Attributes 5 10 PS2 Controller Ps2Control The PS2 Controller uses SDL for mouse and keyboard input It must be used in conjunction with the VGA peripheral device that generates the SDL output window with which it interacts The SDL interface supports polling only and so the PS2 Controller polls the S
45. ACKTRACE_SUPPORT y CONFIG_DEFCONFIG_LIST lib modules SUNAME T ve f miri EASE config General setup CONF IG_EXPERIMENTAL y CONFIG_LOCK_KERNEL y CONFIG_INIT_ENV_ARG_LIMIT 32 CONFIG_LOCALVERSION CONF IG_LOCALVERSION_AUTO y CONF IG_SWAP y CONFIG_SYSVIPC y CONFIG_SYSVIPC_SYSCTL y CONFIG _POSIX_MQUEUE is not set F CONFIG BSD PROCESS _ ACCT is not set CONFIG_TASKSTATS is not set CONFIG_USER_NS is not set CONFIG_AUDIT is not set CONFIG_IKCONFIG is not set CONF IG_LOG_BUF_SHIFT 15 CONFIG_CPUSETS is not set CONFIG_SYSFS_DEPRECATED y CONF IG_RELAY y CONF IG_BLK_DEV_INITRD y CONFIG_INITRAMFS_SOURCE CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONF IG_SYSCTL y CONF IG_EMBEDDED y CONFIG_SYSCTL_SYSCALL is not set CONF IG_KALLSYMS y CONFIG_KALLSYMS_EXTRA_ PASS is not set CONF IG_HOTPLUG y CONF IG_PRINTK y CONF IG_BUG y CONFIG_ELF_CORE y CONF IG_BASE_FULL y CONF IG_FUTEX y CONF IG_ANON_INODES y CONFIG_EPOLL y CONF IG_SIGNALFD y CONF IG_EVENTFD y CONF IG_SHMEM y CONF IG_VM_EVENT_COUNTERS y CONF IG_SLAB y CONFIG_SLUB is not set CONFIG_SLOB is not set CONF IG_RT_MUTEXES y CONFIG_TINY_SHMEM is not set
46. DL interface for activity on the mouse or keyboard The poll rate is configurable Attribute Platform Model Description Default disableInput 0 0 When set this causes the input form the PS2 Controller to be disabled This is used mainly for testing pollPeriod 50000 2000 The value provided for the poll period is the rate at which the PS2 input devices are polled for input The value is in micro seconds grabDisable 0 0 Stop the mouse being grabbed when clicked in window Table 10 PS2 Controller Attributes 5 11 Real Time Clock RtcMC 146818 This is a model of an MC146818 real time clock device Attribute Platform Model Description Default timefromhost 0 0 When set this causes the current time to be read from the host during initialization Table 11 Real Time Clock Attributes 2010 Imperas Software Limited www OVPworld org Page 16 of 115 MIPS32 Malta Linux Platform 5 12 Malta FPGA MaltaFPGA This is a model of the FPGA device that is available on the Malta platform Attribute Platform Model Description Default stoponsoftreset 1 0 If set when the soft reset register is written with a special value it causes the simulation to terminate switches None 0 Set the value of the Malta switches accessed by the FPGA Table 12 Malta FPGA Attributes 5 13 Ethernet Controller Nic AM79C97x The Ethernet controller is a partial model of the AMD AM79C97xx series device It has sufficient capabilities to support a Linux operati
47. EDID y CONFIG_FB DDC is not set CONFIG_FB_CFB_FI s LRECT y CONFIG_FB_CFB_COPYAREA y CONFIG_FB_ CFB _IMAGEBLIT y CONFIG_FB_SYS_ CONFIG_FB_SYS_FILLRECT is no CONFIG_FB_SYS_COPYAREA is no CONFIG_FB SYS_FOPS is not set set set IMAGEBLIT is not set Gt eet CONFIG_FB_DEFERR ED_IO y CONFIG_FB_SVGA LIB is not set CONFIG_FB_MACMODES is not set LIGHT is not set CONF IG_FB_BACK CONFIG_FB_MODE_H ELPERS y CONFIG_FB_ASIL CONFIG_FB_NVID CONFIG_FB_RIVA CONFIG_FB MATROX is not se CONFIG_FB RADEON is not se CONFIG_FB_ ATY128 is not CONFIG_FB ATY is not set CONFIG_FB_S3 is not set CONFIG_FB SAVAGE is not set CONFIG_FB SIS is not set CONFIG_FB_ NEOMAGIC is not set CONFIG_FB TILEBLITTING is not set Frame buffer hardware drivers CONFIG_FB_ CIRRUS y CONFIG_FB_ PM2 is not set CONFIG_FB CYBER2000 is not set IANT is not set CONFIG_FB_IMSTT is not set CONFIG_FB_S1D13XXX is not set IA is not set is not set ct A TA se 2010 Imperas Software Limited www OVPworld org Page 108 of 115 CONFIG_FB_KY CONFIG_FB_3D CONF IG_FB_VO CONFIG_FB_VT MIPS32 Malta Linux Platform RO is not set
48. ER path to compiler install CROSS_COMPTILE_V COMPILER bin mipsel malta linux KERNELSRC path to source linux 2 6 23 11 obg m led_drv o default make CROSS _COMPILE CROSS_COMPILE_V C KERNELSRC modules SUBDIRS PWD 2010 Imperas Software Limited www OVPworld org Page 76 of 115 MIPS32 Malta Linux Platform 13 5 2 Building The tools available allow the driver to be built on a Linux host machine in the same way that the Linux kernel is re built only on a Linux host Building the example kernel module using the Makefile shown above will provide output similar to that below x gratia lasla bey graced been holoehule liae Orns r lolx graham lnx16 ledDriver make make CROSS_COMPILE home nda mips linux install bin mipsel malta linux C home graham workspaceMalta mipsKernel linux 2 6 23 11 H home graham playground kernelModule ledDriver ledDrvModule modules make 1 Entering directory home graham workspaceMalta mipsKernel 1inux 2 6 23 11 CC M home graham playground kernelModule ledDriver ledDrvModule led_drv o Building modules stage 2 MODPOST 1 modules cc home graham playground kernelModule ledDriver ledDrvModule led_drv mod o LD M home graham playground kernel Module ledDriver ledDrvModule led_drv ko make 1 Leaving directory home graham workspaceMalta mipsKernel 1 inux 2 6 23 11 graham lnxi6 ledDriver 13 6 Installing the Kern
49. FX is not set ODOO1 is not set 8623 is not set CONFIG_FB_VI Console disp CONFIG_FB_TRIDENT is CONF IG_FB_ARK CONFIG_FB_PM3 not set set set not is not is not RITUAL is set lay driver support CONFIG_VGA_CONSOLE is not set CONF IG_DUMMY_CONSOLE y CONF IG_FRAMEBUFFER_CONSOLE y CONFIG _FRAMEBUFFER_CONSOLE_DETECT_ PRIMARY is not set CONFIG _FRAMEBUFFER_CONSOLE_ROTATION is not set CONF IG_FONTS y CONFIG_FONT_8x8 is not set CONF IG_FONT_8x16 y CONFIG_FONT_6x11 is not set CONFIG_FONT_7x14 is not set CONFIG_FONT_PEARL 8x8 is not set t CONFIG _FONT_ACORN_8x8 is not set CONFIG_FONT_MINI_4x6 is not set CONFIG_FONT_SUN8x16 is not set CONFIG_FONT_SUN12x22 is not set CONFIG_FONT_10x18 is not set CONF IG_LOGO y CONF IG_LOGO_LINUX_MONO y CONF IG_LOGO_LINUX_VGA16 y CONF IG_LOGO_LINUX_CLUT224 y Sound CONFIG _SOUND is not set CONF IG_HID_SUPPORT y CONFIG_HID y CONF IG_HID_D EBUG is not set CONF IG_USB_SUPPORT y CONF IG_USB_ARCH_HAS_HCD y CONF IG_USB_ARCH_HAS_OHCI y CONF IG_USB_ARCH_HAS_EHCI y CONFIG_USB is not set NOTE T USB_ST USB Gadget S
50. G_NETFILTER_XT_TARGET_NFLOG is not set CONFIG_NETFILTER_XT_TARGET_TRACE is not set CONF IG_NETFILTER_XT_TARGET_SECMARK m CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set CONF IG_NETFILTER_XT_MATCH_COMMENT m CONF IG_NETFILTER_XT_MATCH_DCCP CONFIG_NETFILTER_XT_MATCH_DSCP is not set CONF IG_NETFILTER_XT_MATCH_ESP m CONF IG_NETFILTER_XT_MATCH_LENGTH m CONF IG_NETFILTER_XT_MATCH_LIMIT m CONF IG_NETFILTER_XT_MATCH_MAC m CONF IG_NETFILTER_XT_MATCH_MARK CONF IG_NETFILTER_XT_MATCH_POLICY m CONF IG_NETFILTER_XT_MATCH_MULTIPORT m CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set CONF IG_NETFILTER_XT_MATCH_PKTTYPE m CONF IG_NETFILTER_XT_MATCH_QUOTA m CONF IG_NETFILTER_XT_MATCH_REALM m CONFIG_NETFILTER_XT_MATCH_SCTP m CONFIG_NETFILTER_XT_MATCH_STATISTIC m CONF IG_NETFILTER_XT_MATCH_STRING m CONF IG_NETFILTER_XT_MATCH_TCPMSS m CONFIG_NETFILTER_XT_MATCH_U32 is not set F CONFIG _NETFILTER_XT_MATCH_HASHLIMIT is not set IP Netfilter Configuration CONF IG_IP_NF_QUEUE m CONFIG_IP_NF_TIPTABLES m CONFIG_IP_NF_MATCH_TPRANGE m CONF IG_IP_NF_MATCH_TOS m CONF IG_IP_NF_MATCH_RECENT m CONFIG_IP_NF_MATCH_ECN m CONFIG_IP_NF_MATCH_AH m CONFIG_IP_NF_MATCH_TTL m CONF IG_IP_NF_MATCH_OWNER m CONFIG_IP_NF_MATCH_ADDRTYPE m CONFIG_IP_NF_FILTER m CONFIG_IP_NF_
51. I_QLA FC is not set CONFIG_SCSI_QLA ISCSI is not set CONFIG_SCSI_LPFC is not set CONFIG_SCSI_DC395x is not set CONFIG_SCSI_DC390T is not set CONFIG_SCSI_NSP32 is not set CONFIG_SCSI_DEBUG is not set CONFIG_SCSI_SRP is not set CONFIG_ATA is not set CONF IG_MD y CONF IG_BLK_DEV_MD m CONF IG_MD_LINEAR m CONFIG_MD_RAIDO m CONFIG_MD_RAID1 m CONFIG_MD_RAID10 m CONFIG_MD_RAID456 m CONFIG_MD_RAID5_RESHAPE y CONF IG_MD_MULTIPATH m CONFIG_MD_FAULTY m CONFIG_BLK_DEV_DM m CONFIG_DM_DEBUG is not set CONFIG_DM_CRYPT m CONFIG_DM_SNAPSHOT m CONFIG_DM_MIRROR m 2010 Imperas Software Limited www OVPworld org CONFIG_AIC7XXX_DEBUG_ENABLE is not set CONFIG_SCSI_FUTURE_DOMAIN is not set Page 103 of 115 MIPS32 Malta Linux Platform CONF IG_DM_ZE CONF IG_DM_MULTIPATH m CONF IG_DM_MULTIPATH_EMC m CONFIG_DM_MULTIPATH_RDAC is not set CONFIG_DM_ DELAY is not set Fusion MPT device support CONFIG_FUSION is not set CONFIG_FUSION_SPI is not set CONFIG_FUSION_FC is not set CONFIG_FUSION_SAS is not set H E T E 1394 FireWire support
52. MIPS32 Architecture For Programmers Volume III The MIPS32 Privileged Resource Architecture e Malta User s Manual 2010 Imperas Software Limited www OVPworld org Page 7 of 115 MIPS32 Malta Linux Platform 2 Introduction The MIPS Linux platform based on the MIPS Malta development board contains models of hardware components to a sufficient level of accuracy to run the Linux operating system The Debian distribution of Linux is provided as an example kernel with other files that are used in conjunction with the platform to show Linux booting The platform can make use of any MIPS32 processor model that provides the MMU requirements of Linux The default processor model configuration provided in this platform is the 4KEc device The MIPS32 4KEc is a 32 bit CPU with a Memory Management Unit with user and protected mode instructions to support a Virtual Memory Management System Other 32 bit MIPS32 cores can also be specified these include the 24Kc 24KEc and 34Kc which is shown booting SMP Linux To see all the cores available look at the MIPS32 processor page in the library documentation of an OVP installation The MIPS32 models available from OVP and used in the Malta platform have been verified as part of the MIPS Verified program As well as running the provided Linux kernel the platform is intended to allow the ease of development of the Linux kernel Linux user applications Linux loadable kernel modules addition
53. NET_SCH_CBOQ m CONF IG_NET_SCH_HTB m CONF IG_NET_SCH_HFSC m CONF IG_NET_SCH_PRIO m CONFIG_NET_SCH_RR is not set CONF IG_NET_SCH_RED m CONF IG_NET_SCH_SFQ m CONF IG_NET_SCH_TEQL m CONF IG_NET_SCH_TBF m CONF IG_NET_SCH_GRED m CONF IG_NET_SCH_DSMARK m CONF IG_NET_SCH_NETEM m CONF IG_NET_SCH_INGRESS m Classification CONFIG_NET_CLS y CONF IG_NET_CLS_BASTC m CONF IG_NET_CLS_TCINDEX m CONF IG_NET_CLS_ROUTE4 m CONF IG_NET_CLS_ROUTE y CONF IG_NET_CLS_FW m CONFIG_NET_CLS_U32 m CONFIG_CLS_U32_PERF is not set CONFIG_CLS_U32_MARK is not set CONF IG_NET_CLS_RSVP m CONFIG_NET_CLS_RSVP6 m CONFIG_NET_EMATCH is not set CONFIG_NET_CLS_ACT y CONF IG_NET_ACT_POLICE y CONFIG_NET_ACT_GACT is not set CONFIG_NET_ACT_MIRRED is not set CONFIG_NET_ACT_IPT is not set CONFIG_NET_ACT_PEDIT is not set CONFIG_NET_ACT_SIMP is not set CONF IG_NET_CLS_POLICE y CONF IG_NET_CLS_IND y Network testing 2010 Imperas Software Limited www OVPworld org Page 98 of 115 MIPS32 Malta Linux Platform CONFIG _HAMRADIO is not set CONFIG_IRDA is not set CONFIG_BT is not set CONFIG_AF_ RXRPC is not set CONFIG_FIB_RULES y
54. NLS m CONFIG_NLS_DEFAULT i1s08859 1 CONFIG_NLS_CODEPAGE_437 m CONF IG_NLS_CODEPAGE_737 CONF IG_NLS_CODEPAGE_775 CONF IG_NLS_CODEPAGE_850 CONF IG_NLS_CODEPAGE_852 CONF IG_NLS_CODEPAGE_855 CONF IG_NLS_CODEPAGE_857 CONF IG_NLS_CODEPAGE_860 CONF IG_NLS_CODEPAGE_861 CONF IG_NLS_CODEPAGE_862 CONF IG_NLS_CODEPAGE_863 CONF IG_NLS_CODEPAGE_864 CONF IG_NLS_CODEPAGE_865 SSS Bes SSS ae SS 2010 Imperas Software Limited www OVPworld org Page 112 of 115 MIPS32 Malta Linux Platform CONF IG_NLS_CODEPAGE_866 m CONF IG_NLS_CODEPAGE_869 m CONF IG_NLS_CODEPAGE_936 m CONF IG_NLS_CODEPAGE_950 m CONFIG_NLS_CODEPAGE_932 m CONFIG_NLS_CODEPAGE_949 m CONFIG_NLS_CODEPAGE_874 m CONFIG_NLS_ISO8859_8 m CONFIG_NLS_CODEPAGE_1250 m CONFIG_NLS_CODEPAGE_1251 m CONF IG_NLS_ASCII m CONFIG_NLS_ISO8859_1 CONFIG_NLS_ISO8859_2 CONFIG_NLS_IS08859_3 CONFIG_NLS_ISO8859_4 CONF IG_NLS_IS0O8859_5 CONFIG_NLS_ISO08859_6 CONFIG_NLS_ISO8859_7 CONFIG_NLS_ISO8859_9 m CONF IG_NLS_ISO8859_13 m CONF IG_NLS_ISO8859_14 m CONF IG_NLS_ISO8859_15 m CONFIG_NLS_KOI8_R m CONFIG_NLS_KOI8_U m CONFIG_NLS_UTF8 m BS tos Sts SiS Distributed Lock Manager CONFIG_DLM is not set
55. PPORTS_HIGHMEM y CONFIG_SYS_SUPPORTS_SMARTMIPS y CONF IG_ARCH_FLATMEM_ENABLE y CONF IG_SELECT_MEMORY_MODEL y CONF IG_FLA T T EM_MANUAL y Q NFIG_SPARSEMEM_MANUAL is not set O CONF IG_FLATMEM y CONFIG_FLAT_NODE_MEM_MAP y O F Q NFIG_SPARSEMEM_STATIC is not set IG_SPLIT_PTLOCK_CPUS 4 CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG 1 CONFIG_BOUNCE y CONFIG_VIRT_TO_BUS y CONFIG_SMP y CONFIG_SYS_SUPPORTS_SMP y CONFIG_NR_CPUS_DEFAULT_2 y CONFIG_NR_CPUS 2 CONFIG_HZ_48 is not set CONFIG_HZ_100 y CONFIG_HZ_ 128 is not set CONFIG_HZ_ 250 is not set CONFIG_HZ 256 is not set CONFIG_HZ_1000 is not set CONFIG_HZ_1024 is not set CONFIG_SYS_SUPPORTS_ARBIT_HZ y T CO Z 2010 Imperas Software Limited www OVPworld org C M CONFIG_DISCONTIGMEM_MANUAL is not set A M Page 91 of 115 MIPS32 Malta Linux Platform CONFIG_HZ 100 CONF IG_PREEMP T_NONE y CONFIG PREEMPT VOLUNTARY is not set CONFIG PREEMPT is not set CONF IG_PREEMPT_BKL y CONFIG_KEXEC is not set CONF IG_SECCOMP y CONF IG_LOCKDEP_SUPPORT y CONF IG_ST
56. Partito Diskes a nna n n RAE NEE aa TI Esia 33 64 3 1 Start Partitioning sessa a E E EES 33 6 4 5 2 Guided Partitioning of Entire Disk eee eeeeceseceesseeeeeeeeeenneeeenaeeees 33 6 4 3 3 Create IDE Mastets 2 40 cs Ne a ea eee Reads 34 G45 4 Choose Paritonin Sasien e Seve estan oe a aa oe 34 6 4 5 5 Finish Partitioning of Disk 00 eee eeeeecesececsseceeeeeeeeeeeesneeeenaeeeenaeeees 35 6 4 5 6 Write Changes to Disk a acsutcat se ccaze osuqatgai eiecoataoaaeeatenceatias eectsussecsate ceases 35 6 4 6 SetuP ACCOUNTS ai E E E E E R E ES 36 6 4 6 1 Root Passwords isasara nnes a e ssa e ania aes 36 6 4 6 2 Add User Acconto aneas et i i i fas 37 6 4 7 Base Syste Installationer s enra E E E E 39 6 4 7 Merfitymg th Release riesene ar a Tn e Eaa aos ndis 39 6 4 7 2 7 Retrieving PACKASES ccgicccusjctcrnachucecy avnasapantedadesc a ous exadantdnian O EESK 39 6 4 7 3 Continue Without Kernel eseesseeeeesseeseseesseseresressrrerssresseseresresseseresresss 40 GAA Packase Usage Survey orco a a iE aa is 40 0 47 95 System Seletti On A Seara n E E 41 6 4 7 6 No Boot Lo def ssssssninsisnisiinaiinsrsi nnise 41 6 4 8 Complete Installati n aiie E E E aa 42 6 5 Re Start Syste Mana e E a E S 43 6 5 1 Boot directly from Disk Image eeeeseeeseseeesesesesresseserssresseseresresseseressesee 43 6 5 2 Disk Ch Ck essesi risene aeta a aa a aiet i a ee 44 6 5 3 Re Boot from Disk Image vx isis csiccessicceraacs jeceavsanscevaseapcarasdesaa
57. S m CONF IG_HFS_FS m CONF IG_HFSPLUS_FS m CONF IG_BEFS_FS m CONFIG _BEFS DEBUG is not set CONF IG_BFS_FS m CONF IG_EFS_FS m CONFIG_JFFS2_FS is not set F F CONF IG_CRAMFS y CONF IG_VXFS_FS m CONFIG_HPFS_FS is not set CONFIG_ONX4FS_FS is not set 2010 Imperas Software Limited www OVPworld org Page 111 of 115 MIPS32 Malta Linux Platform CONF IG_SYSV_FS m CONF IG_UFS_FS m CONFIG_UFS_FS_WRITE is not set CONFIG_UFS_DEBUG is not set Network File Systems CONF IG_NFS_FS y CONFIG_NFS_V3 y CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4 is not set CONFIG_NFS_DIRECTIO is not set CONF IG_NFSD y CONF IG_NFSD_V3 y CONFIG_NFSD_V3_ACL is not set CONFIG_NFSD_V4 is not set CONFIG_NFSD_TCP is not set CONF IG_ROOT_NFS y CONF IG_LOCKD y CONF IG_LOCKD_V4 y CONF IG_EXPORTFS y CONF IG_NFS_COMMON y CONF IG_SUNRPC y CONFIG _SUNRPC_BIND34 is not set CONFIG _RPCSEC_GSS_KRB5 is not set CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB FS is not set CONFIG_CIFS is not set CONFIG_NCP_FS is not set CONFIG_CODA_FS is not set CONFIG_AFS_FS is not set Partition Types CONFIG _PARTITION_ADVANCED is not set CONF IG_MSDOS_PARTITION y Native Language Support CONF IG_
58. TARGET_REJECT m CONF IG_IP_NF_TARGET_LOG m CONF IG_IP_NF_TARGET_ULOG m CONF IG_IP_NF_MANGLE m CONF IG_IP_NF_TARGET_TOS m CONFIG_IP_NF_TARGET_ECN m CONFIG_IP_NF_TARGE TL m CONF IG_IP_NF_RAW m CONFIG_IP_NF_ARPTABLES m CONFIG_IP_NF_ARPFILTER m CONFIG_IP_NF_ARP_MANGLE m IPv6 Netfilter Configuration CONFIG_IP6_NF_QUEUE m EXPERIMENTAL CONFIG_IP6_NF_IPTABLES m CONFIG_IP6_NF_MATCH RT m 2010 Imperas Software Limited www OVPworld org Page 96 of 115 MIPS32 Malta Linux Platform CONFIG_IP6_NF_MATCH_OPTS m CONFIG_IP6_NF_MATCH_FRAG m CONFIG_IP6_NF_MATCH_HL m CONFIG_IP6_NF_MATCH_OWNER m CONFIG_IP6_NF_MATCH_IPV6HEADER m CONFIG_IP6_NF_MATCH_AH m CONFIG_IP6_NF_MATCH_MH is not set CONFIG_IP6_NF_MATCH_EUI64 m CONFIG_IP6_NF_FILTER m CONFIG_IP6_NF_TARGET_LOG m CONFIG_IP6_NF_TARGET_REJECT m CONFIG_IP6_NF_MANGLE m CONFIG_IP6_NF_TARGET_HL m CONFIG_IP6_NF_RAW m CONF IG_BRIDGE_NF_EBTABLES m CONF IG_BRIDGE_EBT_BROUTE m CONFIG _BRIDGE_EBT_T_FILTER m CONF IG_BRIDGE_EB NAT m CONFIG_BRIDGE_EBT_802_3 m CONF IG_BRIDGE_EBT_AMONG m CONF IG_BRIDGE_EBT_ARP m CONF IG_BRIDGE_EBT_IP m CONF IG_BRIDGE_EBT_LIMIT m
59. XFRM_MODE_BEET y CONF IG_INET_DIAG y CONF IG_INET_TCP_DIAG y CONFIG_TCP_CONG_ADVANCED is not set CONF IG_TCP_CONG_CUBIC y CONF IG_DEFAULT_TCP_CONG cubic CONFIG_TCP_MD5SIG is not set CONF IG_IP_VS m CONFIG_IP_VS_DEBUG is not set CONFIG_IP_VS_TAB BITS 12 CONFIG_IP_VS_PROTO_TCP y CONFIG_IP_VS_PROTO_UDP y 2010 Imperas Software Limited www OVPworld org IPVS transport protocol load balancing support Page 94 of 115 MIPS32 Malta Linux Platform CONF IG_IP_VS_PROTO_ESP y CONF IG_IP_VS_PROTO_AH y IPVS scheduler CONF IG_IP_VS_RR m CONF IG_IP_VS_WRR CONFIG_IP_VS_LC 3 CONFIG_IP_VS_WLC m CONFIG_IP_VS_LBLC m CONFIG_IP_VS_LBLCR m CONFIG_IP_VS_DH CONFIG_IP_VS_SH CONFIG_IP_VS_SED CONFIG_IP_VS_NQ m I3 3 QQ I m IPVS application helper CONFIG_IP_VS_FTP m CONFIG_IPV6 m CONFIG_IPV6_PRIVACY y CONFIG_IPV6_ROUTER_PREF y CONFIG_IPV6_ROUTE_INFO y CONFIG_IPV6_OPTIMISTIC_DAD is not set m CONFIG_INET6_AH CONFIG_INET6_ESP CONF IG_INI IPCOMP m CONFIG_ eal is not set CONF IG_INI XFRM_TUNNEL m CONF IG_INI T CONF IG_IN H E td ao Oo z an as Oo H E CONF IG_INI XFRM_MODE_TUNNEL m CONF IG_INI XFRM_MODE_BEET m CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not s
60. _NULL m RYPTO_MD4 m RYPTO_MD5 m RYPTO_SHA1 m RYPTO_SHA256 m RYPTO_SHA512 m RYPTO_WP512 m RYPTO_TGR192 m CRYPTO_GF128MUL is not set RYPTO_ECB m RYPTO_CBC m RYPTO_PCBC m CRYPTO_LRW is not set CRYPTO_CRYPTD is not set RYPTO_DES m CRYPTO_FCRYPT is not set RYPTO_BLOWFISH m RYPTO_TWOFISH m RYP WOFISH_COMMON m RYP ERPENT m RYP RYP D pE W Yi OO O O OQ KE ve K rd O OQNOKUPRPHAAP NH ELLIA is not set TEST is not set RYPTO_HW y Q vs i as O Library routines CONF IG_CRC_CCITT CONF IG_CRC16 m CONF IG_CRC_ITU_T CONFIG_CRC32 y CONFIG_LIBCRC32C m CONF IG_BITREVERSE y is not set is not set CONFIG _CRC7 is not set CONFIG_ZLIB_INFLA E y CONFIG_ZLIB_DEFLA H mMm CONFIG_TEXTSEARCH y CONFIG_TEXTSEARCH_KMP m 2010 Imperas Software Limited www OVPworld org Page 114 of 115 MIPS32 Malta Linux Platform CONF IG_TEXTSEARCH_BM m CONF IG_TEXTSEARCH_FSM m CONFIG_PLIST y CONF IG_HAS_IOMEM y CONF IG_HAS_IOPORT y CONF IG_HAS_DMA y 2010 Imperas Software Limited www OVPworld org Page 115 of 115
61. aLinuxBootingInstructions From this page you will be able to download all the files you need to run the examples described There are two installations 1 OVPsim_demo_linux_MipsMalta 2 OVPsim_demo_linux_MipsMalta_install When installed new directories will appear in IMPERAS_HOME Demo OVPsim_linux_MipsMalta and IMPERAS_HOME Demo OVPsim_linux_MipsMalta_install These directories include copies of the platform source and executable the Linux kernel vmlinux a pre built ramdisk initrd gz and scripts to execute 2010 Imperas Software Limited www OVPworld org Page 9 of 115 MIPS32 Malta Linux Platform 3 Virtual Platform Command Line and Standard Usage The MipsMalta virtual platform includes a standard command line parser that supports all the arguments supported by the simulator and also a number of platform specific arguments that are detailed below Linux Kernel specific Arguments Argument Value Description kernel elf file specify the linux kernel elf image to load ramdisk Initial ramdisk Specify the console Linux console Specify the console to be used for example tty0 ttySO disk File root pagebits General Arguments finishonhalt redir nographics tftproot bootimage 2010 Imperas Software Limited www OVPworld org Page 10 of 115 MIPS32 Malta Linux Platform 4 Board Architecture The platform is illustrated by the following block diagram It is architected to closely represent the MIPS Malta h
62. al platform components and porting other Linux distributions OVP provides base intercept technology allowing the semihosting of native host features Imperas provides additional intercept technology and modules using it to provide assistance with Linux on the Malta platform Imperas also provides multiprocessor and platform debug capabilities 2 1 Platform Definition Files The platform is defined and downloaded as part of the standard OVPsim download This is available in source form from the download section of the website www ovpworld org When installed the platform source is found in IMPERAS_HOME ImperasLib source mips ovpworld org platform MipsMalta 1 0 platform And the OVPsim executable for the platform in IMPERAS_HOME lib IMPERAS_ARCH ImperasLib mips ovpworld org platform MipsMalta 1 0 Semihosting is a specific form of interception that is applied to low level functions in the C library being used These function such as open read write etc are intercepted to give Host native operation using the Host file system 2010 Imperas Software Limited www OVPworld org Page 8 of 115 MIPS32 Malta Linux Platform The platform is described on the OVPworld website at http www ovpworld org library wikka php wakka Mips32MaltaLinux 2 2 Demo Package Installers The examples described in this document are available from the OVPworld website They are described at http www ovpworld org library wikka php wakka Mips32Malt
63. ard Layout Ml VGA OVPsim MIPS32 Malta Select a keyboard layout Keymap to use American English Belarusian Belgian Brazilian ABNT2 layout Brazilian EUA aiii Bulgarian Canadian French Croatian Czech Danish Dutch Dvorak Estonian Finnish French German Greek Hebrew lt Go Back gt Space gt se Ss lt Enter gt activates buttons 2010 Imperas Software Limited www OVPworld org Page 29 of 115 MIPS32 Malta Linux Platform 7 4 2 Configure the Network 7 4 2 1 Select Host Name You should choose a hostname that this installation will be known by This will be the name that will be seen on your real network when running the simulation E VGA OVPsim MIPS32 Malta 1 Configure the network Please enter the hostname for this system The hostname is a single word that identifies your system to the network If you don t know what your hostname should be consult your network administrator If you are setting up your own home network you can make something up here Hostname lt Go Back gt lt Cont inue gt buttons 7 4 2 2 Select Domain Name Ml VGA OVPsim MIPS32 Malta Configure the network The domain name is the part of your Internet address to the right of your host name It is often something that ends in com net edu or org If you are setting up a home network you can make something up but make sure you use the same domain name on all your computers Domain name lt G
64. ardware in so far that 1 the binary image can be interchanged between the virtual platform and real silicon 2 the software performs the same function on the virtual platform as it will on real silicon UART TTY 21 16450 LOCAL EUS Malta SysCcntrol gt UART TTY1 UART TTYO KbControl VGA FPSA a 20 g Superlol Superlo Superlo PCI BIS Int Cortrol PIX4 USB PY RTC Timer PIK4 Base PIK4 PIRH PIXA PIR S 5 o i 6 i namic D A SSS PCI Canti Figure 1 Platform Block Diagram The CPU is connected to a local bus and a GT64120 general purpose system controller which supports SDRAM FLASH and provides a bridge to an on board PCI bus The PCI bus services a 4 channel IDE disk controller a USB interface AM79C973 Ethernet interface and a Cirrus CL GD5446 VGA graphics controller A bridge to an ISA bus supports a PS2 keyboard mouse interface and two 16450 UARTs 2010 Imperas Software Limited www OVPworld org Page 11 of 115 MIPS32 Malta Linux Platform An FPGA specific to the MIPS Malta board controls an LED display reads a set of switches and implements a third 16450 UART Two cascaded 8259 interrupt controllers as part of the Intel PXII4E device route interrupts from most devices to the MIPS32 intO input The following diagram provides the general memory map of the platform Some memory areas such as the PCI memory and PCI IO regions contain a number of mapped devi
65. ation Invocation SCL Pls ase esau vases pascal eee oes aon cv gna ddeoswe Macaseraantdeooe 6 2 Creating an Empty Disk lmate catc cca ieta iui ieusecs ee Pleas 6 3 Starting the Linux Kernel Boot icsiscistsasussdecvnscececssecsante lagicdeasdsdae sxeagederseentaceedee 6 4 Installing a Linux Distribution 0 eee ce eeeeceenceceeceeceeeeeceeeeeceneeecseeeeseteeeeaees 6 4 1 CET TS Local caro ace Seale N castes edaal gees A R A aan GA Wel o Select Lian GUAR i555 Ge dane a satan A A E GAA Select location ocre cise enacting dtc schan n ra o a e S 6 4 1 3 Select Keyboard Layout s2 cc5scccccccccticcssussca casadeeaea sentaacs donccucantesdaavandeacteuss 6 4 2 Contig re the NetWorR coinean s a T N Eaa aaa nS GAD Ts SelectHo st NamMeicerio a E E EA R 6 4 2 2 Select Domain NaMe scioperi aee as a a e apii 6 4 3 Download Debian Components sssssssesessseesseesseesseesseesseeessseessesseesseesseee 6 4 3 1 Select Debian Archive Mirror Country ssssssssessseseseeeesseesseessersseessees 6 4 3 2 Select Debian Archive Mirror essesssessssesseessessseseseeessseesseesseesseessees 2010 Imperas Software Limited www OVPworld org Page 3 of 115 MIPS32 Malta Linux Platform 6 4 3 3 Choose a Proxy cniinne tiairaa aa EE EESE S 32 6 4 4 Download Installer Components eesceceesceceeececeeeeeeeeeeeceneeeeseeeenaeeees 32 6 4 4 1 Continue Without Kernel Modules 0 eee eeecceseseceeeseeeesteeeenteeeenaeeees 32 6 4 5
66. be IO A it instruction gt yes microsecond timers yes tlb_entries 16 extra interrupt vector yes hardware watchpoint no ASEs implemented shadow register sets die l VCED exceptions not available VCEI exceptions not available tt Figure 4 Shell Prompt 2010 Imperas Software Limited www OVPworld org Page 22 of 115 MIPS32 Malta Linux Platform The simulation may also be launched with the batch file RUN_MipsMaltaSMP bat on Windows or using the sh script RUN_MipsMaltaSMP sh on Linux This will select the 34Kc MIPS32 processor variant that supports SMP The execution of the platform will commence until the shell is reached as shown in Figure 5 Booting to Shell from Initial Ram Disk SMP E OVPsim MIPS32 Malta 60 oo physmap flash physmap flash 0 map_probe failed serio i8042 KBD port at 0x60 0x64 irg 1 serio i8042 AUX port at 0x60 0x64 irq 12 mice PS 2 mouse device common for all mice input AT Raw Set 2 keyboard as class input inputO TCP cubic registered NET Registered protocol family 1 NET Registered protocol family 1 NET Registered protocol family 15 Bridge firewalling registered 602 19 VLAN Support v1 8 Ben Greear lt greearb candelatech com gt All bugs added by David S Miller lt davem redhat com gt input ImExPS 2 Generic Explorer Mouse as class input inputi RAMDISK Compressed image found at block 0 VFS Mounted root cramfs filesystem readonly Freeing prom memory
67. been performed on the MIPS processor nographics none do not use SDL for the output graphics variant string define the MIPS32 processor variant to be modeled for example 4KEc 24K etc bootimage none define the boot loader file to be loaded and used 2010 Imperas Software Limited www OVPworld org Page 87 of 115 MIPS32 Malta Linux Platform APPENDIX B B 1 Some Terms Explained Term Description Guest Operating System Is the operating system that is running within the simulation Host Operating System Is the OS of the Host machine being used LKM Linux Kernel Module Kernel Module A kernel extension driver that executes as part of the kernel often dynamically loaded 2010 Imperas Software Limited www OVPworld org Page 88 of 115 APPENDIX C C 1 MIPS Kerne MIPS32 Malta Linux Platform I Configuration File Automatically gener Linux kernel versio Thu Feb 14 13 59 24 CONF IG_MIPS y Machine selection CONF IG_ZONE_DMA y CONF IG_MACH_ALCHEMY ated make config don t edit nse 2 6223 01 2008 is not set CONF IG_BASLER_EXCI E is not set CONF IG_MIPS_COBALT CONF IG_MACH_DECSTA CONFIG_MACH_JAZZ is is not set ION is not set not set G is not set CONF IG_LEMOTE_FULON CONFIG_MIPS_ATLAS i CONF IG_MIPS_MALTA y CONFIG_MIPS_SEAD is CONFIG_MIPS_SIM is
68. c Info COR_SD kcrctab_gpl a 0x80446274 0x00000988 0x80446274 0x00348274 Info COR_SD ksymtab_strings a 0x80446bfc O0x0000d5c8 Ox80446bfc 0x00348bfc Info COR_SD __param a 0x804541c4 0x00000668 0x804541c4 0x003561c4 Info COR_SD data wa Ox80456000 O0x0001b220 0x80456000 0x00358000 Info COR_SD data cacheline_aligned wa 0x80472000 0x00006360 0x80472000 0x00374000 Info COR_SD init text ax 0x80479000 0x00026a58 0x80479000 0x0037b000 Info COR_SD init data wa Ox8049fa58 0x00005394 Ox8049fa58 0x003ala58 Info COR_SD init setup wa OxBO04a4df0 Ox000003c0 Ox804a4df0 Ox003a6df0 Info COR_SD sinitcall init wa Ox804a51b0 0x00000264 Ox804a51b0 O0x003a71b0 Info COR_SD con_initcall init wa 0x804a5414 0x00000008 0x804a5414 0x003a7414 Info COR_SD exit text ax 0x804a541c 0x00000d84 Ox804a541c 0x003a741c Info COR_SD sinit ramfs a 0x804a7000 0x00000086 0x804a7000 0x003a9000 Info COR_SD data percpu wa 0x804a8000 0x00001960 O0x804a8000 0x003aa000 idebug mipslel gt m At the initial prompt type continue or c to start the simulation After the Linux operating system has booted we return control to the debugger by interrupting with control C 15 3 Registering Kernel Module with Debugger The development provides a command debugKernelModule which allows the name of a kernel module that will be loaded sometime in the future to be registered with the debugger When the kernel module is loaded using the insmod command a breakpoint w
69. ce input AT Raw Set 2 keyboard as class input input9 TCP cubic registered ET Registered protocol family 1 ET Registered protocol family 1 ET Registered protocol family 15 ridge firewalling registered 602 19 VLAN Support v1 8 Ben Greear lt greearb cande latech com gt All bugs added by David S Miller lt davem redhat com gt ImExPS 2 Generic Explorer Mouse as class input input1 AMDISK Compressed image found at block 0 FS Mounted root cramfs filesystem readonly Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 BusyBox v1 1 3 Debian 1 1 1 3 3 Built in shell Cash Enter help for a list of built in commands bin sh can t access tty job control turned off it Figure 3 Booting to Shell from Initial Ram Disk 2010 Imperas Software Limited www OVPworld org Page 21 of 115 MIPS32 Malta Linux Platform From the shell prompt we can interrogate the proc file system as shown in Figure 4 Shell Prompt just as we would do running on the hardware platform Ei VGA OVPsim MIPS32 Malta 60 Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 BusyBox v1 1 3 Debian 1 1 1 3 3 Built in shell ash Enter help for a list of built in commands Ybin sh can t access tty job control turned off cat proc cpuinfo system type MIPS Malta processor 0 cpu model MIPS 4KEc V0 0 BogoMIPS i
70. ces FPGA UART or Amel Figure 2 Basic Platform Memory Map 2010 Imperas Software Limited www OVPworld org Page 12 of 115 MIPS32 Malta Linux Platform 5 Malta Peripheral Models Overview This section is intended to provide a brief overview of the operation of the peripherals that can be configured and details of the attributes that may be used within the virtual MipsMalta platform to change behavior For complete descriptions of the peripherals the OVP documentation should be consulted 5 1 SmartLoaderLinux The Linux SmartLoader is created as a peripheral but is used in the simulation to initialize the platform It is capable of providing all configuration information required by the Linux kernel This includes the kernel command line being created and written into memory and boot options that is boot from a hard disk image or boot from an initial ramdisk Attribute Platform Model Description Default kernel vmlinux None specify the linux kernel being loaded this must be specified envpaddress None 0x80002000 change the address to which the kernel command lines parameters are based initrd initrd gz None specify the initial ram disk that should be loaded for booting root dev hda None specify booting from the hard disk image eg dev hdal boardid None 0x420 Malta platform with CoreLV memsize None 128Mbytes Set memory available to kernel command None None Allows additional kernel command line parameters to be added
71. d This will execute the platform in the same way as the previous script but will 1 omit the disk image creation stage and 2 boot from the disk image rather than the initial ram disk The kernel starts booting in the same way as before by detecting and configuring the hardware in the platform The boot then continues from the disk image with the full Linux installation The file modules dep is missing from the installation and so modprobe fails this is expected because the kernel modules were not installed as part of the installation These exist as a separate kernel image INIT boots the system Ml VGA OVPsim MIPS32 Malta Yo physmap platform flash device 00400000 at 1e000000 p flash physmap flash 0 map_probe failed i8042 KBD port at 0x60 0x64 irq 1 i8042 AUX port at 0x60 0x64 irq 12 PS 2 mouse device common for all mice input AT Raw 2 keyboard as class input inputO TCP cubic registered NET Registered protocol family 1 NET Registered protocol family 17 NET Registered protocol family 15 Bridge firewalling registered 802 1Q VLAN Support v1 8 Ben Greear lt greearb candelatech com gt All bugs added by David S Miller lt dau b input ImEx i cplorer AS S nput inputi k journald starti m with ordered data mode tem readonly i Freeing unused kernel memo 196k freed Algorithmics MIPS FPU Emulator v1 5 modprobe FATAL Could not load lib modules 2 6 23 11 modules dep No such file or directory INIT versio
72. dev MINOR inode gt i_rdev recura Or 13 4 2 3 Device Close Called when a process closes the device s static int led_release struct inode inode struct file file printk led_release n return 0 2010 Imperas Software Limited www OVPworld org Page 74 of 115 MIPS32 Malta Linux Platform 13 4 2 4 Device Read read entry point pay static ssize_t led read struct file file char buffer lt The buffrer to fili with data size_t length The Length of the butter Loki e O amp tset Our olte im the Cile lt unsigned char c Read from physical LED register c char LED_REG peintk Med read Sx n Unsigned ant ic if put_user c buffer 0 return EFAULT return 1 vead always returns exactly one byte 13 4 2 5 Device Write write entry point a7 static ssize t led write struct file file const char buffer butter size_t length j Mencia on bili bern lort t offset Offset in the file unsigned char c if get_user c buffer 0 return EFAULT peintk Hed write Sx n unsigned ant jic weite to physical LED register char LED_REG G return 1 13 4 3 Device Module Initialize and Exit 13 4 3 1 Device Initialisation This is the function invoked when the kernel module is installed i x Initialize the driver Register the charac
73. dynamically loaded from a compiled relocatable object because it resides in virtual memory This means there are no symbols and no information about where the module resides in memory However the Imperas Multiprocessor Debugger provides functionality to allow source level debug of LKMs without any changes to the original Linux kernel 15 1 Pre Requisites You will need to have obtained and installed a version of the Imperas tools and the demo installers These can be made available from the user area on www imperas com by contacting Imperas at info imperas com Two demonstrations are provided by Imperas for registered Imperas users to show both the capabilities to debug a Linux kernel including a dynamically loaded kernel module LKM and the use of the Imperas Verification Analysis and Profiling VAP tools these are Imperas_idebug_linux_MipsMalta and Imperas_ivap_linux_MipsMalta respectively These demo installers include a version of the MIPS Malta Linux Kernel with symbolic information 15 2 Starting the Platform Simulation The Imperas simulator is invoked using mperas exe the platform may be loaded from the VLNV library or by loading the platform shared object or Dynamic Link Library gt In the following please update the path to the working directory if using the TFTP method for transferring files into the guest operating system 15 2 1 Invoking with VLNV Library Within the VLNV library is a descr
74. e for you Please do take the time to browse the different pages and come back and vi information technology documents and very imnortantly make cure vnin an tn the dawnlinad Figure 6 Execution and Simulated Console Windows When terminated the simulator provides some final execution statistics that includes the instructions executed by the processor and the performance achieved as shown in Figure 7a Execution Statistics Output 2010 Imperas Software Limited www OVPworld org Page 24 of 115 MIPS32 Malta Linux Platform mipslei STATISTICS ype mips32 24KEc gt Nominal MIPS 166 Final program counter 6x861616d4 Simulated instructions 664 261 596 Simulated MIPS SIMULATION TIME STATISTICS Simulated time 35 56 seconds User time 4 72 seconds System time 6 64 seconds Elapsed time seconds mipslei_TC STATISTICS Type mips32 34Kc gt Nominal MIPS 166 Final program counter 6x861616d4 Simulated instructions 587 855 968 Simulated MIPS z CPU mipslei_TCi STATISTICS mips32 34Kc gt Type Nominal MIPS 100 Final program counter 6x861616d4 Simulated instructions 68 681 706 Simulated MIPS z Simulated instructions Simulated MIPS SIMULATION TIME STATISTICS Simulated time 28 86 seconds User time 6 91 seconds System time 61 seconds Elapsed time z seconds Figure 8b Execution Statistics Output SMP Linux Booted 2010 Imperas Software Limited www OVPworld org Page 25 o
75. e target required The targets we are building are to support MIPS32 Little Endian and MIPS Malta platform The information contained in this section is derived from the information available at http www linux mips org wiki Toolchains GCC In this example we have extracted the binutils and the gcc source into parallel directories as shown in the following figure Name Size Type binutils 2 16 1 File Folder Oace 3 4 4 File Folder 13 Build bash 1KB BASH File These are then compiled and installed We created a script Build sh to store this script The build script Build sh for the Cross Compiler looks like bin sh here S pwd Imstalil s dirname Shere imsta lll mkdir p e instali First build a linux compiler export WDIR tmp export TARGET mipsel unknown linux gnu export PREFIX S install export PATH PATH PREFIX bin ARGETS mipsel unknown linux gnu mipsel malta linux ARGETS mipsel malta linux for TARGET in S TARGETS do 2010 Imperas Software Limited www OVPworld org Page 51 of 115 MIPS32 Malta Linux Platform After execution an install directory is created that includes the directories shown in the following figure bin File Folder include File Folder info File Folder lib File Folder Slibexec File Folder man File Folder 2 mipsel malta linux File Folder O mipsel unknown linux gnu File Folder share File Folder 2010 Impera
76. el Module The file created is a ko file and this should be transferred into the MIPS Malta Linux platform in the same way as a user application is transferred as described in section 11 Transferring Files to Guest Linux The kernel module can only be installed from the root account First we use mknod to make a directory entry and corresponding i node for a special file mknod dev led c 42 0 We provide the name of the device as dev led c defines the device as a character device the major device number 42 that helps the operating system find the device driver code and the minor device number 0 used to select the line number The Major number 42 is reserved for examples and demos the Major number used when the entry is created corresponds to the value used in the driver source code during the initialization as the argument to the function register_chrdev see 13 4 3 1 Device Initialisation There will now be an entry in dev called led We must make this file writable for all accounts chmod 666 dev led 2010 Imperas Software Limited www OVPworld org Page 77 of 115 MIPS32 Malta Linux Platform We now use insmod to install our device driver insmod led_drv ko When installed the driver initialization function is executed The following screenshot shows the installation of the led_driver on the MIPS Malta Linux platform simulation useri debian useri debian 5 su root Password debian
77. enabletools cannot be used to load all required tool libraries and they must be loaded individually on the command line 15 2 3 Debug Startup The debugger will load the platform and then wait at the debug prompt for input into 1UM_AL Found attribute symbol modelaAttrs in Tiie C imperas l1b windows lmperasLib imperas com peripheral srs 2c ntrol 1 0 model d11 i i a Info CICM_AL Found attribute symbol modelAttrs in file C Imperas 1lib windows ImperasLib imperas com peripheral Rtcm Info CICM_AL Found attribute symbol modelAttrs in file C Imperas lib windows ImperasLib imperas com semihosting pse Info MIPS32_VM_VMIINIT Setting up Virtual Mapping Info MIPS32_TLBTLBH2 Using 128 hidden TLB entries g pio COR OF Target MipsMaltaLinux mipslel has object file read from C workspace OvPLinuxInstall MipsMaltaLinuxInst al vmlinux Info COR_SH Section flg sect addr size load addr file offset Info OR_SD text ax 0x80100000 0x002d6564 0x80100000 0x00002000 Info COR_SD ex_table a 0x803d6570 0x00001950 0x803d6570 0x002d8570 Info COR_SD rodata a O0x803d8000 0x00065be4 0x803d8000 0x002da000 Info COR_SD pci_fixup a Ox8043dbe4 0x00000558 O0x8043dbe4 0x0033fbe4 Info COR_SD ksymtab a 0x8043e13c 0x00004970 0x8043e13c 0x0034013c Info COR_SD _ksymtab_gpl a Ox80442aac O0x00001310 Ox80442aac 0x00344aac Info COR_SD kcrctab a 0x80443dbc 0x000024b8 0x80443dbc 0x00345db
78. et FIG_IPV6_SIT m FIG_IPV6_TUNNEL m ONFIG_IPV6_MULTIPLE_TABLES is not set CONF IG_N E O E 6 6 6_XFRM_MODE_TRANSPORT m 6 6 Pl Eb Q O Zz Cl ES IG_NETFILTE NFIG_NETFIL IG_BRIDGE_N Yy ER_DEBUG is not set TFILTER y U WORK_SECMARK y R T Q O Zz Core Netfilter Configuration CONF IG_NETFILTER_NETLINK m CONF IG_NETFILTER_NETLINK_QUEUE m CONF IG_NETFILTER_NETLINK_LOG m CONFIG_NF_CONNTRACK_ENABLED is not set CONFIG_NF_CONNTRACK is not set CONF IG_NETFILTER_XTABLES m CONF IG_NETFILTER_XT_TARGET_CLASSIFY m CONFIG_NETFILTER_XT_TARGET_DSCP is not set CONFIG_NETFILTER_XT_TA CONF IG_NETFILTER_X A T T RGET_MARK m RGET_NFQUEUE m E 2010 Imperas Software Limited www OVPworld org Page 95 of 115 MIPS32 Malta Linux Platform CONFI
79. f 115 MIPS32 Malta Linux Platform 7 Installing Full Linux Distribution In addition to the simple preconfigured ram disk version described in section 6 the OVPsim_demo_linux_MipsMalta_install demo allows you to download and configure your own full Linux kernel in a simulated platform The supplied initial ramdisk allows you to perform a full Linux installation using a Debian Linux distribution site This requires access to the internet from the machine you are running the simulation in order to download the required files for the Linux installation 7 1 Simulation Invocation Script Obtain the OVPsim_demo_MipsMalta_install package from www ovpworld org and install it on your system Go to the directory IMPERAS_HOME Demo OVPsim_linux_MipsMalta_install and launch the simulation with the script file RUN_InstallLinux bat on Windows or the shell script RUN_InstallLinux sh on Linux This will execute the platform passing in the Linux kernel specifying the ramdisk initrd gz to set the boot mode and finishonhalt to stop the simulation if a halt command is issued in the simulated kernel In addition the wallclock option is selected so the simulation will not run faster than realtime which can cause premature timeouts when accessing the internet through the semihosting interface 7 2 Creating an Empty Disk Image When the script is invoked you will first be prompted to enter the size of disk that should be created This should
80. g Starting the hotplug events dispatcher udeud Synthesizing the initial hotplug events done aiting for dev to be fully populated done Activating swap Adding 240932k swap on devvhdaS Priority 1 extents 1 acros 240932k one checking root file system fsck 1 40 WIP 14 Nov 2006 devvhdai Superblock last mount time is in the future FIXED devvhdai Superblock last write time is in the future FIXED devvhdai has gone 49710 days without being checked check forced deu hda1 xe REBOOT LINUX see deuzhda1 19677 494016 files 1 0 non contiguous 134767 987989 blocks fsck died with exit status 3 The file system check corrected errors on the root partition but requested that the system be restarted The system will be restarted in 5 seconds 2010 Imperas Software Limited www OVPworld org Page 44 of 115 MIPS32 Malta Linux Platform 7 5 3 Re Boot from Disk Image Again run the platform by executing the batch file RUN_BootLinux bat or sh that is provided 7 5 4 Login This time and for subsequent boots it will proceed to the login prompt We have a fully working Linux installation available to use one IEXT3 FS on hdai internal journal etting the system clock Cleaning up ifupdown Loading kernel modules FATAL Could not load lib modules 2 6 23 11 modules de p No such file or directory Loading device mapper support checking file systems fsck 1 48 WIP 14 Nov 2886 one setting kernel
81. hen used in conjunction with the finishonhalt argument will cause the simulation to stop If the finishonhalt argument is not used you will have to CTRL C the simulator in the command shell or close the VGA graphics display 2010 Imperas Software Limited www OVPworld org Page 46 of 115 MIPS32 Malta Linux Platform 8 Disk Image Files and Initial RAM Disks 8 1 Introduction The MipsMalta platform can be configured to boot from an initial ram disk or from a hard disk image as has been shown previously in this document This section provides some information on the creation and maintenance of these files A windows executable is provided to create a blank disk image or standard Linux tools can be used to create and modify the Linux disk images and initial ram disks used in the simulated Linux environment 8 2 Hard Disk Image A single file is used to encapsulate a file system as accessed by the disk interface of the PciIDE peripheral component By default the platform attempts to access three disks mipsel_hda mipsel_hdb and mipsel_cd The main disk for booting will be mipsel_hda a warning will be created if disks are not available 8 2 1 Creation An executable create image lt arch gt exe is provided as part of the installation of OVPsim_demo_linux_MipsMalta_install to be used to create a blank disk image This image can be accessed by the IDE controller model in the Malta platform and populated Alternatively the disk
82. home user1i mknod dev led c 42 debian home useri Is 1 dev led crw r r 1 root root 42 B 2608 85 25 13 34 devy led debian home user1i chmod 666 dev led debian home useri1l Is 1 dev led crw rw rw 1 root root 42 B 2008 05 25 13 34 dev led debian home user1l insmod led_drv ko LED driver hello debian home user1i exit exit user 1 debian 5 13 7 Kernel Module Test Application A simple test application is created to test the operation of the driver This will open the file that was created with mknod to gain access to the device Const char deviceNname dev led if fh open deviceName O_WRONLY lt 0 char error 64 open strncat error deviceName strlen deviceName perror error return 0 It will then write characters to the device This is a sequence comprising a walking 1 interspersed with a write of zero usleep is used to create a delay between each write int repeat 25 while repeat ce 0 weite Eh lt C dl usleep 500000 c 1 lt lt repeat 8 weite Eh ec 1 usleep 500000 When complete the device is closed 2010 Imperas Software Limited www OVPworld org Page 78 of 115 MIPS32 Malta Linux Platform close fh This is built using the same Makefile and Cross Compiler toolchain as described in section 12 4 Compiling a User Program The exe file created should be transferred into the MIPS Malta Linux
83. ill be set at the start of the function defined with module_init The kernel module is loaded at an arbitrary kernel address and fixed up for execution by the kernel during the loading process This requires that the kernel is built to be relocatable and as such there is no symbol table available for the loaded kernel module When the debugger hits the breakpoint created on the code executed by the insmod command the debugger introspects the kernel to discover the module load address and creates a symbol table 2010 Imperas Software Limited www OVPworld org Page 83 of 115 MIPS32 Malta Linux Platform gt The ko and c file of the kernel module must be available in the directory from which the simulation was started This allows symbolic debug of the loaded kernel module for example adding breakpoints onto the other functions within the kernel driver module by name 15 4 Debugging the Kernel Module This section assumes we are using the same kernel module that was previously explained in section 13 Creating an Example Linux Kernel Module 15 4 1 Register Kernel Module for Debugging We need to register the kernel modules we are interested in debugging with the debugger This is done using the debugKernelModule command The command has been added into the tcl command space of the debugger under the debugger namespace and so is accessed through the tcl command window This can be done from the debug window by prefixing
84. ine start a debug session using command line gdb or gui ddd must specify the specific gdb version to use so that it is compatible with the gdb server installation in the simulated Linux environment ddd debugger gdb6 4 install bin mipsel linux gnu gdb This will start the DDD GUI In the command prompt the file to be debugged should be loaded using the command 2010 Imperas Software Limited www OVPworld org Page 67 of 115 MIPS32 Malta Linux Platform static REAL aa 200 200 a 200 201 b 200 x 200 REAL cray ops total 0 0 norma normx REAL resid 0 0 residn 0 0 eps 0 0 REAL epslon kf static int ipyt 200 n i ntimes info da ldaa kflops lda 201 Idaa 200 cray 056 n 100 printfC Begin d n n ffprintf stdout ROLLING fprintfistdout PREC fprintf stdout Precision Linpack n n fprintf stderr ROLLING fprintf stderr PREC fprintf Cstderr Precision Linpack n n ops 2 0e0 n n n 3 0 2 0 n n for Gi O i lt n i printfC 1 bi d F n i CdoubledbLli 3 matgen a lda n b anorma Dump of assembler code from 0x402934 to 0x402a34 10x00402934 lt maint 48 gt move v0 zero 0x00402938 lt maint 52 gt sw v0 68 s8 0x0040293 lt main 56 gt move 0 zero 0x00402940 lt maint 60 gt sw yvo 60 s8 0x00402944 lt main 64 gt move vO zero 0x00402948 lt maint 63 gt sw vO 56 s8 GNU DDD 3 3 10 i386 redhat linux
85. ing to continue Partition disks This partitioner doesn t have information about the default type of the partition tables on your architecture Please send an e mail message to debian boot lists debian org with information Please note that if the type of the partition table is unsupported by libparted then this partitioner will not work properly Continue with partitioning lt Go Back gt RS lt No gt buttons 7 4 5 2 Guided Partitioning of Entire Disk Ml VGA OVPsim MIPS32 Malta Partition disks The installer can guide you through partitioning a disk using different standard schemes or if you prefer you can do it manually With guided partitioning you will still have a chance later to review and customise the results If you choose guided partitioning for an entire disk you will next be asked which disk should be used Partitioning method Guided use entire disk Guided use entire disk and set up LYM Guided use entire disk and set up encrypted LYM Manual lt GO Back gt Tab gt moves between items 2010 Imperas Software Limited www OVPworld org Page 33 of 115 MIPS32 Malta Linux Platform 7 4 5 3 Create IDE Master W VGA OVPsim MIPS32 Malta Partition disks Note that all data on the disk you select will be erased but not before you have confirmed that you really want to make the changes Select disk to partition lt GO Back gt Enter gt activates buttons
86. inux gnu obj 3 038 K6 File E mipsel unknown linux gnu ranlib 2 388 KB File E mipsel unknown linux gnu rea 420 KB File E mipsel unknown linux gnu size 2 298 KB File E mipsel unknown linux gnu stri 2 280 KB File E mipsel unknown linux gnu strip 2 877 KB File 9 2 2 Building the Linux Kernel 9 2 2 1 Kernel Build Script The build script we created for the Linux Kernel looks like bin sh export CROSS_COMPILE_V path to kernel install bin mipsel unknown linux gnu 2010 Imperas Software Limited www OVPworld org Page 53 of 115 MIPS32 Malta Linux Platform TEM EE lanus 2 6 2027 lal tar oon linux 2 6 23 LIL tar gZ cp kernel config inus 2602091 Config pusha Iinuxs 2 6 29 1 make CROSS_COMPILE distcc CROSS_COMPILE_V CONFIG_DEBUG_INFO 1 J16 popd 9 2 2 2 Kernel Build Configuration The kernel configuration is contained within the kernel config file This defines all the build parameters for the kernel This was initially created using make config for the Linux Kernel and is subsequently stored and copied into the source directory The actual file used is provided in appendix C 1 MIPS Kernel Configuration File of this document 9 3 Building on a Windows Platform The building of the Linux Kernel on a Windows platform is not supported 2010 Imperas Software Limited www OVPworld org Page 54 of 115 MIPS32 Malta Linux Platform 10 Debugging the Linux Kernel 10 1 Non I ntrusive Instrumentation
87. iption of the standard MipsMalta platform This can be selected by the Imperas front end and overrides applied to make configure changes to the platform The invocation of Imperas with the MipsMalta platform is shown below A imperas ex verbos vlnvname MipsMalta vlnvvendor mips ovpworld org objfile vmlinux reset Oxbfc00000 lt output imperas log approxtimer wallelockFactor 3 lt override MipsMalta Core_Board_SDRAM_promInit initrd initrd gz A 2010 Imperas Software Limited www OVPworld org Page 81 of 115 MIPS32 Malta Linux Platform override MipsMalta mipslel variant 24KEc a A cnabilewoo ls extlib MipsMalta mipslel linuxOsHelper Aa idebug This basic invocation is provided in the Imperas_idebug_linux_MipsMalta demo directory in the script DEBUG_Ikm_linux_mipsmalta This will run scriupts to guide you through the LKM debug if you wish to manually enter the commands remove the line to remove the replay of commands in the simulated linux override MipsMalta Ps2Control replay Ps2ControlInput rec to remove the debug commands patch 1lkm_debug_linux_mipsmalta tcl The following additions changes are made in order to provide the same features that were enabled previously Change the boot method to boot from disk image override MipsMalta Core_Board_SDRAM_promInit initrd initrd gz lt becomes override MipsMalta Core_Board_SDRAM_promInit root
88. is not set Non 8250 serial port support CONFIG_SERIAL_CORE y CONFIG CONF IG_SERIAL_CORE_CONSOLE y ERIAL_JSM is not S CONFIG_UNIX98_PTYS y CONFIG_LEGACY_PTYS y CONFIG_LEGACY_PTY_COUNT 256 CONFIG_IPMI_HANDLER is not set CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM is not set CONFIG_RTC y CONFIG_R3964 is not set CONFIG_APPLICOM is not set CONFIG_DRM is not set CONFIG_RAW_DRIVER is not set CONFIG_TCG_TPM is not set CONFIG_DEVPORT y CONFIG_I2C is not set SPI support CONFIG_SPI is not set CONFIG_SPI_MASTER is not set CONFIG_W1 is not set CONFIG _POWER_SUPPLY is not set CONFIG_HWMON is not set Multifunction device drivers 2010 Imperas Software Limited www OVPworld org Page 107 of 115 CONF IG_MFD_SM5 Multimedia dev MIPS32 Malta Linux Platform Ol is not set ices CONF IG_VIDEO_D EV is not set CONFIG_DAB y Graphics suppo Display device CONFIG_DVB_CORE is not set TE CONFIG_BACKLIGHT_LCD_SUPPORT is not set support CONFIG_DISPLAY_SUPPORT is not set CONFIG_VGASTA E is not set CONFIG_VIDEO_OUTPUT_CONTROL m CONF IG_FB y CONF IG_FIRMWARE
89. is not set CONFIG_FS_POSIX_ACL y CONFIG_XFS_FS m CONFIG_XFS_QUOTA y CONFIG_XFS_SECURI CONFIG_XFS_POSIX_ACL y CONFIG_MINIX_FS m CONF IG_ROMFS_FS m CONF IG_INOT TIFY y TY y CONFIG_XFS_RT is not set CONFIG_GFS2_ FS is not set CONFIG_OCFS2_FS is not set CONF IG_INO TEY USI ER y 2010 Imperas Software Limited www OVPworld org Page 110 of 115 MIPS32 Malta Linux Platform CONF IG_QUOTA y CONFIG_QFMT_V1l is not set CONF IG_QFMT_V2 y CONF IG_QUOTACTL y CONF IG_DNOTIFY y CONF IG_AUTOFS_FS y CONFIG_AUTOFS4_ FS is not set CONF IG_FUSE_FS m CD ROM DVD Filesystems CONFIG_IS09660_FS m CONF IG_JOLIET y CONFIG_ZISOFS y CONFIG_UDF_FS m CONF IG_UDF_NLS y DOS FAT NT Filesystems CONF IG_FAT_FS m CONF IG_MSDOS_FS m CONF IG_VFAT_FS m CONFIG_FAT_DEFAULT_CODEPAGE 437 CONFIG_FAT_DEFAULT_IOCHARSET iso8859 1 CONFIG_NTFS_FS is not set Pseudo filesystems CONF IG_PROC_FS y CONF IG_PROC_KCORE y CONF IG_PROC_SYSCTL y CONFIG_SYSFS y CONF IG_TMPFS y CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLB PAGE is not set CONF IG_RAMF S y CONFIG_CONFIGFS_FS is not set Miscellaneous filesystems CONFIG_ADFS_FS is not set CONF IG_AFFS_F
90. le the user application is the MIPS GNU Linux toolchain available from the CodeSourcery website at http www codesourcery com s gpp lite mips portal subscription template lite There are installers for Linux and Windows MINGW host platforms The version of installer used by Imperas for the generation of this example was 4 2 129 12 4 2 Cross Compiler Make Environment The toolchain is extracted into a directory mips 4 2 we add this onto our path export PATH PATH path to installation mips 4 2 bin We can then use a Makefile to build our user application The following Makefile uses the cross compiler to generate an exe file from a source c file led_flash c It also generates the symbol table and an assembler listing objdump for use in debug CHLAGS EL msoft flodt static g LDFLAGS 1m CC mips linux gnu gee CFLAGS NM mips linux gnu nm n OD mips linux gnu objdump D ALL led_flash exe adie SATE exe S c CC o lt LDFLAGS S NM gt nm 0D gt 0od 2010 Imperas Software Limited www OVPworld org Page 64 of 115 MIPS32 Malta Linux Platform clean rm f ALL rm f ALL nm rm E ALL od 12 4 3 Building the Application We can now simply build the application into an executable ready to be loaded onto the MipsMalta platform and executed by typing make at the command line The following is an example of the output generated when the application
91. mponent e A kernel command line is created in memory by the SmartLoader peripheral component 2010 Imperas Software Limited www OVPworld org Page 19 of 115 MIPS32 Malta Linux Platform 6 3 2 Execution Execution starts from the MIPS processor reset vector at virtual address Oxbfc00000 The generated bootstrap code resides at this address and performs some basic setup before a call into the Linux kernel at the kernel_entry point 2010 Imperas Software Limited www OVPworld org Page 20 of 115 MIPS32 Malta Linux Platform 6 4 Running the Platform 6 4 1 Booting from RamDisk Initial RAM Disk To run this demo obtain and install the OVPsim_demo_linux_MipsMalta installer for your platform from www ovpworld org Go to the directory IMPERAS_HOME Demo OVPsim_linux_MipsMalta and launch the simulation with the batch file RUN_MipsMalta bat on Windows or the sh script RUN_MipsMalta sh on Linux This will execute the platform executable passing in the Linux kernel as the first parameter and initrd as an additional parameter to switch the boot mode to initial ram disk The supplied initial ramdisk boots to a shell prompt The execution of the platform will commence until the shell is reached as shown in Figure 3 Booting to Shell from Initial Ram Disk physmap flash physmap flash 0 map_probe failed i8042 KBD port at 0x60 0x64 irq 1 i8042 AUX port at 0x60 0x64 irq 12 Y PS 2 mouse device common for all mi
92. ms 2010 Imperas Software Limited www OVPworld org Page 36 of 115 MIPS32 Malta Linux Platform 7 4 6 2 Add User Account E VGA OVPsim MIPS32 Malta Set up users and passwords A user account will be created for you to use instead of the root account for non administrative activities Please enter the real name of this user This information will be used for instance as default origin for emails sent by this user as well as any program which displays or uses the user s real name Your full name is a reasonable choice Full name for the new user lt Go Back gt lt Cont inue gt E VGA OVPsim MIPS32 Malta Set up users and passwords Select a username for the new account Your first name is a reasonable choice The username should start with a lower case letter which can be followed by any combination of numbers and more lower case letters Username for your account lt Go Back gt lt Cont inue gt 2010 Imperas Software Limited www OVPworld org Page 37 of 115 MIPS32 Malta Linux Platform Ml VGA OVPsim MIPS32 Malta Set up users and passwords A good password will contain a mixture of letters numbers and punctuation and should be changed at regular intervals Choose a password for the new user lt Go Back gt lt Cont inue gt Ml VGA OVPsim MIPS32 Malta Set up users and passwords Please enter the same user password again to verify you have typed it correctly Re en
93. n 2 86 booting 2010 Imperas Software Limited www OVPworld org Page 43 of 115 MIPS32 Malta Linux Platform 7 5 2 Disk Check We have created a new disk and upon booting the Linux kernel performs a disk check using fsck p 7 x ridge firewalling registered 302 19 VLAN Support v1 8 Ben Greear lt greearb candelatech com gt All bugs added by David S Miller lt davem redhat com gt input ImExPS 2 Generic Explorer Mouse as class input inputi ik journald starting Commit interval 5 seconds mounted filesystem with ordered data mode FS Mounted root ext3 filesystem readonly Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 modprobe FATAL Could not load lib modules 2 6 23 11 modules dep No such file or directory INIT version 2 86 booting tarting the hotplug events dispatcher udeud ynthesizing the initial hotplug events done aiting for dev to be fully populated done Activating swap Adding 240932k swap on devvhdaS Priority 1 extents 1 acros is 240932k FIXED devvhdail Superblock last write time is in the future FIXED devvhdai has gone 49710 da without being checked check forced 54 2 x Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 odprobe FATAL Could not load lib modules 2 6 23 11 modules dep No such file or directory INIT version 2 86 bootin
94. ncy tree Done The following NEW packages will be installed tftp O upgraded 1 newly installed B to remove and O not upgraded Need to get 6B 19 5kB of archives After unpacking 98 3kB of additional disk space will be used Selecting previously deselected package tftp Reading database 15815 files and directories currently installed Unpacking tftp from tftp_ 17 15_mipsel deb setting up tftp 17 15 debian home user1 _ now logout as root using the exit command gt exit 11 3 3 Transfer Files into Guest Operating System The simulation was executed with the additional command line argument tftp lt tftpPrefix gt This enabled the emulation of the TFTP server within the NIC peripheral The root from which files are transferred is defined by the path addition to the tftp argument The argument to the get command must be an absolute path though it is converted to a path relative to the tftpPrefix argument to the model For example if we have a file C workspace userApp my File exe we can specify the command line argument as tftp C workspace and access the file in tftp using the command get userApp my File exe For the following example we have created a version of the linpack application by cross compiling on a linux host system using the MIPS Linux cross compiler This is contained in a directory userApp that resides within the directory to which we have set the root using the tftp argument login as userl or
95. ng system specifically the Debian distribution of Linux 2 6 In addition it models a virtual Ethernet with a restricted bridge to the real Ethernet of the host using the publicly available SLIRP package Specifically the bridge emulates a DHCP server which allocates the NIC an IP address of 10 0 2 15 and performs Network Address Translation onto the host network of outgoing and incoming TCP and UDP packets ICMP packets are blocked so for example ping does not work and tftp requests are all handled in the model by a simple tftp server Static address translations for can be set up for incoming requests on particular ports using the redir argument to the model Attribute Platform Model Default Description PCISlot 11 None Define the PCI slot in which the Ethernet card is installed PCI function 0 None Define the PCI function of the device ethereal 0 Packet logging using ethereal format polldelay 1000 1000 The rate at which the network is polled MAC None 52 54 00 12 34 56 Define the MAC address of the NIC redir None None Specify and open ports on the simulated system Example usage 1 exposing gdb server ports for attaching debuggers to user applications or 2 exposing a port for an ftp connection tftpPrefix None None Enable TFTP and define the tftp root on the host localNet 10 0 2 0 Change the local network address Table 13 Ethernet Controller Attributes 5 14 System bus PCI bus ISA bus The Malta platform bridges a limited
96. nonelinux None None Allows a none Linux kernel to be loaded and executed on the Malta platform bootimage None None Replace the default reset vector code to change the manner in which the Malta system boots Table 1 SmartLoader Attributes The SmartLoader will read the Linux kernel to obtain the highest load address and the kernel_entry symbol The kernel_entry symbol is used to update the jump address in the boot loader and the highest kernel load address is masked with the TLB page mask for the load address of the initial ram disk file ie in the next page above the kernel Alternative boot code may be loaded by specifying the bootimage attribute This should specify a fl file as loaded via the parallel port on the actual hardware Specify the argument initrd on the command line when invoking the Malta platform to select booting from the initial ram disk initrd gz Without this argument the platform will boot from the file system on the disk specificed by DriveOName on the IDE model 2010 Imperas Software Limited www OVPworld org Page 13 of 115 MIPS32 Malta Linux Platform 5 2 GT64120 SysGT6412x This is a system controller providing an interface between the local bus and SDRAM and PCI buses The model provides the PCI interface including PCI configuration bus and PCI Interrupt acknowledge bus connections and access cycles The model does not provide the SDRAM memory interface this is provided as discrete memory in the platfo
97. nput AT Raw Set 2 keyboard as class input inputO TCP cubic registered NET Registered protocol family 1 NET Registered protocol family 17 NET Registered protocol family 15 Bridge firewalling registered 802 10 VLAN Support vi 8 Ben Greear lt greearb candelatech com gt All bugs added by David S Miller lt davem redhat com gt input ImExPS 2 Generic Explorer Mouse as class input input1 EXT3 fs INFO recovery required on readonly filesystem EXT3 fs write access will be enabled during recovery k journald starting Commit interval 5 seconds EXT3 fs recovery complete EXT3 fs mounted filesystem with ordered data mode VFS Mounted root ext3 filesystem readonly Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 modprobe FATAL Could not load lib modules 2 6 23 11 modules dep No such file or directory INIT version 2 86 booting 11 3 2 Adding Additional Linux Components The tftp component may need to be added to the Linux installation This component will be installed using apt get and will require root login in the simulated Linux environment 2010 Imperas Software Limited www OVPworld org Page 60 of 115 MIPS32 Malta Linux Platform Login as root and install the TFTP package using the command gt apt get install tftp useri debian 5 su root Password debian home user1 apt get install tftp Reading package lists Done Building depende
98. nually WARNING This will destroy all data on any partitions you have removed as well as on the partitions that are going to be formatted The partition tables of the following devices are changed IDE1 master hda The following partitions are going to be formatted partition 1 of IDE1 master hda as ext3 partition 5 of IDE1 master hda as swap Write the changes to disks lt Go Back gt 2010 Imperas Software Limited www OVPworld org Page 35 of 115 MIPS32 Malta Linux Platform 7 4 6 Setup Accounts 7 4 6 1 Root Password Wi VGA OVPsim MIPS32 Malta Set up users and passwords You need to set a password for root the system administrative account A malicious or unqualified user with root access can have disastrous results so you should take care to choose a root password that is not easy to guess It should not be a word found in dictionaries or a word that could be easily associated with you A good password will contain a mixture of letters numbers and punctuation and should be changed at regular intervals Note that you will not be able to see the password as you type it Root password lt Go Back gt lt Cont inue gt 5 between items lt Sp Ml VGA OVPsim MIPS32 Malta Set up users and passwords Please enter the same root password again to verify that you have typed it correctly Re enter password to verify gt SS ees lt Go Back gt lt Cont inue gt moves between ite
99. o Back gt lt Cont inue gt Enter gt activates buttons 2010 Imperas Software Limited www OVPworld org Page 30 of 115 MIPS32 Malta Linux Platform 7 4 3 Download Debian Components 7 4 3 1 Select Debian Archive Mirror Countr Hl VGA OVPsim MIPS32 Malta Choose a mirror of the Debian archive The goal is to find a mirror of the Debian archive that is close to you on the network be aware that nearby countries or even your own may not be the best choice Debian archive mirror country Nether lands New Zealand Poland Portugal Romania Russian Federation Slovakia South Africa Spain Sweden Switzerland Taiwan Thailand TE lt GO Back gt es between items 7 4 3 2 Select Debian Archive Mirror Ml VGA OVPsim MIPS32 Malta Choose a mirror of the Debian archive Please select a Debian archive mirror You should use a mirror in your country or region if you do not know which mirror has the best Internet connection to you Usually ftp lt your country code gt debian org is a good choice Debian archive mirror ftp uk debian org ukdebian mirror anix net debian zetnet co uk wuw mirrorservice org ftp ticklers org sega aia lt Go Back gt buttons 2010 Imperas Software Limited www OVPworld org Page 31 of 115 MIPS32 Malta Linux Platform 7 4 3 3 Choose a Prox E VGA OVPsim MIPS32 Malta Choose a mirror of the Debian archive If you need to use a HTTP proxy to access the o
100. one of the example script files it should be modified as shown below for Windows SPLATFORM_VLNVS S verbose ramdisk Inrtra gz finishonhalt lt kernel vm Gnu console tey output imperas log wallclock SSG elise e tftp C workspace kernelModule A A 2010 Imperas Software Limited www OVPworld org Page 73 of 115 MIPS32 Malta Linux Platform 13 4 Example Source This section contains example code for a simple device driver The device driver allows the LED register in the Malta FPGA to be accessed for reading and writing 13 4 1 Included Header Files The header files that are used in the Kernel device driver include lt linux kernel h gt include lt linux module h gt include lt linux init h gt Finelude lt linusx fs h gt character device definitions yA This next header file is used to define the register in the MIPS Malta FPGA that is used to access the LEDs include mipsMalta h 13 4 2 Callback Table and Functions 13 4 2 1 Table A table provides the list of functions provided by this device driver struct file_operations ops owner THIS_MODULE open led_open releas led_release read led_read WEIT ed writ 13 4 2 2 Device Open called whenever a process attempts to open the device x7 static int led_open struct inode inode struct file file printk led_open d d n MAJOR inode gt i_r
101. org Page 99 of 115 MIPS32 Malta Linux Platform CONF IG_MTD_CFI y CONFIG_MTD_JEDECPROBE is not set CONF IG_MTD_GEN_PROBE y CONFIG_MTD_CFI_ADV_OPTIONS is not set CONF IG_MTD_MAP_BANK_WIDTH_l y CONF IG_MTD_MAP_BANK_WIDTH_2 y CONF IG_MTD_MAP_BANK_WIDTH_4 y CONFIG_MTD_MAP_BANK_WIDTH_8 is not set CONFIG_MTD_MAP_BANK_WIDTH_16 is not set CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_TI1l y CONFIG_MTD_CFI_I2 y CONFIG_MTD_CFI_I4 is not set CONFIG_MTD_CFI_I8 is not set CONF IG_MTD_CFI_INTELEXT y CONF IG_MTD_CFI_AMDSTD y CONF IG_MTD_CFI_STAA y CONF IG_MTD_CFI_UTIL y CONF IG_MTD_RAM CONF IG_MTD_ROM is not set is not set CONFIG CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 MTD_ABSE NT is not set t Mapping drivers for chip access CONFIG_MTD_COMPLEX_MAPPINGS is not set D_PHYSMAP y D_PHYSMAP_START 0x0 D_PHYSMAP_LEN 0x0 D_PHYSMAP_BANKWIDTH 0 CONF IG_MTD_PLAT RAM is not set Self contained MTD device drivers CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 Disk On C CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 CONF IG_M 1 TD _PMC551 i
102. other countries contrary to United States law is prohibited It is the reader s responsibility to determine the applicable regulations and to comply with them Disclaimer IMPERAS SOFTWARE LIMITED AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND EXPRESS OR IMPLIED WITH REGARD TO THIS MATERIAL INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2010 Imperas Software Limited www OVPworld org Page 2 of 115 MIPS32 Malta Linux Platform Table of Contents Ves s HERA 5 acre SF dyin in cece te se pa alas i Wie wa ng sade a Meader nda Seat Gh 1 1 R lated D c mentS soci 25 secaasiececadscostesh a danced A e a N a ei De NIV ORs seal aces steak ita a a A a A E E N ee 2 1 Platform Definition Files siener e a r S 22 Demo Package Installers ju e e a a a Rai Dn Board Architectures shi ca lid e e i 4 Malta Peripheral Models Overview nsesssesessssesssessseessesssersssressseessessessseessseesssees 4 1 SmartLoaderEinUR oc oncugasss calc sautetoat ae a e E E aT 4 2 GF64120 SysGTO4L2X as eer ii EE E TA AS Wart 1G450 EEE EAE T 4 4 PIIX4E PGrPILX 4B Dase ic saisccssssssceuasioheeda sesqtsldaleaaesstoteagiaddgtieddluanseldedeagsootetsaced 45 IDE CP CHD Ect ae Aa ie hecal E E E deat seal Be NPs DINE a Rie i acl Da Mths A6 NUS BAC PC Ss Jose cn cctavaive soos a T E Ea a AR T EANA aE 4 7 Power management PciPM eseeeseeeesseesseessessseessseessseesseessersseres
103. redir tcep 15901 10 0 2 15 5901 tcp 11001 10 0 2 15 11001 to be passed to the NIC peripheral device This will expose a port that allows a connection to an FTP server For this example we have created a version of the linpack application by cross compiling on a linux host system login as userl or whatever user account you set up during the installation and use ftp to transfer the compiled program onto the simulated Linux platform from an ftp server For this example we are running an ftp server on a host 172 17 1 254 ale ftp lt server gt logins lt login gt password lt password gt ftp gt passive ftp gt cd lt directory of executable gt Etpe binary ftp gt get linpack exe ieee CUE ale ale 2010 Imperas Software Limited www OVPworld org Page 58 of 115 MIPS32 Malta Linux Platform This is shown in the following screenshot S ftp 172 17 1 254 onnected to 172 17 1 254 ame 172 17 1 254 user1 moore 31 Please specify the password ftp gt binary 268 Switching to Binary mode ftp gt cd home moore MipsCompi ler hel lowor ld 254 Directory successfully changed ftp gt get linpack exe local linpack exe remote linpack exe 22 Entering Passive Mode 172 17 1 254 154 121 156 Opening BINARY mode data connection for linpack exe 655566 bytes 226 File send OK 655566 bytes received in 8 86 secs 108819 5 kB s ftp gt quit 221 Goodbye iseri debian _ Check the permissions on the tran
104. rm Attribute Platform Model Description Default There are no user definable attributes for this model Table 2 GT64120 Attributes 5 3 Uart16450 This is a simple UART model for the 16450 devices In this platform it can also be used to maintain a log of its output as well as providing it to stdout Attribute Platform Model Description Default outfile None None Log the characters to the log file specified by this attribute infile None None This file is used as input for the UART registeralign None 1 Allows the 8bit UART registers to be aligned on non byte boundaries log None None The UART output is logged into the simulator stdout There is no UART input portnum None None Port number allows the connection to an external application Table 3 UART16450 Attributes 5 4 PIIX4E PciPlIX4Ebase The PILX4E is modeled using a number of discrete component models such that the PITX4E model itself contains only the base functionality that is common for example the PCI configuration registers Attribute Platform Model Description Default There are no user definable attributes for this model Table 4 PITX4E Attributes 5 5 IDE PcilDE This is a simple IDE model which resides on the PCI bus allowing the connection of up to 4 devices Each device is separately created as an image of the disk file structure The model will attempt to open 3 drives as specified below if any device cannot be opened a warning will be generated If
105. s 68 11 6 3 Debugging Multiple Applications in Parallel ee eee eeseeesneceeeeeeees 70 11 7 Debug using Simulated GDB oa ssisiasceseresssenccegasd oo ieeaavedaads sn doaevs tensaanesaunaceassavcee ses 71 12 Creating an Example Linux Kernel Module oe eeaceeenceeseeceseeeseeeeneesnaeenseenees 13 12 1 Introd ctions naei a Bae e E R Eh 73 12 2 SPre REQUSIteS 3 ss yscces stoves evendedocaiuncau ss lesdadeasuendeies locate a a a E E eaten des 73 12 3 Starting the Platform Simulation iss ccisccscees cds jachssssteessntcsacecacdanescnes devesacedunvesuceaes 73 12A gt SAR ATS SOURCE aacat si actecesirees sta N algae bee aca hase came eee 74 PAP Included Header Files icsi Mee Glo Sia ee ee Se 74 12 4 2 Callback Table and Functions 1 40 eniecine Sereeadiceiebe Geeta ee erase 74 J242 o Tablemcni angres ni a A E a TE EE 14 1242 25 Device Opein a E TO EO aes 74 12 4 2 3 Device Closener raced e eee atten staat S 74 IQA 2A Device Read seirena hernan eaa a ee 75 12 4 2 5 Device WTItE ages ersen ea i sS ies 75 12 4 3 Device Module Initialize and Exit ssseeeseseeeesesesesressessresrerseseresrersersresees 75 12 4 3 1 Device Titi lisatiOn sissi soi aa e AE NE ea aii 75 2010 Imperas Software Limited www OVPworld org Page 5 of 115 MIPS32 Malta Linux Platform WAS 2 Device Exits nines ek peewee Gehan 76 12 4 3 3 Resister IOC G oF cs Sova Sed ages ae eet deed aa S e E s 76 12 5 Building the Device Driver 2 20608 ba toe tie E a eed 76 12 5 1
106. s Software Limited www OVPworld org Page 52 of 115 MIPS32 Malta Linux Platform The bin directory provides tools specific to the mips linux platform _ Name a Size Type mipsel malta linux addr2line 2 406 K6 File E mipsel malta linux ar 2 388 KB File E mipsel malta linux as 3 510 K6 File E mipsel malta linux c filt 2 373 KB File E mipsel malta linux cpp 197 KB File E mipsel malta linux gcc 195KB File E mipsel malta linux gcc 3 4 4 195KB 4 File El mipsel malta linux gccbug 16KB File E mipsel malta linux gcov 60KB File e mipsel malta linux ld 3 311 KB File E mipsel malta linux nm 2 440 KB File E mipsel malta linux objcopy 2 877 KB File E mipsel malta linux objdump 3 039KB File E mipsel malta linux ranlib 2 388 KB File E mipsel malta linux readelf 420KB File E mipsel malta linux size 2 298 KB File e mipsel malta linux strings 2 280 K6 File E mipsel malta linux strip 2 877 KB File E mipsel unknown linux gnu ad 2 406 K6 File E mipsel unknown linux gnu ar 2 388 KB File E mipsel unknown linux gnu as 3 510 K6 File E mipsel unknown linux gnu c 2 373 KB File E mipsel unknown linux gnu cpp 196 KB File E mipsel unknown linux gnu gec 195KB File e mipsel unknown linux gnu acc 195KB 4 File E mipsel unknown linux gnu aec 16KB File E mipsel unknown linux gnu gco 60KB File E mipsel unknown linux gnu ld 3 311 KB File E mipsel unknown linux gnu nm 2 440 KB File E mipsel unknown linux gnu obj 2 877 KB File E mipsel unknown l
107. s not set DS LRAM is not set D_PHRAM is not set D_MTDRAM is not set D_B LOCK2MTD is not set hip Device Drivers D_DOC2000 is not set D_DOC2001 is not set D_DOC2001PLUS is not set D_NAND is not set CONF IG_M D_ON ENAND is not set UBI Unsorted block images CONFIG_MTD_UBI is not set CONFIG_PARPORT is not set CONFIG_B CONFIG_B 1K_DEV y 1K_DEV_FD m 2010 Imperas Software Limited www OVPworld org Page 100 of 115 MIPS32 Malta Linux Platform CONFIG_BLK_CPQ_ DA is not set CONFIG_BLK_CPQ_CISS_DA is not set CONFIG _BLK_ DEV_DAC960 is not set CONFIG _BLK_ DEV_UMEM m CONFIG BLK DEV_COW_COMMON is not set CONFIG _BLK DEV_LOOP m K_D K_D CONFIG_BL EV_CRYPTOLOOP m CONF IG_BL EV_NBD m CONFIG_BLK DEV_SX8 is not set CONFIG_B EV_RAM y CONFIG_BL EV_RAM COUNT 16 CONFIG_B EV_RAM SIZE 4096 CONFIG_BL EV_RAM BLOCKSIZE 1024 CONF IG_CDROM_PKTCDVD m CONFIG_CDROM_PKTCDVD_BUFFERS 8 CONFIG_CDROM_PKTCDVD_WCACHE is not set CONFIG_ATA OVER_ETH m CONF IG_MISC_DEVICES y CONFIG PHANTOM is not set CONFIG_EEPROM_93CX6 is not set CONFIG_SGI_IOC4 is not set CONFIG_TIFM_CORE is not set CONF IG_IDE CONF IG_IDE_ MAX HWIFS 4 CONF IG_BLK_DEV_IDE y
108. s not set CONFIG_NE2K_ PCI is not set CONFIG_8139CP is not set CONFIG_8139TOO is not set CONFIG_SIS900 is not set CONFIG_EPIC100 is not set CONFIG _SUNDANCE is not set CONFIG_TLAN is not set CONFIG_VIA_RHINE is not set CONFIG_SC92031 is not set CONF IG_NETDEV_1000 y CONFIG_ACENIC is not set CONFIG _DL2K is not set CONFIG_E1000 is not set F CONFIG_NS83820 is not set CONFIG _HAMACHI is not set CONFIG_YELLOWFIN is not set CONFIG_R8169 is not set CONFIG_SIS190 is not set CONFIG_SKGE is not set CONFIG_SKY2 is not set CONFIG_SK98LIN is not set CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3 is not set CONFIG_BNX2 is not set CONFIG_QLA3XXX is not set CONFIG_ATL1 is not set CONF IG_NETDEV_10000 y CONFIG_CHELSIO_T1 is not set CONFIG_CHELSIO_T3 is not set CONFIG_IXGB is not set CONFIG _S2IO is not set CONFIG _MYRI10GE is not set CONFIG_NETXEN_NIC is not set CONFIG _MLX4_CORE is not set CONFIG_TR is not set T Wireless LAN CONFIG_WLAN_PRE80211 is not set CONFIG_WLAN_80211 is not set CONFIG_WAN is not set CONFIG_FDDI is not set CONFIG_HIPPI
109. seeesseeesseesseesse 4 8 Interrupt Controller IntPIX4E8259 s sssnssessessssessseesseessersseresseessseesseesseessee 4 9 VGA VgaCEGDJ RR o as suas e e aE EEE TS 4 10 PS2 Controller Ps2Control acc oniagpaindis da Wanice tent dein Coax Sa eid ieee er nents 4 11 Real Time Clock RtCMC146818 oo cece cccccceesssssseceeeseeeeeeserssaeceeeeeeseeenees 4 12 Malta FPGA Malta FPGA ox cscs ecseweseeade yeas ccs daes a steady gues A diss E Eni 4 13 Ethernet Controller GNIGAM79C9 7x cticsoacciscntiecrontatendiun gaged aioceasaes 4 14 System bus PCI bus ISA Busy scciecvecuccracedeects esas eaysasearsecaveusncee ev eeseacssceneeys 5 Booting the pre built LimuxcKRernel 5 0cscsicssereccssseetyoes dvsedvecazedeteatuen ses deoesnseateaaeentdastnne 5 1 Introduction sssini sai ieee neti a iia s 5 2 Linux Kernel Versions and SMP Suppott ecceeseceesseceesneceesteceeseeeenaeeeeaaes J37 SA RCCULMOM Sequencer actrees a E E sauna tat A icates 5 3 1 Memory Initialization ecsiecscccssseseveisvendaaaisdjeaesassssaesassgraeeasssdecasnaecedesotoaeeeaen 5 3 2 OCU ON nnter etina s eenas aaie eais Eiai 5 4 MUP NTT es theRlattOrni a sas a E RE gs ene ae E 5 4 1 Booting from RamDisk Initial RAM Disk 0 000 eee eeeceeeeeeeeneeeeeneeees 5 4 2 Terminating the Simla OMs oF escscsseucosscepovastiisuedgaasunesacad eabteadndgaads aeiammeenvs 6 Installing Full Linux Distribution 0 ee eee eeseceseeeeeeeeseeceaecseeesaeesaeecnaeenseeesees 6 1 Simul
110. sferred file to ensure that it is executable from a user login If it cannot be executed you can use the chmod command for example chmod x linpack exe 11 3 Using TFTP If no FTP server is available or all the files to be transferred are available on the local Host machine it is possible to use the simpler TFTP protocol The NIC peripheral includes an emulated TFTP server that intercepts all TFTP packets being sent from the guest operating system Only the command get is supported to load files from the Host into the guest operating system The TFTP requests for files are translated to file operations on the Host machine The files must be transferred in binary mode 2010 Imperas Software Limited www OVPworld org Page 59 of 115 MIPS32 Malta Linux Platform 11 3 1 Starting the Simulation Run the platform modifying the script file RUN_BootLinux provided in the OVPsim_demo_linux_MipsMalta_install installation to pass an additional parameter tftp lt path gt to enable the emulated TFTP server and set the root directory on the Host machine as shown below for Linux PLATFORM_VLNV verbose ramdisk initrd g2 finishonhalt kernel vmlinux console ttyl gt output imperas log wallclock tftp lt path gt The supplied disk image performs a full Linux operating system boot E VGA CL GD54xx STATUS e serio i8042 AUX port at 0x60 0x64 irq 12 mice PS 2 mouse device common for all mice i
111. simulated Linux operating system This is accomplished using one or more instances of gdbserver running in the simulated Linux environment This section describes additional components that may be required in the simulated Linux environment and the steps required to accomplish user application debugging 12 2 Linux Installation There must be a standard Linux installation available on a disk image Section 7describes how to build a full Linux installation disk 12 3 Booting Linux Run the platform from the command line or by executing a modified version of the batch file bootLinux bat provided This will execute the platform provided passing in the Linux kernel as the first parameter Additional arguments may be used to enable file transfer by FTP or TFTP 12 3 1 Redirecting TCP Port Add the redir argument to set redirection of the tcp port 11001 This will enable both the connection between the gdb server and a gdb instance later and transferring files see section 11 2 Using an FTP Server for more details 2010 Imperas Software Limited www OVPworld org Page 63 of 115 MIPS32 Malta Linux Platform 12 3 2 Enabling TFTP File Transfer Add the TFTP lt path gt argument to enable TFTP with the root server directory on the host set to lt path gt See section 11 3 Using TFTP for more details tftp C workspace 12 4 Compiling a User Program 12 4 1 Cross Compiler ToolChain The toolchain used to compi
112. steven a E 85 15 R stri tions and Caveats 25 rei oe crea tcy facet Siok cota te Airs soia A EEES e ia 86 APPENDIX AS ae aan eter ey tomer er A ae Penna arena er Cem or oe cnn err er eon 87 A l Platform Command Line Argument 00 eeccceescecesneeceeneeceeeeeceeeeeceseeecseeeeesaes 87 APPENDIX Bfe ahah nnee ia tae a tatti tes aea gatas sehen 88 B L Some Terms Explained anessin nann a a 88 APPENDIX Gieaprperttt n n T a a E a E ere e 89 CA MIPS KermmelContreuration Pile eses aaarnas a a 89 2010 Imperas Software Limited www OVPworld org Page 6 of 115 MIPS32 Malta Linux Platform 1 Preface This document describes the simulation model of a platform capable of running a release of Linux cross compiled for the MIPS 32 bit architecture It provides a guide to running a Debian Linux Operating System release on the virtual platform 1 1 Related Documents This platform model uses peripherals from the OVP library Consult the OVP library at www ovpworld org for documentation for the status on individual models The device vendors should be consulted for individual device datasheets The processor cores are developed using the MIPS32 reference material available in general from http www mips com products product materials processor in particular the documents e MIPS32 Architecture For Programmers Volume I Introduction to the MIPS32 Architecture e MIPS32 Architecture For Programmers Volume II The MIPS32 Instruction Set e
113. t offset offset in the file Be 99 unsigned char c 100 ff int ret 101 102 printk C led_write n 103 if get_user c buffer 0 104 return EFAULT 105 printk C led_write x n unsigned intjc 106 char LED_REG c idebug mipslel gt 2010 Imperas Software Limited www OVPworld org Page 85 of 115 MIPS32 Malta Linux Platform 16 Restrictions and Caveats The platform is tested only under the following conditions e Little endian memory organization e Debian distribution of Linux kernel version 2 6 23 11 2010 Imperas Software Limited www OVPworld org Page 86 of 115 APPENDIX A A 1 Platform Command Line Arguments Argument Parameter Description P integer expose a port on which a debugger can be attached T integer start tracing after integer number of instructions have be performed by the MIPS processor initrd none boot using the initial ramdisk finishonhalt none cause the simulation to be stopped when a soft reset is requested during the halt operation wallclock none Simulate using wall clock time ie simulation will not run faster than real time redir none redirection of tcp ports to allow tcp connection with another machine for file transfers etc redirection string is tcp 15901 10 0 2 15 5901 tcp 11001 10 0 2 15 11001 tftp String Enable the emulated TFTP server and specify the root directory in the host machine stopafter double stop execution after an integer number of instructions has
114. ter device Bigs static int led init vyoid Ine Pee printk LED driver hello n ret register_chrdev LED_MAJOR DEVICE_NAME amp ops if ret 0 pecura ret return 0 2010 Imperas Software Limited www OVPworld org Page 75 of 115 MIPS32 Malta Linux Platform 13 4 3 2 Device Exit This is the function invoked when the kernel module is removed void led_exit void printk LED driver goodbye n unregister_chrdev LED _MAJOR DEVICE_NAME 13 4 3 3 Register Module Define module functions used for initialization and exiting module_init led_init module_exit led_exit 13 5 Building the Device Driver 13 5 1 Makefiles For convenience we are using two Makefiles The first Makefile sits in the directory containing the driver source code and sets the object module to the driver name object obj m led_drv o The second is common to all kernel modules and specifies the module to be compiled using M mymoduledirectory COMPILER path to compiler install CROSS_COMPTILE_V S COMPILER bin mipsel malta linux KERNELSRC path to source linux 2 6 23 11 MYMODULE S shell pwd ledDrvModule default make CROSS _COMPILE CROSS_COMPILE_V C KERNELSRC M MYMODULE modules Of course these can be combined into a single Makefile that would reside in the directory with the source files COMP IL
115. ter password to verify lt Go Back gt lt Cont inue gt Tab gt moves between items 2010 Imperas Software Limited www OVPworld org Page 38 of 115 MIPS32 Malta Linux Platform 7 4 7 Base System Installation 7 4 7 1 Verifying the Release The installation of the base system will now progress Wi VGA OVPsim MIPS32 Malta Installing the base system Valid Release signature key id 7EAS91D 724 7203BS8CO4FBCBSDOCB804ADB11277 7 4 7 2 Retrieving Packages This will take the longest period of time Ml VGA OVPsim MIPS32 Malta Installing the base system Retrieving Packages 2010 Imperas Software Limited www OVPworld org Page 39 of 115 MIPS32 Malta Linux Platform 7 4 7 3 Continue Without Kernel The Linux kernel is provided separately from the release We therefore can continue without installing a kernel Ml VGA OVPsim MIPS32 Malta Install the base system No installable kernel was found in the defined APT sources You may try to continue without a kernel and manually install your own kernel later This is only recommended for experts otherwise you will likely end up with a machine that doesn t boot Continue without installing a kernel lt Go Back gt lt No gt 7 4 7 4 Package Usage Survey Select NO to not participate in the package usage surve Ml VGA OVPsim MIPS32 Malta Configuring popularity contest The system may anonymously supply the distribu
116. tered 602 10 VLAN Support v1 8 Ben Greear lt greearb candelatech com gt All bugs added by David S Miller lt davem redhat com gt input ImExPS 2 Ge xplorer Mo s class input input1 RAMDISK Compressed image found at block 0 VFS Mounted root cramfs files tem readonly Freeing prom memory 956k freed Freeing unused kernel memory 196k freed Algorithmics MIPS FPU Emulator v1 5 Setting up filesystem please wait Figure 10 Kernel Booting from Install INITRD 2010 Imperas Software Limited www OVPworld org Page 27 of 115 MIPS32 Malta Linux Platform 7 4 Installing a Linux Distribution A typical Linux installation is performed following the prompts of the graphical user interface provided by the VGA peripheral in the virtual platform This section describes the full installation sequence To complete a full installation will take around 1 2 hours 7 4 1 Configure Local 7 4 1 1 Select Language E VGA OVPsim MIPS32 Malta 2010 Imperas Software Limited www OVPworld org Page 28 of 115 MIPS32 Malta Linux Platform 7 4 1 2 Select location Ml VGA OVPsim MIPS32 Malta Choose language Based on your language you are probably located in one of these countries or regions Choose a country territory or area Australia Botswana Canada Hong Kong India Ireland New Zealand Philippines Singapore South Africa united Kingdon United States Zimbabwe other lt Go Back gt 7 4 1 3 Select Keybo
117. ting System ssesssesssssressresssrssesssseeeseee 61 11 Debugging Linux User Applications esseeseeseesseeresseseesresseserssressessresresseesresreeseese 63 KE Introduction eee e en a A A E EA alr 63 11 2 Linux Installation nensis ansin ps eee 63 DA See gt SMO UII E a LED Fis E E EE E E E E EE 63 TE34 R dir ctine TOP PO dinesoni E E ER E 63 11 3 2 Enabling TFTP File Transfer x sjcaciisicdeassctpeaacves scceus sageasssansdaateautecs osc soaatasee 64 11 4 Compiling a User Proeraitiys c sacscccs sdccsacacnsttassseasacadersdacay dudenadanessaact sia ecadanvdateetes 64 ITAL Cross Compiler ToolC hats cu ge cioeueniontaGadsaia cannes 64 11 4 2 Cross Compiler Make Environment ceeeseeeseceeeceeeeeeeeceaeecsaeeneeneees 64 11 4 3 Building the Application sia ssvcticaiavesiens suse dussaansaeanacessnacstonshes oaedosnaeerqoeatawetons 65 11 5 Adding Additional Linux Components eeceeeeeeceesseeeceeeeeeeeeceeseeeenaeerenes 65 11 6 Remote Debug using GD Bservers ici 2 i ces 2ocits ties etots iota ta seden tech ietidacscueds 66 Lico l Starting GB Server s ccucaitgee ed aie ea aes ee eS 66 11 6 2 Connecting to GDB Server isissecacssicscasiseserecaseascera teesasnavesacessnieceeasbeoaateses 67 11 6 2 1 Usm Eclipsi urse grot a a e eee iS 67 11 6 2 2 Using DDD from a Linux Host sssseeeseseeeeeseesrsereereesersresreesresresrrssee 67 11 6 2 3 Using GDB from local Windows Host s seseeeeeseseeeeeseresresressrseresress
118. tion developers with statistics about the most used packages on this system This information influences decisions such as which packages should go on the first distribution CD If you choose to participate the automatic submission script will run once every week sending statistics to the distribution developers The collected statistics can be viewed on http popcon debian org This choice can be later modified by running dpkg reconfigure popularity contest Participate in the package usage survey lt es gt No Space gt selects activates buttons 2010 Imperas Software Limited www OVPworld org Page 40 of 115 MIPS32 Malta Linux Platform 7 4 7 5 System Selection The system selection determines the default set of Ml VGA OVPsim MIPS32 Malta packages that will be installed Software selection At the moment only the core of the system is installed To tune the system to your needs you can choose to install one or more of the following predefined collections of software Choose software to install onmen lt Cont inue gt 7 4 7 6 No Boot Loader The boot loader is provided as part of the Malta platform so continue the installation without it E VGA OVPsim MIPS32 Malta Continue without boot loader No boot loader installed No boot loader has been installed either because you chose not to or because your specific architecture doesn t support a boot loader yet You will need to boot
119. tual platform and the actual MIPS silicon device with real hardware Linux can boot from an initial ram disk file in a compressed form and extracted into simulated memory This file is called initrd gz and is provided as part of OVPsim_demo_MipsMalta It provides a basic set of commands using the BusyBox system with a minimal file system As downloaded the initial ramdisk will boot to a shell prompt 6 2 Linux Kernel Versions and SMP Support This example is provided with a Debian distribution of the 2 6 23 11 Linux kernel The same platform has also been used with a Debian distribution of the 2 6 24 Linux kernel and a MIPS Technologies Incorporated distribution of the 2 6 29 4 1 Linux Kernel The MIPS32 processor model can support the MIPS single core processors for example 4Kc and 24KEc and also the MP core processors for example the 34Kc The Linux kernel is built with SMP support enabled Thus if an MP core supporting SMP is selected as the processor variant Linux will boot as SMP 6 3 Execution Sequence There is a specific sequence of events carried out by the OVP simulator and the SmartLoader peripheral on startup 6 3 1 Memory Initialization The following memory initialization is performed e Debian Linux kernel image vmlinux is loaded directly into memory using addressing contained in the elf file by the OVP simulator e Bootstrap code is created at the MIPS processor reset vector by the SmartLoader peripheral co
120. ultiple CONF IG_SCSI_MULTI_LUN y CONF IG_SCSI_CONSTANTS y CONF IG_SCSI_LOGGING y CONFIG_SCSI_SCAN_ASYNC is not set CONF IG_SCSI_WAIT_SCAN m SCSI Transports 2010 Imperas Software Limited www OVPworld org LUNs Page 102 of 115 MIPS32 Malta Linux Platform CONFIG_SCSI_SPI_ATTRS m CONFIG_SCSI_FC_ATTRS m CONFIG_SCSI_ISCSI_ATTRS m CONFIG_SCSI_SAS_LIBSAS is not set CONFIG_SCSI_LOWLEVEL y CONFIG_ISCSI_TCP m CONF IG_BLK_DEV_3W_XXXX_RAID m CONFIG_SCSI_3W_9XxXxX m CONFIG_SCSI_ACARD m CONFIG_SCSI_AACRATD m CONFIG_SCSTI_ATIC7XXxX m CONFIG_AIC7XXX_CMDS_PER_DEVICE 32 CONF IG_AIC7XXX_RESET_DELAY_MS 15000 CONF IG_AIC7XXX_DEBUG_MASK 0 CONF IG_AIC7XXX_REG_PRETTY_PRINT y CONFIG_SCSI_AIC7XXX_OLD is not set CONFIG_SCSI_AIC79XX is not set CONFIG_SCSI_AIC94XX is not set CONFIG_SCSI_DPT_I20 is not set CONFIG _SCSI_ARCMSR is not set CONFIG _ MEGARAID NEWGEN is not set CONFIG MEGARAID LEGACY is not set F CONFIG MEGARAID SAS is not set CONFIG_SCSI_HPTIOP is not set CONFIG_SCSI_DMX3191D is not set CONFIG_SCSI_IPS is not set CONFIG_SCSI_INITIO is not set CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_STEX is not set CONFIG_SCSI_SYM53C8XX_2 is not set CONFIG_SCSI_QLOGIC_1280 is not set CONFIG_SCS
121. utside world enter the proxy information here Otherwise leave this blank The proxy information should be given in the standard form of http luser pass host port z HTTP proxy information blank for none lt Go Back gt lt Cont inue gt Enter gt activates buttons 7 4 4 Download Installer Components 7 4 4 1 Continue Without Kernel Modules If prompted to continue without kernel modules select YES The kernel we are providing is built from the Linux 2 6 23 release The distribution is not yet available at this release This does not cause any problems for the installation E VGA OVPsim MIPS32 Malta Download installer components No kernel modules were found This probably is due to a mismatch between the kernel used by this version of the installer and the kernel version available in the archive If you re installing from a mirror you can work around this problem by choosing to install a different version of Debian The install will probably fail to work if you continue without kernel modules Continue the install without loading kernel modules lt Go Back gt lt No gt 2010 Imperas Software Limited www OVPworld org Page 32 of 115 MIPS32 Malta Linux Platform 7 4 5 Partition Disk 7 4 5 1 Start Partitioning The initial disk image that we have created is blank and so contains no information that can be read form the Linux kernel to identify it We shall therefore allow partition
122. variables done punting local filesystems done Activating swapfile swap done petting up networking configuring network interfaces done Starting portmap daemon eth link up etting console screen modes and fonts INIT Entering runlevel 2 5 system log daemon syslogd Starting kernel log daemon klogd portmap daemon Already ruming MIA eximt internet superserver inetd NFS common utilities statd deferred execution scheduler atd periodic command scheduler crond E 7 Ml VGA OVPsim MIPS32 Malta x unting local filesystems done Activating swapfile swap done etting up networking onf iguring network interfaces done Starting portmap daemon link up system log daemon syslogd kernel log daemon klogd portmap daemon Already running MTA eximt internet superserver inetd NFS common utilities statd deferred execution scheduler atd periodic command scheduler crond Linux debian 2 6 23 11 1 SMP Fri Apr 18 11 63 23 BST 2888 mips he programs included with the Debian GNU Linux system are free software the exact distribution terms for each program are described in the individual files in usr share doc copyr ight Debian GNU Linux comes with ABSOLUTELY NO WARRANTY to the extent permitted by applicable law tser1 debian 2010 Imperas Software Limited www OVPworld org Page 45 of 115 MIPS32 Malta Linux Platform 7 6 Stopping the System
123. whatever user account you set up during the installation and use tftp to transfer the compiled program onto the simulated Linux platform 2 titp lt host gt titpe binary tftp gt get userApp linpack exe Ertep gt quit lt host gt should be set to any IP address that is NOT the local host ip address 2010 Imperas Software Limited www OVPworld org Page 61 of 115 MIPS32 Malta Linux Platform This is shown in the following screenshot E VGA Imperas MIPS32 Malta useri debian 5 Is 1 total useri debian tftp 180 0 8 8 netascii Verbose off Tracing off Rexmt interval 5 seconds Max timeout 25 seconds tftp gt binary tftp gt get linpack elf Received 57898 bytes in 8 8 seconds tftp gt q useri debian 5 Is 1 total 64 rw r r 1 useri useri 57898 2668 85 25 15 33 linpack elf useri debian Check the permissions on the transferred file to ensure that it is executable from a user login If it cannot be executed you can use the chmod command for example chmod x linpack exe 2010 Imperas Software Limited www OVPworld org Page 62 of 115 MIPS32 Malta Linux Platform 12 Debugging Linux User Applications 12 1 Introduction Once the Linux kernel is up and running it is the user applications themselves that need to be debugged In the OVPsim environment it is simple to connect a debugger such as command line GDB or a GUI like DDD or Eclipse to a user application running on the

Download Pdf Manuals

image

Related Search

Related Contents

Teka CGB LUX 30 2G AL CI  User Manual  Genie AL5 Bid Specifications  Philips DVP5100 User's Manual  情熱価格「コードレスハンディクリーナー コードレス    User Manual - Huss Licht & Ton  PDFファイル - JR PROPO  Accu-Drive Applicator User Manual  Economical Real-Time Monitoring of Power Consumption  

Copyright © All rights reserved.
Failed to retrieve file