svn commit: r43527 - head/en_US.ISO8859-1/books/arch-handbook/boot

Warren Block wblock at FreeBSD.org
Tue Jan 14 23:45:41 UTC 2014


Author: wblock
Date: Tue Jan 14 23:45:40 2014
New Revision: 43527
URL: http://svnweb.freebsd.org/changeset/doc/43527

Log:
  Whitespace-only fixes, translators please ignore.

Modified:
  head/en_US.ISO8859-1/books/arch-handbook/boot/chapter.xml

Modified: head/en_US.ISO8859-1/books/arch-handbook/boot/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/arch-handbook/boot/chapter.xml	Tue Jan 14 22:21:52 2014	(r43526)
+++ head/en_US.ISO8859-1/books/arch-handbook/boot/chapter.xml	Tue Jan 14 23:45:40 2014	(r43527)
@@ -6,13 +6,26 @@ Copyright (c) 2002 Sergey Lyubka <devnul
 All rights reserved
 $FreeBSD$
 -->
-<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="boot">
-  <info><title>Bootstrapping and Kernel Initialization</title>
+
+<chapter xmlns="http://docbook.org/ns/docbook"
+  xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
+  xml:id="boot">
+
+  <info>
+    <title>Bootstrapping and Kernel Initialization</title>
+
     <authorgroup>
-      <author><personname><firstname>Sergey</firstname><surname>Lyubka</surname></personname><contrib>Contributed by </contrib></author> <!-- devnull at uptsoft.com  12 Jun 2002 -->
+      <author>
+	<personname>
+	  <firstname>Sergey</firstname>
+	  <surname>Lyubka</surname>
+	</personname>
+
+	<contrib>Contributed by </contrib>
+      </author>
+      <!-- devnull at uptsoft.com  12 Jun 2002 -->
     </authorgroup>
   </info>
-  
 
   <sect1 xml:id="boot-synopsis">
     <title>Synopsis</title>
@@ -77,11 +90,11 @@ F5    Disk 2</screen></para></entry>
 	    <entry><para><screen>>>FreeBSD/i386 BOOT
 Default: 1:ad(1,a)/boot/loader
 boot:</screen></para></entry>
-	    <entry><para><literal>boot2</literal><footnote><para>This
-		prompt will appear if the user presses a key just
-		after selecting an OS to boot at the
-		<literal>boot0</literal>
-		stage.</para></footnote></para></entry>
+	    <entry><para><literal>boot2</literal>
+		<footnote><para>This prompt will appear if the user
+		    presses a key just after selecting an OS to boot
+		    at the <literal>boot0</literal>
+		    stage.</para></footnote></para></entry>
 	  </row>
 
 	  <row>
@@ -440,7 +453,7 @@ struct bootinfo {
       nbyte)</function> are used to read the content of a file into
       memory.  <filename>/boot/loader</filename> is an ELF binary, but
       where the ELF header is prepended with a.out's <literal>struct
-      exec</literal> structure. <function>load()</function> scans the
+      exec</literal> structure.  <function>load()</function> scans the
       loader's ELF header, loading the content of
       <filename>/boot/loader</filename> into memory, and passing the
       execution to the loader's entry:</para>
@@ -680,8 +693,7 @@ begin:</programlisting>
 	from the environment:</para>
 
       <programlisting><filename>/usr/src/sys/sys/kernel.h:</filename>
-#define	TUNABLE_INT_FETCH(path, var)	getenv_int((path), (var))
-</programlisting>
+#define	TUNABLE_INT_FETCH(path, var)	getenv_int((path), (var))</programlisting>
 
       <para>Sysctl <literal>kern.hz</literal> is the system clock
 	tick.  Additionally, these sysctls are set by
@@ -689,8 +701,10 @@ begin:</programlisting>
 	kern.maxbcache, kern.maxtsiz, kern.dfldsiz, kern.maxdsiz,
 	  kern.dflssiz, kern.maxssiz, kern.sgrowsiz</literal>.</para>
 
-      <indexterm><primary>Global Descriptors Table
-	  (GDT)</primary></indexterm>
+      <indexterm>
+	<primary>Global Descriptors Table (GDT)</primary>
+      </indexterm>
+
       <para>Then <function>init386()</function> prepares the Global
 	Descriptors Table (GDT).  Every task on an x86 is running in
 	its own virtual address space, and this space is addressed by
@@ -703,8 +717,9 @@ begin:</programlisting>
 	virtual address for this example would just be the value of
 	EIP. Segment registers such as CS, DS etc are the selectors,
 	i.e., indexes, into GDT (to be more precise, an index is not a
-	selector itself, but the INDEX field of a selector). FreeBSD's
-	GDT holds descriptors for 15 selectors per CPU:</para>
+	selector itself, but the INDEX field of a selector).
+	FreeBSD's GDT holds descriptors for 15 selectors per
+	CPU:</para>
 
       <programlisting><filename>sys/i386/i386/machdep.c:</filename>
 union descriptor gdt[NGDT * MAXCPU];	/* global descriptor table */
@@ -739,33 +754,32 @@ union descriptor gdt[NGDT * MAXCPU];	/* 
       <para>The next step is to initialize the Interrupt Descriptor
 	Table (IDT).  This table is referenced by the processor when a
 	software or hardware interrupt occurs.  For example, to make a
-	system call, user application issues the <literal>INT
-	0x80</literal> instruction.  This is a software interrupt, so
-	the processor's hardware looks up a record with index 0x80 in
-	the IDT.  This record points to the routine that handles this
-	interrupt, in this particular case, this will be the kernel's
-	syscall gate.  The IDT may have a maximum of 256 (0x100)
-	records.  The kernel allocates NIDT records for the IDT, where
-	NIDT is the maximum (256):</para>
+	system call, user application issues the
+	<literal>INT 0x80</literal> instruction.  This is a software
+	interrupt, so the processor's hardware looks up a record with
+	index 0x80 in the IDT.  This record points to the routine that
+	handles this interrupt, in this particular case, this will be
+	the kernel's syscall gate.  The IDT may have a maximum of 256
+	(0x100) records.  The kernel allocates NIDT records for the
+	IDT, where NIDT is the maximum (256):</para>
 
       <programlisting><filename>sys/i386/i386/machdep.c:</filename>
 static struct gate_descriptor idt0[NIDT];
-struct gate_descriptor *idt = &idt0[0];	/* interrupt descriptor table */
-</programlisting>
+struct gate_descriptor *idt = &idt0[0];	/* interrupt descriptor table */</programlisting>
 
       <para>For each interrupt, an appropriate handler is set.  The
 	syscall gate for <literal>INT 0x80</literal> is set as
 	well:</para>
 
       <programlisting><filename>sys/i386/i386/machdep.c:</filename>
- 	setidt(0x80, &IDTVEC(int0x80_syscall),
+	setidt(0x80, &IDTVEC(int0x80_syscall),
 			SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL));</programlisting>
 
-      <para>So when a userland application issues the <literal>INT
-	  0x80</literal> instruction, control will transfer to the
-	function <function>_Xint0x80_syscall</function>, which is in
-	the kernel code segment and will be executed with supervisor
-	privileges.</para>
+      <para>So when a userland application issues the
+	<literal>INT 0x80</literal> instruction, control will transfer
+	to the function <function>_Xint0x80_syscall</function>, which
+	is in the kernel code segment and will be executed with
+	supervisor privileges.</para>
 
       <para>Console and DDB are then initialized:</para>
       <indexterm><primary>DDB</primary></indexterm>
@@ -798,14 +812,13 @@ struct gate_descriptor *idt = &idt0[
 /* separate stack, es,fs,gs sels ? */
 /* #define	LPOSIXCALLS_SEL	5*/	/* notyet */
 #define LBSDICALLS_SEL	16	/* BSDI system call gate */
-#define NLDT		(LBSDICALLS_SEL + 1)
-</programlisting>
+#define NLDT		(LBSDICALLS_SEL + 1)</programlisting>
 
-      <para>Next, proc0's Process Control Block (<literal>struct
-	  pcb</literal>) structure is initialized.  proc0 is a
-	<literal>struct proc</literal> structure that describes a
-	kernel process.  It is always present while the kernel is
-	running, therefore it is declared as global:</para>
+      <para>Next, proc0's Process Control Block
+	(<literal>struct pcb</literal>) structure is initialized.
+	proc0 is a <literal>struct proc</literal> structure that
+	describes a kernel process.  It is always present while the
+	kernel is running, therefore it is declared as global:</para>
 
       <programlisting><filename>sys/kern/kern_init.c:</filename>
     struct	proc proc0;</programlisting>
@@ -834,8 +847,8 @@ struct gate_descriptor *idt = &idt0[
 		/* ... skipped ... */
 	}</programlisting>
 
-      <para>Although the sysinit framework is described in the
-	<link xlink:href="&url.doc.langbase;/books/developers-handbook">Developers'
+      <para>Although the sysinit framework is described in the <link
+	  xlink:href="&url.doc.langbase;/books/developers-handbook">Developers'
 	  Handbook</link>, I will discuss the internals of it.</para>
 
       <indexterm><primary>sysinit objects</primary></indexterm>
@@ -911,7 +924,7 @@ __asm(".previous");</programlisting>
 	structure, and that is what the second
 	<literal>__asm</literal> is.  The third
 	<literal>__asm</literal> instruction marks the end of a
-	section. If a directive with the same section name occurred
+	section.  If a directive with the same section name occurred
 	before, the content, i.e., the 32-bit value, will be appended
 	to the existing section, so forming an array of 32-bit
 	pointers.</para>


More information about the svn-doc-all mailing list