011fe81
From 3be166827cecb977ad47ac4d3d89ec92688307a4 Mon Sep 17 00:00:00 2001
011fe81
From: Stephane Rochoy <sheda>
011fe81
Date: Sun, 22 Jun 2014 01:35:52 +0200
58fe9aa
Subject: [PATCH 085/152] 	* grub-core/loader/i386/bsd.c
011fe81
 (grub_netbsd_boot): Pass pointer to 	EFI system table.
011fe81
011fe81
---
011fe81
 ChangeLog                           | 5 +++++
011fe81
 grub-core/loader/i386/bsd.c         | 8 ++++++++
011fe81
 include/grub/i386/netbsd_bootinfo.h | 7 +++++++
011fe81
 3 files changed, 20 insertions(+)
011fe81
011fe81
diff --git a/ChangeLog b/ChangeLog
011fe81
index abf8f4b..0cdd095 100644
011fe81
--- a/ChangeLog
011fe81
+++ b/ChangeLog
011fe81
@@ -1,5 +1,10 @@
011fe81
 2014-06-21  Stephane Rochoy <sheda>
011fe81
 
011fe81
+	* grub-core/loader/i386/bsd.c (grub_netbsd_boot): Pass pointer to
011fe81
+	EFI system table.
011fe81
+
011fe81
+2014-06-21  Stephane Rochoy <sheda>
011fe81
+
011fe81
 	* grub-core/commands/efi/lsefisystab.c (grub_cmd_lsefisystab): Show
011fe81
 	EFI system table physical address.
011fe81
 
011fe81
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
011fe81
index 41ef910..8f691e0 100644
011fe81
--- a/grub-core/loader/i386/bsd.c
011fe81
+++ b/grub-core/loader/i386/bsd.c
011fe81
@@ -1145,6 +1145,14 @@ grub_netbsd_boot (void)
011fe81
   if (err)
011fe81
     return err;
011fe81
 
011fe81
+#ifdef GRUB_MACHINE_EFI
011fe81
+  err = grub_bsd_add_meta (NETBSD_BTINFO_EFI,
011fe81
+			   &grub_efi_system_table,
011fe81
+			   sizeof (grub_efi_system_table));
011fe81
+  if (err)
011fe81
+    return err;
011fe81
+#endif
011fe81
+
011fe81
   {
011fe81
     struct bsd_tag *tag;
011fe81
     tag_buf_len = 0;
011fe81
diff --git a/include/grub/i386/netbsd_bootinfo.h b/include/grub/i386/netbsd_bootinfo.h
011fe81
index e48c19b..9b4f460 100644
011fe81
--- a/include/grub/i386/netbsd_bootinfo.h
011fe81
+++ b/include/grub/i386/netbsd_bootinfo.h
011fe81
@@ -58,6 +58,8 @@
011fe81
 #define NETBSD_BTINFO_BOOTWEDGE		10
011fe81
 #define NETBSD_BTINFO_MODULES		11
011fe81
 #define NETBSD_BTINFO_FRAMEBUF		12
011fe81
+#define NETBSD_BTINFO_USERCONFCOMMANDS  13
011fe81
+#define NETBSD_BTINFO_EFI	        14
011fe81
 
011fe81
 struct grub_netbsd_bootinfo
011fe81
 {
011fe81
@@ -146,4 +148,9 @@ struct grub_netbsd_btinfo_framebuf
011fe81
 
011fe81
 #define GRUB_NETBSD_MAX_ROOTDEVICE_LEN 16
011fe81
 
011fe81
+struct grub_netbsd_btinfo_efi
011fe81
+{
011fe81
+  void *pa_systbl;  /* Physical address of the EFI System Table */
011fe81
+};
011fe81
+
011fe81
 #endif
011fe81
-- 
37b39b7
1.9.3
011fe81