x86: Remove x86 specific GD flags as they are not referenced at all
Subsystems (2)
PATCH 1/2 x86: Remove x86 specific GD flags as they are not referenced at all
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.
--- 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(-)
arch/x86/cpu/coreboot/coreboot.c +0 -3
@@ -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 ();
arch/x86/cpu/start.S +1 -8
@@ -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
arch/x86/cpu/start16.S +0 -3
@@ -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 */
arch/x86/include/asm/global_data.h +0 -6
@@ -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 */
Signature · 1 line
2.22.1
PATCH 2/2 global_data: Remove comment of reserved arch-specific GD flags
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).
--- include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-generic/global_data.h +1 -1
@@ -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 */
Signature · 1 line
2.22.1
PATCH 2/2 global_data: Remove comment of reserved arch-specific GD flags
Quoted 9 lines · Stefan Roese
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).
Quoted 9 lines
Signed-off-by Stefan Roese <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>--- include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 2/2 global_data: Remove comment of reserved arch-specific GD flags
In reply to Stefan RoeseStefan Roese <[email protected]> schrieb am Fr., 16. Aug. 2019, 14:45:
Quoted 5 lines
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.
Quoted 9 lines
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 <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>
---
Quoted 24 lines
include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/asm-generic/global_data.h +0
-1@@ -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
*/
#defineGD_FLG_RELOC0x00001/* Code was relocated to RAM
*/
#defineGD_FLG_DEVINIT0x00002/* Devices have been initialized
*/
--
2.22.1
PATCH 2/2 global_data: Remove comment of reserved arch-specific GD flags
Quoted 13 lines · Simon Goldschmidt
Stefan Roese <[email protected]> schrieb am Fr., 16. Aug. 2019, 14:45:
Quoted 9 lines
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).
Quoted 8 lines
Quoted 5 lines
Signed-off-by Stefan Roese <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>Reviewed-by Simon Goldschmidt <[email protected]>
PATCH 2/2 global_data: Remove comment of reserved arch-specific GD flags
Quoted 23 lines · Simon Glass
Quoted 20 lines · Simon Goldschmidt
Stefan Roese <[email protected]> schrieb am Fr., 16. Aug. 2019, 14:45:
Quoted 14 lines
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 <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>
Quoted 3 lines
Quoted 1 line
Reviewed-by Simon Goldschmidt <[email protected]>Reviewed-by Simon Glass <[email protected]>
applied to u-boot-x86, thanks!
PATCH 1/2 x86: Remove x86 specific GD flags as they are not referenced at all
In reply to Stefan RoeseQuoted 12 lines · Stefan Roese
This patch removes the x86 architecture specific GD flags (
GD_FLG_COLD_BOOT&GD_FLG_WARM_BOOT), as they are not used. OnlyGD_FLG_COLD_BOOTis referenced incoreboot.cbut assigned instart16.S. But the coreboot target does not usestart16.Sat all and boots directly from the 32-bit start code.Signed-off-by Stefan Roese <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>
Quoted 7 lines
--- 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(-)
Tested with U-Boot as coreboot payload, and on Intel MinnowMax
PATCH 1/2 x86: Remove x86 specific GD flags as they are not referenced at all
In reply to Stefan RoeseStefan Roese <[email protected]> schrieb am Fr., 16. Aug. 2019, 14:45:
Quoted 6 lines
This patch removes the x86 architecture specific GD flags (
GD_FLG_COLD_BOOT&GD_FLG_WARM_BOOT), as they are not used. OnlyGD_FLG_COLD_BOOTis referenced incoreboot.cbut assigned instart16.S. But the coreboot target does not usestart16.Sat all and boots directly from the 32-bit start code.
Quoted 6 lines
Signed-off-by Stefan Roese <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>
---
Quoted 85 lines
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(-)arch/x86/cpu/coreboot/coreboot.c +0
-3@@ -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 ();arch/x86/cpu/start.S +0
-3@@ -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 anerror.
arch/x86/cpu/start.S +1
-5@@ -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
arch/x86/cpu/start16.S +0
-3@@ -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 */arch/x86/include/asm/global_data.h +0
-6@@ -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
PATCH 1/2 x86: Remove x86 specific GD flags as they are not referenced at all
Quoted 11 lines · Simon Goldschmidt
Stefan Roese <[email protected]> schrieb am Fr., 16. Aug. 2019, 14:45:
Quoted 7 lines
This patch removes the x86 architecture specific GD flags (
GD_FLG_COLD_BOOT&GD_FLG_WARM_BOOT), as they are not used. OnlyGD_FLG_COLD_BOOTis referenced incoreboot.cbut assigned instart16.S. But the coreboot target does not usestart16.Sat all and boots directly from the 32-bit start code.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Stefan Roese <[email protected]>Cc Bin Meng <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Goldschmidt <[email protected]>Reviewed-by Simon Goldschmidt <[email protected]>
applied to u-boot-x86, thanks!