qemu/hw/char
Henrik Carlqvist 6b90a4cdc0 escc: emulate dip switch language layout settings on SUN keyboard
SUN Type 4, 5 and 5c keyboards have dip switches to choose the language layout
of the keyboard. Solaris makes an ioctl to query the value of the dipswitches
and uses that value to select keyboard layout.  Also the SUN bios like the one
in the file ss5.bin uses this value to support at least some keyboard layouts.
However, the OpenBIOS provided with qemu is hardcoded to always use an US
keyboard layout.

Before this patch, qemu allways gave dip switch value 0x21 (US keyboard),
this patch uses a command line switch like
"-global escc.chnA-sunkbd-layout=de" to select dip switch value. A table is
used to lookup values from arguments like:

-global escc.chnA-sunkbd-layout=fr
-global escc.chnA-sunkbd-layout=es

But the patch also accepts numeric dip switch values directly:

-global escc.chnA-sunkbd-layout=0x2b
-global escc.chnA-sunkbd-layout=43

Both values above are the same and select swedish keyboard as explained in
table 3-15 at
https://docs.oracle.com/cd/E19683-01/806-6642/new-43/index.html

Unless you want to do a full Solaris installation but happen to have
access to a Sun bios file, the easiest way to test that the patch works
is to:

qemu-system-sparc -global escc.chnA-sunkbd-layout=sv -bios /path/to/ss5.bin

If you already happen to have a Solaris installation in a qemu disk image
file you can easily try different keyboard layouts after this patch is
applied.

Signed-off-by: Henrik Carlqvist <hc1245@poolhem.se>
Message-Id: <20230623203007.56d3d182.hc981@poolhem.se>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[MCA edit: update unsigned char to uint8_t, fix spacing issues]
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2023-06-28 10:54:25 +01:00
..
avr_usart.c
bcm2835_aux.c
cadence_uart.c
cmsdk-apb-uart.c
debugcon.c
digic-uart.c
escc.c escc: emulate dip switch language layout settings on SUN keyboard 2023-06-28 10:54:25 +01:00
etraxfs_ser.c
exynos4210_uart.c
goldfish_tty.c
grlib_apbuart.c
ibex_uart.c
imx_serial.c imx_serial: set wake bit when we receive a data byte 2023-06-19 11:35:58 +01:00
ipoctal232.c
Kconfig
mcf_uart.c
mchp_pfsoc_mmuart.c
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
nrf51_uart.c
omap_uart.c hw/arm/omap: Remove unused omap_uart_attach() 2023-06-05 07:43:23 +01:00
parallel-isa.c hw/char/parallel-isa: Export struct ISAParallelState 2023-06-13 11:28:58 +02:00
parallel.c hw/char/parallel-isa: Export struct ISAParallelState 2023-06-13 11:28:58 +02:00
pl011.c
renesas_sci.c
riscv_htif.c hw/riscv: Add signature dump function for spike to run ACT tests 2023-05-05 10:49:50 +10:00
sclpconsole-lm.c
sclpconsole.c
serial-isa.c
serial-pci-multi.c docs/specs: Convert pci-serial.txt to rst 2023-04-24 22:56:55 -04:00
serial-pci.c docs/specs: Convert pci-serial.txt to rst 2023-04-24 22:56:55 -04:00
serial.c
sh_serial.c
shakti_uart.c
sifive_uart.c
spapr_vty.c
stm32f2xx_usart.c
terminal3270.c
trace-events
trace.h
virtio-console.c
virtio-serial-bus.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
xen_console.c hw/xen: Fix double-free in xen_console store_con_info() 2023-04-13 10:09:31 +01:00
xilinx_uartlite.c