[vmips] Linux 2.4.28 running on VMIPS
Cable Guy
donimus at gmail.com
Tue Jan 18 06:59:16 CST 2005
Yes indeed, Linux kernel 2.4.28 runs on VMIPS. And pretty good too,
maybe a bit slow :) The TLB problem was the key to the whole thing.
I dumped the entire TLB table every time I got a miss and it was
pretty apparent something was very wrong. I had to track down a few
references on the R3000 (getting hard to find) and after slogging
through cpuzero.cc I discovered a problem. All my fancy MIPS PDF docs
didn't help because they're all geared towards more advanced versions
of the processor. Before I tell you what it is exactly I want to
clean out all the cruft I added in for debugging. Just another few
days.
Not only does it run, it will also run busybox as a dynamically linked
executable which nobody else seems to be able to do! That's probably
because the embedded initrd is mounted read-write at "/" once and left
that way. No pivot-root or other convoluted root machinations needed.
Busybox performance seems to be better when it's linked statically,
however. Here's a console log to whet your appetite. Good luck with
your move (I _HATE_ moving) and I'll be sending a few files your way
once I get them sorted out. I want to wrap up this phase before
moving on to any enhancements.
[root at test vmips-linux]# vmips vmips.rom
Little-Endian host processor detected.
Mapping ROM image (vmips.rom, 1315840 words) to physical address 0x1f700000
Mapping RAM module (host=0xb5adb008, 32768KB) to physical address 0x0
Mapping DECstation 5000/200 RTC to physical address 0x1fe80000
Connected IRQ3 to the DECstation 5000/200 RTC
Mapping DECstation 5000/200 CSR to physical address 0x1ff00000
Connected IRQ2 to the DECstation 5000/200 CSR
Mapping DECstation 5000/200 CHKSYN & ERRADR to physical address 0x1fd00000
DZ11 Master clear!
Mapping DECstation 5000/200 DZ11 Serial to physical address 0x1fe00000
Connected fd 4 to DECstation 5000/200 DZ11 Serial line 3.
*************RESET*************
DZ11 Master clear!
Vmips boot monitor
> rk
Copy (HEX) src: BF700000, dst: 80040000, size (bytes): 300000
Clear (HEX) dst: 80340000, size (bytes): 266F0
Entry (HEX) : 8011A040, And away we go!
This is a DECstation 5000/200
ERRADR reg cleared
RTC RTC_REGA (10) written with 0x29
RTC rate_selector set to 0x9 (7812500)
RTC RTC_REGB (11) written with 0x40
RTC interrupt_enable set to 1
RTC turning interrupts on
DZ11 Master clear!
CPU revision is: 00000230
Primary instruction cache 0kB, linesize 0 bytes.
Primary data cache 0kB, linesize 0 bytes.
Linux version 2.4.28 (root at test.doen.net) (gcc version 3.0.4) #6 Tue
Jan 18 06:24:30 EST 2005
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initial ramdisk at: 0x80140000 (2097152 bytes)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram0 rw load_ramdisk=1 console=ttyS3,9600n8
Calibrating delay loop... 1.05 BogoMIPS
Memory: 26872k/32768k available (860k kernel code, 5896k reserved,
2116k data, 80k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
DECstation DZ serial driver version 1.02
ttyS00 at 0xbfe00000 (irq = 15)
ttyS01 at 0xbfe00000 (irq = 15)
ttyS02 at 0xbfe00000 (irq = 15)
ttyS03 at 0xbfe00000 (irq = 15)
RAMDISK driver initialized: 2 RAM disks of 4096K size 1024 blocksize
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 2048 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 2048k freed
VFS: Mounted root (ext2 filesystem).
Freeing unused PROM memory: 252k freed
Freeing unused kernel memory: 80k freed
init started: BusyBox v1.00 (2005.01.18-11:22+0000) multi-call binary
Please press Enter to activate this console.
BusyBox v1.00 (2005.01.18-11:22+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # pwd
/
~ # df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ram0 2011 987 1024 49% /
~ # find . -name '*rof*'
./etc/profile
./sbin/poweroff
~ # cat /etc/mtab
/dev/ram0 / ext2 rw 0 0
proc /proc proc rw 0 0
~ # cd /proc
/proc # cat cpuinfo
system type : Digital DECstation 5000/200
processor : 0
cpu model : R3000A V3.0
BogoMIPS : 1.05
wait instruction : no
microsecond timers : no
tlb_entries : 64
extra interrupt vector : no
hardware watchpoint : no
VCED exceptions : not available
VCEI exceptions : not available
/proc # cat meminfo
total: used: free: shared: buffers: cached:
Mem: 29696000 3387392 26308608 0 53248 2813952
Swap: 0 0 0
MemTotal: 29000 kB
MemFree: 25692 kB
MemShared: 0 kB
Buffers: 52 kB
Cached: 2748 kB
SwapCached: 0 kB
Active: 504 kB
Inactive: 2444 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 29000 kB
LowFree: 25692 kB
SwapTotal: 0 kB
SwapFree: 0 kB
/proc # ps aux
PID Uid VmSize Stat Command
1 root 308 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
12 root 440 S -sh
19 root 308 R ps aux
/proc # uname -a
Linux (none) 2.4.28 #6 Tue Jan 18 06:24:30 EST 2005 mips unknown
/proc # hostname
(none)
/proc # reboot
The system is going down NOW !!
Sending SIGTERM to all processes.
Sending SIGKILL to all processes.
Please stand by while rebooting the system.
Restarting system.
DZ11 Master clear!
More information about the Vmips
mailing list