freebsd-src/sys/amd64/include
John Baldwin 00f3efe1bd Add support for FreeBSD/i386 guests under bhyve.
- Similar to the hack for bootinfo32.c in userboot, define
  _MACHINE_ELF_WANT_32BIT in the load_elf32 file handlers in userboot.
  This allows userboot to load 32-bit kernels and modules.
- Copy the SMAP generation code out of bootinfo64.c and into its own
  file so it can be shared with bootinfo32.c to pass an SMAP to the i386
  kernel.
- Use uint32_t instead of u_long when aligning module metadata in
  bootinfo32.c in userboot, as otherwise the metadata used 64-bit
  alignment which corrupted the layout.
- Populate the basemem and extmem members of the bootinfo struct passed
  to 32-bit kernels.
- Fix the 32-bit stack in userboot to start at the top of the stack
  instead of the bottom so that there is room to grow before the
  kernel switches to its own stack.
- Push a fake return address onto the 32-bit stack in addition to the
  arguments normally passed to exec() in the loader.  This return
  address is needed to convince recover_bootinfo() in the 32-bit
  locore code that it is being invoked from a "new" boot block.
- Add a routine to libvmmapi to setup a 32-bit flat mode register state
  including a GDT and TSS that is able to start the i386 kernel and
  update bhyveload to use it when booting an i386 kernel.
- Use the guest register state to determine the CPU's current instruction
  mode (32-bit vs 64-bit) and paging mode (flat, 32-bit, PAE, or long
  mode) in the instruction emulation code.  Update the gla2gpa() routine
  used when fetching instructions to handle flat mode, 32-bit paging, and
  PAE paging in addition to long mode paging.  Don't look for a REX
  prefix when the CPU is in 32-bit mode, and use the detected mode to
  enable the existing 32-bit mode code when decoding the mod r/m byte.

Reviewed by:	grehan, neel
MFC after:	1 month
2014-02-05 04:39:03 +00:00
..
pc - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 2012-09-28 11:59:32 +00:00
xen Implement vector callback for PVHVM and unify event channel implementations 2013-08-29 19:52:18 +00:00
_align.h Merge amd64/i386 _align.h by aligning on the size of register_t (copied 2010-11-26 10:59:20 +00:00
_bus.h
_inttypes.h Copy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98 2011-01-08 18:09:48 +00:00
_limits.h Copy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace 2012-02-28 18:24:28 +00:00
_stdint.h Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace 2012-02-28 18:38:33 +00:00
_types.h Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing 2012-02-28 18:15:28 +00:00
acpica_machdep.h Merge acpica_machdep.h for amd64 and i386 and move to x86. In fact, these 2013-08-13 22:05:10 +00:00
apm_bios.h Move identical copies of apm_bios.h to sys/x86/include, replace them with 2010-11-11 19:36:21 +00:00
asm.h Introduce a WEAK_REFERENCE() alias and use it. Get rid of the CNAME and the 2013-11-21 21:25:58 +00:00
asmacros.h Clear DF bit in eflags/rflags on the kernel entry. The i386 and amd64 2010-06-23 20:44:07 +00:00
atomic.h Remove empty lines before return statements for style consistency. 2013-08-21 22:05:58 +00:00
bus.h bhyve import part 2 of 2, guest kernel changes. 2011-05-14 18:37:24 +00:00
bus_dma.h
clock.h Unsynchronized TSCs on the host require special handling in bhyve: 2013-04-10 05:59:07 +00:00
counter.h Fix issues with zeroing and fetching the counters, on x86 and ppc64. 2013-07-01 02:48:27 +00:00
cpu.h Add a resume hook for bhyve that runs a function on all CPUs during 2013-12-23 19:48:22 +00:00
cpufunc.h Implement PV IPIs for PVHVM guests and further converge PV and HVM 2013-09-06 22:17:02 +00:00
cputypes.h
db_machdep.h
elf.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
endian.h Copy amd64 endian.h to x86 and merge with i386 endian.h. Replace 2012-02-28 19:39:54 +00:00
exec.h
fdt.h Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
float.h Copy amd64 float.h to x86 and merge with i386 float.h. Replace 2012-03-04 14:00:32 +00:00
floatingpoint.h
fpu.h IFC @ r242684 2012-11-11 03:26:14 +00:00
frame.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
gdb_machdep.h
ieeefp.h People porting FreeBSD to new architectures ought not have to 2011-10-21 06:41:46 +00:00
in_cksum.h MFp4 bz_ipv6_fast: 2012-05-24 22:00:48 +00:00
intr_machdep.h Add support for suspend/resume/migration operations when running as a 2013-09-20 05:06:03 +00:00
iodev.h MFC r207329, r208716: 2010-06-01 21:19:58 +00:00
kdb.h
limits.h
md_var.h x86: detect mwait capabilities and extensions, when present 2013-07-28 17:54:42 +00:00
memdev.h Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). 2011-01-17 22:58:28 +00:00
metadata.h Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
minidump.h amd64: introduce minidump version 2 2010-11-11 18:35:28 +00:00
mp_watchdog.h
nexusvar.h
npx.h Move userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h. 2012-03-16 20:24:30 +00:00
ofw_machdep.h Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
param.h Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in 2013-05-07 22:46:24 +00:00
pcb.h Hide struct pcb definition by #ifdef __amd64__ braces. If cc -m32 2013-11-26 19:38:42 +00:00
pci_cfgreg.h Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to 2011-06-22 21:04:13 +00:00
pcpu.h Formalize the concept of virtual CPU ids by adding a per-cpu vcpu_id 2013-10-05 23:11:01 +00:00
pmap.h Re-arrange bits in the amd64/pmap 'pm_flags' field. 2013-12-20 05:50:22 +00:00
pmc_mdep.h Add software PMC support. 2012-03-28 20:58:30 +00:00
ppireg.h
proc.h Handle spurious page faults that may occur in no-fault sections of the 2012-03-22 04:52:51 +00:00
profile.h Use intr_disable() and intr_restore() instead of frobbing the flags register 2010-10-25 15:28:03 +00:00
psl.h Copy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs. 2012-03-19 21:29:57 +00:00
ptrace.h Copy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace 2012-03-04 20:24:28 +00:00
reg.h Copy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98 2012-03-18 19:06:38 +00:00
reloc.h
resource.h
runq.h
segments.h Hide struct pcb definition by #ifdef __amd64__ braces. If cc -m32 2013-11-26 19:38:42 +00:00
setjmp.h Copy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs. 2012-02-28 22:17:52 +00:00
sf_buf.h On those machines, where sf_bufs do not represent any real object, make 2013-09-06 05:37:49 +00:00
sigframe.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
signal.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
smp.h Move <machine/apicvar.h> to <x86/apicvar.h>. 2014-01-23 20:10:22 +00:00
specialreg.h Copy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace 2012-03-19 21:34:11 +00:00
stack.h
stdarg.h Copy amd64 stdarg.h to x86 and replace amd64/i386/pc98 stdarg.h with stubs. 2012-02-28 22:30:58 +00:00
sysarch.h Copy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace 2012-03-19 21:57:31 +00:00
timerreg.h
trap.h Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs. 2012-03-04 14:12:57 +00:00
tss.h
ucontext.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
varargs.h
vdso.h Implement mechanism to export some kernel timekeeping data to 2012-06-22 07:06:40 +00:00
vm.h - Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to 2012-03-29 16:51:22 +00:00
vmm.h Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
vmm_dev.h Enhance the support for PCI legacy INTx interrupts and enable them in 2014-01-29 14:56:48 +00:00
vmm_instruction_emul.h Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
vmparam.h As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other 2013-11-08 16:25:00 +00:00