]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Tidy up global_data flags
authorSimon Glass <sjg@chromium.org>
Fri, 31 Jul 2015 15:31:28 +0000 (09:31 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:52 +0000 (08:00 +0200)
These flags now overlap some global ones. Adjust the x86-specific flags to
avoid this. Since this requires a change to the start.S code, add a way for
tools to find the 32-bit cold reset entry point. Previously this was at a
fixed offset.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/start.S
arch/x86/include/asm/global_data.h

index 7ef8b880ec600971207ad33caed4208b36c6cdc5..a0dec39abeaabbd66cb439418e5a0e9ab9ae44c0 100644 (file)
@@ -41,14 +41,18 @@ _x86boot_start:
        wbinvd
 
        /* Tell 32-bit code it is being entered from an in-RAM copy */
-       movw    $GD_FLG_WARM_BOOT, %bx
+       movl    $GD_FLG_WARM_BOOT, %ebx
        jmp     1f
+
+       /* Add a way for tools to discover the _start entry point */
+       .align  4
+       .long   0x12345678
 _start:
        /*
         * This is the 32-bit cold-reset entry point, coming from start16.
-        * Set %bx to 0 to indicate this.
+        * Set %ebx to GD_FLG_COLD_BOOT to indicate this.
         */
-       movw    $GD_FLG_COLD_BOOT, %bx
+       movl    $GD_FLG_COLD_BOOT, %ebx
 1:
        /* Save BIST */
        movl    %eax, %ebp
index 4d9eac676ee91030221533c7a63131cd80d8ffdb..3db9a4cf0b6bc79a5420b25b6470a8c4769550ad 100644 (file)
@@ -87,14 +87,14 @@ static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void)
 
 #define gd     get_fs_gd_ptr()
 
+#define DECLARE_GLOBAL_DATA_PTR
+
 #endif
 
 /*
  * Our private Global Data Flags
  */
-#define GD_FLG_COLD_BOOT       0x00100 /* Cold Boot */
-#define GD_FLG_WARM_BOOT       0x00200 /* Warm Boot */
-
-#define DECLARE_GLOBAL_DATA_PTR
+#define GD_FLG_COLD_BOOT       0x10000 /* Cold Boot */
+#define GD_FLG_WARM_BOOT       0x20000 /* Warm Boot */
 
 #endif /* __ASM_GBL_DATA_H */