Skip to contentSkip to conversation

hw/input/Kconfig: Rename the 8042 PS/2 Keyboard Controller

PATCH Philippe Mathieu-Daudé 1 participant 3 messages Apr 12, 2019 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 77 lines · BALATON Zoltan
Quoted 73 lines · Philippe Mathieu-Daudé

The Intel 8042 chipset also includes some functions unrelated to the keyboard, such the A20-Gate. Rename it using the chipset name.

---
default-configs/mips-softmmu-common.mak | 2 +-
hw/alpha/Kconfig                        | 2 +-
hw/i386/Kconfig                         | 2 +-
hw/input/Kconfig                        | 2 +-
hw/input/Makefile.objs                  | 2 +-
hw/sparc64/Kconfig                      | 2 +-
hw/unicore32/Kconfig                    | 2 +-

7 files changed, 7 insertions(+), 7 deletions(-)
default-configs/mips-softmmu-common.mak +0 -0
index 0795d522db..bad7ee3360 100644
@@ -13,7 +13,7 @@ CONFIG_SERIAL_ISA=y

CONFIG_PARALLEL=y
CONFIG_I8254=y
CONFIG_PCSPK=y

default-configs/mips-softmmu-common.mak +1 -1
-CONFIG_PCKBD=y
+CONFIG_I8042=y

CONFIG_FDC=y
CONFIG_ACPI=y
CONFIG_ACPI_X86=y

hw/alpha/Kconfig +0 -0
index 22cefd9577..eb99765123 100644
@@ -8,5 +8,5 @@ config DP264

    select IDE_CMD646
    select MC146818RTC
    select PCI
-    select PCKBD
+    select I8042
    select SMC37C669

hw/i386/Kconfig +0 -0
index 78fd70396a..7fa5395894 100644
@@ -20,7 +20,7 @@ config PC

    select FDC
    select I8259
    select I8254
-    select PCKBD
+    select I8042
    select PCSPK
    select I82374
    select I8257

hw/input/Kconfig +0 -0
index e2e66f0858..14e76c5df4 100644
@@ -5,7 +5,7 @@ config LM832X

    bool
    depends on I2C

hw/input/Kconfig +1 -1
-config PCKBD
+config I8042

    bool
    default y
    depends on ISA_BUS

hw/input/Makefile.objs +0 -0
index c8b00f71ec..6e4c3389be 100644
@@ -1,7 +1,7 @@

common-obj-$(CONFIG_ADB) += adb.o adb-mouse.o adb-kbd.o common-obj-y += hid.o common-obj-$(CONFIG_LM832X) += lm832x.o

hw/input/Makefile.objs

Quoted 2 lines
hw/input/Makefile.objs +1 -1
-common-obj-$(CONFIG_PCKBD) += pckbd.o
+common-obj-$(CONFIG_I8042) += pckbd.o
Quoted 7 lines

This makes config option different from the filename so I wonder if it's worth changing it or better to keep it same as its file like the others? A20 gate is controlled by AT keyboard controller but that's probably a hack made by the designers of that machine, it's still used mainly as a keyboard controller so just to avoid changes we could live with the PCKBD name as well (which might even be simpler to understand for people not familiar with chip numbers).

Regarding Kconfig, when we model a machine, I find clearer to name the chipset used by their name. Now when it is about optional feature, I don't mind.

The other Intel chipset are named similarly:

$ ls -1 hw/*/i[0-9]*c
hw/dma/i82374.c
hw/dma/i8257.c
hw/i2c/i2c-ddc.c
hw/intc/i8259.c
hw/intc/i8259_common.c
hw/isa/i82378.c
hw/timer/i8254.c
hw/timer/i8254_common.c

I'm happy to rename the file as i8042.c as you suggested, however I'll do it in another patch previous to this one.

Thanks,

Phil.

Quoted 31 lines

Regards,
BALATON Zoltan

Quoted 28 lines

common-obj-$(CONFIG_PL050) += pl050.o common-obj-y += ps2.o common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o

hw/sparc64/Kconfig +0 -0
index 4a8166ebb7..24ccb11c87 100644
@@ -10,7 +10,7 @@ config SUN4U

    select PCI_SABRE
    select IDE_CMD646
    select PARALLEL
-    select PCKBD
+    select I8042
    select SIMBA

config NIAGARA

hw/unicore32/Kconfig +0 -0
index 4443a29dd2..67f4c867c1 100644
@@ -1,5 +1,5 @@

config PUV3
    bool
    select ISA_BUS
-    select PCKBD
+    select I8042
    select PTIMER

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: [Qemu-devel] [PATCH 4/8] hw/isa/southbridge: Rename ACPI_X86_ICH to ACPI_ICH9

Quoted 6 lines · Igor Mammedov
Quoted 2 lines · On Sun, 17 Mar 2019 01:22:55 +0100 Philippe Mathieu-Daudé <[email protected]>…

The ICH9 chipset is a generic southbridge and can be used by non-X86 hardware. Rename it to make this more obvious.

Is it actually used by anything else in QEMU beside Q35 board?

Yes, the MIPS Boston board (hw/mips/boston.c:520):

ahci =
pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus,

                                           PCI_DEVFN(0, 0),
                                           true, TYPE_ICH9_AHCI);

See:

commit df1d8a1f29f567567b9d20be685a4241282e7005

Author: Paul Burton <[email protected]>
Date:   Thu Sep 8 15:51:58 2016 +0100

hw/mips: MIPS Boston board support

Introduce support for emulating the MIPS Boston development board. The Boston board is built around an FPGA & 3 PCIe controllers, one of which is connected to an Intel EG20T Platform Controller Hub. It is used during the development & debug of new CPUs and the software intended to run on them, and is essentially the successor to the older MIPS Malta board.

This patch does not implement the EG20T, instead connecting an already supported ICH-9 AHCI controller. Whilst this isn't accurate it's enough for typical stock Boston software (eg. Linux kernels) to work with hard disks given that both the ICH-9 & EG20T implement the AHCI specification.

Quoted 57 lines
Quoted 56 lines
---
 hw/acpi/Kconfig       | 2 +-
 hw/acpi/Makefile.objs | 2 +-
 hw/i2c/Makefile.objs  | 2 +-
 hw/isa/Kconfig        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
hw/acpi/Kconfig +1 -1
index eca3beed75..e24c895772 100644
@@ -8,7 +8,7 @@ config ACPI_X86
     select ACPI_CPU_HOTPLUG
     select ACPI_MEMORY_HOTPLUG
 
-config ACPI_X86_ICH
+config ACPI_ICH9
     bool
     select ACPI_X86
 
hw/acpi/Makefile.objs +1 -1
index c86edfbed9..dff94d35e7 100644
@@ -1,5 +1,5 @@
 common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
+common-obj-$(CONFIG_ACPI_ICH9) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
 common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
hw/i2c/Makefile.objs +1 -1
index a98c786918..b632461513 100644
@@ -3,7 +3,7 @@ common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_DDC) += i2c-ddc.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
+common-obj-$(CONFIG_ACPI_ICH9) += smbus_ich9.o
 common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
 common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
 common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
hw/isa/Kconfig +1 -1
index 57e09a0cb8..19101d349f 100644
@@ -50,4 +50,4 @@ config LPC_ICH9
     # for ICH9.
     select ISA_BUS
     select ACPI_SMBUS
-    select ACPI_X86_ICH
+    select ACPI_ICH9
#7 lore raw

Re: [Qemu-devel] [PATCH 4/8] hw/isa/southbridge: Rename ACPI_X86_ICH to ACPI_ICH9

Hi Igor,

Quoted 30 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Igor Mammedov
Quoted 2 lines · On Sun, 17 Mar 2019 01:22:55 +0100 Philippe Mathieu-Daudé <[email protected]>…

The ICH9 chipset is a generic southbridge and can be used by non-X86 hardware. Rename it to make this more obvious.

Is it actually used by anything else in QEMU beside Q35 board?

Yes, the MIPS Boston board (hw/mips/boston.c:520):

ahci =
pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus,

                                           PCI_DEVFN(0, 0),
                                           true, TYPE_ICH9_AHCI);

See:

commit df1d8a1f29f567567b9d20be685a4241282e7005

Author: Paul Burton <[email protected]>
Date:   Thu Sep 8 15:51:58 2016 +0100

hw/mips: MIPS Boston board support

Introduce support for emulating the MIPS Boston development board. The Boston board is built around an FPGA & 3 PCIe controllers, one of which is connected to an Intel EG20T Platform Controller Hub. It is used during the development & debug of new CPUs and the software intended to run on them, and is essentially the successor to the older MIPS Malta board.

Quoted 5 lines

This patch does not implement the EG20T, instead connecting an already supported ICH-9 AHCI controller. Whilst this isn't accurate it's enough for typical stock Boston software (eg. Linux kernels) to work with hard disks given that both the ICH-9 & EG20T implement the AHCI specification.

Sorry I messed with the keyboard and sent this mail without finishing.

So my patch description was not enough, I'll add a paragraph about the Boston board.

Thanks,

Phil.

Quoted 57 lines
Quoted 57 lines
Quoted 56 lines
---
 hw/acpi/Kconfig       | 2 +-
 hw/acpi/Makefile.objs | 2 +-
 hw/i2c/Makefile.objs  | 2 +-
 hw/isa/Kconfig        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
hw/acpi/Kconfig +1 -1
index eca3beed75..e24c895772 100644
@@ -8,7 +8,7 @@ config ACPI_X86
     select ACPI_CPU_HOTPLUG
     select ACPI_MEMORY_HOTPLUG
 
-config ACPI_X86_ICH
+config ACPI_ICH9
     bool
     select ACPI_X86
 
hw/acpi/Makefile.objs +1 -1
index c86edfbed9..dff94d35e7 100644
@@ -1,5 +1,5 @@
 common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
+common-obj-$(CONFIG_ACPI_ICH9) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
 common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
hw/i2c/Makefile.objs +1 -1
index a98c786918..b632461513 100644
@@ -3,7 +3,7 @@ common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_DDC) += i2c-ddc.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
+common-obj-$(CONFIG_ACPI_ICH9) += smbus_ich9.o
 common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
 common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
 common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
hw/isa/Kconfig +1 -1
index 57e09a0cb8..19101d349f 100644
@@ -50,4 +50,4 @@ config LPC_ICH9
     # for ICH9.
     select ISA_BUS
     select ACPI_SMBUS
-    select ACPI_X86_ICH
+    select ACPI_ICH9