Skip to contentSkip to conversation

NetBSD mmap support

PATCH In review Vladimir 'phcoder' Serbinenko 2 participants 4 messages Aug 25, 2009 – Aug 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NetBSD mmap support

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
ChangeLog +9 -0
index 1de68ad..6171d02 100644
@@ -1,5 +1,14 @@
 2009-08-25  Vladimir Serbinenko  <[email protected]>
 
+	NetBSD memory map support.
+
+	* include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
+	(grub_netbsd_btinfo_mmap_header): New structure.
+	(grub_netbsd_btinfo_mmap_entry): Likewise.
+	* loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
+
+2009-08-25  Vladimir Serbinenko  <[email protected]>
+
 	Cleanup NetBSD root support.
 
 	* loader/i386/bsd.c (grub_netbsd_boot): Remove call to
include/grub/i386/bsd.h +18 -0
index 2939035..8ffaf7d 100644
@@ -203,6 +203,7 @@ struct grub_netbsd_bootinfo
 #define NETBSD_BTINFO_BOOTPATH		0
 #define NETBSD_BTINFO_ROOTDEVICE	1
 #define NETBSD_BTINFO_BOOTDISK		3
+#define NETBSD_BTINFO_MEMMAP		9
 
 struct grub_netbsd_btinfo_common
 {
@@ -210,6 +211,23 @@ struct grub_netbsd_btinfo_common
   int type;
 };
 
+struct grub_netbsd_btinfo_mmap_header
+{
+  struct grub_netbsd_btinfo_common common;
+  grub_uint32_t count;
+};
+
+struct grub_netbsd_btinfo_mmap_entry
+{
+  grub_uint64_t addr;
+  grub_uint64_t len;
+#define	NETBSD_MMAP_AVAILABLE	1
+#define	NETBSD_MMAP_RESERVED 	2
+#define	NETBSD_MMAP_ACPI	3
+#define	NETBSD_MMAP_NVS 	4
+  grub_uint32_t type;
+};
+
 struct grub_netbsd_btinfo_bootpath
 {
   struct grub_netbsd_btinfo_common common;
loader/i386/bsd.c +64 -7

94 lines not on this page · raw message

#1 lore raw

ChangeLog line 8

Quoted 8 lines · Vladimir 'phcoder' Serbinenko

2009-08-25 Vladimir Serbinenko <[email protected]>

ChangeLog +6 -0
+	NetBSD memory map support.
+
+	* include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
+	(grub_netbsd_btinfo_mmap_header): New structure.
+	(grub_netbsd_btinfo_mmap_entry): Likewise.
+	* loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.

Didn't NetBSD move to Multiboot? I thought our NetBSD loader was only for legacy versions.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#2 lore raw
Quoted 10 lines · Robert Millan
Quoted 8 lines · Vladimir 'phcoder' Serbinenko

 2009-08-25  Vladimir Serbinenko  <[email protected]>

+     NetBSD memory map support.
+
+     * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
+     (grub_netbsd_btinfo_mmap_header): New structure.
+     (grub_netbsd_btinfo_mmap_entry): Likewise.
+     * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.

Quoted 3 lines

Didn't NetBSD move to Multiboot?  I thought our NetBSD loader was only for legacy versions.

NetBSD32 supports both multiboot and own protocol. NetBSD64 supports only own protocol. Our NetBSD loader handles both NetBSD32 and NetBSD64

Quoted 13 lines

--
Robert Millan

 The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#3 lore raw
Quoted 11 lines · Vladimir 'phcoder' Serbinenko
Quoted 10 lines · Robert Millan
Quoted 8 lines · Vladimir 'phcoder' Serbinenko

 2009-08-25  Vladimir Serbinenko  <[email protected]>

+     NetBSD memory map support.
+
+     * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
+     (grub_netbsd_btinfo_mmap_header): New structure.
+     (grub_netbsd_btinfo_mmap_entry): Likewise.
+     * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.

Quoted 6 lines
Quoted 3 lines

Didn't NetBSD move to Multiboot?  I thought our NetBSD loader was only for legacy versions.

NetBSD32 supports both multiboot and own protocol. NetBSD64 supports only own protocol. Our NetBSD loader handles both NetBSD32 and NetBSD64

Ok. Please go ahead with your patch then.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."