Don't break identity mapping set up for ACPI resume path.
With this change, BSP processor context seems to be recovered.
This commit is contained in:
parent
f89db4357e
commit
76f3d08d26
@ -718,6 +718,8 @@ assign_cpu_ids(void)
|
|||||||
/*
|
/*
|
||||||
* start each AP in our list
|
* start each AP in our list
|
||||||
*/
|
*/
|
||||||
|
/* Lowest 1MB is already mapped: don't touch*/
|
||||||
|
#define TMPMAP_START 1
|
||||||
static int
|
static int
|
||||||
start_all_aps(void)
|
start_all_aps(void)
|
||||||
{
|
{
|
||||||
@ -742,8 +744,9 @@ start_all_aps(void)
|
|||||||
|
|
||||||
/* set up temporary P==V mapping for AP boot */
|
/* set up temporary P==V mapping for AP boot */
|
||||||
/* XXX this is a hack, we should boot the AP on its own stack/PTD */
|
/* XXX this is a hack, we should boot the AP on its own stack/PTD */
|
||||||
|
|
||||||
kptbase = (uintptr_t)(void *)KPTphys;
|
kptbase = (uintptr_t)(void *)KPTphys;
|
||||||
for (i = 0; i < NKPT; i++)
|
for (i = TMPMAP_START; i < NKPT; i++)
|
||||||
PTD[i] = (pd_entry_t)(PG_V | PG_RW |
|
PTD[i] = (pd_entry_t)(PG_V | PG_RW |
|
||||||
((kptbase + i * PAGE_SIZE) & PG_FRAME));
|
((kptbase + i * PAGE_SIZE) & PG_FRAME));
|
||||||
invltlb();
|
invltlb();
|
||||||
@ -793,7 +796,7 @@ start_all_aps(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Undo V==P hack from above */
|
/* Undo V==P hack from above */
|
||||||
for (i = 0; i < NKPT; i++)
|
for (i = TMPMAP_START; i < NKPT; i++)
|
||||||
PTD[i] = 0;
|
PTD[i] = 0;
|
||||||
pmap_invalidate_range(kernel_pmap, 0, NKPT * NBPDR - 1);
|
pmap_invalidate_range(kernel_pmap, 0, NKPT * NBPDR - 1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user