From 8c6fd7f341fd7e414171e09618b496de871da718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Wed, 5 Apr 2017 14:41:31 +0200 Subject: ipmi: use a file to load SDRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The IPMI BMC simulator populates the sdr/sensor tables with a minimal set of entries (Watchdog). But some qemu platforms might want to use extra entries for their custom needs. This patch modifies slighty the initializing routine to take into account a larger set read from a file. The name of the file to use is defined through a new 'sdr' property of the simulator device. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum Signed-off-by: David Gibson --- qemu-options.hx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'qemu-options.hx') diff --git a/qemu-options.hx b/qemu-options.hx index 9171bd5eec..366b088939 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -425,7 +425,7 @@ possible drivers and properties, use @code{-device help} and @code{-device @var{driver},help}. Some drivers are: -@item -device ipmi-bmc-sim,id=@var{id}[,slave_addr=@var{val}] +@item -device ipmi-bmc-sim,id=@var{id}[,slave_addr=@var{val}][,sdrfile=@var{file}] Add an IPMI BMC. This is a simulation of a hardware management interface processor that normally sits on a system. It provides @@ -437,6 +437,15 @@ This address is the BMC's address on the I2C network of management controllers. If you don't know what this means, it is safe to ignore it. +@table @option +@item bmc=@var{id} +The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above. +@item slave_addr=@var{val} +Define slave address to use for the BMC. The default is 0x20. +@item sdrfile=@var{file} +file containing raw Sensor Data Records (SDR) data. The default is none. +@end table + @item -device ipmi-bmc-extern,id=@var{id},chardev=@var{id}[,slave_addr=@var{val}] Add a connection to an external IPMI BMC simulator. Instead of -- cgit v1.2.1 From 540c07d3453c1a82dd66608bcb2cde79ea91b192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Wed, 5 Apr 2017 14:41:32 +0200 Subject: ipmi: provide support for FRUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which name is specified in the object properties, each entry having a fixed size, also specified in the properties. If the file is unknown or not accessible for some reason, a unique entry of 1024 bytes is created as a default. Just enough to start some simulation. These commands complies with the IPMI spec : "34. FRU Inventory Device Commands". Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard [dwg: Folded in subsequent fix to handle NULL filename] Signed-off-by: David Gibson --- qemu-options.hx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qemu-options.hx') diff --git a/qemu-options.hx b/qemu-options.hx index 366b088939..39770c15a6 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -425,7 +425,7 @@ possible drivers and properties, use @code{-device help} and @code{-device @var{driver},help}. Some drivers are: -@item -device ipmi-bmc-sim,id=@var{id}[,slave_addr=@var{val}][,sdrfile=@var{file}] +@item -device ipmi-bmc-sim,id=@var{id}[,slave_addr=@var{val}][,sdrfile=@var{file}][,furareasize=@var{val}][,furdatafile=@var{file}] Add an IPMI BMC. This is a simulation of a hardware management interface processor that normally sits on a system. It provides @@ -443,7 +443,11 @@ The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above. @item slave_addr=@var{val} Define slave address to use for the BMC. The default is 0x20. @item sdrfile=@var{file} -file containing raw Sensor Data Records (SDR) data. The default is none. +file containing raw Sensor Data Records (SDR) data. The default is none. +@item fruareasize=@var{val} +size of a Field Replaceable Unit (FRU) area. The default is 1024. +@item frudatafile=@var{file} +file containing raw Field Replaceable Unit (FRU) inventory data. The default is none. @end table @item -device ipmi-bmc-extern,id=@var{id},chardev=@var{id}[,slave_addr=@var{val}] -- cgit v1.2.1