mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
93afae5d05
commit
2afddae075
2 changed files with 3 additions and 1 deletions
|
@ -499,6 +499,7 @@ static int setup_machine(void)
|
||||||
static int reserve_global_data(void)
|
static int reserve_global_data(void)
|
||||||
{
|
{
|
||||||
gd->start_addr_sp -= sizeof(gd_t);
|
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));
|
gd->new_gd = (gd_t *)map_sysmem(gd->start_addr_sp, sizeof(gd_t));
|
||||||
debug("Reserving %zu Bytes for Global Data at: %08lx\n",
|
debug("Reserving %zu Bytes for Global Data at: %08lx\n",
|
||||||
sizeof(gd_t), gd->start_addr_sp);
|
sizeof(gd_t), gd->start_addr_sp);
|
||||||
|
|
|
@ -99,7 +99,8 @@ typedef struct global_data {
|
||||||
int pcidelay_done;
|
int pcidelay_done;
|
||||||
#endif
|
#endif
|
||||||
struct udevice *cur_serial_dev; /* current serial device */
|
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;
|
} gd_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue