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