Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64 KNF, and fix some comments



details:   https://anonhg.NetBSD.org/src/rev/8a08fcdc3f43
branches:  trunk
changeset: 341631:8a08fcdc3f43
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Nov 14 14:01:23 2015 +0000

description:
KNF, and fix some comments

diffstat:

 sys/arch/amd64/amd64/locore.S     |    9 +-
 sys/arch/amd64/conf/kern.ldscript |  115 +++++++++++++++++++------------------
 2 files changed, 63 insertions(+), 61 deletions(-)

diffs (172 lines):

diff -r 60b60f619e25 -r 8a08fcdc3f43 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Sat Nov 14 13:29:35 2015 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Sat Nov 14 14:01:23 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.78 2015/08/30 01:46:02 uebayasi Exp $     */
+/*     $NetBSD: locore.S,v 1.79 2015/11/14 14:01:23 maxv Exp $ */
 
 /*
  * Copyright-o-rama!
@@ -355,10 +355,9 @@
 
 /*
  * Some hackage to deal with 64bit symbols in 32 bit mode.
- * This may not be needed it things are cleaned up a little.
+ * This may not be needed if things are cleaned up a little.
  */
 
-
        .text
        .globl  _C_LABEL(kernel_text)
        .set    _C_LABEL(kernel_text),KERNTEXTOFF
@@ -782,7 +781,7 @@
        /*
         * Xen info:
         * - %rsi -> start_info struct
-        * - %rsp -> stack, *theorically* the last used page
+        * - %rsp -> stack, *theoretically* the last used page
         *      by Xen bootstrap
         */
        movq    %rsi, %rbx
@@ -811,7 +810,7 @@
         * - console
         * - Xen bootstrap page tables
         * - kernel stack. provided by Xen
-        * - guaranted 512kB padding
+        * - guaranteed 512kB padding
         *
         * As we want to rebuild our page tables and place our stack
         * in proc0 struct, all data starting from after console can be
diff -r 60b60f619e25 -r 8a08fcdc3f43 sys/arch/amd64/conf/kern.ldscript
--- a/sys/arch/amd64/conf/kern.ldscript Sat Nov 14 13:29:35 2015 +0000
+++ b/sys/arch/amd64/conf/kern.ldscript Sat Nov 14 14:01:23 2015 +0000
@@ -1,70 +1,73 @@
-/*     $NetBSD: kern.ldscript,v 1.15 2015/08/25 08:07:24 uebayasi Exp $        */
+/*     $NetBSD: kern.ldscript,v 1.16 2015/11/14 14:01:23 maxv Exp $    */
 
 #include "assym.h"
 
 ENTRY(_start)
 SECTIONS
 {
-  /* Read-only sections, merged into text segment: */
-  .text :
-  {
-    *(.text)
-    *(.text.*)
-    *(.stub)
-  }
-  _etext = . ;
-  PROVIDE (etext = .) ;
+       /* Read-only sections, merged into text segment: */
+       .text :
+       {
+               *(.text)
+               *(.text.*)
+               *(.stub)
+       }
+       _etext = . ;
+       PROVIDE (etext = .) ;
 
-  .rodata :
-  {
-    *(.rodata)
-    *(.rodata.*)
-  }
+       .rodata :
+       {
+               *(.rodata)
+               *(.rodata.*)
+       }
 
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  */
-  . = ALIGN(0x100000) + (. & (0x100000 - 1));
-  __data_start = . ;
-  .data :
-  {
-    *(.data)
-  }
+       /*
+        * Adjust the address for the data segment.  We want to adjust up to
+        * the same address within the page on the next page up.
+        */
+       . = ALIGN(0x100000) + (. & (0x100000 - 1));
+       __data_start = . ;
+       .data :
+       {
+               *(.data)
+       }
 
-  . = ALIGN(COHERENCY_UNIT);
-  .data.cacheline_aligned :
-  {
-    *(.data.cacheline_aligned)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  .data.read_mostly :
-  {
-    *(.data.read_mostly)
-  }
-  . = ALIGN(COHERENCY_UNIT);
+       . = ALIGN(COHERENCY_UNIT);
+       .data.cacheline_aligned :
+       {
+               *(.data.cacheline_aligned)
+       }
+       . = ALIGN(COHERENCY_UNIT);
+       .data.read_mostly :
+       {
+               *(.data.read_mostly)
+       }
+       . = ALIGN(COHERENCY_UNIT);
 
-  _edata = . ;
-  PROVIDE (edata = .) ;
-  __bss_start = . ;
-  .bss :
-  {
-    *(.bss)
-    *(.bss.*)
-    *(COMMON)
-    . = ALIGN(64 / 8);
-  }
-  . = ALIGN(64 / 8);
-  _end = . ;
-  PROVIDE (end = .) ;
-  .note.netbsd.ident :
-  {
-    KEEP(*(.note.netbsd.ident));
-  }
+       _edata = . ;
+       PROVIDE (edata = .) ;
+       __bss_start = . ;
+       .bss :
+       {
+               *(.bss)
+               *(.bss.*)
+               *(COMMON)
+               . = ALIGN(64 / 8);
+       }
+       . = ALIGN(64 / 8);
+       _end = . ;
+       PROVIDE (end = .) ;
+       .note.netbsd.ident :
+       {
+               KEEP(*(.note.netbsd.ident));
+       }
 }
+
 SECTIONS
 {
-  .text :
-  AT (ADDR(.text) & 0x0fffffff)
-  {
-    *(.text)
-  } =0
+       .text :
+       AT (ADDR(.text) & 0x0fffffff)
+       {
+               *(.text)
+       } = 0
 }



Home | Main Index | Thread Index | Old Index