Skip to content
Snippets Groups Projects
Commit 2afddae0 authored by Simon Glass's avatar Simon Glass
Browse files

Align global_data to a 16-byte boundary


Some archs like to have larger alignment for their global data. Use 16 bytes
which suits all current archs.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 93afae5d
No related branches found
No related tags found
No related merge requests found
......@@ -499,6 +499,7 @@ static int setup_machine(void)
static int reserve_global_data(void)
{
gd->start_addr_sp -= sizeof(gd_t);
gd->start_addr_sp &= ~0xf;
gd->new_gd = (gd_t *)map_sysmem(gd->start_addr_sp, sizeof(gd_t));
debug("Reserving %zu Bytes for Global Data at: %08lx\n",
sizeof(gd_t), gd->start_addr_sp);
......
......@@ -99,7 +99,8 @@ typedef struct global_data {
int pcidelay_done;
#endif
struct udevice *cur_serial_dev; /* current serial device */
struct arch_global_data arch; /* architecture-specific data */
/* arch-specific data */
struct arch_global_data arch __attribute__((aligned(16)));
} gd_t;
#endif
......
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