mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Provide stub functions for i386_set_ldt() and i386_get_ldt() even when
compiling as an amd64 support binary. They will return EINVAL on an amd64 kernel, but this simplifies other #ifdefs that were getting a bit nasty.
This commit is contained in:
parent
c6acf6d557
commit
3bbf3512ad
2 changed files with 4 additions and 7 deletions
|
|
@ -34,7 +34,6 @@
|
|||
void
|
||||
_set_tp(void *tp)
|
||||
{
|
||||
#ifndef COMPAT_32BIT
|
||||
union descriptor ldt;
|
||||
int error, sel;
|
||||
|
||||
|
|
@ -53,7 +52,4 @@ _set_tp(void *tp)
|
|||
ldt.sd.sd_hibase = (((uintptr_t)tp) >> 24) & 0xff;
|
||||
sel = i386_set_ldt(LDT_AUTO_ALLOC, &ldt, 1);
|
||||
__asm __volatile("movl %0,%%gs" : : "rm" ((sel << 3) | 7));
|
||||
#else
|
||||
i386_set_gsbase(tp);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
# $FreeBSD$
|
||||
|
||||
.if !defined(COMPAT_32BIT)
|
||||
SRCS+= i386_clr_watch.c i386_get_ioperm.c i386_get_ldt.c i386_set_ioperm.c \
|
||||
i386_set_ldt.c i386_set_watch.c i386_vm86.c
|
||||
SRCS+= i386_clr_watch.c i386_get_ioperm.c \
|
||||
i386_set_ioperm.c i386_set_watch.c i386_vm86.c
|
||||
.endif
|
||||
SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_set_fsbase.c i386_set_gsbase.c
|
||||
SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ldt.c \
|
||||
i386_set_fsbase.c i386_set_gsbase.c i386_set_ldt.c
|
||||
|
||||
MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
|
||||
reboot.S sbrk.S setlogin.S sigreturn.S syscall.S
|
||||
|
|
|
|||
Loading…
Reference in a new issue