HV: fix MISRA violation of _ld_ram_xxx

Variable should not have a prefix of '_' per MISRA C standard. The patch
removes the prefix for _ld_ram_start and _ld_ram_end.

Tracked-On: #6885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Victor Sun 2021-11-24 11:07:50 +08:00 committed by wenlingz
parent e718f48a55
commit e4a58363e3
4 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@ address_tag_start:
.short 0
.long address_tag_end - address_tag_start
.long mb2_header_start /* address corresponding to the beginning of the Multiboot2 header */
.long _ld_ram_start /* load_addr: load from the binary's beginning */
.long ld_ram_start /* load_addr: load from the binary's beginning */
/*
* load_end_addr: this includes .bss so that boot loader could reserve the
* memory that .bss occupies to avoid placing boot modules or other data in that area.
@ -84,7 +84,7 @@ address_tag_start:
* However, the boot loader is supposed not to actually load the .bss section because
* it's beyond the scope of acrn.bin
*/
.long _ld_ram_end
.long ld_ram_end
.long 0 /* bss_end_addr, don't ask boot loader to clear .bss */
address_tag_end:

View File

@ -255,7 +255,7 @@ void init_paging(void)
const struct abi_mmap *p_mmap = abi->mmap_entry;
pr_dbg("HV MMU Initialization");
hv_ram_size = (uint64_t)(&_ld_ram_end - &_ld_ram_start);
hv_ram_size = (uint64_t)(&ld_ram_end - &ld_ram_start);
init_sanitized_page((uint64_t *)sanitized_page, hva2hpa_early(sanitized_page));

View File

@ -13,7 +13,7 @@ SECTIONS
{
.boot :
{
_ld_ram_start = . ;
ld_ram_start = . ;
KEEP(*(multiboot_header)) ;
} > ram
@ -99,5 +99,5 @@ SECTIONS
} > ram
. = ALIGN(0x200000) ;
_ld_ram_end = . ;
ld_ram_end = . ;
}

View File

@ -14,7 +14,7 @@ extern uint8_t ld_entry_end;
extern const uint8_t ld_trampoline_load;
extern uint8_t ld_trampoline_start;
extern uint8_t ld_trampoline_end;
extern uint8_t _ld_ram_start;
extern uint8_t _ld_ram_end;
extern uint8_t ld_ram_start;
extern uint8_t ld_ram_end;
#endif /* LD_SYM_H */