On 09/01/2014 05:22 PM, Michal Privoznik wrote:
Up to now, users can configure BIOS via the <loader/> element.
With
the upcoming implementation of UEFI this is not enough as BIOS and
UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
is programmable flash (although all writes to code section are
denied). Therefore we need new attribute @type which will
differentiate the two. Then, new attribute @readonly is introduced to
reflect the fact that some images are RO.
Moreover, the OVMF (which is going to be used mostly), works in two
modes:
1) Code and UEFI variable store is mixed in one file.
2) Code and UEFI variable store is separated in two files
The latter has advantage of updating the UEFI code without losing the
configuration. However, in order to represent the latter case we need
yet another XML element: <nvram/>. Currently, it has no additional
attributes, it's just a bare element containing path to the variable
store file.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Acked-by: Laszlo Ersek <lersek(a)redhat.com>
---
ACK
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9586c3b..f09312a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1628,6 +1628,26 @@ struct _virDomainBIOSDef {
int rt_delay;
};
+typedef enum {
+ VIR_DOMAIN_LOADER_TYPE_ROM = 0,
+ VIR_DOMAIN_LOADER_TYPE_PFLASH,
+
+ VIR_DOMAIN_LOADER_TYPE_LAST
+} virDomainLoader;
+
+VIR_ENUM_DECL(virDomainLoader)
+
+typedef struct _virDomainLoaderDef virDomainLoaderDef;
+typedef virDomainLoaderDef *virDomainLoaderDefPtr;
+struct _virDomainLoaderDef {
+ char *path;
+ int readonly; /* enum virTristateBool */
This would look nicer indented to the same column as the comment below :)
+ virDomainLoader type;
+ char *nvram; /* path to non-volatile RAM */
+};
+
+void virDomainLoaderDefFree(virDomainLoaderDefPtr loader);
+
/* Operating system configuration data & machine / arch */
typedef struct _virDomainOSDef virDomainOSDef;
typedef virDomainOSDef *virDomainOSDefPtr;
Jan