util/pgtblgen: Fix qemu on KVM
Running the x86_64 qemu mainboard target with '-accel kvm' results in hang, as the 'D' and 'A' bits needs to be set in read only page tables. Tested on QEMU Q35: Boots into payload with '-accel kvm'. Change-Id: I4beae8deec6bf34f9762e7b54c5da4e5b63f6d24 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36778 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
b73111cfa7
commit
e69798b5ae
|
@ -38,12 +38,14 @@ static void usage(char *argv[])
|
|||
*
|
||||
* Page table attributes: WB, User+Supervisor, Present, Writeable
|
||||
*/
|
||||
#define PRES (1ULL << 0)
|
||||
#define RW (1ULL << 1)
|
||||
#define US (1ULL << 2)
|
||||
#define PS (1ULL << 7)
|
||||
#define _GEN_DIR(a) (PRES | RW | US | (a))
|
||||
#define _GEN_PAGE(a) (PRES | RW | US | PS | (a))
|
||||
#define _PRES (1ULL << 0)
|
||||
#define _RW (1ULL << 1)
|
||||
#define _US (1ULL << 2)
|
||||
#define _A (1ULL << 5)
|
||||
#define _D (1ULL << 6)
|
||||
#define _PS (1ULL << 7)
|
||||
#define _GEN_DIR(a) (_PRES | _RW | _US | _A | (a))
|
||||
#define _GEN_PAGE(a) (_PRES | _RW | _US | _PS | _A | _D | (a))
|
||||
|
||||
/*
|
||||
* Generate x86_64 page tables.
|
||||
|
|
Loading…
Reference in New Issue