[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 4/7] docs: Improve documentation and parsing for efi=
Update parse_efi_param() to use parse_boolean() for "rs", so it behaves like other Xen booleans. However, change "attr=uc" to not be a boolean. This is a functional change, but "no-attr=uc" is ambiguous and shouldn't be accepted. Update the command line documentation for consistency. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Juergen Gross <jgross@xxxxxxxx> v3: * New --- docs/misc/xen-command-line.pandoc | 22 ++++++++-------------- xen/common/efi/boot.c | 11 +++-------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 41dec5b..4f27e54 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -851,23 +851,17 @@ disable it (edid=no). This option should not normally be required except for debugging purposes. ### efi -> `= List of [ rs | attr ]` +> `= List of [ rs=<bool>, attr=uc ]` -All options are of boolean kind and can be prefixed with `no-` to -effect the inverse meaning. +Controls for interacting with the system Extended Firmware Interface. -> `rs` +* The `rs` boolean controls whether Runtime Services are used. By default, + Xen uses Runtime Services itself, and proxies certain calls on behalf of + dom0. Selecting `rs=0` prohibits all use of Runtime Services. -> Default: `true` - ->> Force or disable use of EFI runtime services. - -> `attr=uc` - -> Default: `off` - ->> Allows mapping of RuntimeServices which have no cachability attribute ->> set as UC. +* The `attr=uc` string exists as a workaround, to allow mapping memory regions + with unknown/unrecognised cacheability as uncacheable, rather than not + present. ### ept > `= List of [ ad=<bool>, pml=<bool> ]` diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 1e1a551..597b2ff 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -1389,19 +1389,14 @@ static bool __initdata efi_map_uc; static int __init parse_efi_param(const char *s) { const char *ss; - int rc = 0; + int rc = 0, val; do { - bool val = strncmp(s, "no-", 3); - - if ( !val ) - s += 3; - ss = strchr(s, ','); if ( !ss ) ss = strchr(s, '\0'); - if ( !cmdline_strcmp(s, "rs") ) + if ( (val = parse_boolean("rs", s, ss)) >= 0 ) { if ( val ) __set_bit(EFI_RS, &efi_flags); @@ -1409,7 +1404,7 @@ static int __init parse_efi_param(const char *s) __clear_bit(EFI_RS, &efi_flags); } else if ( !cmdline_strcmp(s, "attr=uc") ) - efi_map_uc = val; + efi_map_uc = true; else rc = -EINVAL; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |