Commit Graph

8 Commits

Author SHA1 Message Date
Victor Sun
695e09a194 HV: relocate SOS kernel before boot modules for SBL
SBL would load multiboot modules to the maximum usable ram below 4GB, in this
case the SOS kernel would be failed to load because no room for kernel in
the range of end of modules and MEM_4G. So kernel must be relocated to the
range of MEM_1M and start of modules, or other appropriate place according
to modules layout.

Tracked-On: #6162

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-06-08 16:48:20 +08:00
Victor Sun
c09e55c376 HV: modularizatoin: use abi_efi_info struct in acrn boot info
Previousely the efi_info structure in acrn_boot_info struct is defined as
same as Linux kernel so that the native efi info from host could be passed
to SOS zeropage with memcpy() api directly. Now replace it with abi_efi_info
struct to make the content more generic;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
57d7225901 HV: modularization: use abi_mmap struct in acrn boot info
Use more generic abi_mmap struct to replace multiboot_mmap struct in
acrn_boot_info;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
45d56a8173 HV: modularization: use abi_module struct in acrn boot info
Use more generic abi_module struct to replace multiboot_module struct in
acrn_boot_info;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
aa5502c5a4 HV: modularization: rename mi_loader_name to loader_name
The patch has below changes:
	1. rename mi_loader_name in acrn_boot_info struct to loader_name;
	2. remove mi_drivers_length and mi_drivers_addr which are never used;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
56c52d0b95 HV: modularization: remove mi_flags from acrn boot info
The mi_flags is not needed any more so remove it from acrn_boot_info struct;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
23222d0192 HV: modularization: rename multiboot.h to boot.h
Given the structure in multiboot.h could be used for any boot protocol,
use a more generic name "boot.h" instead;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
fd75fcdef0 HV: modularization: add boot.c to wrap multiboot module
Add a wrapper API init_acrn_boot_info() so that it could be used to boot
ACRN with any boot protocol;

Another change is change term of multiboot1 to multiboot because there is
no such term officially;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00