Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jZRJd-0004zc-Sg for mharc-grub-devel@gnu.org; Thu, 14 May 2020 23:47:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZRJb-0004uW-RO for grub-devel@gnu.org; Thu, 14 May 2020 23:47:15 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]:32788 helo=smtp.bawue.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZRJa-0000WG-8L for grub-devel@gnu.org; Thu, 14 May 2020 23:47:15 -0400 Received: from infty.fritz.box (p5b17584c.dip0.t-ipconnect.de [91.23.88.76]) (Authenticated sender: pdim@bawue.de) by smtp.bawue.net (Postfix) with ESMTPSA id 3B8002266F; Fri, 15 May 2020 05:47:07 +0200 (CEST) From: Hans Ulrich Niedermann To: grub-devel@gnu.org Cc: Hans Ulrich Niedermann Subject: [MULTIBOOT2 SPEC PATCH v4 12/27] multiboot2: Add boot_mips.S example code to docs Date: Fri, 15 May 2020 05:43:35 +0200 Message-Id: <20200515034349.133092-13-hun@n-dimensional.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200515034349.133092-1-hun@n-dimensional.de> References: <20200515034349.133092-1-hun@n-dimensional.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanner: SAV Dynamic Interface 2.6.0, Engine: 3.77.1, SAV: 5.75 (A93B943C) on relay01.mx.bawue.net using milter-sssp 0.1.0 X-Virus-Scan: Found to be clean. Received-SPF: pass client-ip=193.7.176.67; envelope-from=hun@n-dimensional.de; helo=smtp.bawue.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/14 23:46:23 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2020 03:47:16 -0000 Add the boot_mips.S file to the example code documentation. Before this, while boot_mips.S was the boot code always built, boot_i386.S was the only documented boot code. Now both boot_i386.S and boot_mips.S are in the docs, with the build situation remaining unchanged. Signed-off-by: Hans Ulrich Niedermann diff --git a/doc/Makefile.am b/doc/Makefile.am index e88f4d271..08fdbf342 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ info_TEXINFOS = multiboot.texi arch_sources = boot_i386.S boot_mips.S -multiboot_TEXINFOS = boot_i386.S.texi kernel.c.texi multiboot2.h.texi +multiboot_TEXINFOS = boot_i386.S.texi boot_mips.S.texi kernel.c.texi multiboot2.h.texi SRC2TEXI = src2texi noinst_SCRIPTS = $(SRC2TEXI) EXTRA_PROGRAMS = kernel diff --git a/doc/multiboot.texi b/doc/multiboot.texi index b89b12272..67f0abd84 100644 --- a/doc/multiboot.texi +++ b/doc/multiboot.texi @@ -1553,25 +1553,30 @@ Multiboot2-compliant boot loader and for reference to how to implement a Multiboot2 kernel. The source files can be found under the directory @file{doc} in the Multiboot2 source distribution. -The kernel @file{kernel} consists of only three files: @file{boot_i386.S}, -@file{kernel.c} and @file{multiboot2.h}. The assembly source -@file{boot_i386.S} is written in GAS (@pxref{Top, , GNU assembler, as.info, -The GNU assembler}), and contains the Multiboot2 information structure to -comply with the specification. When a Multiboot2-compliant boot loader -loads and execute it, it initialize the stack pointer and @code{EFLAGS}, -and then call the function @code{cmain} defined in @file{kernel.c}. If -@code{cmain} returns to the callee, then it shows a message to inform -the user of the halt state and stops forever until you push the reset -key. The file @file{kernel.c} contains the function @code{cmain}, -which checks if the magic number passed by the boot loader is valid and -so on, and some functions to print messages on the screen. The file -@file{multiboot2.h} defines some macros, such as the magic number for the -Multiboot2 header, the Multiboot2 header structure and the Multiboot2 -information structure. +The kernel @file{kernel} consists of only three files: +@file{boot_i386.S} or @file{boot_mips.S} (depending on the kernel +architecture), @file{kernel.c}, and @file{multiboot2.h}. The assembly +sources @file{boot_i386.S} and @file{boot_mips.S} are written in GAS +(@pxref{Top, , GNU assembler, as.info, The GNU assembler}) and +contain the Multiboot2 information structure to comply with the +specification. When a Multiboot2-compliant boot loader loads and +executes @file{boot_*.S}, it initializes the stack pointer and +@code{EFLAGS}, and then calls the function @code{cmain} defined in +@file{kernel.c}. + +If @code{cmain} returns to the callee, then it shows a message to +inform the user of the halt state and stops forever until you push the +system reset button. The file @file{kernel.c} contains the function +@code{cmain}, which checks if the magic number passed by the boot +loader is valid and so on, and some functions to print messages on the +screen. The file @file{multiboot2.h} defines some C preprocessor +macros, such as the magic number for the Multiboot2 header, the +Multiboot2 header structure and the Multiboot2 information structure. @menu * multiboot2.h:: * boot_i386.S:: +* boot_mips.S:: * kernel.c:: * Other Multiboot2 kernels:: @end menu @@ -1597,6 +1602,16 @@ In the file @file{boot_i386.S}: @end example +@node boot_mips.S +@subsection boot_mips.S + +In the file @file{boot_mips.S}: + +@example +@include boot_mips.S.texi +@end example + + @node kernel.c @subsection kernel.c -- 2.26.2