use bios_boot_device::BIOSBootDeviceTag;
use tag::{Tag, TagIter};


#[derive(Debug)]
#[repr(C, packed)]
pub struct MultiBootInfo {
    total_size: u32,
    reserved: u32,      // Should always be 0.
    first_tag: *const Tag
}

impl MultiBootInfo {
    unsafe fn new(multiboot_addr: u32) -> MultiBootInfo {
        let total_size = *(multiboot_addr as *const u32);
        let reserved = *((multiboot_addr + 4) as *const u32);
        let first_tag = (multiboot_addr + 8) as *const Tag;
        
        MultiBootInfo {
            total_size: total_size,
            reserved: reserved,
            first_tag: first_tag
        }

    }

    pub fn start_address(&self) -> usize {
        self as *const _ as usize
    }

    pub fn end_address(&self) -> usize {
        self.start_address() + self.total_size()
    }

    pub fn total_size(&self) -> usize {
        self.total_size as usize
    }


}
use bios_boot_device::BIOSBootDeviceTag;
use tag::{Tag, TagIter};


pub struct MultiBootInfo {
    total_size: u32,
    reserved: u32,      // Should always be 0
    mem_lower: u32,
    mem_upper: u32,
    boot_device: u32,
    boot_cmd_line: u32,
    module_count: u32,
    modules: u32,
    elf_symbols: u32,
    memory_map: u32,
    boot_loader_name: u32,
    apm_table: u32,
    vbe_info: u32,
    framebuffer_info: u32
}

impl MultiBootInfo {
    unsafe fn new(multiboot_addr: u32) -> () {
        let total_size = *(multiboot_addr as *const u32);
        let reserved = *((multiboot_addr + 4) as *const u32);
        let first_tag = (multiboot_addr + 8) as *const Tag;
        let tag_iter = TagIter::new(first_tag);
    }
}
--- 
+++ 
@@ -2,28 +2,39 @@
 use tag::{Tag, TagIter};
 
 
+#[derive(Debug)]
+#[repr(C, packed)]
 pub struct MultiBootInfo {
     total_size: u32,
-    reserved: u32,      // Should always be 0
-    mem_lower: u32,
-    mem_upper: u32,
-    boot_device: u32,
-    boot_cmd_line: u32,
-    module_count: u32,
-    modules: u32,
-    elf_symbols: u32,
-    memory_map: u32,
-    boot_loader_name: u32,
-    apm_table: u32,
-    vbe_info: u32,
-    framebuffer_info: u32
+    reserved: u32,      // Should always be 0.
+    first_tag: *const Tag
 }
 
 impl MultiBootInfo {
-    unsafe fn new(multiboot_addr: u32) -> () {
+    unsafe fn new(multiboot_addr: u32) -> MultiBootInfo {
         let total_size = *(multiboot_addr as *const u32);
         let reserved = *((multiboot_addr + 4) as *const u32);
         let first_tag = (multiboot_addr + 8) as *const Tag;
-        let tag_iter = TagIter::new(first_tag);
+        
+        MultiBootInfo {
+            total_size: total_size,
+            reserved: reserved,
+            first_tag: first_tag
+        }
+
     }
+
+    pub fn start_address(&self) -> usize {
+        self as *const _ as usize
+    }
+
+    pub fn end_address(&self) -> usize {
+        self.start_address() + self.total_size()
+    }
+
+    pub fn total_size(&self) -> usize {
+        self.total_size as usize
+    }
+
+
 }
Redefine Multiboot info struct in an easier way. Because we do not know what tags will be there at startup, we need to use the tag iterator to search for the tags by their tag type as we need them.
