mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: replace MEM_2K with a new macro MAX_BOOTARGS_SIZE for bootargs size
- for all cases of referring guest bootargs size, replace MEM_2K with CONFIG_MAX_BOOTARGS_SIZE for better readability. - remove duplicated MAX_BOOTARGS_SIZE definition from vm_config.h. Also fix one minor issue in general_sw_loader() which uses copy_to_gpa() to copy a string. Since copy_to_gpa() makes use of memncpy_s() to do the job, the size parameter should include the string null ternimator. Tracked-On: #2806 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
#define MULTIBOOT_INFO_HAS_DRIVES 0x00000080U
|
||||
#define MULTIBOOT_INFO_HAS_LOADER_NAME 0x00000200U
|
||||
|
||||
/* maximum lengt of the guest OS' command line parameter string */
|
||||
#define MAX_BOOTARGS_SIZE 2048U
|
||||
|
||||
struct acrn_vm;
|
||||
struct multiboot_info {
|
||||
uint32_t mi_flags;
|
||||
|
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <pci.h>
|
||||
#include <multiboot.h>
|
||||
|
||||
#define MAX_BOOTARGS_SIZE 1024U
|
||||
#define MAX_CONFIG_NAME_SIZE 32U
|
||||
|
||||
#define PLUG_CPU(n) (1U << (n))
|
||||
|
Reference in New Issue
Block a user