All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Carlqvist <hc981@poolhem.se>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: hc1245@poolhem.se, qemu-devel@nongnu.org, atar4qemu@gmail.com
Subject: Re: [PATCH v5] Emulate dip switch language layout settings on SUN keyboard
Date: Mon, 23 Jan 2023 20:09:37 +0100	[thread overview]
Message-ID: <20230123200937.32eb19eb.hc981@poolhem.se> (raw)
In-Reply-To: <d2850ef0-d825-bb03-09d4-0d1427cf6577@ilande.co.uk>

On Sun, 22 Jan 2023 18:07:47 +0000
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:
> Did you see my comments re: OpenBIOS for the earlier version of this patch?

Thanks for your replies! Sorry, I missed that reply... To make sure that I
wouldn't miss any reply I subscribed to the mailing list, but that made many
mails to me drown in mails from the list...

On Tue, 10 Jan 2023 23:08:27 +0000
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:
> Thanks for the patch. I think what you're effectively doing here is
> equivalent to creating a qdev property that is used to set the keyboard
> layout, which is a nicer approach because it enables better control from the
> command line and also handles the default value.

I must admit that I am not very familiar with "qdev properties", to me it
seemed like a rather intuitive solution to use the existing -k switch for this
purpose as it is intended to use for keyboard layouts. Would you prefer some
other implementation?

> Does changing the keyboard layout work with other OSs?

To my knowledge only Solaris and the SUN sparc openboot bios cares about those
dip switch settings in the 32 bit SUN sparc machine keyboards.

This post on a forum makes me think that it doesn't work with NetBSD:
https://www.linuxquestions.org/questions/%2Absd-17/netbsd-sparc-non-us-keyboard-layout-issue-367601/

It does seem as if the Linux kernel supports those layout dip switches,
however I don't know if it is used in any Linux distribution. I have never run
any Linux distribution on sparc myself. From the Linux kernel source file
sunkbd.c:

-8<--------------------
	if (sunkbd->type == 4) {	/* Type 4 keyboard */
		sunkbd->layout = -2;
		serio_write(sunkbd->serio, SUNKBD_CMD_LAYOUT);
		wait_event_interruptible_timeout(sunkbd->wait,
						 sunkbd->layout >= 0, HZ / 4);
		if (sunkbd->layout < 0)
			return -1;
		if (sunkbd->layout & SUNKBD_LAYOUT_5_MASK)
			sunkbd->type = 5;
	}
-8<--------------------

> It may also be that OpenBIOS will be difficult to use if the layout
> defaults to anything other than en-us since I suspect it will be hardcoded
> there too.

Today qemu is hardcoded to emulate dip switch setting 0x21 (en-us layout). My
patch keeps 0x21 (en-us layout) as default value, but also makes it possible
to give other values with the -k option. From may experience it seems as if
OpenBIOS does not care about the settings of the dip switch and allways uses
en-us layout. Suns openboot bios (which is possible to find for download and
use with qemu) supports some, but not all layout dip switch settings which are
supported by Solaris.

regards Henrik


  reply	other threads:[~2023-01-23 19:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07  2:37 [PATCH qemu v3 0/1] [PATCH v3] Emulate dip switch language layout settings on SUN keyboard ~henca
2023-01-06 21:33 ` [PATCH qemu v3 1/1] Emulating sun keyboard language layout dip switches, taking the value for the dip switches from the "-k" option to qemu ~henca
2023-01-10 23:08   ` Mark Cave-Ayland
2023-01-23 19:09     ` Henrik Carlqvist [this message]
2023-03-04 21:07       ` [PATCH v5] Emulate dip switch language layout settings on SUN keyboard Henrik Carlqvist
2023-03-28 14:01         ` Daniel P. Berrangé
2023-03-28 17:19           ` Henrik Carlqvist
2023-03-28 17:59             ` Daniel P. Berrangé
2023-03-28 20:16               ` Henrik Carlqvist
2023-04-30 20:55                 ` [PATCH v6] " Henrik Carlqvist
2023-06-08 16:14                   ` Ping: " Henrik Carlqvist
2023-06-10  7:06                     ` Mark Cave-Ayland
2023-06-10 10:29                       ` Henrik Carlqvist
2023-06-10 23:47                         ` [PATCH v7] " Henrik Carlqvist
2023-06-20  9:22                           ` Daniel P. Berrangé
2023-06-20 19:50                             ` Henrik Carlqvist
2023-06-21  7:09                               ` Daniel P. Berrangé
2023-06-21 18:14                                 ` Henrik Carlqvist
2023-06-23 18:30                                   ` [PATCH v8] " Henrik Carlqvist
2023-06-26  9:42                                     ` Daniel P. Berrangé
2023-06-27  6:33                                     ` Mark Cave-Ayland
2023-06-27 17:18                                       ` Henrik Carlqvist
2023-08-01 21:27                                     ` [PATCH v1] Allowing setting and overriding parameters in smb.conf Henrik Carlqvist
2023-08-02 19:53                                       ` Samuel Thibault
2023-08-02 23:09                                         ` Henrik Carlqvist
2023-08-02 23:13                                           ` Samuel Thibault
2023-08-02 23:26                                             ` Henrik Carlqvist
2023-08-02 23:34                                               ` Samuel Thibault
2023-08-03  0:13                                                 ` Henrik Carlqvist
2023-08-03 15:12                                                 ` [PATCH v2] " Henrik Carlqvist
2023-09-10 11:48                                                   ` Ping: " Henrik Carlqvist
2024-02-17 22:28                                                     ` Ping 2: " Henrik Carlqvist
2024-02-18  9:30                                                       ` Michael Tokarev
2024-02-18 14:55                                                         ` Henrik Carlqvist
2023-06-08 16:22                   ` [PATCH v6] Emulate dip switch language layout settings on SUN keyboard Daniel P. Berrangé
2023-06-08 18:12                     ` Henrik Carlqvist
2023-06-09  7:50                       ` Daniel P. Berrangé
2023-01-14 11:50 [PATCH v4] " Henrik Carlqvist
2023-01-14 14:38 ` [PATCH v5] " Henrik Carlqvist
2023-01-22 18:07   ` Mark Cave-Ayland
2023-01-28 13:08     ` Henrik Carlqvist
2023-03-28 13:47   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230123200937.32eb19eb.hc981@poolhem.se \
    --to=hc981@poolhem.se \
    --cc=atar4qemu@gmail.com \
    --cc=hc1245@poolhem.se \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.