All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all
@ 2019-08-16 12:45 Stefan Roese
  2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stefan Roese @ 2019-08-16 12:45 UTC (permalink / raw)
  To: u-boot

This patch removes the x86 architecture specific GD flags
(GD_FLG_COLD_BOOT & GD_FLG_WARM_BOOT), as they are not used. Only
GD_FLG_COLD_BOOT is referenced in coreboot.c but assigned in start16.S.
But the coreboot target does not use start16.S at all and boots directly
from the 32-bit start code.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---
 arch/x86/cpu/coreboot/coreboot.c   | 3 ---
 arch/x86/cpu/start.S               | 9 +--------
 arch/x86/cpu/start16.S             | 3 ---
 arch/x86/include/asm/global_data.h | 6 ------
 4 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 4c6ed0bfb2..9686f8ed5b 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -73,9 +73,6 @@ static void board_final_cleanup(void)
 
 int last_stage_init(void)
 {
-	if (gd->flags & GD_FLG_COLD_BOOT)
-		timestamp_add_to_bootstage();
-
 	/* start usb so that usb keyboard can be used as input device */
 	if (CONFIG_IS_ENABLED(USB_KEYBOARD))
 		usb_init();
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index 71cd70f9cd..3c9bdf2a9d 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -40,9 +40,6 @@ _x86boot_start:
 	movl	%eax, %cr0
 	wbinvd
 
-	/* Tell 32-bit code it is being entered from an in-RAM copy */
-	movl	$GD_FLG_WARM_BOOT, %ebx
-
 	/*
 	 * Zero the BIST (Built-In Self Test) value since we don't have it.
 	 * It must be 0 or the previous loader would have reported an error.
@@ -55,11 +52,7 @@ _x86boot_start:
 	.align	4
 	.long	0x12345678
 _start:
-	/*
-	 * This is the 32-bit cold-reset entry point, coming from start16.
-	 * Set %ebx to GD_FLG_COLD_BOOT to indicate this.
-	 */
-	movl	$GD_FLG_COLD_BOOT, %ebx
+	/* This is the 32-bit cold-reset entry point, coming from start16 */
 
 	/* Save BIST */
 	movl	%eax, %ebp
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index dd659278ff..474efe4df5 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -23,9 +23,6 @@ start16:
 	/* Save BIST */
 	movl	%eax, %ecx
 
-	/* Set the Cold Boot / Hard Reset flag */
-	movl	$GD_FLG_COLD_BOOT, %ebx
-
 	xorl	%eax, %eax
 	movl	%eax, %cr3	/* Invalidate TLB */
 
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 797397e697..17a4d34491 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -137,10 +137,4 @@ static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void)
 
 #endif
 
-/*
- * Our private Global Data Flags
- */
-#define GD_FLG_COLD_BOOT	0x10000	/* Cold Boot */
-#define GD_FLG_WARM_BOOT	0x20000	/* Warm Boot */
-
 #endif /* __ASM_GBL_DATA_H */
-- 
2.22.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags
  2019-08-16 12:45 [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Stefan Roese
@ 2019-08-16 12:45 ` Stefan Roese
  2019-08-16 14:51   ` Bin Meng
  2019-08-16 15:05   ` Simon Goldschmidt
  2019-08-16 14:50 ` [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Bin Meng
  2019-08-16 15:03 ` Simon Goldschmidt
  2 siblings, 2 replies; 9+ messages in thread
From: Stefan Roese @ 2019-08-16 12:45 UTC (permalink / raw)
  To: u-boot

With the removal of the x86 specific GD flags, there are no arch-
specific GD flags any more. Let's remove the comment about reserving the
upper 16 bits for arch-specific flags in the common header. This gives
us more flexibility with the usage of the GD flags.

As a matter of fact, we are already using more than 16 bits for common
GD flags (with the addition of GD_FLG_WDT_READY).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---
 include/asm-generic/global_data.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 5372d5d8cd..7587ba2ee5 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -150,7 +150,7 @@ typedef struct global_data {
 #endif
 
 /*
- * Global Data Flags - the top 16 bits are reserved for arch-specific flags
+ * Global Data Flags
  */
 #define GD_FLG_RELOC		0x00001	/* Code was relocated to RAM	   */
 #define GD_FLG_DEVINIT		0x00002	/* Devices have been initialized   */
-- 
2.22.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all
  2019-08-16 12:45 [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Stefan Roese
  2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
@ 2019-08-16 14:50 ` Bin Meng
  2019-08-16 15:03 ` Simon Goldschmidt
  2 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2019-08-16 14:50 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 16, 2019 at 8:45 PM Stefan Roese <sr@denx.de> wrote:
>
> This patch removes the x86 architecture specific GD flags
> (GD_FLG_COLD_BOOT & GD_FLG_WARM_BOOT), as they are not used. Only
> GD_FLG_COLD_BOOT is referenced in coreboot.c but assigned in start16.S.
> But the coreboot target does not use start16.S at all and boots directly
> from the 32-bit start code.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
>  arch/x86/cpu/coreboot/coreboot.c   | 3 ---
>  arch/x86/cpu/start.S               | 9 +--------
>  arch/x86/cpu/start16.S             | 3 ---
>  arch/x86/include/asm/global_data.h | 6 ------
>  4 files changed, 1 insertion(+), 20 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Tested with U-Boot as coreboot payload, and on Intel MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags
  2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
@ 2019-08-16 14:51   ` Bin Meng
  2019-08-16 15:05   ` Simon Goldschmidt
  1 sibling, 0 replies; 9+ messages in thread
From: Bin Meng @ 2019-08-16 14:51 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 16, 2019 at 8:45 PM Stefan Roese <sr@denx.de> wrote:
>
> With the removal of the x86 specific GD flags, there are no arch-
> specific GD flags any more. Let's remove the comment about reserving the
> upper 16 bits for arch-specific flags in the common header. This gives
> us more flexibility with the usage of the GD flags.
>
> As a matter of fact, we are already using more than 16 bits for common
> GD flags (with the addition of GD_FLG_WDT_READY).
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
>  include/asm-generic/global_data.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all
  2019-08-16 12:45 [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Stefan Roese
  2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
  2019-08-16 14:50 ` [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Bin Meng
@ 2019-08-16 15:03 ` Simon Goldschmidt
  2019-08-18 13:59   ` Bin Meng
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Goldschmidt @ 2019-08-16 15:03 UTC (permalink / raw)
  To: u-boot

Stefan Roese <sr@denx.de> schrieb am Fr., 16. Aug. 2019, 14:45:

> This patch removes the x86 architecture specific GD flags
> (GD_FLG_COLD_BOOT & GD_FLG_WARM_BOOT), as they are not used. Only
> GD_FLG_COLD_BOOT is referenced in coreboot.c but assigned in start16.S.
> But the coreboot target does not use start16.S at all and boots directly
> from the 32-bit start code.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

---
>  arch/x86/cpu/coreboot/coreboot.c   | 3 ---
>  arch/x86/cpu/start.S               | 9 +--------
>  arch/x86/cpu/start16.S             | 3 ---
>  arch/x86/include/asm/global_data.h | 6 ------
>  4 files changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/arch/x86/cpu/coreboot/coreboot.c
> b/arch/x86/cpu/coreboot/coreboot.c
> index 4c6ed0bfb2..9686f8ed5b 100644
> --- a/arch/x86/cpu/coreboot/coreboot.c
> +++ b/arch/x86/cpu/coreboot/coreboot.c
> @@ -73,9 +73,6 @@ static void board_final_cleanup(void)
>
>  int last_stage_init(void)
>  {
> -       if (gd->flags & GD_FLG_COLD_BOOT)
> -               timestamp_add_to_bootstage();
> -
>         /* start usb so that usb keyboard can be used as input device */
>         if (CONFIG_IS_ENABLED(USB_KEYBOARD))
>                 usb_init();
> diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
> index 71cd70f9cd..3c9bdf2a9d 100644
> --- a/arch/x86/cpu/start.S
> +++ b/arch/x86/cpu/start.S
> @@ -40,9 +40,6 @@ _x86boot_start:
>         movl    %eax, %cr0
>         wbinvd
>
> -       /* Tell 32-bit code it is being entered from an in-RAM copy */
> -       movl    $GD_FLG_WARM_BOOT, %ebx
> -
>         /*
>          * Zero the BIST (Built-In Self Test) value since we don't have it.
>          * It must be 0 or the previous loader would have reported an
> error.
> @@ -55,11 +52,7 @@ _x86boot_start:
>         .align  4
>         .long   0x12345678
>  _start:
> -       /*
> -        * This is the 32-bit cold-reset entry point, coming from start16.
> -        * Set %ebx to GD_FLG_COLD_BOOT to indicate this.
> -        */
> -       movl    $GD_FLG_COLD_BOOT, %ebx
> +       /* This is the 32-bit cold-reset entry point, coming from start16
> */
>
>         /* Save BIST */
>         movl    %eax, %ebp
> diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
> index dd659278ff..474efe4df5 100644
> --- a/arch/x86/cpu/start16.S
> +++ b/arch/x86/cpu/start16.S
> @@ -23,9 +23,6 @@ start16:
>         /* Save BIST */
>         movl    %eax, %ecx
>
> -       /* Set the Cold Boot / Hard Reset flag */
> -       movl    $GD_FLG_COLD_BOOT, %ebx
> -
>         xorl    %eax, %eax
>         movl    %eax, %cr3      /* Invalidate TLB */
>
> diff --git a/arch/x86/include/asm/global_data.h
> b/arch/x86/include/asm/global_data.h
> index 797397e697..17a4d34491 100644
> --- a/arch/x86/include/asm/global_data.h
> +++ b/arch/x86/include/asm/global_data.h
> @@ -137,10 +137,4 @@ static inline __attribute__((no_instrument_function))
> gd_t *get_fs_gd_ptr(void)
>
>  #endif
>
> -/*
> - * Our private Global Data Flags
> - */
> -#define GD_FLG_COLD_BOOT       0x10000 /* Cold Boot */
> -#define GD_FLG_WARM_BOOT       0x20000 /* Warm Boot */
> -
>  #endif /* __ASM_GBL_DATA_H */
> --
> 2.22.1
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags
  2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
  2019-08-16 14:51   ` Bin Meng
@ 2019-08-16 15:05   ` Simon Goldschmidt
  2019-08-16 15:59     ` Simon Glass
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Goldschmidt @ 2019-08-16 15:05 UTC (permalink / raw)
  To: u-boot

Stefan Roese <sr@denx.de> schrieb am Fr., 16. Aug. 2019, 14:45:

> With the removal of the x86 specific GD flags, there are no arch-
> specific GD flags any more. Let's remove the comment about reserving the
> upper 16 bits for arch-specific flags in the common header. This gives
> us more flexibility with the usage of the GD flags.
>
> As a matter of fact, we are already using more than 16 bits for common
> GD flags (with the addition of GD_FLG_WDT_READY).
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

---
>  include/asm-generic/global_data.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/asm-generic/global_data.h
> b/include/asm-generic/global_data.h
> index 5372d5d8cd..7587ba2ee5 100644
> --- a/include/asm-generic/global_data.h
> +++ b/include/asm-generic/global_data.h
> @@ -150,7 +150,7 @@ typedef struct global_data {
>  #endif
>
>  /*
> - * Global Data Flags - the top 16 bits are reserved for arch-specific
> flags
> + * Global Data Flags
>   */
>  #define GD_FLG_RELOC           0x00001 /* Code was relocated to RAM
>  */
>  #define GD_FLG_DEVINIT         0x00002 /* Devices have been initialized
>  */
> --
> 2.22.1
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags
  2019-08-16 15:05   ` Simon Goldschmidt
@ 2019-08-16 15:59     ` Simon Glass
  2019-08-18 13:59       ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2019-08-16 15:59 UTC (permalink / raw)
  To: u-boot

On Fri, 16 Aug 2019 at 10:05, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
>
>
> Stefan Roese <sr@denx.de> schrieb am Fr., 16. Aug. 2019, 14:45:
>>
>> With the removal of the x86 specific GD flags, there are no arch-
>> specific GD flags any more. Let's remove the comment about reserving the
>> upper 16 bits for arch-specific flags in the common header. This gives
>> us more flexibility with the usage of the GD flags.
>>
>> As a matter of fact, we are already using more than 16 bits for common
>> GD flags (with the addition of GD_FLG_WDT_READY).
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>
>
> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all
  2019-08-16 15:03 ` Simon Goldschmidt
@ 2019-08-18 13:59   ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2019-08-18 13:59 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 16, 2019 at 11:04 PM Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
>
>
> Stefan Roese <sr@denx.de> schrieb am Fr., 16. Aug. 2019, 14:45:
>>
>> This patch removes the x86 architecture specific GD flags
>> (GD_FLG_COLD_BOOT & GD_FLG_WARM_BOOT), as they are not used. Only
>> GD_FLG_COLD_BOOT is referenced in coreboot.c but assigned in start16.S.
>> But the coreboot target does not use start16.S at all and boots directly
>> from the 32-bit start code.
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>
>
> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags
  2019-08-16 15:59     ` Simon Glass
@ 2019-08-18 13:59       ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2019-08-18 13:59 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 16, 2019 at 11:59 PM Simon Glass <sjg@chromium.org> wrote:
>
> On Fri, 16 Aug 2019 at 10:05, Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com> wrote:
> >
> >
> >
> > Stefan Roese <sr@denx.de> schrieb am Fr., 16. Aug. 2019, 14:45:
> >>
> >> With the removal of the x86 specific GD flags, there are no arch-
> >> specific GD flags any more. Let's remove the comment about reserving the
> >> upper 16 bits for arch-specific flags in the common header. This gives
> >> us more flexibility with the usage of the GD flags.
> >>
> >> As a matter of fact, we are already using more than 16 bits for common
> >> GD flags (with the addition of GD_FLG_WDT_READY).
> >>
> >> Signed-off-by: Stefan Roese <sr@denx.de>
> >> Cc: Bin Meng <bmeng.cn@gmail.com>
> >> Cc: Simon Glass <sjg@chromium.org>
> >> Cc: Tom Rini <trini@konsulko.com>
> >> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> >
> >
> > Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-18 13:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 12:45 [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Stefan Roese
2019-08-16 12:45 ` [U-Boot] [PATCH 2/2] global_data: Remove comment of reserved arch-specific GD flags Stefan Roese
2019-08-16 14:51   ` Bin Meng
2019-08-16 15:05   ` Simon Goldschmidt
2019-08-16 15:59     ` Simon Glass
2019-08-18 13:59       ` Bin Meng
2019-08-16 14:50 ` [U-Boot] [PATCH 1/2] x86: Remove x86 specific GD flags as they are not referenced at all Bin Meng
2019-08-16 15:03 ` Simon Goldschmidt
2019-08-18 13:59   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.