From: Daniel Kiper <daniel.kiper@oracle.com>
To: grub-devel@gnu.org, xen-devel@lists.xenproject.org
Cc: andrew.cooper3@citrix.com, arvidjaar@gmail.com,
eric.snowberg@oracle.com, jgross@suse.com,
konrad.wilk@oracle.com, phcoder@gmail.com,
seth.goldberg@oracle.com, tsoome@me.com
Subject: [MULTIBOOT2 DOC PATCH v3 09/13] multiboot2: Add description of support for relocatable images
Date: Tue, 6 Dec 2016 23:52:57 +0100 [thread overview]
Message-ID: <1481064781-16949-10-git-send-email-daniel.kiper@oracle.com> (raw)
In-Reply-To: <1481064781-16949-1-git-send-email-daniel.kiper@oracle.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
v2 - suggestions/fixes:
- add missing the articles
(suggested by Andrew Cooper),
- various minor cleanups and fixes
(suggested by Andrew Cooper).
---
doc/multiboot.texi | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
doc/multiboot2.h | 24 ++++++++++++++++++++++
2 files changed, 80 insertions(+)
diff --git a/doc/multiboot.texi b/doc/multiboot.texi
index 1581220..13e4e80 100644
--- a/doc/multiboot.texi
+++ b/doc/multiboot.texi
@@ -353,6 +353,7 @@ executable header.
* Console header tags::
* Module alignment tag::
* EFI boot services tag::
+* Relocatable header tag::
@end menu
@@ -679,6 +680,47 @@ u32 | size = 8 |
This tag indicates that payload supports starting without
terminating boot services.
+@node Relocatable header tag
+@subsection Relocatable header tag
+
+@example
+@group
+ +-------------------+
+u16 | type = 10 |
+u16 | flags |
+u32 | size = 24 |
+u32 | min_addr |
+u32 | max_addr |
+u32 | align |
+u32 | preference |
+ +-------------------+
+@end group
+@end example
+
+This tag indicates that image is relocatable.
+
+The meaning of each field is as follows:
+
+@table @code
+@item min_addr
+Lowest possible physical address at which image should be loaded.
+The bootloader cannot load any part of image below this address.
+
+@item max_addr
+Highest possible physical address at which loaded image should end.
+The bootloader cannot load any part of image above this address.
+
+@item align
+Image alignment in memory, e.g. 4096.
+
+@item preference
+It contains load address placement suggestion for boot loader.
+Boot loader should follow it. @samp{0} means none, @samp{1} means
+load image at lowest possible address but not lower than min_addr
+and @samp{2} means load image at highest possible address but not
+higher than max_addr.
+@end table
+
@node Machine state
@section MIPS machine state
@@ -1323,6 +1365,20 @@ u64 | pointer |
This tag contains pointer to EFI amd64 image handle.
Usually it is boot loader image handle.
+@subsection Image load base physical address
+@example
+@group
+ +-------------------+
+u32 | type = 21 |
+u32 | size = 12 |
+u32 | load_base_addr |
+ +-------------------+
+@end group
+@end example
+
+This tag contains image load base physical address. It is
+provided only if image has relocatable header tag.
+
@node Examples
@chapter Examples
diff --git a/doc/multiboot2.h b/doc/multiboot2.h
index b85cb13..b181607 100644
--- a/doc/multiboot2.h
+++ b/doc/multiboot2.h
@@ -62,6 +62,7 @@
#define MULTIBOOT_TAG_TYPE_EFI_BS 18
#define MULTIBOOT_TAG_TYPE_EFI32_IH 19
#define MULTIBOOT_TAG_TYPE_EFI64_IH 20
+#define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR 21
#define MULTIBOOT_HEADER_TAG_END 0
#define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST 1
@@ -73,11 +74,16 @@
#define MULTIBOOT_HEADER_TAG_EFI_BS 7
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI32 8
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9
+#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10
#define MULTIBOOT_ARCHITECTURE_I386 0
#define MULTIBOOT_ARCHITECTURE_MIPS32 4
#define MULTIBOOT_HEADER_TAG_OPTIONAL 1
+#define MULTIBOOT_LOAD_PREFERENCE_NONE 0
+#define MULTIBOOT_LOAD_PREFERENCE_LOW 1
+#define MULTIBOOT_LOAD_PREFERENCE_HIGH 2
+
#define MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED 1
#define MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED 2
@@ -162,6 +168,17 @@ struct multiboot_header_tag_module_align
multiboot_uint32_t size;
};
+struct multiboot_header_tag_relocatable
+{
+ multiboot_uint16_t type;
+ multiboot_uint16_t flags;
+ multiboot_uint32_t size;
+ multiboot_uint32_t min_addr;
+ multiboot_uint32_t max_addr;
+ multiboot_uint32_t align;
+ multiboot_uint32_t preference;
+};
+
struct multiboot_color
{
multiboot_uint8_t red;
@@ -388,6 +405,13 @@ struct multiboot_tag_efi64_ih
multiboot_uint64_t pointer;
};
+struct multiboot_tag_load_base_addr
+{
+ multiboot_uint32_t type;
+ multiboot_uint32_t size;
+ multiboot_uint32_t load_base_addr;
+};
+
#endif /* ! ASM_FILE */
#endif /* ! MULTIBOOT_HEADER */
--
1.7.10.4
next prev parent reply other threads:[~2016-12-06 22:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 22:52 [MULTIBOOT2 DOC PATCH v3 00/13] multiboot2: Update documentation Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 01/13] multiboot2: Replace u_phys with u32 Daniel Kiper
2016-12-10 17:23 ` Andrei Borzenkov
2016-12-12 13:48 ` Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 02/13] multiboot2: Replace u_virt " Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 03/13] multiboot2: Rename Multiboot to Multiboot2 Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 04/13] multiboot2: Replace redundant if with the Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 05/13] multiboot2: Clarify meaning of information request header tag Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 06/13] multiboot2: Fix description of EFI boot services tag Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 07/13] multiboot2: Add description of support for EFI boot services Daniel Kiper
2016-12-07 14:33 ` Konrad Rzeszutek Wilk
2016-12-07 18:21 ` Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 08/13] multiboot2: Add description of EFI image handle tags Daniel Kiper
2016-12-06 22:52 ` Daniel Kiper [this message]
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 10/13] multiboot2: Say that memory maps may not be available on EFI platforms Daniel Kiper
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 11/13] multiboot2: Add C structure members alignment and padding consideration section Daniel Kiper
2016-12-06 22:53 ` [MULTIBOOT2 DOC PATCH v3 12/13] multiboot2: Add me to authors Daniel Kiper
2016-12-06 22:53 ` [MULTIBOOT2 DOC PATCH v3 13/13] multiboot2: Bump version to 2.0 Daniel Kiper
2016-12-07 3:45 ` [MULTIBOOT2 DOC PATCH v3 00/13] multiboot2: Update documentation Konrad Rzeszutek Wilk
2016-12-07 11:26 ` Daniel Kiper
2016-12-07 14:34 ` Konrad Rzeszutek Wilk
2016-12-07 18:24 ` Daniel Kiper
2016-12-09 12:57 ` Daniel Kiper
2016-12-14 13:21 ` 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=1481064781-16949-10-git-send-email-daniel.kiper@oracle.com \
--to=daniel.kiper@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=arvidjaar@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=grub-devel@gnu.org \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=phcoder@gmail.com \
--cc=seth.goldberg@oracle.com \
--cc=tsoome@me.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).