qemu/include/hw
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
..
acpi tpm: Extend common APIs to support TPM TIS I2C 2023-04-20 08:17:15 -04:00
adc hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
arm hw/misc/bcm2835_property: Handle CORE_CLK_ID firmware property 2023-06-19 15:27:21 +01:00
audio
block hw/block: replace TABs with space 2023-03-24 11:45:46 +01:00
char escc: emulate dip switch language layout settings on SUN keyboard 2023-06-28 10:54:25 +01:00
core accel/tcg: Store some tlb flags in CPUTLBEntryFull 2023-06-26 17:33:00 +02:00
cpu
cris
cxl hw/cxl/events: Add injection of Memory Module Events 2023-06-23 02:54:40 -04:00
display
dma
firmware
gpio
hyperv
i2c qtest: Add functions for accessing devices on Aspeed I2C controller 2023-04-20 08:17:15 -04:00
i386 hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models 2023-06-26 09:50:00 -04:00
ide hw/ide: replace TABs with space 2023-03-24 11:45:33 +01:00
input hw/input: Clean up includes 2023-02-08 07:16:23 +01:00
intc hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes 2023-06-05 11:08:55 +08:00
ipack
ipmi
isa hw/audio/via-ac97: Basic implementation of audio playback 2023-03-08 00:37:48 +01:00
kvm
loongarch hw/loongarch/virt: Set max 256 cpus support on loongarch virt machine 2023-05-15 19:09:33 +08:00
m68k q800: move macfb device to Q800MachineState 2023-06-22 09:30:11 +02:00
mem
mips hw/mips/bootloader: Handle buffers as opaque arrays 2023-01-13 09:32:32 +01:00
misc hw/arm/raspi: Import Linux raspi definitions as 'raspberrypi-fw-defs.h' 2023-06-19 15:27:21 +01:00
net hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h 2023-06-22 09:25:40 +02:00
nubus
nvram Revert "x86: return modified setup_data only if read as memory, not as file" 2023-03-02 03:10:46 -05:00
openrisc
pci hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0 2023-05-19 10:30:46 -04:00
pci-bridge
pci-host hw/pci-host/pam: Make init_pam() usage more readable 2023-05-19 10:30:46 -04:00
ppc pnv/xive2: Add a get_config() method on the presenter class 2023-06-25 22:41:30 +02:00
rdma
remote
riscv hw/riscv/opentitan: Correct OpenTitanState parent type/size 2023-06-13 17:19:42 +10:00
rtc hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data 2023-02-27 22:29:02 +01:00
rx
s390x s390x/pv: Fix spurious warning with asynchronous teardown 2023-05-16 09:14:18 +02:00
scsi virtio-scsi: implement BlockDevOps->drained_begin() 2023-05-30 17:32:02 +02:00
sd hw: sd: allwinner-sdhost: Add sun50i-a64 SoC support 2023-06-06 10:19:33 +01:00
sensor
sh4
southbridge hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE 2023-06-07 15:07:10 +01:00
sparc
ssi Do not include hw/hw.h if it is not necessary 2023-02-27 09:15:38 +01:00
timer hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available 2023-02-27 22:29:02 +01:00
tricore Do not include hw/hw.h if it is not necessary 2023-02-27 09:15:38 +01:00
usb
vfio vfio/migration: Rename entry points 2023-03-07 11:19:07 -07:00
virtio virtio-gpu/win32: allocate shareable 2d resources/images 2023-06-27 17:08:56 +02:00
watchdog hw/watchdog: Allwinner WDT emulation for system reset 2023-04-20 10:21:13 +01:00
xen hw/arm: introduce xenpvh machine 2023-06-15 16:46:47 -07:00
xtensa
boards.h numa: Validate cluster and NUMA node boundary if required 2023-06-26 10:23:01 +02:00
clock.h
elf_ops.h replace TABs with spaces 2023-03-20 12:43:50 +01:00
fw-path-provider.h
hotplug.h pci: fix 'hotplugglable' property behavior 2023-03-07 12:38:59 -05:00
hw.h
ide.h hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' 2023-02-27 22:29:02 +01:00
irq.h
loader-fit.h
loader.h hw: arm: Support direct boot for Linux/arm64 EFI zboot images 2023-03-06 14:08:12 +00:00
nmi.h
or-irq.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
pcmcia.h replace TABs with spaces 2023-03-20 12:43:50 +01:00
platform-bus.h
ptimer.h
qdev-clock.h
qdev-core.h hw/qdev: introduce qdev_is_realized() helper 2023-05-30 17:32:02 +02:00
qdev-dma.h
qdev-properties-system.h
qdev-properties.h
register.h
registerfields.h
resettable.h
stream.h
sysbus.h
usb.h
vmstate-if.h