mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: treewide: fix 'Array has no bounds specified'
MISRAC requires that the array size should be declared explicitly. This patch fixes the issues caused by the arrays that are defined in link_ram.ld.in or assembly file. v1 -> v2: * Update the solution based on the info from the following link. https://sourceware.org/binutils/docs/ld/Source-Code-Reference.html Fix pattern is like below: extern char start_of_ROM, end_of_ROM, start_of_FLASH; memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM); Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
34
hypervisor/boot/include/reloc.h
Executable file → Normal file
34
hypervisor/boot/include/reloc.h
Executable file → Normal file
@@ -14,25 +14,25 @@ extern void write_trampoline_sym(void *sym, uint64_t val);
|
||||
extern uint64_t prepare_trampoline(void);
|
||||
|
||||
/* external symbols that are helpful for relocation */
|
||||
extern uint8_t _DYNAMIC[];
|
||||
extern const uint8_t _ld_trampoline_load[];
|
||||
extern uint8_t _ld_trampoline_start[];
|
||||
extern uint8_t _ld_trampoline_end[];
|
||||
extern const uint64_t _ld_trampoline_size;
|
||||
extern uint8_t _DYNAMIC[1];
|
||||
extern const uint8_t _ld_trampoline_load;
|
||||
extern uint8_t _ld_trampoline_start;
|
||||
extern uint8_t _ld_trampoline_end;
|
||||
extern const uint64_t _ld_trampoline_size;
|
||||
|
||||
extern uint8_t cpu_primary_start_32[];
|
||||
extern uint8_t cpu_primary_start_64[];
|
||||
extern uint8_t cpu_primary_start_32;
|
||||
extern uint8_t cpu_primary_start_64;
|
||||
|
||||
extern uint8_t trampoline_fixup_cs[];
|
||||
extern uint8_t trampoline_fixup_ip[];
|
||||
extern uint8_t trampoline_fixup_target[];
|
||||
extern uint8_t CPU_Boot_Page_Tables_Start[];
|
||||
extern uint8_t CPU_Boot_Page_Tables_ptr[];
|
||||
extern uint8_t trampoline_pdpt_addr[];
|
||||
extern uint8_t trampoline_gdt_ptr[];
|
||||
extern uint8_t trampoline_start64_fixup[];
|
||||
extern uint8_t trampoline_spinlock_ptr[];
|
||||
extern uint8_t trampoline_fixup_cs;
|
||||
extern uint8_t trampoline_fixup_ip;
|
||||
extern uint8_t trampoline_fixup_target;
|
||||
extern uint8_t CPU_Boot_Page_Tables_Start;
|
||||
extern uint8_t CPU_Boot_Page_Tables_ptr;
|
||||
extern uint8_t trampoline_pdpt_addr;
|
||||
extern uint8_t trampoline_gdt_ptr;
|
||||
extern uint8_t trampoline_start64_fixup;
|
||||
extern uint8_t trampoline_spinlock_ptr;
|
||||
|
||||
extern uint64_t trampoline_start16_paddr;
|
||||
extern uint64_t trampoline_start16_paddr;
|
||||
|
||||
#endif /* RELOCATE_H */
|
||||
|
Reference in New Issue
Block a user