Skip to contentSkip to conversation

qom: Fix missing interface in qemu-storage-daemon

PATCH Superseded Philippe Mathieu-Daudé 4 participants 9 messages Oct 6, 2020 Arm/Amlogic Meson SoC support

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover qom: Fix missing interface in qemu-storage-daemon

Attempt to fix the issue reported by Kevin.

Since RFC:
- Keep it local to hw/nvram (danpb)
- Based on Meson cleanup

Based-on: <[email protected]>
Supersedes: <[email protected]>

Philippe Mathieu-Daudé (1):
hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

 hw/nvram/fw_cfg-interface.c | 15 +++++++++++++++
 hw/nvram/fw_cfg.c           |  7 -------
 MAINTAINERS                 |  2 +-
 hw/nvram/meson.build        |  3 +++
 4 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 hw/nvram/fw_cfg-interface.c
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/1 hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
---
 hw/nvram/fw_cfg-interface.c | 15 +++++++++++++++
 hw/nvram/fw_cfg.c           |  7 -------
 MAINTAINERS                 |  2 +-
 hw/nvram/meson.build        |  3 +++
 4 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 hw/nvram/fw_cfg-interface.c
hw/nvram/fw_cfg-interface.c new file +15 -0
new file mode 100644
index 0000000000..2b19502ffe
@@ -0,0 +1,15 @@
+#include "qemu/osdep.h"
+#include "hw/nvram/fw_cfg.h"
+
+static const TypeInfo fw_cfg_data_generator_interface_info = {
+    .parent = TYPE_INTERFACE,
+    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
+    .class_size = sizeof(FWCfgDataGeneratorClass),
+};
+
+static void fw_cfg_register_types(void)
+{
+    type_register_static(&fw_cfg_data_generator_interface_info);
+}
+
+type_init(fw_cfg_register_types)
hw/nvram/fw_cfg.c +0 -7
index 0e95d057fd..08539a1aab 100644
@@ -1360,18 +1360,11 @@ static const TypeInfo fw_cfg_mem_info = {
     .class_init    = fw_cfg_mem_class_init,
 };
 
-static const TypeInfo fw_cfg_data_generator_interface_info = {
-    .parent = TYPE_INTERFACE,
-    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
-    .class_size = sizeof(FWCfgDataGeneratorClass),
-};
-
 static void fw_cfg_register_types(void)
 {
     type_register_static(&fw_cfg_info);
     type_register_static(&fw_cfg_io_info);
     type_register_static(&fw_cfg_mem_info);
-    type_register_static(&fw_cfg_data_generator_interface_info);
 }
 
 type_init(fw_cfg_register_types)
MAINTAINERS +1 -1
index b76fb31861..a45d908ebd 100644
@@ -2054,7 +2054,7 @@ R: Laszlo Ersek <[email protected]>
 R: Gerd Hoffmann <[email protected]>
 S: Supported
 F: docs/specs/fw_cfg.txt
-F: hw/nvram/fw_cfg.c
+F: hw/nvram/fw_cfg*.c
 F: stubs/fw_cfg.c
 F: include/hw/nvram/fw_cfg.h
 F: include/standard-headers/linux/qemu_fw_cfg.h
hw/nvram/meson.build +3 -0
index 1f2ed013b2..fd2951a860 100644
@@ -1,3 +1,6 @@
+# QOM interfaces must be available anytime QOM is used.
+qom_ss.add(files('fw_cfg-interface.c'))
+
 softmmu_ss.add(files('fw_cfg.c'))
 softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
 softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
Signature · 1 line
2.26.2
Reviewed-by on v2 1/1
#2 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

Quoted 96 lines · Philippe Mathieu-Daudé

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
---
 hw/nvram/fw_cfg-interface.c | 15 +++++++++++++++
 hw/nvram/fw_cfg.c           |  7 -------
 MAINTAINERS                 |  2 +-
 hw/nvram/meson.build        |  3 +++
 4 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 hw/nvram/fw_cfg-interface.c
hw/nvram/fw_cfg-interface.c new file +15 -0
new file mode 100644
index 0000000000..2b19502ffe
@@ -0,0 +1,15 @@
+#include "qemu/osdep.h"
+#include "hw/nvram/fw_cfg.h"
+
+static const TypeInfo fw_cfg_data_generator_interface_info = {
+    .parent = TYPE_INTERFACE,
+    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
+    .class_size = sizeof(FWCfgDataGeneratorClass),
+};
+
+static void fw_cfg_register_types(void)
+{
+    type_register_static(&fw_cfg_data_generator_interface_info);
+}
+
+type_init(fw_cfg_register_types)
hw/nvram/fw_cfg.c +0 -7
index 0e95d057fd..08539a1aab 100644
@@ -1360,18 +1360,11 @@ static const TypeInfo fw_cfg_mem_info = {
     .class_init    = fw_cfg_mem_class_init,
 };
 
-static const TypeInfo fw_cfg_data_generator_interface_info = {
-    .parent = TYPE_INTERFACE,
-    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
-    .class_size = sizeof(FWCfgDataGeneratorClass),
-};
-
 static void fw_cfg_register_types(void)
 {
     type_register_static(&fw_cfg_info);
     type_register_static(&fw_cfg_io_info);
     type_register_static(&fw_cfg_mem_info);
-    type_register_static(&fw_cfg_data_generator_interface_info);
 }
 
 type_init(fw_cfg_register_types)
MAINTAINERS +1 -1
index b76fb31861..a45d908ebd 100644
@@ -2054,7 +2054,7 @@ R: Laszlo Ersek <[email protected]>
 R: Gerd Hoffmann <[email protected]>
 S: Supported
 F: docs/specs/fw_cfg.txt
-F: hw/nvram/fw_cfg.c
+F: hw/nvram/fw_cfg*.c
 F: stubs/fw_cfg.c
 F: include/hw/nvram/fw_cfg.h
 F: include/standard-headers/linux/qemu_fw_cfg.h
hw/nvram/meson.build +0 -0
index 1f2ed013b2..fd2951a860 100644

hw/nvram/meson.build line 6

Quoted 6 lines
hw/nvram/meson.build +3 -0
@@ -1,3 +1,6 @@
+# QOM interfaces must be available anytime QOM is used.
+qom_ss.add(files('fw_cfg-interface.c'))
+
 softmmu_ss.add(files('fw_cfg.c'))
 softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
 softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
#3 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

In reply to Philippe Mathieu-Daudé

Am 06.10.2020 um 13:19 hat Philippe Mathieu-Daudé geschrieben:

Quoted 20 lines

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Quoted 5 lines

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")

This fails to build for me:

../hw/nvram/meson.build:2:7: ERROR: Unknown method "add" in object.

Kevin

#4 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

Quoted 23 lines · Kevin Wolf

Am 06.10.2020 um 13:19 hat Philippe Mathieu-Daudé geschrieben:

Quoted 22 lines

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Quoted 7 lines
Quoted 3 lines
Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")

This fails to build for me:

../hw/nvram/meson.build:2:7: ERROR: Unknown method "add" in object.

It's

Based-on: <[email protected]>

(which won't be applied in exactly that shape, but more or less it will be the same).

Paolo

#5 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

Am 06.10.2020 um 14:20 hat Paolo Bonzini geschrieben:

Quoted 30 lines · Kevin Wolf
Quoted 29 lines

Am 06.10.2020 um 13:19 hat Philippe Mathieu-Daudé geschrieben:

Quoted 20 lines

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Quoted 5 lines

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")

This fails to build for me:

Quoted 8 lines
Quoted 1 line

../hw/nvram/meson.build:2:7: ERROR: Unknown method "add" in object.

It's

Based-on: <[email protected]>

(which won't be applied in exactly that shape, but more or less it will be the same).

Oh, I see. Then I guess it's not supposed to be merged through my tree.

Kevin

#6 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

Quoted 9 lines · Kevin Wolf

Am 06.10.2020 um 14:20 hat Paolo Bonzini geschrieben:

Quoted 6 lines

It's

Based-on: <[email protected]>

(which won't be applied in exactly that shape, but more or less it will be the same).

Oh, I see. Then I guess it's not supposed to be merged through my tree.

As you prefer; feel free to take that one when Phil sends the final version.

Paolo

Reviewed-by on v2 1/1
#7 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

In reply to Philippe Mathieu-Daudé
Quoted 44 lines · Philippe Mathieu-Daudé

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
---
 hw/nvram/fw_cfg-interface.c | 15 +++++++++++++++
 hw/nvram/fw_cfg.c           |  7 -------
 MAINTAINERS                 |  2 +-
 hw/nvram/meson.build        |  3 +++
 4 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 hw/nvram/fw_cfg-interface.c
hw/nvram/fw_cfg-interface.c new file +5 -0
new file mode 100644
index 0000000000..2b19502ffe
@@ -0,0 +1,15 @@
+#include "qemu/osdep.h"
+#include "hw/nvram/fw_cfg.h"
+
+static const TypeInfo fw_cfg_data_generator_interface_info = {
+    .parent = TYPE_INTERFACE,

hw/nvram/fw_cfg-interface.c line 15

Quoted 10 lines
hw/nvram/fw_cfg-interface.c new file +10 -0
+    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
+    .class_size = sizeof(FWCfgDataGeneratorClass),
+};
+
+static void fw_cfg_register_types(void)
+{
+    type_register_static(&fw_cfg_data_generator_interface_info);
+}
+
+type_init(fw_cfg_register_types)

Can you rename *this* instance of "fw_cfg_register_types" to "fw_cfg_register_interfaces"?

While the code is correct from the C lang perspective, duplicate function names are not convenient when debugging with gdb, or when jumping to tags in an editor.

With the rename:

(If you strongly disagree, I'm OK to R-b v2 as well.)

Thanks,
Laszlo

Quoted 48 lines
hw/nvram/fw_cfg.c +0 -7
index 0e95d057fd..08539a1aab 100644
@@ -1360,18 +1360,11 @@ static const TypeInfo fw_cfg_mem_info = {
     .class_init    = fw_cfg_mem_class_init,
 };
 
-static const TypeInfo fw_cfg_data_generator_interface_info = {
-    .parent = TYPE_INTERFACE,
-    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
-    .class_size = sizeof(FWCfgDataGeneratorClass),
-};
-
 static void fw_cfg_register_types(void)
 {
     type_register_static(&fw_cfg_info);
     type_register_static(&fw_cfg_io_info);
     type_register_static(&fw_cfg_mem_info);
-    type_register_static(&fw_cfg_data_generator_interface_info);
 }
 
 type_init(fw_cfg_register_types)
MAINTAINERS +1 -1
index b76fb31861..a45d908ebd 100644
@@ -2054,7 +2054,7 @@ R: Laszlo Ersek <[email protected]>
 R: Gerd Hoffmann <[email protected]>
 S: Supported
 F: docs/specs/fw_cfg.txt
-F: hw/nvram/fw_cfg.c
+F: hw/nvram/fw_cfg*.c
 F: stubs/fw_cfg.c
 F: include/hw/nvram/fw_cfg.h
 F: include/standard-headers/linux/qemu_fw_cfg.h
hw/nvram/meson.build +3 -0
index 1f2ed013b2..fd2951a860 100644
@@ -1,3 +1,6 @@
+# QOM interfaces must be available anytime QOM is used.
+qom_ss.add(files('fw_cfg-interface.c'))
+
 softmmu_ss.add(files('fw_cfg.c'))
 softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
 softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
#8 lore raw

Re: [PATCH v2 1/1] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

Quoted 59 lines · Laszlo Ersek
Quoted 44 lines · Philippe Mathieu-Daudé

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed by a device only available using system-mode (fw_cfg), it is implemented by a crypto component (tls-cipher-suites) which is always available when crypto is used.

Commit 69699f3055 introduced the following error in the qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue could not be triggered at linktime, and we don't have test running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Fixes 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
---
 hw/nvram/fw_cfg-interface.c | 15 +++++++++++++++
 hw/nvram/fw_cfg.c           |  7 -------
 MAINTAINERS                 |  2 +-
 hw/nvram/meson.build        |  3 +++
 4 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 hw/nvram/fw_cfg-interface.c
hw/nvram/fw_cfg-interface.c new file +5 -0
new file mode 100644
index 0000000000..2b19502ffe
@@ -0,0 +1,15 @@
+#include "qemu/osdep.h"
+#include "hw/nvram/fw_cfg.h"
+
+static const TypeInfo fw_cfg_data_generator_interface_info = {
+    .parent = TYPE_INTERFACE,

hw/nvram/fw_cfg-interface.c line 15

Quoted 10 lines
hw/nvram/fw_cfg-interface.c new file +10 -0
+    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
+    .class_size = sizeof(FWCfgDataGeneratorClass),
+};
+
+static void fw_cfg_register_types(void)
+{
+    type_register_static(&fw_cfg_data_generator_interface_info);
+}
+
+type_init(fw_cfg_register_types)

Can you rename *this* instance of "fw_cfg_register_types" to "fw_cfg_register_interfaces"?

Quoted 3 lines

While the code is correct from the C lang perspective, duplicate function names are not convenient when debugging with gdb, or when jumping to tags in an editor.

Sure.

Quoted 4 lines

With the rename:

Thanks!

Quoted 55 lines

(If you strongly disagree, I'm OK to R-b v2 as well.)

Thanks,
Laszlo

Quoted 48 lines
hw/nvram/fw_cfg.c +0 -7
index 0e95d057fd..08539a1aab 100644
@@ -1360,18 +1360,11 @@ static const TypeInfo fw_cfg_mem_info = {
     .class_init    = fw_cfg_mem_class_init,
 };
 
-static const TypeInfo fw_cfg_data_generator_interface_info = {
-    .parent = TYPE_INTERFACE,
-    .name = TYPE_FW_CFG_DATA_GENERATOR_INTERFACE,
-    .class_size = sizeof(FWCfgDataGeneratorClass),
-};
-
 static void fw_cfg_register_types(void)
 {
     type_register_static(&fw_cfg_info);
     type_register_static(&fw_cfg_io_info);
     type_register_static(&fw_cfg_mem_info);
-    type_register_static(&fw_cfg_data_generator_interface_info);
 }
 
 type_init(fw_cfg_register_types)
MAINTAINERS +1 -1
index b76fb31861..a45d908ebd 100644
@@ -2054,7 +2054,7 @@ R: Laszlo Ersek <[email protected]>
 R: Gerd Hoffmann <[email protected]>
 S: Supported
 F: docs/specs/fw_cfg.txt
-F: hw/nvram/fw_cfg.c
+F: hw/nvram/fw_cfg*.c
 F: stubs/fw_cfg.c
 F: include/hw/nvram/fw_cfg.h
 F: include/standard-headers/linux/qemu_fw_cfg.h
hw/nvram/meson.build +3 -0
index 1f2ed013b2..fd2951a860 100644
@@ -1,3 +1,6 @@
+# QOM interfaces must be available anytime QOM is used.
+qom_ss.add(files('fw_cfg-interface.c'))
+
 softmmu_ss.add(files('fw_cfg.c'))
 softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
 softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))