* SOL,obmc-console-client can't connect to the host OS [not found] <mailman.13.1542934803.27188.openbmc@lists.ozlabs.org> @ 2018-11-23 4:48 ` =?gb18030?B?eGl1emhp?= 2018-11-23 5:13 ` Jeremy Kerr 0 siblings, 1 reply; 6+ messages in thread From: =?gb18030?B?eGl1emhp?= @ 2018-11-23 4:48 UTC (permalink / raw) To: =?gb18030?B?b3BlbmJtYw==?=, =?gb18030?B?ams=?= [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1360 bytes --] Hi All, I am debugging the SOL, the obmc-console-client didn't work. My BMC and host OS runtime environments are: 1, BMC: 1) obmc-console-server is good # systemctl status obmc-console\@ttyVUART0 [[0;1;32m¡ñ[[0m obmc-console@ttyVUART0.service - Phosphor Console Muxer listening on device /dev/ttyVUART0 Loaded: loaded (/lib/systemd/system/obmc-console@.service; indirect; vendor preset: enabled) Active: [[0;1;32mactive (running)[[0m since Fri 1998-01-02 19:42:56 UTC; 38min ago Main PID: 1616 (obmc-console-se) CGroup: /system.slice/system-obmc\x2dconsole.slice/obmc-console@ttyVUART0.service ©¸©¤1616 obmc-console-server --config /etc/obmc-console.conf ttyVUART0 Jan 02 19:42:56 haiguang1 systemd[1]: Started Phosphor Console Muxer listening on device /dev/ttyVUART0. 2) /etc/ obmc-console.conf lpc-address = 0x3f8 sirq = 4 local-tty = ttyS0 local-tty-baud = 115200 2, Host OS: redhat 7 # cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16450 port:000003F8 irq:4 tx:0 rx:0 1: uart:unknown port:000002F8 irq:3 2: uart:unknown port:000003E8 irq:4 3: uart:unknown port:000002E8 irq:3 It seemed to lock and output nothing when I run "obmc-console-client" on BMC. And there is nothing in the log /var/log/obmc-console.log Who can tell me how to debug it? Thanks, Xiuzhi [-- Attachment #2: Type: text/html, Size: 1802 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SOL,obmc-console-client can't connect to the host OS 2018-11-23 4:48 ` SOL,obmc-console-client can't connect to the host OS =?gb18030?B?eGl1emhp?= @ 2018-11-23 5:13 ` Jeremy Kerr 2018-11-23 9:39 ` =?gb18030?B?eGl1emhp?= 0 siblings, 1 reply; 6+ messages in thread From: Jeremy Kerr @ 2018-11-23 5:13 UTC (permalink / raw) To: xiuzhi, openbmc Hi Xiuzhi, > I am debugging the SOL, the obmc-console-client didn't work. > My BMC and host OS runtime environments are: > 1, BMC: > 1) obmc-console-server is good > # systemctl status obmc-console\@ttyVUART0 > [[0;1;32m●[[0m obmc-console@ttyVUART0.service - Phosphor Console Muxer > listening on device /dev/ttyVUART0 > Loaded: loaded (/lib/systemd/system/obmc-console@.service; > indirect; vendor preset: enabled) > Active: [[0;1;32mactive (running)[[0m since Fri 1998-01-02 19:42:56 > UTC; 38min ago > Main PID: 1616 (obmc-console-se) > CGroup: /system.slice/system-obmc\ > x2dconsole.slice/obmc-console@ttyVUART0.service > └─1616 obmc-console-server --config /etc/obmc-console.conf > ttyVUART0 > > Jan 02 19:42:56 haiguang1 systemd[1]: Started Phosphor Console Muxer > listening on device /dev/ttyVUART0. > 2) /etc/ obmc-console.conf > lpc-address = 0x3f8 > sirq = 4 > local-tty = ttyS0 > local-tty-baud = 115200 > > 2, Host OS: redhat 7 What hardware platform is this? > It seemed to lock and output nothing when I run "obmc-console-client" > on BMC. And there is nothing in the log /var/log/obmc-console.log This doesn't necessarily indicate a problem with the BMC though - are you sure that the host is connecting something (like a getty) to its serial device? Is there something on the host side of the serial connection? (what are you expecting to see there?) If the host is definitely using up that serial console, this could either be an issue with the obmc-console infrastructure, or the UART devices. You can split up the debugging to eliminate parts of the stack there. Try: - Stop obmc-console-server - from the BMC, read directly from the VUART (say, `cat /dev/ttyVUART0`) - from the host, write to the UART (`echo hello > /dev/ttyS0`, changing to whatever tty is connected to the BMC, if it isn't ttyS0.). If that works, then you know that the UART channel is OK, and it's either obmc-console, or that nothing on the host is using that serial port. Regards, Jeremy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re:Re: SOL,obmc-console-client can't connect to the host OS 2018-11-23 5:13 ` Jeremy Kerr @ 2018-11-23 9:39 ` =?gb18030?B?eGl1emhp?= 2018-11-25 10:42 ` Jeremy Kerr 0 siblings, 1 reply; 6+ messages in thread From: =?gb18030?B?eGl1emhp?= @ 2018-11-23 9:39 UTC (permalink / raw) To: =?gb18030?B?ams=?=, =?gb18030?B?b3BlbmJtYw==?= [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="gb18030", Size: 6484 bytes --] Hi Jeremy, ------------------ Original ------------------From: "jk";<jk@ozlabs.org>; Send time: Friday, Nov 23, 2018 1:13 PM To: "xiuzhi"<1450335857@qq.com>; "openbmc"<openbmc@lists.ozlabs.org>; Subject: Re: SOL,obmc-console-client can't connect to the host OS >Hi Xiuzhi, >> I am debugging the SOL, the obmc-console-client didn't work. >> My BMC and host OS runtime environments are: >> 1, BMC: >> 1) obmc-console-server is good >> # systemctl status obmc-console\@ttyVUART0 >> [[0;1;32m¡ñ[[0m obmc-console@ttyVUART0.service - Phosphor Console Muxer >> listening on device /dev/ttyVUART0 >> Loaded: loaded (/lib/systemd/system/obmc-console@.service; >> indirect; vendor preset: enabled) >> Active: [[0;1;32mactive (running)[[0m since Fri 1998-01-02 19:42:56 >> UTC; 38min ago >> Main PID: 1616 (obmc-console-se) >> CGroup: /system.slice/system-obmc\ >> x2dconsole.slice/obmc-console@ttyVUART0.service >> ©¸©¤1616 obmc-console-server --config /etc/obmc-console.conf >> ttyVUART0 >> >> Jan 02 19:42:56 haiguang1 systemd[1]: Started Phosphor Console Muxer >> listening on device /dev/ttyVUART0. >> 2) /etc/ obmc-console.conf >> lpc-address = 0x3f8 >> sirq = 4 >> local-tty = ttyS0 >> local-tty-baud = 115200 >> >> 2, Host OS: redhat 7 >What hardware platform is this? My platform is AMD X86 platform. >> It seemed to lock and output nothing when I run "obmc-console-client" >> on BMC. And there is nothing in the log /var/log/obmc-console.log >This doesn't necessarily indicate a problem with the BMC though - are >you sure that the host is connecting something (like a getty) to its >serial device? Is there something on the host side of the serial >connection? (what are you expecting to see there?) >If the host is definitely using up that serial console, this could >either be an issue with the obmc-console infrastructure, or the UART >devices. >You can split up the debugging to eliminate parts of the stack there. >Try: > - Stop obmc-console-server > - from the BMC, read directly from the VUART (say, `cat /dev/ttyVUART0`) > - from the host, write to the UART (`echo hello > /dev/ttyS0`, changing to whatever tty is connected to the BMC, if it isn't ttyS0.). >If that works, then you know that the UART channel is OK, and it's either obmc-console, or that nothing on the host is using that serial port. I tried the above instruments, but can't read anything on my BMC console screen. My AST2500 hardware uses the following gpios to connect to host hardware : GPIOF5_NRTS4_LHFRAME# GPIOF6_TXD4_LHSIRQ# GPIOF7_RXD4_LHRST# so, I append uart4 in my .dts file: &uart4 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_txd4_default &pinctrl_rxd4_default &pinctrl_ncts4_default &pinctrl_nrts4_default>; and this is my bmc serials information: root@haiguang1:~# cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A mmio:0x1E783000 irq:31 tx:0 rx:0 RTS|CTS|DTR|DSR|CD 1: uart:unknown port:00000000 irq:0 2: uart:unknown port:00000000 irq:0 3: uart:16550A mmio:0x1E78F000 irq:35 tx:0 rx:0 4: uart:16550A mmio:0x1E784000 irq:32 tx:14139 rx:383 RTS|CTS|DTR|DSR|CD 5: uart:16550A mmio:0x1E787000 irq:33 tx:0 rx:0 RTS|DTR Here ,the uart4 tx:14139 rx:383 shows it has data flow. root@haiguang1:~# stty -F /dev/ttyVUART0 -a speed 9600 baud;stty: /dev/ttyVUART0 line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke On host OS side: #cat /proc/tty/device/serial serinfo:1.0 driver revision: 0: uart:16450 port:000003F8 irq:4 tx:17204 rx:0 RTS|DTR|DSR|CD|RI 1: uart:16450 port:000002F8 irq:3 2: uart:unknown port:000003E8 irq:4 3: uart:unknown port:000002E8 irq:3 [root@localhost ~]#stty -F /dev/ttyS0 -a speed 9600 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke . I input the following command on one host OS console: # mgetty -r -x 9 /dev/ttyS0 & # echo "123" > /dev/ttyS0 And on BMC side: # cat /dev/ttyVUART0 I can see nothing. But the uart4 tx and rx number increased when do: cat /proc/tty/device/serial before: 4: uart:16550A mmio:0x1E784000 irq:32 tx:15416 rx:498 RTS|CTS|DTR|DSR|CD after host input: echo "123" > /dev/ttyS0 4: uart:16550A mmio:0x1E784000 irq:32 tx:16171 rx:586 RTS|CTS|DTR|DSR|CD Why can't I see nothing on bmc side? Which serial parameter should I use in the BMC file etc/obmc-console.conf, BMC uart4 port or Host uart0? Best, Xiuzhi >Regards, >Jeremy [-- Attachment #2: Type: text/html, Size: 10608 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SOL,obmc-console-client can't connect to the host OS 2018-11-23 9:39 ` =?gb18030?B?eGl1emhp?= @ 2018-11-25 10:42 ` Jeremy Kerr 2018-11-26 8:18 ` xiuzhi 0 siblings, 1 reply; 6+ messages in thread From: Jeremy Kerr @ 2018-11-25 10:42 UTC (permalink / raw) To: xiuzhi; +Cc: openbmc Hi Xiuzhi, > >What hardware platform is this? > My platform is AMD X86 platform. OK, so some of my assumptions about how things are hooked up may not be correct then. But just to check: You mention that you're connecting to the host through a physical UART connection (UART4: GPIOF5-GPIOF7). Does this mean that you have a separate SuperIO chip doing UART on the host side? (and you have *not* connected to the AST2500's LPC bus?) If this is the case, you will not be using the VUART - we use that on our machines where the host is mastering the AST2500's LPC slave - and so this means that the 0x3f8 port on host LPC is directly interfacing to the AST2500's VUART, not a separate SuperIO chip with a UART. This also means that you'll need to change the `cat /dev/ttyVUART0` tests to use the proper UART on the BMC side (because you're not using the VUART device). I think the main issue is that you seem to be mixing up the Linux device names (ttySx, which are zero-based in the default setup) with the hardware device names (UARTn, which are one-based). Try referring to the MMIO base addresses (0x1e78x000) to check that you're using the right uart. I suspect that you want to be using ttyS3 if you're using UART4 from the datasheet. Since you're using a physical UART too, you'll need to ensure that the baud rates are the same on host and BMC. Also, I would suggest not using any of the obmc-console stuff until you' ve confirmed that you can transfer data just using the serial devices on host and BMC directly with `cat`. > Which serial parameter should I use in the BMC file > etc/obmc-console.conf, BMC uart4 port or Host uart0? Ah, that's a different setting. The serial device that you specify on the obmc-console-server command line is the UART that is connected to the host. This command-line argument is configured through obmc-console@.service. The serial device specified in the `local-tty` setting of obmc- console.conf is a separate device that is typically connected to a BMC- controlled port on the rear panel of the machine. This configures obmc- console-server to mirror the serial data (from the host) to that port. So, I'd suggest removing the `local-tty` setting when you start using obmc-console, to avoid confusion. You can add it back (specifying a serial port that is connected to only the BMC) when you want to mirror to that port. Regards, Jeremy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re:Re: SOL,obmc-console-client can't connect to the host OS 2018-11-25 10:42 ` Jeremy Kerr @ 2018-11-26 8:18 ` xiuzhi 2018-11-26 8:41 ` Jeremy Kerr 0 siblings, 1 reply; 6+ messages in thread From: xiuzhi @ 2018-11-26 8:18 UTC (permalink / raw) To: jk; +Cc: openbmc [-- Attachment #1: Type: text/plain, Size: 11121 bytes --] Hi Jeremy, Thank you for your patient explanation extremely . Yes, Pysical uart4 of AST2500 connect to uart0 of host CPU directly on my platform. Now, 'cat /dev/ttyS3' on AST2500 can read string from the host ttyS0. But I can not get any information from obmc-console-client with the /etc/obmc-console.conf: lpc-address = 0x1E78F000 sirq = 35 local-tty = ttyS5 local-tty-baud = 9600 The serials are: root@haiguang1:~# cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A mmio:0x1E783000 irq:31 tx:0 rx:0 1: uart:unknown port:00000000 irq:0 2: uart:unknown port:00000000 irq:0 3: uart:16550A mmio:0x1E78F000 irq:35 tx:12774 rx:11013 fe:2981 brk:34 4: uart:16550A mmio:0x1E784000 irq:32 tx:31307 rx:1379 RTS|CTS|DTR|DSR|CD 5: uart:16550A mmio:0x1E787000 irq:33 tx:0 rx:0 RTS|DTR root@haiguang1:~# ls -l /dev/tty* crw-rw-rw- 1 root tty 5, 0 Nov 7 2018 /dev/tty crw-rw---- 1 root dialout 4, 64 Nov 7 2018 /dev/ttyS0 crw-rw---- 1 root dialout 4, 65 Nov 7 2018 /dev/ttyS1 crw-rw---- 1 root dialout 4, 66 Nov 7 2018 /dev/ttyS2 crw-rw---- 1 root dialout 4, 67 Nov 7 2018 /dev/ttyS3 crw------- 1 root tty 4, 68 Jan 5 23:24 /dev/ttyS4 crw-rw---- 1 root dialout 4, 69 Nov 7 2018 /dev/ttyS5 lrwxrwxrwx 1 root root 5 Nov 7 2018 /dev/ttyVUART0 -> ttyS5 I also changed or removed the "local-tty" from ttyS5 to ttyS3, and then systemctl restart obmc-console\@ttyVUART0, It didn't work. root@haiguang1:~# strace obmc-console-server --config /etc/obmc-console.conf ttyVUART0 execve("/usr/sbin/obmc-console-server", ["obmc-console-server", "--config", "/etc/obmc-console.conf", "ttyVUART0"], 0x7edd0d5c /* 15 vars */) = 0 brk(NULL) = 0x1807000 uname({sysname="Linux", nodename="haiguang1", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=6589, ...}) = 0 mmap2(NULL, 6589, PROT_READ, MAP_PRIVATE, 3, 0) = 0x76f32000 close(3) = 0 openat(AT_FDCWD, "/lib/tls/v6l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v6l", 0x7e945580) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0x7e945580) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/v6l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat64("/lib/v6l", 0x7e945580) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\274\206\376M4\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1259744, ...}) = 0 mmap2(0x4dfd0000, 1325608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4dfd0000 mprotect(0x4e0ff000, 61440, PROT_NONE) = 0 mmap2(0x4e10e000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e000) = 0x4e10e000 mmap2(0x4e112000, 6696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4e112000 close(3) = 0 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f30000 set_tls(0x76f308b0, 0x76f30fa8, 0x4dfc1000, 0x76f308b0, 0x4dfc1000) = 0 mprotect(0x23000, 4096, PROT_READ) = 0 mprotect(0x4e10e000, 8192, PROT_READ) = 0 mprotect(0x4dfc0000, 4096, PROT_READ) = 0 munmap(0x76f32000, 6589) = 0 brk(NULL) = 0x1807000 brk(0x1828000) = 0x1828000 openat(AT_FDCWD, "/etc/obmc-console.conf", O_RDONLY) = 3 brk(0x1849000) = 0x1849000 read(3, "lpc-address = 0x1E78F000\nsirq = "..., 4096) = 75 read(3, "", 4021) = 0 close(3) = 0 lstat64("/dev", {st_mode=S_IFDIR|0755, st_size=2040, ...}) = 0 lstat64("/dev/ttyVUART0", {st_mode=S_IFLNK|0777, st_size=5, ...}) = 0 readlink("/dev/ttyVUART0", "ttyS5", 4095) = 5 lstat64("/dev/ttyS5", {st_mode=S_IFCHR|0660, st_rdev=makedev(4, 69), ...}) = 0 lstat64("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 lstat64("/sys/class", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/class/tty", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/class/tty/ttyS5", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/class/tty/ttyS5", "../../devices/platform/ahb/ahb:a"..., 4095) = 60 lstat64("/sys/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial/tty", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial/tty/ttyS5", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 lstat64("/sys/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial/tty", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/ahb/ahb:apb/1e787000.serial/tty/ttyS5", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 openat(AT_FDCWD, "/sys/devices/platform/ahb/ahb:apb/1e787000.serial/sirq", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 write(3, "0x23", 4) = 4 close(3) = 0 openat(AT_FDCWD, "/sys/devices/platform/ahb/ahb:apb/1e787000.serial/lpc_address", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 write(3, "0x1e78f000", 10) = 10 close(3) = 0 openat(AT_FDCWD, "/dev/ttyS5", O_RDWR) = 3 fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 ioctl(3, TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B9600 -opost -isig -icanon -echo ...}) = 0 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 write(1, "3 handlers\n", 113 handlers ) = 11 openat(AT_FDCWD, "/var/log/obmc-console.log", O_RDWR|O_CREAT, 0644) = 4 ftruncate(4, 0) = 0 write(1, " log [active]\n", 15 log [active] ) = 15 socket(AF_UNIX, SOCK_STREAM, 0) = 5 bind(5, {sa_family=AF_UNIX, sun_path=@"obmc-console\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 110) = 0 listen(5, 1) = 0 write(1, " socket [active]\n", 18 socket [active] ) = 18 openat(AT_FDCWD, "/dev/ttyS3", O_RDWR|O_NONBLOCK) = 6 fcntl64(6, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) ioctl(6, TCGETS, {B9600 opost isig icanon echo ...}) = 0 ioctl(6, SNDCTL_TMR_CONTINUE or TCSETSF, {B9600 opost isig icanon echo ...} The obmc-console-client didn't work until I did the following command: 1, del /dev/ttyVUART0 2, ln -s /dev/ttyS3 /dev/ttyVUART0 3,modify the first line lpc-address of /etc/obmc-console.conf lpc-address = 0x3F8 , the other three options can change to anything. 4,systemctl restart obmc-console\@ttyVUART0 5, obmc-console-client, it works. Why and how to achieve this link the ttyVUART0 to ttyS3 by modifying the compilation configuration ? Best, Xiuzhi Hi Xiuzhi, > >What hardware platform is this? > My platform is AMD X86 platform. OK, so some of my assumptions about how things are hooked up may not be correct then. But just to check: You mention that you're connecting to the host through a physical UART connection (UART4: GPIOF5-GPIOF7). Does this mean that you have a separate SuperIO chip doing UART on the host side? (and you have *not* connected to the AST2500's LPC bus?) If this is the case, you will not be using the VUART - we use that on our machines where the host is mastering the AST2500's LPC slave - and so this means that the 0x3f8 port on host LPC is directly interfacing to the AST2500's VUART, not a separate SuperIO chip with a UART. This also means that you'll need to change the `cat /dev/ttyVUART0` tests to use the proper UART on the BMC side (because you're not using the VUART device). I think the main issue is that you seem to be mixing up the Linux device names (ttySx, which are zero-based in the default setup) with the hardware device names (UARTn, which are one-based). Try referring to the MMIO base addresses (0x1e78x000) to check that you're using the right uart. I suspect that you want to be using ttyS3 if you're using UART4 from the datasheet. Since you're using a physical UART too, you'll need to ensure that the baud rates are the same on host and BMC. Also, I would suggest not using any of the obmc-console stuff until you' ve confirmed that you can transfer data just using the serial devices on host and BMC directly with `cat`. > Which serial parameter should I use in the BMC file > etc/obmc-console.conf, BMC uart4 port or Host uart0? Ah, that's a different setting. The serial device that you specify on the obmc-console-server command line is the UART that is connected to the host. This command-line argument is configured through obmc-console@.service. The serial device specified in the `local-tty` setting of obmc- console.conf is a separate device that is typically connected to a BMC- controlled port on the rear panel of the machine. This configures obmc- console-server to mirror the serial data (from the host) to that port. So, I'd suggest removing the `local-tty` setting when you start using obmc-console, to avoid confusion. You can add it back (specifying a serial port that is connected to only the BMC) when you want to mirror to that port. Regards, Jeremy [-- Attachment #2: Type: text/html, Size: 15607 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: SOL,obmc-console-client can't connect to the host OS 2018-11-26 8:18 ` xiuzhi @ 2018-11-26 8:41 ` Jeremy Kerr 0 siblings, 0 replies; 6+ messages in thread From: Jeremy Kerr @ 2018-11-26 8:41 UTC (permalink / raw) To: xiuzhi; +Cc: openbmc HI Xiuzhi, > Thank you for your patient explanation extremely . No problem! > Now, 'cat /dev/ttyS3' on AST2500 can read string from the host ttyS0. OK, great. So ttyS3 is the device that we want obmc-console-server to be using. > I also changed or removed the "local-tty" from ttyS5 to ttyS3, and > then > systemctl restart obmc-console\@ttyVUART0, It didn't work. > root@haiguang1:~# strace obmc-console-server --config /etc/obmc- > console.conf ttyVUART0 > execve("/usr/sbin/obmc-console-server", ["obmc-console-server", " > --config", "/etc/obmc-console.conf", "ttyVUART0"], 0x7edd0d5c /* 15 > vars */) = 0 You're still passing ttyVUART0 to the obmc-console-server command-line, so it will try to use this for the connection to the host. In your system though, you want it to be using ttyS3 for the connection to the host. So, you should be running something like this instead: obmc-console-server --config /etc/obmc-console.conf ttyS3 And because you're not using the VUART device, you do not need to specify the LPC address (with the `lpc-address = x`) in obmc- console.conf. You should be able to remove that line. We only need on our platforms this configure the VUART to be at the correct address on the AST2500 LPC bus. Because you're not using that, you don't need the lpc-address line. > Why and how to achieve this link the ttyVUART0 to ttyS3 by modifying > the compilation configuration ? No compiled configuration changes are needed - just tell obmc-console- server to use ttyS3 rather than ttyVUART, by modifying the command-line argument. Regards, Jeremy ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-11-26 8:41 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <mailman.13.1542934803.27188.openbmc@lists.ozlabs.org> 2018-11-23 4:48 ` SOL,obmc-console-client can't connect to the host OS =?gb18030?B?eGl1emhp?= 2018-11-23 5:13 ` Jeremy Kerr 2018-11-23 9:39 ` =?gb18030?B?eGl1emhp?= 2018-11-25 10:42 ` Jeremy Kerr 2018-11-26 8:18 ` xiuzhi 2018-11-26 8:41 ` Jeremy Kerr
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).