Thanks!! I really appreciate you posting these directions to the mailing list.
If you don't mind, it would be even more helpful if we integrated the necessary changes into the code repository (assuming they don't cause any problems in other situations) and added the necessary instructions (and the updated config file) to the wiki. The first part would entail taking your code changes and uploading them for review (see http://gem5.org/Submitting_Contributions). The second part would just be putting something on the wiki somewhere; I think updating/extending the x86 section at http://gem5.org/Linux_kernel is probably the best way to do it. Thanks again., Steve On Mon, Feb 15, 2016 at 8:06 AM Nikolaos Tampouratzis < [email protected]> wrote: > Hello, > > I manage to configure the GEM5 so as to run X86 FS Mode with "--dual" > option. > > First of all, in GEM5’s publicly available repositories, the only > network interface card implemented, tested and > verified is the Intel 8254x based gigabit Ethernet adapter for ARM > architecture. It is provided as a PCI GEM5 > network device using the e1000 Linux driver. Unfortunately, the latest > version of GEM5 does not support the real-network > device for X86-based architectures. So, we had to modify GEM5 for x86 > ISA and configure it properly. In the process to > achieve this functionality on x86, proper drivers for the specific > network device were also required. Moreover, we > manage to build a more modern kernel for x86 because only 2.6.x > out-of-date kernels were available in the GEM5 repositories and add the > e1000 driver (steps 1-5). > > > So, you can follow these steps: > > 1) You have to download linux 3.2.24 kernel version (from this link: > https://www.kernel.org/pub/linux/kernel/v3.0/) and extract it: > $tar -zxvf linux-3.2.24.tar.gz > $cd linux-3.2.24 > > 2) linux-2.6.28.4 configuration file (from this link: > http://www.m5sim.org/dist/current/x86/config-x86.tar.bz2) is used to > build the 3.2.24 Kernel typing: > $wget http://www.m5sim.org/dist/current/x86/config-x86.tar.bz2 > $tar jxvf config-x86.tar.bz2 > $cp configs/linux-2.6.28.4 .config > > 3) e1000 driver is added using make menuconfig gui > $make menuconfig > > 4) Compile the kernel, assuming you're building on an x86 host (-j is > the number of processors) > $make vmlinux -j 4 > > 5) Rename the vmlinux to x86_64-vmlinux-3.2.24 > > 6) You have to use a X86 image with root privileges so that the kernel > e1000 driver can create the network device (linux-x86.img from official > gem5 site hasn't root privileges). You can download > the x86 image with root privileges for parsec benchmarks for example > from here: http://www.cs.utexas.edu/~parsec_m5/x86root-parsec.img.bz2 > After untar it, you have to rename it in "linux-bigswap2.img" because > the GEM5 scripts needs one image with this name (or you can rename the > .img file for /configs/common/FSConfig.py script file). > > 7) You have to change the /configs/common/FSConfig.py script file so as > to add the Intel 8254x network card in the GEM5 bus (dma, config and > pio ports) as well as connect it with the etherlink. So, you must add > the following: > > i) In connectX86ClassicSystem function you must add these lines (to > connect the network device in the classic memory System): > x86_sys.ethernet.pio = x86_sys.iobus.master # x86 Implementation # > x86_sys.ethernet.config = x86_sys.iobus.master # x86 Implementation # > x86_sys.ethernet.dma = x86_sys.iobus.slave # x86 Implementation # > > > ii) In connectX86RubySystem function you must add these lines (to > connect the network device in the Ruby memory System): > x86_sys.ethernet.pio = x86_sys.iobus.master # x86 Implementation # > x86_sys.ethernet.config = x86_sys.iobus.master # x86 Implementation # > > iii) In connectX86RubySystem function you must change this line (to > connect the network device in the Ruby memory System): > From: x86_sys._dma_ports = [x86_sys.pc.south_bridge.ide.dma] > To: x86_sys._dma_ports = [x86_sys.pc.south_bridge.ide.dma, > x86_sys.ethernet.dma] # x86 Implementation # > > iv) In makeLinuxX86System function you must add this line (to > instantiate the Intel 8254x device): > self.ethernet = IGbE_e1000(pci_bus=0, pci_dev=0, pci_func=0, > InterruptLine=1, InterruptPin=1) # x86 Implementation # > > v) In makeDualRoot function you must change this line (to connect the > network card with the etherlink): > From: fatal("Don't know how to connect these system together") > To: self.etherlink.int0 = Parent.testsys.ethernet.interface # x86 > Implementation # > self.etherlink.int1 = Parent.drivesys.ethernet.interface # x86 > Implementation # > > 8) Put the above "x86_64-vmlinux-3.2.24" kernel and "linux-bigswap2.img" > image inside "binaries" and "disks" folders respectively. > > 9) Now, you can run the GEM5 using X86 with "--dual" option typing(using > the above kernel and image): > > $build/X86/gem5.opt configs/example/fs.py --kernel=x86_64-vmlinux-3.2.24 > --disk-image=linux-bigswap2.img --dual > > Best Regards, Nikos > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
