SimpleSSD / SimpleSSD-FullSystem

Open-Source Licensed Educational SSD Simulator for High-Performance Storage and Full-System Evaluations
BSD 3-Clause "New" or "Revised" License
88 stars 46 forks source link

NVMe device is not created #2

Closed sooyun802 closed 5 years ago

sooyun802 commented 5 years ago

Hello,

I've succeeded in building and booting SimpleSSD.

However, unlike what it mentions in your wiki page, no device shows when I check with the ./nvme list command.

kakaotalk_photo_2018-10-29-19-53-31

I've tried booting it with an NVMe device and an Open-Channel device, but it's the same with both cases.

Do you have any ideas of what I might be doing wrong?

Thanks.

kukdh1 commented 5 years ago

Hi,

Which kernel version are you using? Can you show kernel boot log using dmesg?

Thanks

sooyun802 commented 5 years ago

This is the host system.

image

This is the simulator.

image
root@genericarmv8:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.92.CAMELab (kukdh1@kukdh1-dorm.iptime.org) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #6 SMP PREEMPT Thu Apr 19 14:30:50 KST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fc0f0]
[    0.000000] Memory limited to 2048MB
[    0.000000] cma: Reserved 16 MiB at 0x00000000ff000000
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 8192 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 524288 pages, LIFO batch:31
[    0.000000] percpu: Embedded 22 pages/cpu @ffffffc07ef96000 s50968 r8192 d30952 u90112
[    0.000000] pcpu-alloc: s50968 r8192 d30952 u90112 alloc=22*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=2GB root=/dev/sda1
[    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] log_buf_len min size: 16384 bytes
[    0.000000] log_buf_len: 32768 bytes
[    0.000000] early log buf free: 15108(92%)
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 2034416K/2097152K available (6270K kernel code, 640K rwdata, 2196K rodata, 512K init, 265K bss, 46352K reserved, 16384K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80086a0000   (  6272 KB)
[    0.000000]     .rodata : 0xffffff80086a0000 - 0xffffff80088d0000   (  2240 KB)
[    0.000000]       .init : 0xffffff80088d0000 - 0xffffff8008950000   (   512 KB)
[    0.000000]       .data : 0xffffff8008950000 - 0xffffff80089f0008   (   641 KB)
[    0.000000]        .bss : 0xffffff80089f0008 - 0xffffff8008a3277c   (   266 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf02000000   (    32 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GICv2m: range[mem 0x2c1c0000-0x2c1cffff], SPI[256:319]
[    0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ4, assuming level low
[    0.000000] arm_arch_timer: WARNING: Please fix your firmware
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 25.16MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
[    0.000001] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 4398046511084ns
[    0.000063] Console: colour dummy device 80x25
[    0.000067] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS (lpj=19988480)
[    0.000071] pid_max: default: 32768 minimum: 301
[    0.000093] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000097] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000287] ASID allocator initialised with 256 entries
[    0.068039] Detected PIPT I-cache on CPU1
[    0.068047] CPU1: Booted secondary processor [410fc0f0]
[    0.096058] Detected PIPT I-cache on CPU2
[    0.096067] CPU2: Booted secondary processor [410fc0f0]
[    0.124078] Detected PIPT I-cache on CPU3
[    0.124086] CPU3: Booted secondary processor [410fc0f0]
[    0.124109] Brought up 4 CPUs
[    0.124120] SMP: Total of 4 processors activated.
[    0.124124] CPU features: detected feature: 32-bit EL0 Support
[    0.124140] CPU: All CPU(s) started at EL1
[    0.124368] devtmpfs: initialized
[    0.125226] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.125232] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.125428] atomic64_test: passed
[    0.126321] NET: Registered protocol family 16
[    0.156529] vdso: 2 pages (1 code @ ffffff80086a7000, 1 data @ ffffff8008954000)
[    0.156534] hw-breakpoint: found 2 breakpoint and 2 watchpoint registers.
[    0.157005] DMA: preallocated 256 KiB pool for atomic allocations
[    0.157009] Serial: AMBA PL011 UART driver
[    0.157108] irq: type mismatch, failed to map hwirq-27 for /interrupt-controller@2c001000!
[    0.157683] 1c090000.uart: ttyAMA0 at MMIO 0x1c090000 (irq = 8, base_baud = 0) is a PL011 rev3
[    0.157988] console [ttyAMA0] enabled
[    0.176194] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.176446] vgaarb: loaded
[    0.176565] SCSI subsystem initialized
[    0.176639] libata version 3.00 loaded.
[    0.176795] usbcore: registered new interface driver usbfs
[    0.176834] usbcore: registered new interface driver hub
[    0.176872] usbcore: registered new device driver usb
[    0.176941] pps_core: LinuxPPS API ver. 1 registered
[    0.176947] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.176972] PTP clock support registered
[    0.177394] clocksource: Switched to clocksource arch_sys_counter
[    0.194898] NET: Registered protocol family 2
[    0.195100] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.195191] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.195288] TCP: Hash tables configured (established 16384 bind 16384)
[    0.195305] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.195327] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.195394] NET: Registered protocol family 1
[    0.195481] RPC: Registered named UNIX socket transport module.
[    0.195485] RPC: Registered udp transport module.
[    0.195489] RPC: Registered tcp transport module.
[    0.195493] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.195498] PCI: CLS 0 bytes, default 128
[    0.195691] kvm [1]: HYP mode not available
[    0.196323] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    0.201725] fuse init (API version 7.26)
[    0.202151] io scheduler noop registered
[    0.202230] io scheduler cfq registered (default)
[    0.202625] OF: PCI: host bridge /pci ranges:
[    0.202632] OF: PCI:   No bus range found for /pci, using [bus 00-ff]
[    0.202643] OF: PCI:    IO 0x2f000000..0x2f00ffff -> 0x00000000
[    0.202652] OF: PCI:   MEM 0x40000000..0x7fffffff -> 0x40000000
[    0.202672] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-ff]
[    0.202748] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[    0.202756] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.202764] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.202772] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[    0.202779] pci_bus 0000:00: scanning bus
[    0.202791] pci 0000:00:01.0: [8086:7111] type 00 class 0x010185
[    0.202801] pci 0000:00:01.0: reg 0x10: [io  0x0000-0x0007]
[    0.202811] pci 0000:00:01.0: reg 0x14: [io  0x0000-0x0003]
[    0.202820] pci 0000:00:01.0: reg 0x18: [io  0x0000-0x0007]
[    0.202829] pci 0000:00:01.0: reg 0x1c: [io  0x0000-0x0003]
[    0.202838] pci 0000:00:01.0: reg 0x20: [io  0x0000-0x000f]
[    0.202849] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
[    0.202943] pci 0000:00:02.0: [1d1d:1f1f] type 00 class 0x010802
[    0.202959] pci 0000:00:02.0: reg 0x10: [mem 0x00000000-0x00001fff]
[    0.202973] pci 0000:00:02.0: reg 0x20: [mem 0x00000000-0x00001fff]
[    0.202983] pci 0000:00:02.0: reg 0x24: [mem 0x00000000-0x00000fff]
[    0.202992] pci 0000:00:02.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
[    0.203101] pci_bus 0000:00: fixups for bus
[    0.203108] pci_bus 0000:00: bus scan returning with max=00
[    0.203138] pci 0000:00:01.0: fixup irq: got 11
[    0.203145] pci 0000:00:01.0: assigning IRQ 11
[    0.203177] pci 0000:00:02.0: fixup irq: got 12
[    0.203184] pci 0000:00:02.0: assigning IRQ 12
[    0.203194] pci 0000:00:02.0: BAR 0: assigned [mem 0x40000000-0x40001fff]
[    0.203203] pci 0000:00:02.0: BAR 4: assigned [mem 0x40002000-0x40003fff]
[    0.203213] pci 0000:00:02.0: BAR 5: assigned [mem 0x40004000-0x40004fff]
[    0.203222] pci 0000:00:01.0: BAR 6: assigned [mem 0x40005000-0x400057ff pref]
[    0.203231] pci 0000:00:02.0: BAR 6: assigned [mem 0x40005800-0x40005fff pref]
[    0.203240] pci 0000:00:01.0: BAR 4: assigned [io  0x1000-0x100f]
[    0.203249] pci 0000:00:01.0: BAR 0: assigned [io  0x1010-0x1017]
[    0.203258] pci 0000:00:01.0: BAR 2: assigned [io  0x1018-0x101f]
[    0.203267] pci 0000:00:01.0: BAR 1: assigned [io  0x1020-0x1023]
[    0.203276] pci 0000:00:01.0: BAR 3: assigned [io  0x1024-0x1027]
[    0.205184] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.205946] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_parse_clock_info: Unable to find clocks, assuming enabled
[    0.205956] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled
[    0.205966] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_populate_vreg: Unable to find vcc-supply regulator, assuming enabled
[    0.205976] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_populate_vreg: Unable to find vccq-supply regulator, assuming enabled
[    0.205985] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_populate_vreg: Unable to find vccq2-supply regulator, assuming enabled
[    0.206089] scsi host0: ufshcd
[    0.377400] tc-dwc-g210-pltfm 2e000000.ufs: Controller enable failed
[    0.377408] tc-dwc-g210-pltfm 2e000000.ufs: Host controller enable failed
[    0.377517] tc-dwc-g210-pltfm 2e000000.ufs: Initialization failed
[    0.377525] tc-dwc-g210-pltfm 2e000000.ufs: ufshcd_pltfrm_init() failed -5
[    0.377541] tc-dwc-g210-pltfm: probe of 2e000000.ufs failed with error -5
[    0.377799] nvme nvme0: pci function 0000:00:02.0
[    0.377810] nvme 0000:00:02.0: enabling device (0000 -> 0002)
[    0.377818] nvme 0000:00:02.0: enabling bus mastering
[    0.378460] ata_piix 0000:00:01.0: version 2.13
[    0.378474] ata_piix 0000:00:01.0: enabling device (0000 -> 0001)
[    0.378718] ata_piix 0000:00:01.0: enabling bus mastering
[    0.379355] scsi host0: ata_piix
[    0.379506] scsi host1: ata_piix
[    0.379618] ata1: PATA max UDMA/33 cmd 0x1010 ctl 0x1020 bmdma 0x1000 irq 11
[    0.379625] ata2: PATA max UDMA/33 cmd 0x1018 ctl 0x1024 bmdma 0x1008 irq 11
[    0.379896] libphy: Fixed MDIO Bus: probed
[    0.379902] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[    0.379908] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    0.379938] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    0.379945] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.379975] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    0.379982] igb: Copyright (c) 2007-2014 Intel Corporation.
[    0.380013] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 4.4.0-k
[    0.380020] ixgbe: Copyright (c) 1999-2016 Intel Corporation.
[    0.380070] ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver - version 3.2.2-k
[    0.380077] ixgbevf: Copyright (c) 2009 - 2015 Intel Corporation.
[    0.380122] i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.6.16-k
[    0.380129] i40e: Copyright (c) 2013 - 2014 Intel Corporation.
[    0.380178] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
[    0.380184] ixgb: Copyright (c) 1999-2008 Intel Corporation.
[    0.380215] i40evf: Intel(R) 40-10 Gigabit Virtual Function Network Driver - version 1.6.16-k
[    0.380222] Copyright (c) 2013 - 2015 Intel Corporation.
[    0.380414] usbcore: registered new interface driver usb-storage
[    0.380653] mousedev: PS/2 mouse device common for all mice
[    0.381072] usbcore: registered new interface driver usbhid
[    0.381078] usbhid: USB HID core driver
[    0.381130] NET: Registered protocol family 17
[    0.481513] input: AT Raw Set 2 keyboard as /devices/platform/1c060000.kmi/serio0/input/input0
[    0.537433] ata1.00: ATA-7: M5 IDE Disk, , max UDMA/66
[    0.537440] ata1.00: 2097152 sectors, multi 0: LBA
[    0.537469] ata1.00: configured for UDMA/33
[    0.537557] scsi 0:0:0:0: Direct-Access     ATA      M5 IDE Disk      n/a  PQ: 0 ANSI: 5
[    0.569582] sd 0:0:0:0: [sda] 2097152 512-byte logical blocks: (1.07 GB/1.00 GiB)
[    0.569634] sd 0:0:0:0: [sda] Write Protect is off
[    0.569637] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    0.569643] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.569668] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    0.569950]  sda: sda1
[    0.570257] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.585501] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[    0.586253] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    0.586265] VFS: Mounted root (ext4 filesystem) on device 8:1.
[    0.586614] devtmpfs: mounted
[    0.586692] Freeing unused kernel memory: 512K
[    0.589470] random: fast init done
[    0.735947] EXT4-fs (sda1): re-mounted. Opts: data=ordered
[    0.893539] input: PS/2 Generic Mouse as /devices/platform/1c070000.kmi/serio1/input/input2
[    1.299455] random: crng init done
kukdh1 commented 5 years ago

Hi,

In your kernel log, NVMe driver initialized SimpleSSD.

[    0.377799] nvme nvme0: pci function 0000:00:02.0
[    0.377810] nvme 0000:00:02.0: enabling device (0000 -> 0002)
[    0.377818] nvme 0000:00:02.0: enabling bus mastering

Could you check cat /proc/partitions and ls /sys/block? I think dev node does not created.

kukdh1 commented 5 years ago

If you cannot find nvme0n1 in both /proc/partitions and /sys/block, please show me the gem5 printout (stdout).

sooyun802 commented 5 years ago

/proc/partitions

root@genericarmv8:~# cat /proc/partitions
major minor  #blocks  name

   8        0    1048576 sda
   8        1    1047552 sda1

/sys/block

root@genericarmv8:~# ls /sys/block
sda

gem5 printout (stdout)

gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Oct 29 2018 18:22:30
gem5 started Nov  5 2018 18:29:53
gem5 executing on eslab-desktop, pid 8842
command line: ./build/ARM/gem5.opt --outdir=test --debug-flag=M5Print --debug-file=debug.txt ./configs/example/fs.py --kernel=/home/eslab/m5/binaries/aarch64-vmlinux-4.9.92 --machine-type=VExpress_GEM5_V1 --dtb-file=/home/eslab/m5/binaries/armv8_gem5_v1_4cpu.dtb --num-cpu=4 --cpu-clock=2GHz --caches --l2cache --cpu-type=AtomicSimpleCPU --mem-size=2GB --mem-type=DDR4_2400_8x8 --disk-image=/home/eslab/m5/disks/linaro-aarch64-linux.img --ssd-config=./src/dev/storage/simplessd/config/sample.cfg --ssd-interface=ocssd

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (16384 Mbytes) does not match the address range assigned (2048 Mbytes)
info: kernel located at: /home/eslab/m5/binaries/aarch64-vmlinux-4.9.92
warn: Highest ARM exception-level set to AArch32 but bootloader is for AArch64. Assuming you wanted these to match.
0: PAL: Channel |   Way   |   Die   |  Plane  |  Block  |   Page
0: PAL:       8 |       4 |       2 |       2 |     512 |     512
0: PAL: Multi-plane mode enabled
0: PAL: Page size 16384 -> 32768
0: PAL: Total block count 65536 -> 0
0: PAL::PALOLD: NAND timing:
0: PAL::PALOLD: Operation |     LSB    |     CSB    |     MSB    |    DMA 0   |    DMA
0: PAL::PALOLD:    READ   |   40000000 |          0 |   65000000 |      16689 |   39062500
0: PAL::PALOLD:    WRITE  |  500000000 |          0 | 1300000000 |   39079188 |       2384
0: PAL::PALOLD:    ERASE  |                           3500000000 |      11920 |       2384
0: HIL::NVMe: OpenChannel SSD v1.2
0: HIL::NVMe: OpenChannel SSD Structure: (Blk size is 4096)
0: HIL::NVMe:    Group    |  PU (LUN)  |   Chunk    | Chunk Size | Write Size
0: HIL::NVMe:           8 |          8 |        512 |   4096 Blk |      8 Blk
0: HIL::NVMe:   In total: |         64 |      32768 | 134217728 Blk / 549755813888 Bytes
0: HIL::NVMe: nvm notation (old): [8/1/512/512/64/8]
0: HIL::NVMe: nvm notation (new): [8/8/512/64/8]
system.vncserver: Listening for connections on port 5900
system.terminal: Listening for connections on port 3456
0: system.remote_gdb: listening for remote gdb on port 7000
0: system.remote_gdb: listening for remote gdb on port 7001
0: system.remote_gdb: listening for remote gdb on port 7002
0: system.remote_gdb: listening for remote gdb on port 7003
info: Using bootloader at address 0x10
info: Using kernel entry physical address at 0x80080000
info: Loading DTB file: /home/eslab/m5/binaries/armv8_gem5_v1_4cpu.dtb at address 0x88000000
**** REAL SIMULATION ****
warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
info: Entering event queue @ 0.  Starting simulation...
warn: SCReg: Access to unknown device dcc0:site0:pos0:fn7:dev0
warn: Tried to read RealView I/O at offset 0x60 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to read RealView I/O at offset 0x8 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
233735979000: HIL::NVMe: INTR    | MSI disabled | 1 vectors
233737907000: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
236803001000: warn: Undefined UFSHCI register write size
236803003000: warn: Undefined UFSHCI register write size
236939288500: warn: Undefined UFSHCI register write size
408551610000: HIL::NVMe: BAR0    | READ  | Controller Status
408551610000: HIL::NVMe: DMAPORT | READ  | DATA 00000000
408552578000: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
408572491000: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
408578003000: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
408578059500: HIL::NVMe: BAR0    | READ  | Controller Capabilities
408578059500: HIL::NVMe: DMAPORT | READ  | DATA 28010FFF
408578061000: HIL::NVMe: BAR0    | READ  | Controller Capabilities
408578061000: HIL::NVMe: DMAPORT | READ  | DATA 00200020
408578072500: HIL::NVMe: BAR0    | READ  | Version
408578072500: HIL::NVMe: DMAPORT | READ  | DATA 00010201
408578077500: HIL::NVMe: BAR0    | READ  | Controller Memory Buffer Size
408578077500: HIL::NVMe: DMAPORT | READ  | DATA 00000000
408584440500: warn: nvme_interface: Invalid PCI config read offset: 0xa0
408584440500: warn: nvme_interface: Invalid PCI config read offset: 0xa0
408586481000: HIL::NVMe: BAR0    | READ  | Controller Capabilities
408586481000: HIL::NVMe: DMAPORT | READ  | DATA 28010FFF
408586482500: HIL::NVMe: BAR0    | READ  | Controller Capabilities
408586482500: HIL::NVMe: DMAPORT | READ  | DATA 00200020
408586485500: HIL::NVMe: BAR0    | READ  | Version
408586485500: HIL::NVMe: DMAPORT | READ  | DATA 00010201
408586501500: HIL::NVMe: BAR0    | WRITE | Controller Configuration
408586501500: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
408586522000: HIL::NVMe: BAR0    | READ  | Controller Status
408586522000: HIL::NVMe: DMAPORT | READ  | DATA 00000000
408643252000: HIL::NVMe: BAR0    | WRITE | Admin Queue Attributes
408643252000: HIL::NVMe: DMAPORT | WRITE | DATA 00FF00FF
408643254000: HIL::NVMe: BAR0    | WRITE | Admin Submission Queue Base Address | L
408643254000: HIL::NVMe: DMAPORT | WRITE | DATA FF044000
408643256000: HIL::NVMe: BAR0    | WRITE | Admin Submission Queue Base Address | H
408643256000: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
408643258500: HIL::NVMe: BAR0    | WRITE | Admin Completion Queue Base Address | L
408643258500: HIL::NVMe: DMAPORT | WRITE | DATA FF040000
408643260500: HIL::NVMe: BAR0    | WRITE | Admin Completion Queue Base Address | H
408643260500: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
408643260500: HIL::NVMe: CQ 0    | CREATE | Entry size 256
408643260500: HIL::NVMe: SQ 0    | CREATE | Entry size 256
408643275500: HIL::NVMe: BAR0    | WRITE | Controller Configuration
408643275500: HIL::NVMe: DMAPORT | WRITE | DATA 00460001
408643295000: HIL::NVMe: BAR0    | READ  | Controller Status
408643295000: HIL::NVMe: DMAPORT | READ  | DATA 00000001
408715461000: HIL::NVMe: BAR0    | READ  | Version
408715461000: HIL::NVMe: DMAPORT | READ  | DATA 00010201
408715468000: HIL::NVMe: BAR0    | READ  | Controller Capabilities
408715468000: HIL::NVMe: DMAPORT | READ  | DATA 0020002028010FFF
408718175500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 0 | tail 0 -> 1
408723645953: HIL::NVMe: ADMIN   | Identify | CNS 1 | CNTID 0 | NSID 0
408733109703: HIL::NVMe: INTR    | MSI-X sent | vector 0
408734703000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 0 -> 1 | tail 1
408737705000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 1 | tail 1 -> 2
408742758906: HIL::NVMe: ADMIN   | Set Features | Feature 7 | NSID 0
408747968906: HIL::NVMe: INTR    | MSI-X sent | vector 0
408749315000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 1 -> 2 | tail 2
408753499500: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
408782548500: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
408854467000: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
408867615000: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
409050310500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 2 | tail 2 -> 3
409055176859: HIL::NVMe: ADMIN   | Create I/O Completion Queue
409055176859: HIL::NVMe: CQ 1    | CREATE | Entry size 1024 | IV 0000 | IEN true | PC true
409061179359: HIL::NVMe: INTR    | MSI-X sent | vector 0
409062756000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 2 -> 3 | tail 3
409065258000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 3 | tail 3 -> 4
409070828562: HIL::NVMe: ADMIN   | Create I/O Submission Queue
409070828562: HIL::NVMe: SQ 1    | CREATE | Entry size 1024 | Priority 2 | PC true
409076831062: HIL::NVMe: INTR    | MSI-X sent | vector 0
409078172000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 3 -> 4 | tail 4
409084446500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 4 | tail 4 -> 5
409089587765: HIL::NVMe: ADMIN   | Create I/O Completion Queue
409089587765: HIL::NVMe: CQ 2    | CREATE | Entry size 1024 | IV 0001 | IEN true | PC true
409095590265: HIL::NVMe: INTR    | MSI-X sent | vector 0
409097009000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 4 -> 5 | tail 5
409099600500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 5 | tail 5 -> 6
409105239468: HIL::NVMe: ADMIN   | Create I/O Submission Queue
409105239468: HIL::NVMe: SQ 2    | CREATE | Entry size 1024 | Priority 2 | PC true
409111241968: HIL::NVMe: INTR    | MSI-X sent | vector 0
409113255500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 5 -> 6 | tail 6
409133645500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 6 | tail 6 -> 7
409137982421: HIL::NVMe: ADMIN   | Create I/O Completion Queue
409137982421: HIL::NVMe: CQ 3    | CREATE | Entry size 1024 | IV 0002 | IEN true | PC true
409143984921: HIL::NVMe: INTR    | MSI-X sent | vector 0
409145325500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 6 -> 7 | tail 7
409147892000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 7 | tail 7 -> 8
409153634124: HIL::NVMe: ADMIN   | Create I/O Submission Queue
409153634124: HIL::NVMe: SQ 3    | CREATE | Entry size 1024 | Priority 2 | PC true
409159636624: HIL::NVMe: INTR    | MSI-X sent | vector 0
409161057000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 7 -> 8 | tail 8
409178839500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 8 | tail 8 -> 9
409183269577: HIL::NVMe: ADMIN   | Create I/O Completion Queue
409183269577: HIL::NVMe: CQ 4    | CREATE | Entry size 1024 | IV 0003 | IEN true | PC true
409189272077: HIL::NVMe: INTR    | MSI-X sent | vector 0
409193964500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 8 -> 9 | tail 9
409196531000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 9 | tail 9 -> 10
409202028780: HIL::NVMe: ADMIN   | Create I/O Submission Queue
409202028780: HIL::NVMe: SQ 4    | CREATE | Entry size 1024 | Priority 2 | PC true
409208031280: HIL::NVMe: INTR    | MSI-X sent | vector 0
409209382500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 9 -> 10 | tail 10
409415680000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 10 | tail 10 -> 11
409418009000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 11 | tail 11 -> 12
409427579233: HIL::NVMe: INTR    | MSI-X sent | vector 0
409428011500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 10 -> 11 | tail 11
409428946733: HIL::NVMe: ADMIN   | Identify | CNS 1 | CNTID 0 | NSID 0
409438410483: HIL::NVMe: INTR    | MSI-X sent | vector 0
409439884500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 11 -> 12 | tail 12
1852106828000: HIL::NVMe: BAR0    | READ  | Controller Status
1852106828000: HIL::NVMe: DMAPORT | READ  | DATA 00000001
2876095730500: HIL::NVMe: BAR0    | READ  | Controller Status
2876095730500: HIL::NVMe: DMAPORT | READ  | DATA 00000001
3868084973500: HIL::NVMe: BAR0    | READ  | Controller Status
3868084973500: HIL::NVMe: DMAPORT | READ  | DATA 00000001
4860074214000: HIL::NVMe: BAR0    | READ  | Controller Status
4860074214000: HIL::NVMe: DMAPORT | READ  | DATA 00000001
5852063489000: HIL::NVMe: BAR0    | READ  | Controller Status
5852063489000: HIL::NVMe: DMAPORT | READ  | DATA 00000001
6876052516000: HIL::NVMe: BAR0    | READ  | Controller Status
6876052516000: HIL::NVMe: DMAPORT | READ  | DATA 00000001
kukdh1 commented 5 years ago

If you want to use Open-Channel SSD, please build Linux Kernel >=4.12 with proper kernel configurations.

somnode commented 5 years ago

Hi,

I have used kernel version 4.14 and still can not get a ocssd device. What's the problem?

./nvme list

root@genericarmv8:~# ./nvme list
Node             SN                   Model                                    Namespace Usage                      Format           FW Rev
———————— —————————— ———————————————————— ———— ————————————— ———————— ————

uname -a

root@genericarmv8:~# uname -a
Linux genericarmv8 4.14.0+ #1 SMP PREEMPT Tue Nov 6 01:15:39 KST 2018 aarch64 GNU/Linux

/sys/block

root@genericarmv8:~# ls /sys/block
sda

gem5 printout (stdout)

gem5 compiled Oct 29 2018 18:22:30
gem5 started Nov  6 2018 01:19:22
gem5 executing on eslab-desktop, pid 28079
command line: ./build/ARM/gem5.opt --outdir=test --debug-flag=M5Print --debug-file=debug.txt ./configs/example/fs.py --kernel=/home/eslab/linux/vmlinux --machine-type=VExpress_GEM5_V1 --dtb-file=/home/esl
ab/m5/binaries/armv8_gem5_v1_4cpu.dtb --num-cpu=4 --cpu-clock=2GHz --caches --l2cache --cpu-type=AtomicSimpleCPU --mem-size=2GB --mem-type=DDR4_2400_8x8 --disk-image=/home/eslab/m5/disks/linaro-aarch64-li
nux.img --ssd-config=./src/dev/storage/simplessd/config/sample.cfg --ssd-interface=ocssd

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (16384 Mbytes) does not match the address range assigned (2048 Mbytes)
info: kernel located at: /home/eslab/linux/vmlinux
warn: Highest ARM exception-level set to AArch32 but bootloader is for AArch64. Assuming you wanted these to match.
0: PAL: Channel |   Way   |   Die   |  Plane  |  Block  |   Page
0: PAL:       8 |       4 |       2 |       2 |     512 |     512
0: PAL: Multi-plane mode enabled
0: PAL: Page size 16384 -> 32768
0: PAL: Total block count 65536 -> 0
0: PAL::PALOLD: NAND timing:
0: PAL::PALOLD: Operation |     LSB    |     CSB    |     MSB    |    DMA 0   |    DMA
0: PAL::PALOLD:    READ   |   40000000 |          0 |   65000000 |      16689 |   39062500
0: PAL::PALOLD:    WRITE  |  500000000 |          0 | 1300000000 |   39079188 |       2384
0: PAL::PALOLD:    ERASE  |                           3500000000 |      11920 |       2384
0: HIL::NVMe: OpenChannel SSD v1.2
0: HIL::NVMe: OpenChannel SSD Structure: (Blk size is 4096)
0: HIL::NVMe:    Group    |  PU (LUN)  |   Chunk    | Chunk Size | Write Size
0: HIL::NVMe:           8 |          8 |        512 |   4096 Blk |      8 Blk
0: HIL::NVMe:   In total: |         64 |      32768 | 134217728 Blk / 549755813888 Bytes
0: HIL::NVMe: nvm notation (old): [8/1/512/512/64/8]
0: HIL::NVMe: nvm notation (new): [8/8/512/64/8]
system.vncserver: Listening for connections on port 5900
system.terminal: Listening for connections on port 3456
0: system.remote_gdb: listening for remote gdb on port 7000
0: system.remote_gdb: listening for remote gdb on port 7001
0: system.remote_gdb: listening for remote gdb on port 7002
0: system.remote_gdb: listening for remote gdb on port 7003
info: Using bootloader at address 0x10
info: Using kernel entry physical address at 0x80080000
info: Loading DTB file: /home/eslab/m5/binaries/armv8_gem5_v1_4cpu.dtb at address 0x88000000
**** REAL SIMULATION ****
warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
info: Entering event queue @ 0.  Starting simulation...
warn: SCReg: Access to unknown device dcc0:site0:pos0:fn7:dev0
warn: Tried to read RealView I/O at offset 0x60 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to read RealView I/O at offset 0x8 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
194345281000: HIL::NVMe: INTR    | MSI disabled | 1 vectors
194346490500: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
196507386500: HIL::NVMe: BAR0    | READ  | Controller Status
196507386500: HIL::NVMe: DMAPORT | READ  | DATA 00000000
196508003500: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
196526132500: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
196529607500: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
196529659000: HIL::NVMe: BAR0    | READ  | Controller Capabilities
196529659000: HIL::NVMe: DMAPORT | READ  | DATA 28010FFF
196529660500: HIL::NVMe: BAR0    | READ  | Controller Capabilities
196529660500: HIL::NVMe: DMAPORT | READ  | DATA 00200020
196529675500: HIL::NVMe: BAR0    | READ  | Version
196529675500: HIL::NVMe: DMAPORT | READ  | DATA 00010201
196529680000: HIL::NVMe: BAR0    | READ  | Controller Memory Buffer Size
196529680000: HIL::NVMe: DMAPORT | READ  | DATA 00000000
196533748500: warn: nvme_interface: Invalid PCI config read offset: 0xa0
196533748500: warn: nvme_interface: Invalid PCI config read offset: 0xa0
196535068500: HIL::NVMe: BAR0    | READ  | Version
196535068500: HIL::NVMe: DMAPORT | READ  | DATA 00010201
196535085000: HIL::NVMe: BAR0    | WRITE | Controller Configuration
196535085000: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
196535106500: HIL::NVMe: BAR0    | READ  | Controller Status
196535106500: HIL::NVMe: DMAPORT | READ  | DATA 00000000
196662699000: HIL::NVMe: BAR0    | WRITE | Admin Queue Attributes
196662699000: HIL::NVMe: DMAPORT | WRITE | DATA 001F001F
196662701000: HIL::NVMe: BAR0    | WRITE | Admin Submission Queue Base Address | L
196662701000: HIL::NVMe: DMAPORT | WRITE | DATA FF043000
196662703000: HIL::NVMe: BAR0    | WRITE | Admin Submission Queue Base Address | H
196662703000: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
196662705500: HIL::NVMe: BAR0    | WRITE | Admin Completion Queue Base Address | L
196662705500: HIL::NVMe: DMAPORT | WRITE | DATA FF041000
196662707500: HIL::NVMe: BAR0    | WRITE | Admin Completion Queue Base Address | H
196662707500: HIL::NVMe: DMAPORT | WRITE | DATA 00000000
196662707500: HIL::NVMe: CQ 0    | CREATE | Entry size 32
196662707500: HIL::NVMe: SQ 0    | CREATE | Entry size 32
196662722000: HIL::NVMe: BAR0    | WRITE | Controller Configuration
196662722000: HIL::NVMe: DMAPORT | WRITE | DATA 00460001
196662742500: HIL::NVMe: BAR0    | READ  | Controller Status
196662742500: HIL::NVMe: DMAPORT | READ  | DATA 00000001
196699249000: HIL::NVMe: BAR0    | READ  | Version
196699249000: HIL::NVMe: DMAPORT | READ  | DATA 00010201
196699256000: HIL::NVMe: BAR0    | READ  | Controller Capabilities
196699256000: HIL::NVMe: DMAPORT | READ  | DATA 0020002028010FFF
196701842500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 0 | tail 0 -> 1
196707356203: HIL::NVMe: ADMIN   | Identify | CNS 1 | CNTID 0 | NSID 0
196716819953: HIL::NVMe: INTR    | MSI-X sent | vector 0
196717568500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 0 -> 1 | tail 1
196722068000: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 1 | tail 1 -> 2
196726469156: HIL::NVMe: ADMIN   | Set Features | Feature 7 | NSID 0
196731679156: HIL::NVMe: INTR    | MSI-X sent | vector 0
196732428000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 1 -> 2 | tail 2
196737478000: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
196756967000: HIL::NVMe: INTR    | MSI-X disabled | 512 vectors
196807821500: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
196816848000: HIL::NVMe: INTR    | MSI-X enabled | 512 vectors
196959788500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 2 | tail 2 -> 3
196964307109: HIL::NVMe: ADMIN   | Create I/O Completion Queue
196964307109: HIL::NVMe: CQ 1    | CREATE | Entry size 1024 | IV 0000 | IEN true | PC true
196970309609: HIL::NVMe: INTR    | MSI-X sent | vector 0
196971067000: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 2 -> 3 | tail 3
196974584500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 3 | tail 3 -> 4
196979958812: HIL::NVMe: ADMIN   | Create I/O Submission Queue
196979958812: HIL::NVMe: SQ 1    | CREATE | Entry size 1024 | Priority 0 | PC true
196985961312: HIL::NVMe: INTR    | MSI-X sent | vector 0
196986718500: HIL::NVMe: CQ 0    | Completion Queue Head Doorbell | Item count in queue 1 -> 0 | head 3 -> 4 | tail 4
196993620500: HIL::NVMe: SQ 0    | Submission Queue Tail Doorbell | Item count in queue 0 -> 1 | head 4 | tail 4 -> 5