summaryrefslogtreecommitdiff
path: root/introduction.tex
diff options
context:
space:
mode:
authorrusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2014-02-12 03:13:44 +0000
committerrusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2014-02-12 03:13:44 +0000
commit3333466818ee309b8f941679fc26827036a02ed2 (patch)
tree1769b653e5ccbf83c8c9c8145a2e8a1d6a0a268a /introduction.tex
parentf5e6f143b240ea1a81846b6e3b132a9a3aaa08d8 (diff)
C struct specifications.
Explicitly specify that our C struct specifications are without padding, and add some definitions for our integer data types. [ Rusty - added /* comments */ and removed redundant old le* explanation ] Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@231 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
Diffstat (limited to 'introduction.tex')
-rw-r--r--introduction.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/introduction.tex b/introduction.tex
index 5d57f78..83b01f0 100644
--- a/introduction.tex
+++ b/introduction.tex
@@ -44,5 +44,26 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
\phantomsection\label{intro:S390 Common I/O}\textbf{[S390 Common I/O]} & ESA/390 Common I/O-Device and Self-Description, \newline IBM Publication SA22-7204\\
\end{longtable}
+\section{Structure Specifications}
+
+Many device and driver in-memory structure layouts are documented using
+the C struct syntax. All structures are assumed to be without additional
+padding. To stress this, cases where common C compilers are known to insert
+extra padding within structures are tagged using the GNU C
+__attribute__((packed)) syntax.
+
+For the integer data types used in the structure definitions, the following
+conventions are used:
+
+\begin{description}
+\item[u8, u16, u32, u64] An unsigned integer of the specified length in bits.
+
+\item[le16, le32, le64] An unsigned integer of the specified length in bits,
+in little-endian byte order.
+
+\item[be16, be32, be64] An unsigned integer of the specified length in bits,
+in big-endian byte order.
+\end{description}
+
\newpage