mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Now that the GDT has been reorganized and GNDIS_SEL has been reserved
for us, use it if it's available, otherwise default to using slot 7 as before.
This commit is contained in:
parent
71526784e9
commit
427fea0ba6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145205
@ -52,6 +52,10 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/queue.h>
|
||||
|
||||
#ifdef __i386__
|
||||
#include <machine/segments.h>
|
||||
#endif
|
||||
|
||||
#include <compat/ndis/pe_var.h>
|
||||
#include <compat/ndis/cfg_var.h>
|
||||
#include <compat/ndis/resource_var.h>
|
||||
@ -545,7 +549,19 @@ extern void x86_setldt(struct gdt *, uint16_t);
|
||||
|
||||
#define SEL_LDT 4 /* local descriptor table */
|
||||
#define SEL_TO_FS(x) (((x) << 3))
|
||||
#define FREEBSD_EMPTYSEL 7
|
||||
|
||||
/*
|
||||
* FreeBSD 6.0 and later has a special GDT segment reserved
|
||||
* specifically for us, so if GNDIS_SEL is defined, use that.
|
||||
* If not, use GTGATE_SEL, which is uninitialized and infrequently
|
||||
* used.
|
||||
*/
|
||||
|
||||
#ifdef GNDIS_SEL
|
||||
#define FREEBSD_EMPTYSEL GNDIS_SEL
|
||||
#else
|
||||
#define FREEBSD_EMPTYSEL GTGATE_SEL /* slot 7 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The meanings of various bits in a descriptor vary a little
|
||||
|
Loading…
Reference in New Issue
Block a user