Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAXstation 4000 VLC gets garbage characters on console #1114

Open
patbarron opened this issue Jan 11, 2022 · 3 comments
Open

VAXstation 4000 VLC gets garbage characters on console #1114

patbarron opened this issue Jan 11, 2022 · 3 comments

Comments

@patbarron
Copy link

patbarron commented Jan 11, 2022

  • Context

When using the "BOOT" command to enter the ROM monitor on the VAXstation 4000 VLC simulator, garbage characters appear on the console before the ">>>" prompt is shown. These garbage characters also seem to be seen by a running operating system attempting to use the console.

When this occurs there are at least three garbage characters (there may be non-printing characters that I just can't see), and seem to include a newline followed by "6c". The garbage characters are always the same every time they appear.

I do not observe this issue in any of the other VAX simulators that include a ROM bootstrap - just this one.

  • the output of "sim> SHOW VERSION" while running the simulator which is having the issue

sim> show version
VAXstation 4000-VLC (KA48) simulator V4.0-0 Current
    Simulator Framework Capabilities:
        64b data
        64b addresses
        Threaded Ethernet Packet transports:TAP:NAT:UDP
        Idle/Throttling support is available
        Virtual Hard Disk (VHD) support
        RAW disk and CD/DVD ROM support
        Asynchronous I/O support (Lock free asynchronous event queue)
        Asynchronous Clock support
        FrontPanel API Version 12
    Host Platform:
        Compiler: GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
        Simulator Compiled as C arch: x64 (Release Build) on Jan 10 2022 at 15:55:39
        Build Tool: simh-makefile
        Memory Access: Little Endian
        Memory Pointer Size: 64 bits
        Large File (>2GB) support
        SDL Video support: No Video Support
        PCRE RegEx (Version 8.45 2021-06-15) support for EXPECT commands
        OS clock resolution: 1ms
        Time taken by msleep(1): 1ms
        OS: Linux _(hostname redacted)_ 5.15.12-200.fc35.x86_64 #1 SMP Wed Dec 29 15:03:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
        tar tool: tar (GNU tar) 1.34
        curl tool: curl 7.79.1 (x86_64-redhat-linux-gnu) libcurl/7.79.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.45.1 OpenLDAP/2.4.59
        git commit id: 7756a38e
        git commit time: 2022-01-10T04:08:44-0800
  • how you built the simulator or that you're using prebuilt binaries

$ make vaxstation4000vlc
lib paths are: /lib/ /lib64/ /usr/lib64/dyninst/ /usr/lib64/iscsi/ /usr/lib64/llvm11/lib/ /usr/lib64/llvm12/lib/ /usr/lib64/pipewire-0.3/jack/ /usr/lib64/tcl8.6/ /usr/lib/
include paths are:  /usr/lib/gcc/x86_64-redhat-linux/11/include /usr/local/include /usr/include
using libm: /lib64/libm.so
using librt: /lib64/librt.a
using libpthread: /lib64/libpthread.a /usr/include/pthread.h
using libpcre: /lib64/libpcre.so /usr/include/pcre.h
using semaphore: /usr/include/semaphore.h
using libdl: /lib64/libdl.a /usr/include/dlfcn.h
using libpng: /lib64/libpng.so /usr/include/png.h
using zlib: /lib64/libz.so /usr/include/zlib.h
using mman: /usr/include/sys/mman.h
*** Warning ***
*** Warning *** vaxstation4000vlc Simulator is being built WITHOUT
*** Warning *** libpcap networking support
*** Warning ***
*** Warning *** To build simulator(s) with libpcap networking support you
*** Warning *** should read 0readme_ethernet.txt and follow the instructions
*** Warning *** regarding the needed libpcap development components for your
*** Warning *** Linux platform
*** Warning ***
*** Info ***
*** Info *** Simulators on your Linux platform can also be built with
*** Info *** extended LAN Ethernet networking support by using VDE Ethernet.
*** Info ***
*** Info *** To build simulator(s) with extended networking support you
*** Info *** should read 0readme_ethernet.txt and follow the instructions
*** Info *** regarding the needed libvdeplug components for your Linux
*** Info *** platform
*** Info ***
***
*** vaxstation4000vlc Simulator being built with:
*** - compiler optimizations and no debugging support. GCC Version: 11.2.1.
*** - Local LAN packet transports: TAP NAT(SLiRP)
*** - Per simulator tests will be run.
***
*** git commit id is 7756a38e315cd189619158443b84480a8c63a732.
*** git commit time is 2022-01-10T04:08:44-0800.
***
gcc -std=gnu99 -U__STRICT_ANSI__  -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=7756a38e315cd189619158443b84480a8c63a732 -DSIM_GIT_COMMIT_TIME=2022-01-10T04:08:44-0800  -DSIM_COMPILER="GCC Version: 11.2.1" -DSIM_BUILD_TOOL=simh-makefile -I . -D_GNU_SOURCE -DUSE_READER_THREAD -DSIM_ASYNCH_IO  -DHAVE_PCRE_H -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DHAVE_LINUX_CDROM -DSIM_HAVE_DLOPEN=so -DHAVE_UTIME -DHAVE_LIBPNG -DHAVE_ZLIB -DHAVE_GLOB -DHAVE_SHM_OPEN  ./VAX/vax_cpu.c ./VAX/vax_cpu1.c ./VAX/vax_fpa.c ./VAX/vax_cis.c ./VAX/vax_octa.c ./VAX/vax_cmode.c ./VAX/vax_mmu.c ./VAX/vax_sys.c ./VAX/vax_syscm.c ./VAX/vax_watch.c ./VAX/vax_nar.c ./VAX/vax4xx_stddev.c ./VAX/vax440_sysdev.c ./VAX/vax440_syslist.c ./VAX/vax4xx_dz.c ./VAX/vax_xs.c ./VAX/vax_lk.c ./VAX/vax_vs.c ./VAX/vax4xx_rz94.c ./sim_scsi.c ./scp.c ./sim_console.c ./sim_fio.c ./sim_timer.c ./sim_sock.c ./sim_tmxr.c ./sim_ether.c ./sim_tape.c ./sim_disk.c ./sim_serial.c ./sim_video.c ./sim_imd.c ./sim_card.c -DVM_VAX -DVAX_440 -DUSE_INT64 -DUSE_ADDR64 -I ./VAX -DHAVE_TAP_NETWORK -DUSE_NETWORK -Islirp -Islirp_glue -Islirp_glue/qemu -DHAVE_SLIRP_NETWORK -DUSE_SIMH_SLIRP_DEBUG slirp/*.c slirp_glue/*.c -DVAX_48 -o BIN/vaxstation4000vlc -lm -lrt -lpthread -lpcre -ldl -lpng -lz
BIN/vaxstation4000vlc RegisterSanityCheck /home/pbarron/src/simh/VAX/tests/vax-diag_test.ini </dev/null
 Running internal register sanity checks on VAXstation 4000-VLC (KA48) simulator.
*** Good Registers in VAXstation 4000-VLC (KA48) simulator.

VAXstation 4000-VLC (KA48) simulator V4.0-0 Current        git commit id: 7756a38e
No diagnostics are available for the VAXstation 4000-VLC (KA48) Simulator

$
  • the simulator configuration file (or commands) which were used when the problem occurred.

The only configuration command I used before attempting to boot was "SET ROM NODELAY" (which is necessary due to issue #1113 but I have observed that this issue still occurs even without disabling the ROM delay).

This instance of SIMH is running under Fedora 35, on a VMware virtual machine provisioned on a VMware ESXi hypervisor.

  • the expected behavior and the actual behavior

$ vaxstation4000vlc

VAXstation 4000-VLC (KA48) simulator V4.0-0 Current        git commit id: 7756a38e
sim> set rom nodelay
sim> boot
Loading boot code from internal ka48a.bin



KA48-A V1.2-32B-V4.0
08-00-2B-7A-F7-13
16MB
|                                     |
#######################################
?? 010   2       LCG  0086
?? 001   3        DZ  0032
?? 001   4     CACHE  0512
?? 001   7        IT  0514
?? 001   8       SYS  0128
?? 001   9        NI  0024

>>>

>>> 6c

Note that the newline near the end, and the "6c" characters, were not typed by me - they spontaneously appeared.

If we attach a boot device to this simulator, and boot it, we see the same thing when the operating system comes up:

>>>
Simulation stopped, PC: 2004ABA8 (SUBL2 R2,R0)
sim> set rz1 cdrom
sim> attach rz1 NetBSD-9.2-vax.iso
RZ1: Unit is read only
sim> c


>>> show dev

  VMS/VMB      ADDR      DEVTYPE    NUMBYTES     RM/FX    WP    DEVNAM      REV
  -------      ----      -------    --------     -----    --    ------      ---
  ESA0         08-00-2B-A1-00-94
  DKA0         A/0/0     DISK        ......       FX            RZ23        0A18
  DKA100       A/1/0     RODISK     342.57MB      RM      WP    RRD40       250D
  DKA200       A/2/0     DISK        ......       FX            RZ23        0A18
  DKA300       A/3/0     DISK        ......       FX            RZ23        0A18
  DKA400       A/4/0     DISK        ......       FX            RZ23        0A18
  DKA500       A/5/0     DISK        ......       FX            RZ23        0A18
 ..HostID..    A/6       INITR
  DKA700       A/7/0     DISK        ......       FX            RZ23        0A18



>>> boot dka100


-DKA100
>> NetBSD/vax boot [1.12 (Wed May 12 13:15:55 UTC 2021)] <<
>> Press any key to abort autoboot 5
Press '?' for help
> {?6c

As before, the garbage characters at the end were not typed by me. I can backspace over them and issue the "boot" command manually.

Interestingly, when I boot the OS, it panics immediately (due to some type of SCSI-related error that may or may not be related to SIMH), and drops into the OS debugger - and I get the OS debugger prompt without any garbage characters. I'm not sure what's different between the way the OS bootstrap prompts for input, and the way the debugger prompts for input.

The garbage characters are the same every time they appear - they do not vary from run to run.

@agn453
Copy link
Contributor

agn453 commented Jan 11, 2022

Are you using a terminal emulator that responds to a DA (device attributes) escape sequence? The firmware may be trying to detect the attached terminal type by sending a CSI 0c and the response is not expected.

@patbarron
Copy link
Author

patbarron commented Jan 11, 2022

I'm using PuTTY 0.76 as my terminal emulator.

@patbarron
Copy link
Author

patbarron commented Jan 16, 2022

As an update, I updated to commit 1cffbd5, and somewhere along the line my issue with having to do SET ROM NODELAY went away (at least for the most part - see the ticket mentioned above for details). Without the SET ROM NODELAY, I can boot to the ROM bootstrap, and I do not get the garbage characters - but, I still get the same garbage characters from the OS bootstrap. If I do SET ROM NODELAY (even in the new build), the garbage characters appear both when booting to the ROM bootstrap, and from the OS bootstrap, as described above.

I wonder if this is some sort of timing problem with how the console serial port is accessed by these bootstraps? Just speculation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants