openbmc / docs

OpenBMC Documentation
Creative Commons Attribution 4.0 International
267 stars 305 forks source link

NCSI does not work. #49

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello ! I use the Neptune Alfa OpenBMC kit from Portwell. It has an Intel I210 network interface chip. A host is connected to it through PCIe. The host network is working well. BMC has a dedicated interface (MAC0 + RTL8211), it works well. I want to create a BMC interface via NCSI + VLAN, but it does not work: see dmesg output below. Please help me solve this problem.

/openbmc/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig _CONFIG_VLAN_8021Q=y CONFIG_NET_NCSI=y CONFIG_FTGMAC100=y CONFIG_NET_VENDOR_INTEL=y CONFIG_REALTEKPHY=y

mac config from aspeed-bmc-facebook-tiogapas2.dts file: _&mac0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rmii1default>; };

_&mac1 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rmii2default>; use-ncsi; };

dmesg outpu (messages in bold are highlighted by me): [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.3.0-4fde000 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 Mon Nov 11 13:23:06 UTC 2019 [ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache [ 0.000000] OF: fdt: Machine model: Facebook TiogaPass BMC [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 16 MiB at 0x9d800000 [ 0.000000] On node 0 totalpages: 126976 [ 0.000000] Normal zone: 992 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 126976 pages, LIFO batch:31 [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 125984 [ 0.000000] Kernel command line: console=ttyS4,115200n8 root=/dev/ram rw [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 475688K/507904K available (6144K kernel code, 390K rwdata, 1424K rodata, 1024K init, 146K bss, 15832K reserved, 16384K cma-reserved) [ 0.000000] random: get_random_u32 called from cache_alloc_refill+0x3e8/0x8d8 with crng_init=0 [ 0.000000] ftrace: allocating 21063 entries in 42 pages [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] i2c controller registered, irq 16 [ 0.000000] clocksource: FTTMR010-TIMER2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 77222644334 ns [ 0.000017] sched_clock: 32 bits at 24MHz, resolution 40ns, wraps every 86767015915ns [ 0.000091] Switching to timer-based delay loop, resolution 40ns [ 0.001220] Calibrating delay loop (skipped), value calculated using timer frequency.. 49.50 BogoMIPS (lpj=247500) [ 0.001271] pid_max: default: 32768 minimum: 301 [ 0.001985] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.002030] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003739] CPU: Testing write buffer coherency: ok [ 0.005499] Setting up static identity map for 0x80100000 - 0x80100038 [ 0.009216] devtmpfs: initialized [ 0.023298] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.023358] futex hash table entries: 256 (order: -1, 3072 bytes, linear) [ 0.026693] pinctrl core: initialized pinctrl subsystem [ 0.027738] NET: Registered protocol family 16 [ 0.029584] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.031631] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers. [ 0.031663] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.070451] videodev: Linux video capture interface: v2.00 [ 0.073541] clocksource: Switched to clocksource FTTMR010-TIMER2 [ 0.127223] NET: Registered protocol family 2 [ 0.128430] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.128520] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.128604] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.128674] TCP: Hash tables configured (established 4096 bind 4096) [ 0.128899] UDP hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.128959] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.129488] NET: Registered protocol family 1 [ 0.130385] Unpacking initramfs... [ 1.811602] Freeing initrd memory: 1492K [ 1.814453] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 1.814984] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 1.815019] jffs2: version 2.2. (SUMMARY) © 2001-2006 Red Hat, Inc. [ 1.815637] NET: Registered protocol family 38 [ 1.818598] aspeed-kcs-bmc: channel=2 addr=0xca8 idr=0x28 odr=0x34 str=0x40 [ 1.819330] aspeed-kcs-bmc: channel=3 addr=0xca2 idr=0x2c odr=0x38 str=0x44 [ 1.825329] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled [ 1.829242] 1e787000.serial: ttyS5 at MMIO 0x1e787000 (irq = 31, base_baud = 1546875) is a 16550A [ 1.831276] 1e783000.serial: ttyS0 at MMIO 0x1e783000 (irq = 29, base_baud = 1500000) is a 16550A [ 1.832696] 1e784000.serial: ttyS4 at MMIO 0x1e784000 (irq = 30, base_baud = 1500000) is a 16550A [ 2.206545] printk: console [ttyS4] enabled [ 2.212327] 1e78d000.serial: ttyS1 at MMIO 0x1e78d000 (irq = 32, base_baud = 1500000) is a 16550A [ 2.222657] 1e78e000.serial: ttyS2 at MMIO 0x1e78e000 (irq = 33, base_baud = 1500000) is a 16550A [ 2.233420] timeriomem_rng 1e6e2078.hwrng: 32bits from 0x(ptrval) @ 1us [ 2.241581] random: fast init done [ 2.252504] random: crng init done [ 2.265195] loop: module loaded [ 2.310309] aspeed-smc 1e620000.spi: Using 50 MHz SPI frequency [ 2.316469] aspeed-smc 1e620000.spi: mx25l25635e (32768 Kbytes) [ 2.322419] aspeed-smc 1e620000.spi: CE0 window [ 0x20000000 - 0x22000000 ] 32MB [ 2.329922] aspeed-smc 1e620000.spi: CE1 window [ 0x22000000 - 0x2a000000 ] 128MB [ 2.337500] aspeed-smc 1e620000.spi: read control register: 203c0641 [ 2.480979] 5 fixed-partitions partitions found on MTD device 1e620000.spi [ 2.487985] Creating 5 MTD partitions on "1e620000.spi": [ 2.493345] 0x000000000000-0x000000060000 : "u-boot" [ 2.500647] 0x000000060000-0x000000080000 : "u-boot-env" [ 2.508427] 0x000000080000-0x0000004c0000 : "kernel" [ 2.515842] 0x0000004c0000-0x000001c00000 : "rofs" [ 2.522881] 0x000001c00000-0x000002000000 : "rwfs" [ 2.531696] aspeed-smc 1e630000.spi: Using 50 MHz SPI frequency [ 2.537918] aspeed-smc 1e630000.spi: s25fl008k (1024 Kbytes) [ 2.543712] aspeed-smc 1e630000.spi: CE0 window [ 0x30000000 - 0x30100000 ] 1MB [ 2.551042] aspeed-smc 1e630000.spi: CE1 window [ 0x30100000 - 0x38000000 ] 127MB [ 2.558620] aspeed-smc 1e630000.spi: read control register: 203b0241 [ 2.573348] aspeed-smc 1e630000.spi: Calibration area too uniform, using low speed [ 2.585249] libphy: Fixed MDIO Bus: probed [ 2.590271] ftgmac100 1e660000.ethernet: Read MAC address 72:8a:5f:b4:0a:dc from chip [ 2.605952] libphy: ftgmac100_mdio: probed [ 2.610832] RTL8211E Gigabit Ethernet 1e660000.ethernet--1:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=1e660000.ethernet--1:00, irq=POLL) [ 2.626621] ftgmac100 1e660000.ethernet eth0: irq 19, mapped at 93f530f2 [ 2.633817] ftgmac100 1e680000.ethernet: Read MAC address 72:8a:5f:b4:0a:dd from chip [ 2.641684] ftgmac100 1e680000.ethernet: Using NCSI interface [ 2.648728] ftgmac100 1e680000.ethernet eth1: irq 20, mapped at 9fed6c95 [ 2.656453] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers [ 2.666551] i2c /dev entries driver [ 2.671429] aspeed-i2c-bus 1e78a0c0.i2c-bus: i2c bus 2 registered, irq 34 [ 2.679569] aspeed-i2c-bus 1e78a100.i2c-bus: i2c bus 3 registered, irq 35 [ 2.688520] pca953x 6-0027: failed writing register [ 2.693900] aspeed-i2c-bus 1e78a1c0.i2c-bus: i2c bus 6 registered, irq 36 [ 3.454060] tpm_i2c_infineon 7-0020: could not request locality [ 3.460889] aspeed-i2c-bus 1e78a300.i2c-bus: i2c bus 7 registered, irq 37 [ 7.605535] aspeed-i2c-bus 1e78a380.i2c-bus: i2c bus 9 registered, irq 38 [ 7.613186] Driver for 1-wire Dallas network protocol. [ 7.621532] tmp421 7-004e: Could not read configuration register (-6) [ 7.628664] tmp421 7-004f: Could not read configuration register (-6) [ 7.645359] NET: Registered protocol family 10 [ 7.652465] Segment Routing with IPv6 [ 7.656936] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 7.664341] NET: Registered protocol family 17 [ 7.668852] 8021q: 802.1Q VLAN Support v1.8 [ 7.682534] printk: console [netcon0] enabled [ 7.687016] netconsole: network logging started [ 7.691857] hctosys: unable to open rtc device (rtc0) [ 7.702762] Freeing unused kernel memory: 1024K [ 7.709409] Checked W+X mappings: passed, no W+X pages found [ 7.715203] Run /init as init process [ 8.666987] jffs2: notice: (78) jffs2_build_xattr_subsystem: complete building xattr subsystem, 28 of xdatum (24 unchecked, 4 orphan) and 55 of xref (3 dead, 1 orphan) found. [ 8.723302] overlayfs: upper fs does not support tmpfile. [ 11.026466] systemd[1]: systemd 242-108-gf875dce+ running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS -KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) [ 11.051268] systemd[1]: Detected architecture arm. [ 11.160109] systemd[1]: Set hostname to . [ 11.939717] systemd[1]: File /lib/systemd/system/systemd-journald.service:14 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 11.957130] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 12.350703] systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly. [ 13.351756] systemd[1]: /lib/systemd/system/phosphor-pid-control.service:6: Neither a valid executable name nor an absolute path: {bindir}/swampd [ 13.730302] systemd[1]: /lib/systemd/system/phosphor-ipmi-net@.socket:3: Invalid interface name, ignoring: sys-subsystem-net-devices-%i.device [ 13.843385] systemd[1]: phosphor-pid-control.service: Cannot add dependency job, ignoring: Unit phosphor-pid-control.service has a bad unit file setting. [ 13.888443] systemd[1]: Reached target Slices. [ 16.084123] systemd[1]: Started Journal Service. [ 16.568021] systemd-journald[103]: Received request to flush runtime journal from PID 1 [ 21.576567] 8021q: adding VLAN 0 to HW filter on device eth1 [ 25.844268] ftgmac100 1e660000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 25.852610] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 38.256875] ftgmac100 1e680000.ethernet eth1: NCSI: No channel found to configure! [ 39.283785] ftgmac100 1e680000.ethernet eth1: Wrong NCSI state 0x100 in workqueue [ 83.135194] ------------[ cut here ]------------ [ 83.139889] WARNING: CPU: 0 PID: 149 at net/sched/sch_generic.c:447 dev_watchdog+0x268/0x288 [ 83.148456] NETDEV WATCHDOG: eth1 (ftgmac100): transmit queue 0 timed out [ 83.155351] CPU: 0 PID: 149 Comm: rngd Not tainted 5.3.0-4fde000 #1 [ 83.161629] Hardware name: Generic DT based system [ 83.166500] Backtrace: [ 83.169021] [<80107cf0>] (dump_backtrace) from [<80107f24>] (show_stack+0x20/0x24) [ 83.176701] r7:80a12d00 r6:00000000 r5:9c8f7e04 r4:00000009 [ 83.182400] [<80107f04>] (show_stack) from [<806b1410>] (dump_stack+0x20/0x28) [ 83.189744] [<806b13f0>] (dump_stack) from [<80116880>] (warn.part.0+0xb4/0xdc) [ 83.197342] [<801167cc>] (warn.part.0) from [<80116918>] (warn_slowpath_fmt+0x70/0x98) [ 83.205526] r6:805b6518 r5:000001bf r4:80842460 [ 83.210188] [<801168a8>] (warn_slowpath_fmt) from [<805b6518>] (dev_watchdog+0x268/0x288) [ 83.218459] r3:9d63a000 r2:80842424 [ 83.222051] r6:00000000 r5:9d61db00 r4:9d63a22c [ 83.226794] [<805b62b0>] (dev_watchdog) from [<8015aca4>] (call_timer_fn+0x40/0x124) [ 83.234557] r9:00000122 r8:ffffab48 r7:00000100 r6:805b62b0 r5:9d63a22c r4:9d63a22c [ 83.242409] [<8015ac64>] (call_timer_fn) from [<8015ae28>] (expire_timers+0xa0/0xdc) [ 83.250259] r8:ffffab48 r7:80a13a20 r6:9c8f7ecc r5:9c8f7ecc r4:9d63a22c [ 83.257079] [<8015ad88>] (expire_timers) from [<8015af04>] (run_timer_softirq+0xa0/0x198) [ 83.265359] r10:00000002 r9:00000100 r8:80a12d00 r7:80a13a20 r6:80a13a20 r5:9c8f7ecc [ 83.273198] r4:9c8f7ecc r3:ffffab49 [ 83.276887] [<8015ae64>] (run_timer_softirq) from [<801022cc>] (do_softirq+0xdc/0x314) [ 83.284996] r8:00000000 r7:9c8f6000 r6:80a62174 r5:00000002 r4:00000001 [ 83.291817] [<801021f0>] (__do_softirq) from [<8011a8bc>] (irq_exit+0xac/0xe4) [ 83.299153] r10:00000001 r9:00000f50 r8:00000000 r7:9d414600 r6:00000001 r5:80a4a490 [ 83.307073] r4:00000000 [ 83.309667] [<8011a810>] (irq_exit) from [<8014d12c>] (handle_domain_irq+0x60/0xb4) [ 83.317623] [<8014d0cc>] (handle_domain_irq) from [<801021e4>] (avic_handle_irq+0x68/0x70) [ 83.326168] r9:00000f50 r8:00c5387d r7:00c5387d r6:ffffffff r5:9c8f7fb0 r4:9d402e40 [ 83.333935] [<8010217c>] (avic_handle_irq) from [<80101e34>] (irq_usr+0x54/0x80) [ 83.341600] Exception stack(0x9c8f7fb0 to 0x9c8f7ff8) [ 83.346757] 7fa0: 777fa06b 00000002 00000001 00000000 [ 83.354949] 7fc0: 00000000 00000000 00000001 00000000 58000000 00000f50 00000001 76f5bd24 [ 83.363214] 7fe0: 00000001 76f5bc60 4be80bf0 4be80e58 80000010 ffffffff [ 83.369927] r5:80000010 r4:4be80e58 [ 83.373516] ---[ end trace 0bd7cec28593fee8 ]---

geissonator commented 4 years ago

I don't think the doc repo is really the right place for a bug. Also, my understanding is the Neptune Alfa OpenBMC is designed for Facebooks OpenBMC (https://github.com/facebook/openbmc)? May be better to start on our mailing list if you're looking for help on getting this OpenBMC stack working on this system. https://github.com/openbmc/openbmc#contact

ghost commented 4 years ago

I see. Thank you!