[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch
Le 10/09/2017 à 13:30, Manuel Bouyer a écrit :
On Sun, Sep 10, 2017 at 01:18:07PM +0200, Maxime Villard wrote:
Le 06/09/2017 à 14:39, Manuel Bouyer a écrit :
Module Name: src
Committed By: bouyer
Date: Wed Sep 6 12:39:18 UTC 2017
The last GDT slots are reserved for Xen, so use FIRST_RESERVED_GDT_BYTE
instead of MAXGDTSIZ for gdt_size.
Xen kernels should boot again.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amd64/amd64/gdt.c
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/i386/i386/gdt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
While I'm at it: is it normal that in amd64::lgdt() we're calling
xpmap_ptetomach with a pte and not a va?
it is a VA (it's a pointer to a pte, not the pte iself)
Sorry, I meant the contrary: it is called with a va, while it should take a
pte. Right now we're doing:
frames[i] = xpmap_ptetomach((pt_entry_t *)va) >> PAGE_SHIFT;
It seems to me it should be
pte = kvtopte(va);
frames[i] = xpmap_ptetomach(pte) >> PAGE_SHIFT;
Am I missing something?
And is it normal that in
i386::gdt_init_cpu() we're not using a mask on the pte when doing
[*ptp >> PAGE_SHIFT]?
Why should it be masked ?
Because PG_NX is above bit 12. I believe it should be:
frames[f] = (*ptp & PG_FRAME) >> PAGE_SHIFT;
Main Index |
Thread Index |