mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
xen: fix initial kenv setup for legacy PVH
When adding support for the new PVH mode the kenv handling was switched to use a boot time allocated scratch space, however the legacy PVH early boot code was not modified to allocate such space. Approved by: re (gjb) Sponsored by: Citrix Systems R&D
This commit is contained in:
parent
c9a591b0f6
commit
ddbc1b4387
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338627
@ -204,6 +204,7 @@ hammer_time_xen_legacy(start_info_t *si, uint64_t xenstack)
|
||||
uint64_t *PT3 = (u_int64_t *)(xenstack + PAGE_SIZE);
|
||||
uint64_t *PT2 = (u_int64_t *)(xenstack + 2 * PAGE_SIZE);
|
||||
int i;
|
||||
char *kenv;
|
||||
|
||||
xen_domain_type = XEN_PV_DOMAIN;
|
||||
vm_guest = VM_GUEST_XEN;
|
||||
@ -252,6 +253,15 @@ hammer_time_xen_legacy(start_info_t *si, uint64_t xenstack)
|
||||
}
|
||||
load_cr3(((uint64_t)&PT4[0]) - KERNBASE);
|
||||
|
||||
/*
|
||||
* Init an empty static kenv using a free page. The contents will be
|
||||
* filled from the parse_preload_data hook.
|
||||
*/
|
||||
kenv = (void *)(physfree + KERNBASE);
|
||||
physfree += PAGE_SIZE;
|
||||
bzero(kenv, PAGE_SIZE);
|
||||
init_static_kenv(kenv, PAGE_SIZE);
|
||||
|
||||
/* Set the hooks for early functions that diverge from bare metal */
|
||||
init_ops = xen_legacy_init_ops;
|
||||
apic_ops = xen_apic_ops;
|
||||
|
Loading…
Reference in New Issue
Block a user