2002-06-30 08:05:21 +00:00
|
|
|
# $FreeBSD$
|
2003-05-19 22:19:02 +00:00
|
|
|
# Options specific to AMD64 platform kernels
|
2002-06-30 08:05:21 +00:00
|
|
|
|
2003-11-17 08:58:16 +00:00
|
|
|
AUTO_EOI_1 opt_auto_eoi.h
|
|
|
|
AUTO_EOI_2 opt_auto_eoi.h
|
2010-06-17 11:54:49 +00:00
|
|
|
COUNT_XINVLTLB_HITS opt_smp.h
|
|
|
|
COUNT_IPIS opt_smp.h
|
2002-06-30 08:05:21 +00:00
|
|
|
MAXMEM
|
2010-10-29 18:38:36 +00:00
|
|
|
MPTABLE_FORCE_HTT
|
2005-12-12 10:15:11 +00:00
|
|
|
MP_WATCHDOG
|
2011-08-26 17:08:22 +00:00
|
|
|
NKPT opt_pmap.h
|
2012-03-24 19:43:49 +00:00
|
|
|
PV_STATS opt_pmap.h
|
2004-03-03 09:35:47 +00:00
|
|
|
|
|
|
|
# Options for emulators. These should only be used at config time, so
|
|
|
|
# they are handled like options for static filesystems
|
|
|
|
# (see src/sys/conf/options), except for broken debugging options.
|
2018-06-02 06:40:15 +00:00
|
|
|
COMPAT_AOUT opt_dontuse.h
|
2018-04-06 17:35:35 +00:00
|
|
|
COMPAT_FREEBSD32 opt_global.h
|
2004-03-13 22:16:34 +00:00
|
|
|
#COMPAT_LINUX opt_dontuse.h
|
2004-08-16 07:55:06 +00:00
|
|
|
COMPAT_LINUX32 opt_compat.h
|
2006-05-07 18:12:18 +00:00
|
|
|
LINPROCFS opt_dontuse.h
|
2006-05-10 03:25:45 +00:00
|
|
|
LINSYSFS opt_dontuse.h
|
Add support for Windows/x86-64 binaries to Project Evil.
Ville-Pertti Keinonen (will at exomi dot comohmygodnospampleasekthx)
deserves a big thanks for submitting initial patches to make it
work. I have mangled his contributions appropriately.
The main gotcha with Windows/x86-64 is that Microsoft uses a different
calling convention than everyone else. The standard ABI requires using
6 registers for argument passing, with other arguments on the stack.
Microsoft uses only 4 registers, and requires the caller to leave room
on the stack for the register arguments incase the callee needs to
spill them. Unlike x86, where Microsoft uses a mix of _cdecl, _stdcall
and _fastcall, all routines on Windows/x86-64 uses the same convention.
This unfortunately means that all the functions we export to the
driver require an intermediate translation wrapper. Similarly, we have
to wrap all calls back into the driver binary itself.
The original patches provided macros to wrap every single routine at
compile time, providing a secondary jump table with a customized
wrapper for each exported routine. I decided to use a different approach:
the call wrapper for each function is created from a template at
runtime, and the routine to jump to is patched into the wrapper as
it is created. The subr_pe module has been modified to patch in the
wrapped function instead of the original. (On x86, the wrapping
routine is a no-op.)
There are some minor API differences that had to be accounted for:
- KeAcquireSpinLock() is a real function on amd64, not a macro wrapper
around KfAcquireSpinLock()
- NdisFreeBuffer() is actually IoFreeMdl(). I had to change the whole
NDIS_BUFFER API a bit to accomodate this.
Bugs fixed along the way:
- IoAllocateMdl() always returned NULL
- kern_windrv.c:windrv_unload() wasn't releasing private driver object
extensions correctly (found thanks to memguard)
This has only been tested with the driver for the Broadcom 802.11g
chipset, which was the only Windows/x86-64 driver I could find.
2005-02-16 05:41:18 +00:00
|
|
|
NDISAPI opt_dontuse.h
|
2002-06-30 08:05:21 +00:00
|
|
|
|
2004-03-03 09:35:47 +00:00
|
|
|
TIMER_FREQ opt_clock.h
|
2002-06-30 08:05:21 +00:00
|
|
|
|
2006-07-29 18:38:54 +00:00
|
|
|
# options for serial support
|
|
|
|
COM_ESP opt_sio.h
|
|
|
|
COM_MULTIPORT opt_sio.h
|
|
|
|
CONSPEED opt_sio.h
|
|
|
|
GDBSPEED opt_sio.h
|
2007-11-30 21:45:07 +00:00
|
|
|
COM_NO_ACPI opt_sio.h
|
2006-07-29 18:38:54 +00:00
|
|
|
|
2002-06-30 08:05:21 +00:00
|
|
|
VGA_ALT_SEQACCESS opt_vga.h
|
|
|
|
VGA_DEBUG opt_vga.h
|
|
|
|
VGA_NO_FONT_LOADING opt_vga.h
|
|
|
|
VGA_NO_MODE_CHANGE opt_vga.h
|
|
|
|
VGA_SLOW_IOACCESS opt_vga.h
|
|
|
|
VGA_WIDTH90 opt_vga.h
|
|
|
|
|
2009-09-09 09:50:31 +00:00
|
|
|
VESA
|
|
|
|
VESA_DEBUG opt_vesa.h
|
|
|
|
|
2009-02-06 20:57:10 +00:00
|
|
|
# AGP debugging support
|
|
|
|
AGP_DEBUG opt_agp.h
|
|
|
|
|
2002-06-30 08:05:21 +00:00
|
|
|
ATKBD_DFLT_KEYMAP opt_atkbd.h
|
|
|
|
|
2017-02-10 01:04:11 +00:00
|
|
|
# iWARP client interface support in ixl
|
|
|
|
IXL_IW opt_ixl.h
|
|
|
|
|
2002-06-30 08:05:21 +00:00
|
|
|
# -------------------------------
|
|
|
|
# EOF
|
|
|
|
# -------------------------------
|
2003-05-01 02:59:24 +00:00
|
|
|
HAMMER opt_cpu.h
|
|
|
|
PSM_HOOKRESUME opt_psm.h
|
|
|
|
PSM_RESETAFTERSUSPEND opt_psm.h
|
|
|
|
PSM_DEBUG opt_psm.h
|
2003-11-17 08:58:16 +00:00
|
|
|
DEV_ATPIC opt_atpic.h
|
2005-04-30 20:01:00 +00:00
|
|
|
|
2005-12-06 02:58:12 +00:00
|
|
|
# BPF just-in-time compiler
|
|
|
|
BPF_JITTER opt_bpf.h
|
2009-03-11 15:30:12 +00:00
|
|
|
|
|
|
|
XENHVM opt_global.h
|
2012-01-31 19:38:18 +00:00
|
|
|
|
|
|
|
# options for the Intel C600 SAS driver (isci)
|
|
|
|
ISCI_LOGGING opt_isci.h
|
Add kernel interfaces to call EFI Runtime Services.
Runtime services require special execution environment for the call.
Besides that, OS must inform firmware about runtime virtual memory map
which will be active during the calls, with the SetVirtualAddressMap()
runtime call, done while the 1:1 mapping is still used. There are two
complication: the SetVirtualAddressMap() effectively must be done from
loader, which needs to know kernel address map in advance. More,
despite not explicitely mentioned in the specification, both 1:1 and
the map passed to SetVirtualAddressMap() must be active during the
SetVirtualAddressMap() call. Second, there are buggy BIOSes which
require both mappings active during runtime calls as well, most likely
because they fail to identify all relocations to perform.
On amd64, we can get rid of both problems by providing 1:1 mapping for
the duration of runtime calls, by temprorary remapping user addresses.
As result, we avoid the need for loader to know about future kernel
address map, and avoid bugs in BIOSes. Typically BIOS only maps
something in low 4G. If not runtime bugs, we would take advantage of
the DMAP, as previous versions of this patch did.
Similar but more complicated trick can be used even for i386 and 32bit
runtime, if and when the EFI boot on i386 is supported. We would need
a trampoline page, since potentially whole 4G of VA would be switched
on calls, instead of only userspace portion on amd64.
Context switches are disabled for the duration of the call, FPU access
is granted, and interrupts are not disabled. The later is possible
because kernel is mapped during calls.
To test, the sysctl mib debug.efi_time is provided, setting it to 1
makes one call to EFI get_time() runtime service, on success the efitm
structure is printed to the control terminal. Load efirt.ko, or add
EFIRT option to the kernel config, to enable code.
Discussed with: emaste, imp
Tested by: emaste (mac, qemu)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
2016-09-21 11:31:58 +00:00
|
|
|
|
|
|
|
# EFI Runtime services support
|
|
|
|
EFIRT opt_efirt.h
|