All of lore.kernel.org
 help / color / mirror / Atom feed
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 11/13] multiboot2: Add C structure members alignment and padding consideration section
Date: Tue,  6 Dec 2016 23:52:59 +0100	[thread overview]
Message-ID: <1481064781-16949-12-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:
   - rephrase whole section
     (suggested by Andrew Cooper).
---
 doc/multiboot.texi |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/multiboot.texi b/doc/multiboot.texi
index 35f2bed..f566114 100644
--- a/doc/multiboot.texi
+++ b/doc/multiboot.texi
@@ -1398,6 +1398,7 @@ document, but are included for prospective operating system and boot
 loader writers.
 
 @menu
+* C structure members alignment and padding consideration::
 * Notes on PC::                 
 * BIOS device mapping techniques::  
 * Example OS code::             
@@ -1405,6 +1406,16 @@ loader writers.
 @end menu
 
 
+@node C structure members alignment and padding consideration
+@section C structure members alignment and padding consideration
+
+It is preferred that the structures used for communication between the bootloader
+and the OS image conform to chosen ABI for a given architecture. If it is not
+possible then GCC @samp{__attribute__ ((__packed__))} (or anything else which has
+similar meaning for chosen C compiler) have to be added to relevant structures
+definitions to avoid spurious, in this case, padding and alignment.
+
+
 @node Notes on PC
 @section Notes on PC
 
-- 
1.7.10.4



  parent reply	other threads:[~2016-12-06 22:54 UTC|newest]

Thread overview: 47+ 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-06 22:52 ` Daniel Kiper
2016-12-10 17:23   ` Andrei Borzenkov
2016-12-10 17:23     ` Andrei Borzenkov
2016-12-12 13:48     ` Daniel Kiper
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 ` 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 ` 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 ` 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 ` 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   ` 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-06 22:52   ` Daniel Kiper
2016-12-07 14:33   ` Konrad Rzeszutek Wilk
2016-12-07 14:33     ` Konrad Rzeszutek Wilk
2016-12-07 18:21     ` Daniel Kiper
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
2016-12-06 22:52 ` [MULTIBOOT2 DOC PATCH v3 09/13] multiboot2: Add description of support for relocatable images Daniel Kiper
2016-12-06 22:52   ` Daniel Kiper
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   ` 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:52 ` Daniel Kiper [this message]
2016-12-06 22:53 ` [MULTIBOOT2 DOC PATCH v3 12/13] multiboot2: Add me to authors Daniel Kiper
2016-12-06 22:53   ` Daniel Kiper
2016-12-06 22:53 ` [MULTIBOOT2 DOC PATCH v3 13/13] multiboot2: Bump version to 2.0 Daniel Kiper
2016-12-06 22:53   ` Daniel Kiper
2016-12-07  3:45 ` [MULTIBOOT2 DOC PATCH v3 00/13] multiboot2: Update documentation Konrad Rzeszutek Wilk
2016-12-07  3:45 ` Konrad Rzeszutek Wilk
2016-12-07 11:26   ` Daniel Kiper
2016-12-07 11:26   ` Daniel Kiper
2016-12-07 14:34     ` Konrad Rzeszutek Wilk
2016-12-07 18:24       ` Daniel Kiper
2016-12-07 18:24       ` Daniel Kiper
2016-12-07 14:34     ` Konrad Rzeszutek Wilk
2016-12-09 12:57 ` Daniel Kiper
2016-12-09 12:57   ` Daniel Kiper
2016-12-14 13:21   ` 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-12-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.