Confusion in acpi_sleep_machdep().
- From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 12:43:44 -0800 (PST)
I'm trying to figure out how the acpi_sleep_machdep() code works and
there are a couple of lines I just don't understand:
pm = vmspace_pmap(p->p_vmspace);
cr3 = rcr3();
#ifdef PAE
load_cr3(vtophys(pm->pm_pdpt));
#else
load_cr3(vtophys(pm->pm_pdir));
#endif
page = PHYS_TO_VM_PAGE(sc->acpi_wakephys);
pmap_enter(pm, sc->acpi_wakephys, page,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE, 1);
First, why isn't it just using kernel_pmap ? What's all the load_cr3()
stuff for ?
Second, why is it entering the physical address sc->acpi_wakephys
as the virtual address in the pmap ? Shouldn't it be using
sc->acpi_wakeaddr there?
Anybody know ?
-Matt
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Prev by Date: Re: Init.c, making it chroot
- Next by Date: Re: how to deal with const
- Previous by thread: how to deal with const
- Index(es):
Relevant Pages
|
|