From: Daniel Kiper <daniel.kiper@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: keir@xen.org, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, ross.philipson@citrix.com,
roy.franz@linaro.org, ning.sun@intel.com, jbeulich@suse.com,
qiaowei.ren@intel.com, richard.l.maliszewski@intel.com,
gang.wei@intel.com, fu.wei@linaro.org
Subject: [PATCH RFC 1/7] xen/x86: Add mbd.h header file
Date: Sat, 9 Aug 2014 01:04:00 +0200 [thread overview]
Message-ID: <1407539046-16910-2-git-send-email-daniel.kiper@oracle.com> (raw)
In-Reply-To: <1407539046-16910-1-git-send-email-daniel.kiper@oracle.com>
Define MultiBoot Data (MBD) type. It is used to define variable
which carry over data from multiboot protocol (any version) through
Xen preloader stage. Later all or parts of this data is used
to initialize Xen Boot Info (XBI) structure. XBI is defined
in next patch.
MBD helps to break multiboot (v1) protocol dependency. Using it
we are able to save space on trampoline (we do not allocate space
for unused data what happens in current preloader implementation).
Additionally, we are able to easily add new members to MBD if we
want support new features or protocols.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
xen/include/asm-x86/mbd.h | 70 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 xen/include/asm-x86/mbd.h
diff --git a/xen/include/asm-x86/mbd.h b/xen/include/asm-x86/mbd.h
new file mode 100644
index 0000000..5c20e76
--- /dev/null
+++ b/xen/include/asm-x86/mbd.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013, 2014 Oracle Co., Daniel Kiper
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MBD_H__
+#define __MBD_H__
+
+/* Module type. */
+typedef struct {
+ u32 start;
+ u32 end;
+
+ /* Pointer to a module command line. */
+ u32 cmdline;
+
+ /* If relocated != 0 then a given module was relocated. */
+ u32 relocated;
+} boot_module_t;
+
+/*
+ * MultiBoot Data (MBD) type. It is used to define variable which
+ * carry over data from multiboot protocol (any version) through
+ * Xen preloader stage. Later all or parts of this data is used
+ * to initialize Xen Boot Info (XBI) structure.
+ */
+typedef struct {
+ /* Pointer to boot loader name. */
+ u32 boot_loader_name;
+
+ /* Pointer to Xen command line. */
+ u32 cmdline;
+
+ /*
+ * Amount of lower memory (in KiB) accordingly to The Multiboot
+ * Specification version 0.6.96.
+ */
+ u32 mem_lower;
+
+ /*
+ * Amount of upper memory (in KiB) accordingly to The Multiboot
+ * Specification version 0.6.96.
+ */
+ u32 mem_upper;
+
+ /* Size (in bytes) of memory map provided by bootloader. */
+ u32 mmap_size;
+
+ /* Pointer to memory map provided by bootloader. */
+ u32 mmap;
+
+ /* Number of modules. */
+ u32 mods_nr;
+
+ /* Pointer to modules description (boot_module_t *). */
+ u32 mods;
+} mbd_t;
+#endif /* __MBD_H__ */
--
1.7.10.4
next prev parent reply other threads:[~2014-08-08 23:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 23:03 [PATCH RFC 0/7] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-08-08 23:04 ` Daniel Kiper [this message]
2014-08-11 9:49 ` [PATCH RFC 1/7] xen/x86: Add mbd.h header file Jan Beulich
2014-08-11 16:16 ` Stefano Stabellini
2014-09-03 14:11 ` Ian Campbell
2014-09-03 15:16 ` Daniel Kiper
2014-09-04 22:45 ` Stefano Stabellini
2014-09-09 13:39 ` Daniel Kiper
2014-09-09 14:28 ` Jan Beulich
2014-09-09 15:57 ` Daniel Kiper
2014-08-08 23:04 ` [PATCH RFC 2/7] xen/x86: Add xbi.h " Daniel Kiper
2014-08-10 16:34 ` Andrew Cooper
2014-09-18 16:30 ` Daniel Kiper
2014-09-19 6:46 ` Jan Beulich
2014-08-11 9:54 ` Jan Beulich
2014-08-11 16:20 ` Stefano Stabellini
2014-08-11 16:37 ` Stefano Stabellini
2014-08-08 23:04 ` [PATCH RFC 3/7] xen: Add multiboot2.h " Daniel Kiper
2014-08-11 9:58 ` Jan Beulich
2014-09-09 13:47 ` Daniel Kiper
2014-08-08 23:04 ` [PATCH RFC 4/7] xen/x86: Migrate to XBI structure Daniel Kiper
2014-08-09 0:07 ` Roy Franz
2014-08-10 16:22 ` Daniel Kiper
2014-08-10 17:05 ` Andrew Cooper
2014-08-11 10:01 ` Jan Beulich
2014-09-09 13:22 ` Daniel Kiper
2014-09-09 13:37 ` Jan Beulich
2014-09-09 13:39 ` Andrew Cooper
2014-08-08 23:04 ` [PATCH RFC 5/7] xen/x86: Add multiboot2 protocol support Daniel Kiper
2014-08-10 17:23 ` Andrew Cooper
2014-09-09 13:34 ` Daniel Kiper
2014-09-09 13:43 ` Andrew Cooper
2014-08-11 10:33 ` Jan Beulich
2014-09-09 14:21 ` Daniel Kiper
2014-09-09 14:36 ` Jan Beulich
2014-09-09 16:04 ` Daniel Kiper
2014-08-08 23:04 ` [PATCH RFC 6/7] xen: Remove redundant xen/include/xen/vga.h file Daniel Kiper
2014-08-11 10:35 ` Jan Beulich
2014-08-08 23:04 ` [PATCH RFC 7/7] xen/x86: Add new line to the end of graphics mode error message Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407539046-16910-2-git-send-email-daniel.kiper@oracle.com \
--to=daniel.kiper@oracle.com \
--cc=fu.wei@linaro.org \
--cc=gang.wei@intel.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=ning.sun@intel.com \
--cc=qiaowei.ren@intel.com \
--cc=richard.l.maliszewski@intel.com \
--cc=ross.philipson@citrix.com \
--cc=roy.franz@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).