mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
amd64: add defines and decode protection keys and SGX page faults reasons.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D18893
This commit is contained in:
parent
1809ef7836
commit
87b1bf4f31
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344352
@ -885,10 +885,12 @@ trap_fatal(frame, eva)
|
||||
#endif
|
||||
if (type == T_PAGEFLT) {
|
||||
printf("fault virtual address = 0x%lx\n", eva);
|
||||
printf("fault code = %s %s %s, %s\n",
|
||||
printf("fault code = %s %s %s%s%s, %s\n",
|
||||
code & PGEX_U ? "user" : "supervisor",
|
||||
code & PGEX_W ? "write" : "read",
|
||||
code & PGEX_I ? "instruction" : "data",
|
||||
code & PGEX_PK ? " prot key" : " ",
|
||||
code & PGEX_SGX ? " SGX" : " ",
|
||||
code & PGEX_RSV ? "reserved bits in PTE" :
|
||||
code & PGEX_P ? "protection violation" : "page not present");
|
||||
}
|
||||
|
@ -131,6 +131,8 @@
|
||||
#define PGEX_U 0x04 /* access from User mode (UPL) */
|
||||
#define PGEX_RSV 0x08 /* reserved PTE field is non-zero */
|
||||
#define PGEX_I 0x10 /* during an instruction fetch */
|
||||
#define PGEX_PK 0x20 /* protection key violation */
|
||||
#define PGEX_SGX 0x40 /* SGX-related */
|
||||
|
||||
/*
|
||||
* undef the PG_xx macros that define bits in the regular x86 PTEs that
|
||||
|
Loading…
Reference in New Issue
Block a user