Dear all, I have built gem5 with scons from "https://gem5.googlesource.com/public/gem5".
By running "scons build/X86/gem5.opt -j7". It builds without any problems. I try to run the example code given in "gem5/configs/example/gem5_library/x86-ubuntu-run.py" By adding "gem5/build/X86/" to the PATH variable and running: "gem5.opt x86-ubuntu-run.py" in the relevant directory. It gets stuck: gem5 Simulator System. https://www.gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.0.0.2 gem5 compiled Sep 25 2022 05:18:11 gem5 started Sep 26 2022 14:02:08 gem5 executing on humza-HP-ProBook-450-G7, pid 7299 command line: gem5.opt x86-ubuntu-run.py warn: The X86DemoBoard is solely for demonstration purposes. This board is not known to be be representative of any real-world system. Use with caution. warn: The simulate package is still in a beta state. The gem5 project does not guarantee the APIs within this package will remain consistent across upcoming releases. Global frequency set at 1000000000000 ticks per second warn: failed to generate dot output from m5out/config.dot warn: failed to generate dot output from m5out/config.board.cache_hierarchy.ruby_system.dot build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (2048 Mbytes) build/X86/sim/kernel_workload.cc:46: info: kernel located at: /home/humza/.cache/gem5/x86-linux-kernel-5.4.49 build/X86/base/statistics.hh:280: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated. 0: board.pc.south_bridge.cmos.rtc: Real-time clock set to Sun Jan 1 00:00:00 2012 board.pc.com_1.device: Listening for connections on port 3456 build/X86/dev/intel_8254_timer.cc:128: warn: Reading current count from inactive timer. 0: board.remote_gdb: listening for remote gdb on port 7000 build/X86/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... build/X86/mem/ruby/system/Sequencer.cc:611: warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files! build/X86/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 6 build/X86/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 6 build/X86/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 6 build/X86/arch/x86/generated/exec-ns.cc.inc:27: warn: instruction 'fninit' unimplemented build/X86/dev/x86/pc.cc:117: warn: Don't know what interrupt to clear for console. WW I must ctrl-c to interrupt. If I go to m5out/board.pc.com_1.device to read its contents, I get: Linux version 5.4.49 (aakahlow@amarillo) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #8 SMP Mon Jun 29 14:40:17 PDT 2020 Command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1 CPU: vendor_id 'M5 Simulator' unknown, using generic init. CPU: Your system may be unstable. x86/fpu: x87 FPU will use FXSAVE BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x000000007fffffff] usable BIOS-e820: [mem 0x00000000ffff0000-0x00000000ffffffff] reserved printk: bootconsole [earlyser0] enabled NX (Execute Disable) protection: active SMBIOS 2.5 present. DMI: , BIOS 06/08/2008 tsc: Fast TSC calibration using PIT tsc: Detected 3003.010 MHz processor last_pfn = 0x80000 max_arch_pfn = 0x400000000 Disabled x86/PAT: MTRRs disabled, skipping PAT initialization too. CPU MTRRs all blank - virtualized system. x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC found SMP MP-table at [mem 0x000f0050-0x000f005f] ACPI: Early table checksum verification disabled ACPI: RSDP 0x00000000000F01F0 000024 (v02 ) ACPI: XSDT 0x00000000000F0238 000024 (v01 00000000 00000000) ACPI BIOS Error (bug): Invalid table length 0x24 in RSDT/XSDT (20190816/tbutils-291) Zone ranges: DMA [mem 0x0000000000001000-0x0000000000ffffff] DMA32 [mem 0x0000000001000000-0x000000007fffffff] Normal empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000000001000-0x000000000009efff] node 0: [mem 0x0000000000100000-0x000000007fffffff] Zeroed struct page in unavailable ranges: 98 pages Initmem setup node 0 [mem 0x0000000000001000-0x000000007fffffff] Intel MultiProcessor Specification v1.4 MPTABLE: OEM ID: MPTABLE: Product ID: MPTABLE: APIC at: 0xFEE00000 Processor #0 (Bootup-CPU) Processor #1 Processor #2 Processor #3 IOAPIC[0]: apic_id 4, version 20, address 0xfec00000, GSI 0-23 Processors: 4 smpboot: Allowing 4 CPUs, 0 hotplug CPUs [mem 0x80000000-0xfffeffff] available for PCI devices Booting paravirtualized kernel on bare hardware clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns I suspect the message in red is the problem. Does someone have any insights on how to fix this such that code does not get stuck, or at least guide me slightly as to where the problem might be? I will also paste the contents of "x86-ubuntu-run.py" as well here: # Copyright (c) 2021 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer; # redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution; # neither the name of the copyright holders nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ This script utilizes the X86DemoBoard to run a simple Ubunutu boot. The script will boot the the OS to login before exiting the simulation. A detailed terminal output can be found in `m5out/system.pc.com_1.device`. **Warning:** The X86DemoBoard uses the Timing CPU. The boot may take considerable time to complete execution. `configs/example/gem5_library/x86-ubuntu-run-with-kvm.py` can be referenced as an example of booting Ubuntu with a KVM CPU. Usage ----- ``` scons build/X86/gem5.opt ./build/X86/gem5.opt configs/example/gem5_library/x86-ubuntu-run.py ``` """ from gem5.prebuilt.demo.x86_demo_board import X86DemoBoard from gem5.resources.resource import Resource from gem5.simulate.simulator import Simulator # Here we setup the board. The prebuilt X86DemoBoard allows for Full-System X86 # simulation. board = X86DemoBoard() # We then set the workload. Here we use the 5.4.49 Linux kernel with an X86 # Ubuntu OS. If these cannot be found locally they will be automatically # downloaded. board.set_kernel_disk_workload( kernel=Resource("x86-linux-kernel-5.4.49"), disk_image=Resource("x86-ubuntu-18.04-img"), ) simulator = Simulator(board=board) simulator.run() I will appreciate any help. Thank you! My system: Ubuntu 20.04.4 LTS intel core i5i-0210U 16 GiB ram
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org