WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Commit missing multiboot f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][XEN] Commit missing multiboot files.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Aug 2007 05:30:15 -0700
Delivery-date: Tue, 07 Aug 2007 05:28:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1186066255 18000
# Node ID 976db28bcc43bfbb38728aa08e079e6c4d20b3bb
# Parent  553f64e4f6efb0482490324a8e7cd99d3a9a653d
[POWERPC][XEN] Commit missing multiboot files.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/multiboot2.c  |   67 +++++++++++++++++++++++++++
 xen/include/asm-powerpc/boot.h |   46 +++++++++++++++++++
 xen/include/xen/multiboot2.h   |   99 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 212 insertions(+)

diff -r 553f64e4f6ef -r 976db28bcc43 xen/arch/powerpc/multiboot2.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/powerpc/multiboot2.c     Thu Aug 02 09:50:55 2007 -0500
@@ -0,0 +1,67 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright IBM Corp. 2006, 2007
+ *
+ * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
+ */
+
+#include <xen/config.h>
+#include <xen/lib.h>
+#include <xen/multiboot2.h>
+#include <asm/boot.h>
+#include <asm/init.h>
+
+static struct mb2_tag_module *mb2_tag_mod_find(struct mb2_tag_header *tags,
+                                                const char *type)
+{
+    struct mb2_tag_header *tag;
+
+    for_each_tag(tag, tags) {
+        if (tag->key == MB2_TAG_MODULE) {
+            struct mb2_tag_module *mod = (struct mb2_tag_module *)tag;
+            if (!strcmp((char *)mod->type, type))
+                return mod;
+        }
+    }
+    return NULL;
+}
+
+void parse_multiboot(ulong tags_addr)
+{
+    struct mb2_tag_header *tags = (struct mb2_tag_header *)tags_addr;
+    struct mb2_tag_module *mod;
+
+    if (tags->key != MB2_TAG_START)
+        return;
+
+    mod = mb2_tag_mod_find(tags, "kernel");
+    if (mod) {
+        xen_cmdline = (char *)mod->cmdline;
+    }
+
+    mod = mb2_tag_mod_find(tags, "dom0");
+    if (mod) {
+        dom0_addr = mod->addr;
+        dom0_len = mod->size;
+        dom0_cmdline = (char *)mod->cmdline;
+    }
+
+    mod = mb2_tag_mod_find(tags, "initrd");
+    if (mod) {
+        initrd_start = mod->addr;
+        initrd_len = mod->size;
+    }
+}
diff -r 553f64e4f6ef -r 976db28bcc43 xen/include/asm-powerpc/boot.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-powerpc/boot.h    Thu Aug 02 09:50:55 2007 -0500
@@ -0,0 +1,46 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright IBM Corp. 2007
+ *
+ * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
+ */
+
+#ifndef _ASM_BOOT_H
+#define _ASM_BOOT_H
+
+/* a collection of interfaces used during boot. */
+
+extern void boot_of_init(ulong, ulong);
+extern void *boot_of_devtree(void);
+extern void boot_of_serial(void *);
+extern void boot_of_finish(void);
+extern int boot_of_mem_avail(int pos, ulong *startpage, ulong *endpage);
+
+extern void parse_multiboot(ulong tags_addr);
+
+extern void memory_init(void);
+
+extern char *xen_cmdline;
+extern ulong dom0_addr;
+extern ulong dom0_len;
+extern char *dom0_cmdline;
+extern ulong initrd_start;
+extern ulong initrd_len;
+
+/* From linker script. */
+extern char builtin_cmdline[];
+
+#endif
diff -r 553f64e4f6ef -r 976db28bcc43 xen/include/xen/multiboot2.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/xen/multiboot2.h      Thu Aug 02 09:50:55 2007 -0500
@@ -0,0 +1,99 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright IBM Corp. 2006, 2007
+ *
+ * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
+ *          
+ */
+
+#ifndef _MULTIBOOT2_H_
+#define _MULTIBOOT2_H_
+
+/* How many bytes from the start of the file we search for the header.  */
+#define MB2_HEADER_SEARCH           8192
+
+/* The magic field should contain this.  */
+#define MB2_HEADER_MAGIC            0xe85250d6
+
+/* Passed from the bootloader to the kernel.  */
+#define MB2_BOOTLOADER_MAGIC        0x36d76289
+
+#include <stdint.h>
+
+#define for_each_tag(_tag, _tags) \
+    for ((_tag) = (_tags); \
+            ((_tag)->key != MB2_TAG_END && (_tag)->key != 0); \
+            (_tag) = (void *)(_tag) + (_tag)->len)
+
+typedef uint32_t mb2_word;
+
+struct mb2_header
+{
+  uint32_t magic;
+};
+
+struct mb2_tag_header
+{
+  uint32_t key;
+  uint32_t len;
+};
+
+#define MB2_TAG_START     1
+struct mb2_tag_start
+{
+  struct mb2_tag_header header;
+  mb2_word size; /* Total size of all mb2 tags. */
+};
+
+#define MB2_TAG_NAME      2
+struct mb2_tag_name
+{
+  struct mb2_tag_header header;
+  char name[1];
+};
+
+#define MB2_TAG_MODULE    3
+struct mb2_tag_module
+{
+  struct mb2_tag_header header;
+  mb2_word addr;
+  mb2_word size;
+  unsigned char type[36];
+  unsigned char cmdline[1];
+};
+
+#define MB2_TAG_MEMORY    4
+struct mb2_tag_memory
+{
+  struct mb2_tag_header header;
+  mb2_word addr;
+  mb2_word size;
+  mb2_word type;
+};
+
+#define MB2_TAG_UNUSED    5
+struct mb2_tag_unused
+{
+  struct mb2_tag_header header;
+};
+
+#define MB2_TAG_END       0xffff
+struct mb2_tag_end
+{
+  struct mb2_tag_header header;
+};
+
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [POWERPC][XEN] Commit missing multiboot files., Xen patchbot-unstable <=