summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/boot/efi/libefi/bootinfo.c4
-rw-r--r--sys/boot/efi/libefi/efiboot.h3
-rw-r--r--sys/boot/ia64/common/bootinfo.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/sys/boot/efi/libefi/bootinfo.c b/sys/boot/efi/libefi/bootinfo.c
index 60a2510..956b813 100644
--- a/sys/boot/efi/libefi/bootinfo.c
+++ b/sys/boot/efi/libefi/bootinfo.c
@@ -239,7 +239,7 @@ bi_copymodules(vm_offset_t addr)
* - Module metadata are formatted and placed in kernel space.
*/
int
-bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args)
+bi_load(struct bootinfo *bi, struct preloaded_file *fp, UINTN *mapkey)
{
char *rootdevname;
struct efi_devdesc *rootdev;
@@ -340,7 +340,9 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args)
&bi->bi_memdesc_version);
if (EFI_ERROR(status)) {
printf("bi_load: Can't read memory map\n");
+ return EINVAL;
}
+ *mapkey = key;
return(0);
}
diff --git a/sys/boot/efi/libefi/efiboot.h b/sys/boot/efi/libefi/efiboot.h
index 13d6d6a..c8d6da7 100644
--- a/sys/boot/efi/libefi/efiboot.h
+++ b/sys/boot/efi/libefi/efiboot.h
@@ -85,4 +85,5 @@ extern int efi_autoload(void);
struct bootinfo;
struct preloaded_file;
-extern int bi_load(struct bootinfo *, struct preloaded_file *);
+extern int bi_load(struct bootinfo *, struct preloaded_file *,
+ UINTN *mapkey);
diff --git a/sys/boot/ia64/common/bootinfo.c b/sys/boot/ia64/common/bootinfo.c
index 60a2510..956b813 100644
--- a/sys/boot/ia64/common/bootinfo.c
+++ b/sys/boot/ia64/common/bootinfo.c
@@ -239,7 +239,7 @@ bi_copymodules(vm_offset_t addr)
* - Module metadata are formatted and placed in kernel space.
*/
int
-bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args)
+bi_load(struct bootinfo *bi, struct preloaded_file *fp, UINTN *mapkey)
{
char *rootdevname;
struct efi_devdesc *rootdev;
@@ -340,7 +340,9 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args)
&bi->bi_memdesc_version);
if (EFI_ERROR(status)) {
printf("bi_load: Can't read memory map\n");
+ return EINVAL;
}
+ *mapkey = key;
return(0);
}
OpenPOWER on IntegriCloud