mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 06:13:24 +00:00
hv: add ACPI support for pre-launched VMs
Statically define the per vm RSDP/XSDT/MADT ACPI template tables in vacpi.c, RSDP/XSDT tables are copied to guest physical memory after checksum is calculated. For MADT table, first fix up process id/lapic id in its lapic subtable, then the MADT table's checksum is calculated before it is copies to guest physical memory. Add 8-bit checksum function in util.h Tracked-On: #3601 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -46,4 +46,12 @@ static inline uint8_t calculate_sum8(const void *buf, uint32_t length)
|
||||
return sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @pre buf != NULL
|
||||
*/
|
||||
static inline uint8_t calculate_checksum8(const void *buf, uint32_t len)
|
||||
{
|
||||
return (uint8_t)(0x100U - calculate_sum8(buf, len));
|
||||
}
|
||||
|
||||
#endif /* UTIL_H */
|
||||
|
Reference in New Issue
Block a user