Page MenuHomeFreeBSD

D47694.diff
No OneTemporary

D47694.diff

diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c
--- a/sys/dev/efidev/efirt.c
+++ b/sys/dev/efidev/efirt.c
@@ -309,6 +309,9 @@
fpu_kern_leave(td, NULL);
mtx_unlock(&efi_lock);
PMAP_UNLOCK(curpmap);
+ } else {
+ MPASS((td->td_pflags & TDP_EFIRT) == 0);
+ td->td_pflags |= TDP_EFIRT;
}
return (error);
}
@@ -319,10 +322,13 @@
struct thread *td;
pmap_t curpmap;
+ td = curthread;
+ MPASS((td->td_pflags & TDP_EFIRT) == 0);
+ td->td_pflags &= ~TDP_EFIRT;
+
efi_arch_leave();
curpmap = &curproc->p_vmspace->vm_pmap;
- td = curthread;
fpu_kern_leave(td, NULL);
mtx_unlock(&efi_lock);
PMAP_UNLOCK(curpmap);
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -560,7 +560,7 @@
#define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */
#define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */
#define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */
-#define TDP_UNUSED0 0x20000000 /* UNUSED */
+#define TDP_EFIRT 0x20000000 /* In firmware (EFI RT) call */
#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */
#define TDP_SIGFASTPENDING 0x80000000 /* Pending signal due to sigfastblock */

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 7:17 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15885337
Default Alt Text
D47694.diff (1 KB)

Event Timeline