Skip to contentSkip to conversation

Kconfig dependencies for some MIPS machines

PATCH In review Philippe Mathieu-Daudé 3 participants 8 messages Jul 1, 2019

lore
Share & tools
lore
#0 lore raw

v4 cover Kconfig dependencies for some MIPS machines

Express the MIPS machine dependencies with Kconfig.

Various issues prevent to use Kconfig with the Boston and Malta boards. They will be switched later.

v4:
- dropped Boston (Aleksandar required the ITU to be selectable)
- comment why use 'imply' in Jazz (Thomas)

v3:
- addressed review comments from Thomas and Aleksandar (noted in each patch)

v2: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00887.html
- Do not remove machines from the default config (Thomas)
- Corrected comment about CONFIG_PCI_BONITO (Thomas)

v1: https://www.mail-archive.com/[email protected]/msg593013.html

$ git backport-diff -u kconfig_mips-v3
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/4:[down] 'hw/mips: Explicit the semi-hosting feature is always required' 002/4:[----] [--] 'hw/mips: Express dependencies of the MIPSsim machine with Kconfig' 003/4:[----] [-C] 'hw/mips: Express dependencies of the Jazz machine with Kconfig' 004/4:[0005] [FC] 'hw/mips: Express dependencies of the r4k platform with Kconfig'

Regards,

Phil.

Philippe Mathieu-Daudé (4):
hw/mips: Explicit the semi-hosting feature is always required hw/mips: Express dependencies of the MIPSsim machine with Kconfig hw/mips: Express dependencies of the Jazz machine with Kconfig hw/mips: Express dependencies of the r4k platform with Kconfig

 default-configs/mips-softmmu-common.mak |  7 +++---
 default-configs/mips64-softmmu.mak      |  5 -----
 default-configs/mips64el-softmmu.mak    |  5 -----
 hw/mips/Kconfig                         | 30 +++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 14 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v4 1/4 hw/mips: Explicit the semi-hosting feature is always required

Disabling the semi-hosting feature leads to build failure:

LINK mips-softmmu/qemu-system-mips
/usr/bin/ld: target/mips/mips-semi.o: in function `helper_do_semihosting':
target/mips/mips-semi.c:335: undefined reference to qemu_semihosting_log_out' /usr/bin/ld: target/mips/mips-semi.c:338: undefined reference to qemu_semihosting_log_out'
collect2: error: ld returned 1 exit status

Add a comment to avoid this feature to be disabled.

---
 default-configs/mips-softmmu-common.mak | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
default-configs/mips-softmmu-common.mak +3 -1
index e10ac4b20c..1ea47a9c2a 100644
@@ -1,5 +1,8 @@
 # Common mips*-softmmu CONFIG defines
 
+# CONFIG_SEMIHOSTING is always required on this architecture
+CONFIG_SEMIHOSTING=y
+
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
@@ -35,7 +38,6 @@ CONFIG_MIPS_CPS=y
 CONFIG_MIPS_ITU=y
 CONFIG_R4K=y
 CONFIG_MALTA=y
-CONFIG_SEMIHOSTING=y
 CONFIG_PCNET_PCI=y
 CONFIG_MIPSSIM=y
 CONFIG_ACPI_SMBUS=y
Signature · 1 line
2.20.1
Reviewed-by on v4 1/4
#2 lore raw

Re: [Qemu-devel] [PATCH v4 1/4] hw/mips: Explicit the semi-hosting feature is always required

Quoted 5 lines

From: Philippe Mathieu-Daudé <[email protected]>
Sent: Monday, July 1, 2019 1:26 PM
Subject: [PATCH v4 1/4] hw/mips: Explicit the semi-hosting feature is always required

Disabling the semi-hosting feature leads to build failure:

...

Quoted 1 line

Add a comment to avoid this feature to be disabled.

---

#3 lore raw

PATCH v4 2/4 hw/mips: Express dependencies of the MIPSsim machine with Kconfig

In reply to Philippe Mathieu-Daudé

The MIPSsim machine only emulates an 8250 UART and a simple network controller, connected via an ISA bus.

---
 default-configs/mips-softmmu-common.mak | 1 -
 hw/mips/Kconfig                         | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)
default-configs/mips-softmmu-common.mak +0 -1
index 1ea47a9c2a..63ed293f2e 100644
@@ -29,7 +29,6 @@ CONFIG_PIIX4=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_PIIX=y
 CONFIG_NE2000_ISA=y
-CONFIG_MIPSNET=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_I8259=y
 CONFIG_MC146818RTC=y
hw/mips/Kconfig +3 -0
index cdc07e59b6..3433e97e1a 100644
@@ -6,6 +6,9 @@ config MALTA
 
 config MIPSSIM
     bool
+    select ISA_BUS
+    select SERIAL_ISA
+    select MIPSNET
 
 config JAZZ
     bool
Signature · 1 line
2.20.1
#4 lore raw

PATCH v4 3/4 hw/mips: Express dependencies of the Jazz machine with Kconfig

In reply to Philippe Mathieu-Daudé

The Jazz use the RC4030 Asic to provide an EISA bus and DMA/IRQ. The framebuffer display is managed by a G364, the network card is a Sonic DP83932. A QLogic ESP216 provides a SCSI bus.

None, for the both machine variants (PICA-61 and Magnum 4000), the DP83932 chipset is soldered on the board, and is MMIO-mapped (selected via Chip Select). Therefore we have to enforce the 'select' Kconfig rule (we can not use the 'imply' rule helpful when devices are connected on a bus).

---
v3: Keep CONFIG_JAZZ in default-configs/mips64el-softmmu.mak (Thomas)
v4: explain DP83932 is soldered to justify not using the 'imply' rule

---
 default-configs/mips-softmmu-common.mak |  1 -
 default-configs/mips64-softmmu.mak      |  5 -----
 default-configs/mips64el-softmmu.mak    |  5 -----
 hw/mips/Kconfig                         | 17 +++++++++++++++++
 4 files changed, 17 insertions(+), 11 deletions(-)
default-configs/mips-softmmu-common.mak +0 -1
index 63ed293f2e..d545987d42 100644
@@ -6,7 +6,6 @@ CONFIG_SEMIHOSTING=y
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
-CONFIG_ESP=y
 CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
 CONFIG_VGA_CIRRUS=y
default-configs/mips64-softmmu.mak +0 -5
index bad7496672..a169738635 100644
@@ -1,9 +1,4 @@
 # Default configuration for mips64-softmmu
 
 include mips-softmmu-common.mak
-CONFIG_RC4030=y
-CONFIG_DP8393X=y
-CONFIG_DS1225Y=y
 CONFIG_JAZZ=y
-CONFIG_G364FB=y
-CONFIG_JAZZ_LED=y
default-configs/mips64el-softmmu.mak +0 -5
index a67c9517a2..8b0c9b1e15 100644
@@ -2,15 +2,10 @@
 
 include mips-softmmu-common.mak
 CONFIG_IDE_VIA=y
-CONFIG_RC4030=y
-CONFIG_DP8393X=y
-CONFIG_DS1225Y=y
 CONFIG_FULONG=y
 CONFIG_ATI_VGA=y
 CONFIG_RTL8139_PCI=y
 CONFIG_JAZZ=y
-CONFIG_G364FB=y
-CONFIG_JAZZ_LED=y
 CONFIG_VT82C686=y
 CONFIG_AHCI=y
 CONFIG_MIPS_BOSTON=y
hw/mips/Kconfig +17 -0
index 3433e97e1a..ab006477c7 100644
@@ -12,6 +12,23 @@ config MIPSSIM
 
 config JAZZ
     bool
+    select ISA_BUS
+    select RC4030
+    select I8259
+    select I8254
+    select I8257
+    select PCSPK
+    select VGA_ISA_MM
+    select G364FB
+    select DP8393X
+    select ESP
+    select FDC
+    select MC146818RTC
+    select PCKBD
+    select SERIAL
+    select PARALLEL
+    select DS1225Y
+    select JAZZ_LED
 
 config FULONG
     bool
Signature · 1 line
2.20.1
#5 lore raw

PATCH v4 4/4 hw/mips: Express dependencies of the r4k platform with Kconfig

In reply to Philippe Mathieu-Daudé

This platform use standard PC devices connected to an ISA bus. Networking is provided by a ne2000 chipset.

---
v4: use 'imply' for VGA_ISA/NE2000_ISA (Thomas)

v3: remove CONFIG_NE2000_ISA (Thomas)
add PFLASH_CFI01

---
 default-configs/mips-softmmu-common.mak |  1 -
 hw/mips/Kconfig                         | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
default-configs/mips-softmmu-common.mak +0 -1
index d545987d42..da29c6c0b2 100644
@@ -27,7 +27,6 @@ CONFIG_I8257=y
 CONFIG_PIIX4=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_PIIX=y
-CONFIG_NE2000_ISA=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_I8259=y
 CONFIG_MC146818RTC=y
hw/mips/Kconfig +10 -0
index ab006477c7..62aa01b29e 100644
@@ -1,5 +1,15 @@
 config R4K
     bool
+    select ISA_BUS
+    select SERIAL_ISA
+    select I8259
+    select I8254
+    select MC146818RTC
+    imply VGA_ISA
+    imply NE2000_ISA
+    select IDE_ISA
+    select PCKBD
+    select PFLASH_CFI01
 
 config MALTA
     bool
Signature · 1 line
2.20.1
Reviewed-by on v4 4/4
#6 lore raw

Re: [Qemu-devel] [PATCH v4 4/4] hw/mips: Express dependencies of the r4k platform with Kconfig

Quoted 9 lines

From: Philippe Mathieu-Daudé <[email protected]>
Sent: Monday, July 1, 2019 1:26 PM
Subject: [PATCH v4 4/4] hw/mips: Express dependencies of the r4k platform with Kconfig

This platform use standard PC devices connected to an ISA bus. Networking is provided by a ne2000 chipset.

---

#7 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé

Express the MIPS machine dependencies with Kconfig.

Various issues prevent to use Kconfig with the Boston and Malta boards. They will be switched later.

I am going to select the whole series for mips queue scheduled tomorrow.

Yours,
Aleksandar

Quoted 12 lines

v4:
- dropped Boston (Aleksandar required the ITU to be selectable)
- comment why use 'imply' in Jazz (Thomas)

v3:
- addressed review comments from Thomas and Aleksandar (noted in each patch)

v2: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00887.html
- Do not remove machines from the default config (Thomas)
- Corrected comment about CONFIG_PCI_BONITO (Thomas)

Quoted 6 lines

v1: https://www.mail-archive.com/[email protected]/msg593013.html

$ git backport-diff -u kconfig_mips-v3
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream

patch

Quoted 1 line

The flags [FC] indicate (F)unctional and (C)ontextual differences,

respectively

Quoted 2 lines

001/4:[down] 'hw/mips: Explicit the semi-hosting feature is always

required'

Quoted 1 line

002/4:[----] [--] 'hw/mips: Express dependencies of the MIPSsim machine

with Kconfig'

Quoted 1 line

003/4:[----] [-C] 'hw/mips: Express dependencies of the Jazz machine with

Kconfig'

Quoted 1 line

004/4:[0005] [FC] 'hw/mips: Express dependencies of the r4k platform with

Kconfig'

Quoted 21 lines

Regards,

Phil.

Philippe Mathieu-Daudé (4):
hw/mips: Explicit the semi-hosting feature is always required hw/mips: Express dependencies of the MIPSsim machine with Kconfig hw/mips: Express dependencies of the Jazz machine with Kconfig hw/mips: Express dependencies of the r4k platform with Kconfig

 default-configs/mips-softmmu-common.mak |  7 +++---
 default-configs/mips64-softmmu.mak      |  5 -----
 default-configs/mips64el-softmmu.mak    |  5 -----
 hw/mips/Kconfig                         | 30 +++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 14 deletions(-)

--
2.20.1