Skip to content
Snippets Groups Projects
Commit 5a35e6c4 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

x86: Move gd_addr into arch_global_data


Move this field into arch_global_data and tidy up.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
[trini: Add arch/x86/cpu/cpu.c changes after Graeme's comments]
Signed-off-by: default avatarTom Rini <trini@ti.com>
parent 0cecc3b6
No related branches found
No related tags found
No related merge requests found
...@@ -100,9 +100,9 @@ void setup_gdt(gd_t *id, u64 *gdt_addr) ...@@ -100,9 +100,9 @@ void setup_gdt(gd_t *id, u64 *gdt_addr)
gdt_addr[X86_GDT_ENTRY_32BIT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff); gdt_addr[X86_GDT_ENTRY_32BIT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff);
/* FS: data, read/write, 4 GB, base (Global Data Pointer) */ /* FS: data, read/write, 4 GB, base (Global Data Pointer) */
id->gd_addr = id; id->arch.gd_addr = id;
gdt_addr[X86_GDT_ENTRY_32BIT_FS] = GDT_ENTRY(0xc093, gdt_addr[X86_GDT_ENTRY_32BIT_FS] = GDT_ENTRY(0xc093,
(ulong)&id->gd_addr, 0xfffff); (ulong)&id->arch.gd_addr, 0xfffff);
/* 16-bit CS: code, read/execute, 64 kB, base 0 */ /* 16-bit CS: code, read/execute, 64 kB, base 0 */
gdt_addr[X86_GDT_ENTRY_16BIT_CS] = GDT_ENTRY(0x109b, 0, 0x0ffff); gdt_addr[X86_GDT_ENTRY_16BIT_CS] = GDT_ENTRY(0x109b, 0, 0x0ffff);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
/* Architecture-specific global data */ /* Architecture-specific global data */
struct arch_global_data { struct arch_global_data {
struct global_data *gd_addr; /* Location of Global Data */
}; };
/* /*
...@@ -44,8 +45,6 @@ typedef struct global_data gd_t; ...@@ -44,8 +45,6 @@ typedef struct global_data gd_t;
struct global_data { struct global_data {
struct arch_global_data arch; /* architecture-specific data */ struct arch_global_data arch; /* architecture-specific data */
/* NOTE: gd_addr MUST be first member of struct global_data! */
gd_t *gd_addr; /* Location of Global Data */
bd_t *bd; bd_t *bd;
unsigned long flags; unsigned long flags;
unsigned int baudrate; unsigned int baudrate;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment