This article is a stub. You can help by
Now supported by linux-mips kernel. Needs information and instructions on how to use.
THIS PAGE IS A DRAFT. FEEL FREE TO CORRECT IT (ESPECIALLY THE ENGLISH).
One of the difficulties of a SoC designer is to evaluate the impact of the SoC architecture and its configuration on the final system. When the final system includes the Linux Kernel, the MIPSsim simulator can be the good candidate to solve the problem.
Analyzing the traces of several simulations its possible to (in)validate an architecture and to configure the SoC to obtain the best system performances. And in the case of the cache configuration, the impact of this analysis can be very important due to the cost of the cache ram.
This page intends to explain briefly how to quickly run a Linux kernel on MIPSsim configured to simulate a 4KSd. This core should be replaced by any other MIPS core.
This document has been validated on the following platform:
- Ubuntu 7.10/8.04
- Redhat Enterprise 5
- Fedora 8
Configuration of the different components.
To configure the kernel, the best way is to use the MIPSsim default configuration and to modify it:
Using menuconfig/xconfig you must choose the endianess correpsponding to the core configuration.
Excepted that, there is no other mandatory modification.
This configuration uses the virtual UART, you must not modify the section "Serial Drivers" excepted if you want integrated your own virtual UART.
In order to allow the kernel to calibrate the delay you need to enable interruption from the internal timer. In the configuration file you must have this line:
set TIMER_INT_ENABLE 1
The second part of the MIPSsim configuration is the configuration of the Device Manager. This one is in charge to simulate hardware devices. MIPSsim is provided with some virtual devices. In order to run the Linux kernel on MIPsim you have to enable a RAM, an UART (to get the console) and a RTC. The default configuration of those last devices are those you have to use.
Your device configuration files should look like:
MemIntf(EB, SparseMemRam, 0, 0x0, 64M, MIPS_SparseMemRam) MemIntf(EB, RTC, 2, 0x1fd00070, 0x00000002, MIPS_Rtc) MemIntf(EB, UART, 3, 0x1fd003f8, 0x00000008, MIPS_Uart) SparseMemRam(0,,,0,0,0,0,0) RTC(2,,0,0,1) UART(3,UNBUFFERED,0,0,1)
An important point here is the delay you can add to the SparseMemRam accesses modifying the last number of the line:
The GDB script must set the configuration file, the MIPSsim library and the target MIPS core. By example for a 4KSd the gdb script can look like this:
set mdi library libMIPSsim_MDIc.so set mdi configfile 4KSd.cfg set mdi target 19 set mdi device 01 target mdi load run
Run the Simulation
First make the kernel:
Then run the simulation:
sde-gdb -x gdbinit vmlinux
--Grome 15:11, 29 August 2008 (UTC)