mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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. "no-attr=uc" is ambiguous and shouldn't be accepted, but accept "attr=no" as an acceptable alternative. Update the command line documentation for consistency. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Release-acked-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
30f5047b2c
commit
633a409473
2 files changed
+20
-23
No files matched your search
@@ -853,23 +853,18 @@ 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=no|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=` string exists to specify what to do with memory regions of
|
||||
unknown/unrecognised cacheability. `attr=no` is the default and will
|
||||
leave the memory regions unmapped, while `attr=uc` will map them as fully
|
||||
uncacheable.
|
||||
|
||||
### ept
|
||||
> `= List of [ ad=<bool>, pml=<bool> ]`
|
||||
|
||||
+11
-9
@@ -1389,27 +1389,29 @@ 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);
|
||||
else
|
||||
__clear_bit(EFI_RS, &efi_flags);
|
||||
}
|
||||
else if ( !cmdline_strcmp(s, "attr=uc") )
|
||||
efi_map_uc = val;
|
||||
else if ( (ss - s) > 5 && !memcmp(s, "attr=", 5) )
|
||||
{
|
||||
if ( cmdline_strcmp(s + 5, "uc") )
|
||||
efi_map_uc = true;
|
||||
else if ( cmdline_strcmp(s + 5, "no") )
|
||||
efi_map_uc = false;
|
||||
else
|
||||
rc = -EINVAL;
|
||||
}
|
||||
else
|
||||
rc = -EINVAL;
|
||||
|
||||
|
||||