mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 20:59:03 +00:00
hv: use int32_t replace int
Since it's typedef in "include/lib/types.h" Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -28,12 +28,12 @@ enum IDX_CMD {
|
||||
IDX_MAX_CMD,
|
||||
};
|
||||
|
||||
static void handle_cmd(const char *cmd, int len)
|
||||
static void handle_cmd(const char *cmd, int32_t len)
|
||||
{
|
||||
int i;
|
||||
int32_t i;
|
||||
|
||||
for (i = 0; i < IDX_MAX_CMD; i++) {
|
||||
int tmp = strnlen_s(cmd_list[i], MAX_CMD_LEN);
|
||||
int32_t tmp = strnlen_s(cmd_list[i], MAX_CMD_LEN);
|
||||
|
||||
/*cmd prefix should be same with one in cmd_list */
|
||||
if (len < tmp)
|
||||
@@ -62,7 +62,7 @@ static void handle_cmd(const char *cmd, int len)
|
||||
}
|
||||
}
|
||||
|
||||
int parse_hv_cmdline(void)
|
||||
int32_t parse_hv_cmdline(void)
|
||||
{
|
||||
const char *start;
|
||||
const char *end;
|
||||
|
@@ -77,7 +77,7 @@ EFI_STATUS construct_mbi(EFI_PHYSICAL_ADDRESS hv_hpa)
|
||||
struct multiboot_info *mbi;
|
||||
struct multiboot_mmap *mmap;
|
||||
struct efi_context *efi_ctx;
|
||||
int i, j;
|
||||
int32_t i, j;
|
||||
|
||||
mbi = MBOOT_INFO_PTR(hv_hpa);
|
||||
mmap = MBOOT_MMAP_PTR(hv_hpa);
|
||||
@@ -202,7 +202,7 @@ switch_to_guest_mode(EFI_HANDLE image, EFI_PHYSICAL_ADDRESS hv_hpa)
|
||||
struct multiboot_info *mbi;
|
||||
struct efi_context *efi_ctx;
|
||||
struct acpi_table_rsdp *rsdp = NULL;
|
||||
int i;
|
||||
int32_t i;
|
||||
EFI_CONFIGURATION_TABLE *config_table;
|
||||
|
||||
mbi = MBOOT_INFO_PTR(hv_hpa);
|
||||
|
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
EFI_STATUS get_pe_section(CHAR8 *base, char *section, UINTN *vaddr, UINTN *size);
|
||||
typedef void(*hv_func)(int, struct multiboot_info*);
|
||||
typedef void(*hv_func)(int32_t, struct multiboot_info*);
|
||||
|
||||
/*
|
||||
* We allocate memory for the following struct together with hyperivosr itself
|
||||
|
@@ -48,7 +48,7 @@
|
||||
static inline void memset(void *dstv, char ch, UINTN size)
|
||||
{
|
||||
char *dst = dstv;
|
||||
int i;
|
||||
int32_t i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
dst[i] = ch;
|
||||
@@ -56,15 +56,15 @@ static inline void memset(void *dstv, char ch, UINTN size)
|
||||
|
||||
static inline void memcpy(char *dst, const char *src, UINTN size)
|
||||
{
|
||||
int i;
|
||||
int32_t i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dst++ = *src++;
|
||||
}
|
||||
|
||||
static inline int strlen(const char *str)
|
||||
static inline int32_t strlen(const char *str)
|
||||
{
|
||||
int len;
|
||||
int32_t len;
|
||||
|
||||
len = 0;
|
||||
while (*str++)
|
||||
|
@@ -14,9 +14,9 @@ static void efi_init(void);
|
||||
|
||||
struct efi_context* efi_ctx = NULL;
|
||||
struct lapic_regs uefi_lapic_regs;
|
||||
static int efi_initialized;
|
||||
static int32_t efi_initialized;
|
||||
|
||||
void efi_spurious_handler(int vector)
|
||||
void efi_spurious_handler(int32_t vector)
|
||||
{
|
||||
struct acrn_vcpu* vcpu;
|
||||
|
||||
@@ -33,9 +33,9 @@ void efi_spurious_handler(int vector)
|
||||
return;
|
||||
}
|
||||
|
||||
int uefi_sw_loader(struct acrn_vm *vm)
|
||||
int32_t uefi_sw_loader(struct acrn_vm *vm)
|
||||
{
|
||||
int ret = 0;
|
||||
int32_t ret = 0;
|
||||
struct acrn_vcpu *vcpu = get_primary_vcpu(vm);
|
||||
struct acrn_vcpu_regs *vcpu_regs = &boot_context;
|
||||
|
||||
|
Reference in New Issue
Block a user