mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-05 23:16:59 +00:00
The name of mi_cmdline in acrn_boot_info structure would cause confusion with mi_cmdline in multiboot_info structure, rename it to cmdline. At the same time, the data type is changed from pointer to array to avoid accessing the original multiboot info region which might be used by other software modules. Tracked-On: #5661 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef BOOT_H
|
|
#define BOOT_H
|
|
|
|
#include <multiboot_std.h>
|
|
#include <efi.h>
|
|
#include <vm_configurations.h>
|
|
|
|
/* TODO: MAX_MMAP_ENTRIES shall be config by config tool, and same as E820_MAX_ENTRIES */
|
|
#define MAX_MMAP_ENTRIES 32U
|
|
|
|
#define MAX_BOOTARGS_SIZE 2048U
|
|
|
|
#define MAX_PROTOCOL_NAME_SIZE 16U
|
|
|
|
/* The modules in multiboot are: Pre-launched VM: kernel/ramdisk/acpi; SOS VM: kernel/ramdisk */
|
|
#define MAX_MODULE_NUM (3U * PRE_VM_NUM + 2U * SOS_VM_NUM)
|
|
|
|
/* The vACPI module size is fixed to 1MB */
|
|
#define ACPI_MODULE_SIZE MEM_1M
|
|
|
|
struct acrn_boot_info {
|
|
|
|
char protocol_name[MAX_PROTOCOL_NAME_SIZE];
|
|
const char cmdline[MAX_BOOTARGS_SIZE];
|
|
const char *mi_loader_name;
|
|
|
|
uint32_t mi_mods_count;
|
|
struct multiboot_module mi_mods[MAX_MODULE_NUM];
|
|
|
|
uint32_t mi_drives_length;
|
|
uint32_t mi_drives_addr;
|
|
|
|
uint32_t mi_mmap_entries;
|
|
struct multiboot_mmap mi_mmap_entry[MAX_MMAP_ENTRIES];
|
|
|
|
const void *mi_acpi_rsdp_va;
|
|
struct efi_info mi_efi_info;
|
|
};
|
|
|
|
int32_t init_multiboot_info(uint32_t *registers);
|
|
|
|
void init_acrn_boot_info(uint32_t *registers);
|
|
int32_t sanitize_acrn_boot_info(struct acrn_boot_info *abi);
|
|
struct acrn_boot_info *get_acrn_boot_info(void);
|
|
|
|
#endif /* BOOT_H */
|