Index: trunk/tools/bootloader_tsar/boot_entry.S
===================================================================
--- trunk/tools/bootloader_tsar/boot_entry.S	(revision 1)
+++ trunk/tools/bootloader_tsar/boot_entry.S	(revision 6)
@@ -1,2 +1,25 @@
+/*
+ * boot_entry.S - TSAR bootloader entry point.
+ * 
+ * Authors :   Alain Greiner / Vu Son  (2016)
+ *
+ * Copyright (c) UPMC Sorbonne Universites
+ *
+ * This file is part of ALMOS-MKH.
+ *
+ * ALMOS-MKH is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2.0 of the License.
+ *
+ * ALMOS-MKH is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ALMOS-MKH; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
 /*************************************************************************************************
  * This file contains the entry point of the ALMOS-MK boot-loader for TSAR architecture.         *
@@ -61,26 +84,20 @@
     mfc0    k0,     CP0_PROCID          
     andi    k0,     k0,     0xFFF                       /* k0 <= gid                        */
-    andi    t1,     k0,     ((1 << PADDR_WIDTH) - 1)    /* t1 <= lid                        */
-    srl     t2,     k0,     PADDR_WIDTH                 /* t2 <= cxy                        */
+    andi    t1,     k0,     ((1 << P_WIDTH) - 1)        /* t1 <= lid                        */
+    srl     t2,     k0,     P_WIDTH                     /* t2 <= cxy                        */
     
-    /* 
-     * Initializing stack pointer from previously retrieved lid value.
-     */
+    /* Initialize stack pointer from previously retrieved lid value  */
     
     la      t0,     BOOT_STACK_BASE                     /* t0 <= BOOT_STACK_BASE            */
     li      k1,     BOOT_STACK_SIZE                     /* k1 <= BOOT_STACK_SIZE            */
     multu   k1,     t1
-    mflo    k0,                                         /* k0 <= BOOT_STACK_SIZE * lid      */
+    mflo    k0                                          /* k0 <= BOOT_STACK_SIZE * lid      */
     subu    sp,     t0,     k0                          /* P[cxy,lid] stack top initialized */ 
 
-    /* 
-     * Switching to local DSPACE by changing the value of the address extension registers.
-     */
+    /* Switch to local DSPACE by changing the value of the address extension registers  */
 
     mtc2    t2,     CP2_DATA_PADDR_EXT
 
-    /* 
-     * Jumping to boot_loader() function after passing 2 arguments in the registers.
-     */
+    /* Jump to boot_loader() function after passing 2 arguments in the registers  */
 
     or      a0,     zero,   t1                          /* a0 <= lid                        */     
@@ -96,7 +113,5 @@
  *************/
 
-    /* 
-     * Testing if this is bscpu.
-     */
+    /* Test if this is bscpu  */
 
     mfc0    k0,     CP0_PROCID          
@@ -108,7 +123,5 @@
     li      t4,     BOOT_CORE_CXY                       /* t4 <= bscpu cxy                  */
 
-    /* 
-     * Getting base address of the core descriptor table in 'arch_info.bin' file.
-     */
+    /* Get base address of the core descriptor table in 'arch_info.bin' file */
 
     la      t0,     ARCHINFO_BASE                       /* t0 <= ARCHINFO_BASE              */
@@ -116,7 +129,5 @@
     addu    t2,     t0,     t1                          /* t2 <= ARCHINFO_CORE_BASE         */
 
-    /* 
-     * Scanning the core descriptor table if this is not bscpu. TODO If not found?
-     */
+    /* scan the core descriptor table if this is not bscpu. TODO If not found?  */
 
     li      t3,     0x8                                 /* t3 <= ARCHINFO_CORE_SIZE         */
@@ -127,14 +138,10 @@
     addu    t2,     t2,     t3                          /* t2 <= @ next archinfo_core       */
 
-    /* 
-     * Getting (cxy, lid) values from the found core descriptor.
-     */
+    /* Get (cxy, lid) values from the found core descriptor  */
     
     lw      t3,     -8(t2)                              /* t3 <= lid                        */
     lw      t4,     -4(t2)                              /* t4 <= cxy                        */
 
-    /* 
-     * Initializing stack pointer from previously retrieved lid value.
-     */
+    /* Initialize stack pointer from previously retrieved lid value  */
 
 bscpu_exit:    
@@ -145,13 +152,9 @@
     subu    sp,     t0,     k0                          /* P[cxy,lid] stack top initialized */ 
 
-    /* 
-     * Switching to local DSPACE by changing the value of the address extension registers.
-     */
+    /* Switch to local DSPACE by changing the value of the address extension registers  */
 
     mtc2    t4,     CP2_DATA_PADDR_EXT
 
-    /* 
-     * Jumping to boot_loader() function after passing 2 arguments in the registers.
-     */
+    /* Jumping to boot_loader() function after passing 2 arguments in registers */
 
     or      a0,     zero,   t3                          /* a0 <= lid                        */     
