mirror of
https://github.com/systemd/systemd
synced 2026-03-18 02:54:47 +01:00
Compare commits
No commits in common. "311fddcd8d994e8398357f53a07695fbbaf27a78" and "f7047b8c1cabca03fd8754abb3b13a6c26117b36" have entirely different histories.
311fddcd8d
...
f7047b8c1c
@ -813,8 +813,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBook*:*
|
|||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPElite*x360*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPElite*x360*:*
|
||||||
# HP Elite Dragonfly
|
# HP Elite Dragonfly
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteDragonfly*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteDragonfly*:*
|
||||||
# HP EliteBoard
|
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBoard*:*
|
|
||||||
# HP ProBook 440 G2
|
# HP ProBook 440 G2
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:*
|
||||||
# HP ProBook
|
# HP ProBook
|
||||||
|
|||||||
@ -588,12 +588,11 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>RestartSteps=</varname></term>
|
<term><varname>RestartSteps=</varname></term>
|
||||||
<listitem><para>Configures the number of exponential steps to take to increase the interval
|
<listitem><para>Configures the number of steps to take to increase the interval
|
||||||
of auto-restarts from <varname>RestartSec=</varname> to <varname>RestartMaxDelaySec=</varname>.
|
of auto-restarts from <varname>RestartSec=</varname> to <varname>RestartMaxDelaySec=</varname>.
|
||||||
Takes a positive integer or 0 to disable it. Defaults to 0.</para>
|
Takes a positive integer or 0 to disable it. Defaults to 0.</para>
|
||||||
|
|
||||||
<para>This setting is effective only if <varname>RestartMaxDelaySec=</varname> is also set and
|
<para>This setting is effective only if <varname>RestartMaxDelaySec=</varname> is also set.</para>
|
||||||
<varname>RestartSec=</varname> is not zero.</para>
|
|
||||||
|
|
||||||
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -605,8 +604,7 @@
|
|||||||
in the same format as <varname>RestartSec=</varname>, or <literal>infinity</literal>
|
in the same format as <varname>RestartSec=</varname>, or <literal>infinity</literal>
|
||||||
to disable the setting. Defaults to <literal>infinity</literal>.</para>
|
to disable the setting. Defaults to <literal>infinity</literal>.</para>
|
||||||
|
|
||||||
<para>This setting is effective only if <varname>RestartSteps=</varname> is also set and
|
<para>This setting is effective only if <varname>RestartSteps=</varname> is also set.</para>
|
||||||
<varname>RestartSec=</varname> is not zero.</para>
|
|
||||||
|
|
||||||
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|||||||
@ -13,7 +13,6 @@
|
|||||||
#include "export-vars.h"
|
#include "export-vars.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
#include "initrd.h"
|
#include "initrd.h"
|
||||||
#include "iovec-util-fundamental.h"
|
|
||||||
#include "line-edit.h"
|
#include "line-edit.h"
|
||||||
#include "measure.h"
|
#include "measure.h"
|
||||||
#include "memory-util-fundamental.h"
|
#include "memory-util-fundamental.h"
|
||||||
@ -2691,7 +2690,7 @@ static EFI_STATUS call_image_start(
|
|||||||
return log_error_status(err, "Error loading %ls: %m", entry->devicetree);
|
return log_error_status(err, "Error loading %ls: %m", entry->devicetree);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = initrd_register(&IOVEC_MAKE(PHYSICAL_ADDRESS_TO_POINTER(initrd_pages.addr), initrd_size), &initrd_handle);
|
err = initrd_register(PHYSICAL_ADDRESS_TO_POINTER(initrd_pages.addr), initrd_size, &initrd_handle);
|
||||||
if (err != EFI_SUCCESS)
|
if (err != EFI_SUCCESS)
|
||||||
return log_error_status(err, "Error registering initrd: %m");
|
return log_error_status(err, "Error registering initrd: %m");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
|
||||||
#include "initrd.h"
|
#include "initrd.h"
|
||||||
#include "iovec-util-fundamental.h"
|
|
||||||
#include "proto/device-path.h"
|
#include "proto/device-path.h"
|
||||||
#include "proto/load-file.h"
|
#include "proto/load-file.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@ -12,7 +11,8 @@
|
|||||||
/* extend LoadFileProtocol */
|
/* extend LoadFileProtocol */
|
||||||
struct initrd_loader {
|
struct initrd_loader {
|
||||||
EFI_LOAD_FILE_PROTOCOL load_file;
|
EFI_LOAD_FILE_PROTOCOL load_file;
|
||||||
struct iovec data;
|
const void *address;
|
||||||
|
size_t length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* static structure for LINUX_INITRD_MEDIA device path
|
/* static structure for LINUX_INITRD_MEDIA device path
|
||||||
@ -52,21 +52,23 @@ static EFIAPI EFI_STATUS initrd_load_file(
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
|
|
||||||
loader = (struct initrd_loader *) this;
|
loader = (struct initrd_loader *) this;
|
||||||
if (!iovec_is_set(&loader->data))
|
|
||||||
|
if (loader->length == 0 || !loader->address)
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
|
|
||||||
if (!buffer || *buffer_size < loader->data.iov_len) {
|
if (!buffer || *buffer_size < loader->length) {
|
||||||
*buffer_size = loader->data.iov_len;
|
*buffer_size = loader->length;
|
||||||
return EFI_BUFFER_TOO_SMALL;
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(buffer, loader->data.iov_base, loader->data.iov_len);
|
memcpy(buffer, loader->address, loader->length);
|
||||||
*buffer_size = loader->data.iov_len;
|
*buffer_size = loader->length;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS initrd_register(
|
EFI_STATUS initrd_register(
|
||||||
const struct iovec *initrd,
|
const void *initrd_address,
|
||||||
|
size_t initrd_length,
|
||||||
EFI_HANDLE *ret_initrd_handle) {
|
EFI_HANDLE *ret_initrd_handle) {
|
||||||
|
|
||||||
EFI_STATUS err;
|
EFI_STATUS err;
|
||||||
@ -76,10 +78,7 @@ EFI_STATUS initrd_register(
|
|||||||
|
|
||||||
assert(ret_initrd_handle);
|
assert(ret_initrd_handle);
|
||||||
|
|
||||||
/* If no initrd is specified we'll not install any. This avoids registration of the protocol for that
|
if (!initrd_address || initrd_length == 0)
|
||||||
* case, leaving it open for something else. */
|
|
||||||
|
|
||||||
if (!iovec_is_set(initrd))
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
/* check if a LINUX_INITRD_MEDIA_GUID DevicePath is already registered.
|
/* check if a LINUX_INITRD_MEDIA_GUID DevicePath is already registered.
|
||||||
@ -93,7 +92,8 @@ EFI_STATUS initrd_register(
|
|||||||
loader = xnew(struct initrd_loader, 1);
|
loader = xnew(struct initrd_loader, 1);
|
||||||
*loader = (struct initrd_loader) {
|
*loader = (struct initrd_loader) {
|
||||||
.load_file.LoadFile = initrd_load_file,
|
.load_file.LoadFile = initrd_load_file,
|
||||||
.data = *initrd,
|
.address = initrd_address,
|
||||||
|
.length = initrd_length
|
||||||
};
|
};
|
||||||
|
|
||||||
/* create a new handle and register the LoadFile2 protocol with the InitrdMediaPath on it */
|
/* create a new handle and register the LoadFile2 protocol with the InitrdMediaPath on it */
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
#include "efi.h"
|
#include "efi.h"
|
||||||
|
|
||||||
EFI_STATUS initrd_register(
|
EFI_STATUS initrd_register(
|
||||||
const struct iovec *initrd,
|
const void *initrd_address,
|
||||||
|
size_t initrd_length,
|
||||||
EFI_HANDLE *ret_initrd_handle);
|
EFI_HANDLE *ret_initrd_handle);
|
||||||
|
|
||||||
EFI_STATUS initrd_unregister(EFI_HANDLE initrd_handle);
|
EFI_STATUS initrd_unregister(EFI_HANDLE initrd_handle);
|
||||||
|
|||||||
@ -96,7 +96,7 @@ static EFI_STATUS load_via_boot_services(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
||||||
err = initrd_register(initrd, &initrd_handle);
|
err = initrd_register(initrd->iov_base, initrd->iov_len, &initrd_handle);
|
||||||
if (err != EFI_SUCCESS)
|
if (err != EFI_SUCCESS)
|
||||||
return log_error_status(err, "Error registering initrd: %m");
|
return log_error_status(err, "Error registering initrd: %m");
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ EFI_STATUS linux_exec(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
||||||
err = initrd_register(initrd, &initrd_handle);
|
err = initrd_register(initrd->iov_base, initrd->iov_len, &initrd_handle);
|
||||||
if (err != EFI_SUCCESS)
|
if (err != EFI_SUCCESS)
|
||||||
return log_error_status(err, "Error registering initrd: %m");
|
return log_error_status(err, "Error registering initrd: %m");
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user