Use BOOT_BSS instead of BOOT_DATA where possible

For variables that don't have initial data can be BOOT_BSS and not take
up space in the ELF file.

Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
Kent McLeod 2021-02-17 14:28:36 +11:00 committed by Gerwin Klein
parent 41497c6e60
commit 176baac003
4 changed files with 6 additions and 6 deletions

View file

@ -35,12 +35,12 @@ extern char ki_end[1];
#ifdef ENABLE_SMP_SUPPORT
/* sync variable to prevent other nodes from booting
* until kernel data structures initialized */
BOOT_DATA static volatile int node_boot_lock = 0;
BOOT_BSS static volatile int node_boot_lock;
#endif /* ENABLE_SMP_SUPPORT */
#define ARCH_RESERVED 3 // kernel + user image + dtb
#define MAX_RESERVED (ARCH_RESERVED + MODE_RESERVED)
BOOT_DATA static region_t reserved[MAX_RESERVED];
BOOT_BSS static region_t reserved[MAX_RESERVED];
BOOT_CODE static void arch_init_freemem(p_region_t ui_p_reg, p_region_t dtb_p_reg, v_region_t it_v_reg,
word_t extra_bi_size_bits)

View file

@ -25,12 +25,12 @@ extern char ki_boot_end[1];
extern char ki_end[1];
#ifdef ENABLE_SMP_SUPPORT
BOOT_DATA static volatile word_t node_boot_lock = 0;
BOOT_BSS static volatile word_t node_boot_lock;
#endif
/* kernel image + [extra bootinfo] + user image */
#define MAX_RESERVED 3
BOOT_DATA static region_t res_reg[MAX_RESERVED];
BOOT_BSS static region_t res_reg[MAX_RESERVED];
BOOT_CODE static bool_t create_untypeds(cap_t root_cnode_cap, region_t boot_mem_reuse_reg)
{

View file

@ -24,7 +24,7 @@
#include <plat/machine/intel-vtd.h>
#define MAX_RESERVED 1
BOOT_DATA static region_t reserved[MAX_RESERVED];
BOOT_BSS static region_t reserved[MAX_RESERVED];
/* functions exactly corresponding to abstract specification */

View file

@ -698,7 +698,7 @@ static inline pptr_t ceiling_kernel_window(pptr_t p)
/* we can't delcare arrays on the stack, so this is space for
* the below function to use. */
static BOOT_DATA region_t avail_reg[MAX_NUM_FREEMEM_REG];
static BOOT_BSS region_t avail_reg[MAX_NUM_FREEMEM_REG];
/**
* Dynamically initialise the available memory on the platform.
* A region represents an area of memory.