aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/include/pc
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* smbios: Move smbios driver out from x86 machdep codeAllan Jude2021-02-231-32/+0
| | | | | | | | | Add it to the x86 GENERIC and MINIMAL kernels Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: rpokala Differential Revision: https://reviews.freebsd.org/D28738
* i386 4/4G split.Konstantin Belousov2018-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change makes the user and kernel address spaces on i386 independent, giving each almost the full 4G of usable virtual addresses except for one PDE at top used for trampoline and per-CPU trampoline stacks, and system structures that must be always mapped, namely IDT, GDT, common TSS and LDT, and process-private TSS and LDT if allocated. By using 1:1 mapping for the kernel text and data, it appeared possible to eliminate assembler part of the locore.S which bootstraps initial page table and KPTmap. The code is rewritten in C and moved into the pmap_cold(). The comment in vmparam.h explains the KVA layout. There is no PCID mechanism available in protected mode, so each kernel/user switch forth and back completely flushes the TLB, except for the trampoline PTD region. The TLB invalidations for userspace becomes trivial, because IPI handlers switch page tables. On the other hand, context switches no longer need to reload %cr3. copyout(9) was rewritten to use vm_fault_quick_hold(). An issue for new copyout(9) is compatibility with wiring user buffers around sysctl handlers. This explains two kind of locks for copyout ptes and accounting of the vslock() calls. The vm_fault_quick_hold() AKA slow path, is only tried after the 'fast path' failed, which temporary changes mapping to the userspace and copies the data to/from small per-cpu buffer in the trampoline. If a page fault occurs during the copy, it is short-circuit by exception.s to not even reach C code. The change was motivated by the need to implement the Meltdown mitigation, but instead of KPTI the full split is done. The i386 architecture already shows the sizing problems, in particular, it is impossible to link clang and lld with debugging. I expect that the issues due to the virtual address space limits would only exaggerate and the split gives more liveness to the platform. Tested by: pho Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D14633 Notes: svn path=/head/; revision=332489
* sys/i386: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326260
* Add more UEFI/e820 memory types from latest specifications.Alexander Motin2016-07-241-0/+3
| | | | | | | | | This is only cosmetics. MFC after: 2 weeks Notes: svn path=/head/; revision=303261
* - Add a new structure type for the ACPI 3.0 SMAP entry that includes theJohn Baldwin2014-08-291-0/+8
| | | | | | | | | | | | | | | | | | optional attributes field. - Add a 'machdep.smap' sysctl that exports the SMAP table of the running system as an array of the ACPI 3.0 structure. (On older systems, the attributes are given a value of zero.) Note that the sysctl only exports the SMAP table if it is available via the metadata passed from the loader to the kernel. If an SMAP is not available, an empty array is returned. - Add a format handler for the ACPI 3.0 SMAP structure to the sysctl(8) binary to format the SMAP structures in a readable format similar to the format found in boot messages. MFC after: 2 weeks Notes: svn path=/head/; revision=270828
* - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specificJohn Baldwin2012-09-281-73/+103
| | | | | | | | | | | | | | bits under #ifdef _KERNEL but leave definitions for various structures defined by standards ($PIR table, SMAP entries, etc.) available to userland. - Consolidate duplicate SMBIOS table structure definitions in ipmi(4) and smbios(4) in <machine/pc/bios.h> and make them available to userland. MFC after: 2 weeks Notes: svn path=/head/; revision=241027
* - Teach vesa(4) and dpms(4) about x86emu. [1]Xin LI2009-09-091-120/+0
| | | | | | | | | | | | | - Add vesa kernel options for amd64. - Connect libvgl library and splash kernel modules to amd64 build. - Connect manual page dpms(4) to amd64 build. - Remove old vesa/dpms files. Submitted by: paradox <ddkprog yahoo com> [1], swell k at gmail.com (with some minor tweaks) Notes: svn path=/head/; revision=197025
* A simple rewrite of biossmap.c:Jung-uk Kim2009-04-151-0/+4
| | | | | | | | | | | | | | | | - Do not iterate int 15h, function e820h twice. Instead, we use STAILQ to store each return buffer and copy all at once. - Export optional extended attributes defined in ACPI 3.0 as separate metadata. Currently, there are only two bits defined in the specification. For example, if the descriptor has extended attributes and it is not enabled, it has to be ignored by OS. We may implement it in the kernel later if it is necessary and proven correct in reality. - Check return buffer size strictly as suggested in ACPI 3.0. Reviewed by: jhb Notes: svn path=/head/; revision=191111
* - Add constants for the different memory types in the SMAP table.John Baldwin2007-10-281-2/+8
| | | | | | | | - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it. Notes: svn path=/head/; revision=173118
* Remove the internal use of __packed and put it on the structuresMatt Jacob2007-07-111-11/+11
| | | | | | | | | | themselves. Reviewed by: nate, peter, warner, robert Approved by: re (ken) Notes: svn path=/head/; revision=171382
* __packed has no effect on u_int8_t's except to cause a warning (andPeter Wemm2007-07-051-1/+1
| | | | | | | | | never has had any effect). Approved by: re (rwatson) Notes: svn path=/head/; revision=171241
* Make the facility for recognizing BIOS-signatures more generalPoul-Henning Kamp2005-07-211-1/+16
| | | | | | | | | | | | | | | | | and return a printable representation. This fixes recognition of the PC Engines WRAP and improves the recognition of the Soekris boards (Bios version can now be seen in the dmesg output for instance). Also, add watchdog support for PCM-582x platforms. Submitted by: Adrian Steinmann <ast@marabu.ch> Slightly changed by: phk PR: 81360 Notes: svn path=/head/; revision=148231
* Move pc98 specific parts to the pc98 specific file.Yoshihiro Takahashi2005-04-131-5/+0
| | | | Notes: svn path=/head/; revision=145010
* These appear to be unused in our tree, so remove them.Warner Losh2005-01-051-45/+0
| | | | Notes: svn path=/head/; revision=139732
* - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 isJohn Baldwin2004-06-101-1/+0
| | | | | | | | | | present and thus that the PnPBIOS probe should be skipped instead of having ACPI zero out the PnPBIOStable pointer. - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is the only place it is used. Notes: svn path=/head/; revision=130313
* Remove atdevbase and replace it's remaining uses with direct references toJohn Baldwin2004-06-101-2/+2
| | | | | | | KERNBASE instead. Notes: svn path=/head/; revision=130312
* Add new bios_string() which will hunt for a string inside a given rangePoul-Henning Kamp2004-06-031-0/+8
| | | | | | | | of the BIOS. This can be used for finding arbitrary magic in the BIOS in order to recognize particular platforms. Notes: svn path=/head/; revision=130040
* Removed bits related to MBRs now that they have a proper home inBruce Evans2002-10-021-20/+0
| | | | | | | <sys/diskmbr.h>. Notes: svn path=/head/; revision=104340
* use __packed.Alfred Perlstein2002-09-232-16/+16
| | | | Notes: svn path=/head/; revision=103870
* Fixed to draw mouse cursor. The syscons driver for PC98 uses differentYoshihiro Takahashi2001-12-141-0/+5
| | | | | | | | | | attributes from i386. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) MFC after: 3 days Notes: svn path=/head/; revision=87886
* Fix the argument specifier for the PnP BIOS function 2Kazutaka YOKOTA2001-09-031-1/+1
| | | | | | | | | | (PNP_SET_DEVNODE). The second argument is not a segment:offset pointer, but a 16 bit short. MFC after: 4 weeks Notes: svn path=/head/; revision=82845
* The general conesnsus on irc was that pci bios for config registersWarner Losh2001-08-211-0/+1
| | | | | | | | | | | | and such was just a bad idea and one that users should be forced to enable if they want it. This patch introduces a hw.pci.enable_pcibios tunable for those people. This does not impact the pcibios interrupt routing at all. Approved by: peter, msmith Notes: svn path=/head/; revision=82035
* Add PCI BIOS function codes for IRQ routing fetch and route.Mike Smith2000-10-191-0/+2
| | | | Notes: svn path=/head/; revision=67310
* Add types and prototypes.Warner Losh2000-10-161-1/+45
| | | | | | | Submitted by: msmith Notes: svn path=/head/; revision=67223
* More updates to the ACPI code:Mike Smith2000-09-301-0/+13
| | | | | | | | | | | | | | | | | | - Move all register I/O into acpi_io.c - Move event handling into acpi_event.c - Reorganise headers into acpivar/acpireg/acpiio - Move find-RSDT and find-ACPI-owned-memory into acpi_machdep - Allocate all resources (except those detailed only by AML) as real resources. Add infrastructure that will make adding resource support to AML code easy. - Remove all ACPI #ifdefs in non-ACPI code - Removed unnecessary includes - Minor style and commenting fixes Reviewed by: iwasaki Notes: svn path=/head/; revision=66489
* Some more i386-only BIOS-friendliness:Mike Smith2000-04-161-0/+11
| | | | | | | | | | | | - Add support for using the PCI BIOS functions for configuration space accesses, and make this the default. - Make PNPBIOS the default (obsoletes the PNPBIOS config option). - Add two new boot-time tunables to disable each of the above. Notes: svn path=/head/; revision=59294
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
| | | | Notes: svn path=/head/; revision=50477
* Reference the correct gdt[] entry on SMP. Remove the `generation' flag,Jonathan Lemon1999-08-271-2/+1
| | | | | | | and always reload the selectors for every bios call. Notes: svn path=/head/; revision=50463
* Remove the SMBIOS detection and definitions; this should be handled in aMike Smith1999-08-181-29/+1
| | | | | | | loadable module (under development). Notes: svn path=/head/; revision=49996
* Search for and interrogate the PnP BIOS if found. This code just printsMike Smith1999-08-171-4/+68
| | | | | | | | the PnP device IDs in verbose mode; it does not (yet) save any resource data or contribute to the PnP process nor resource management. Notes: svn path=/head/; revision=49953
* Major update to the kernel's BIOS-calling ability.Mike Smith1999-07-291-13/+75
| | | | | | | | | | | | - Add support for calling 32-bit code in other segments - Add support for calling 16-bit protected mode code Update APM to use this facility. Submitted by: jlemon Notes: svn path=/head/; revision=49197
* - Don't assume the line length in the video memory is always the same asKazutaka YOKOTA1999-02-051-2/+2
| | | | | | | | | | the screen width. - Store the current video mode information in the `video_adapter' struct. - The size of the `v_offscreensize' field in the VESA mode information block is u_int16, not u_int8. Notes: svn path=/head/; revision=43664
* The first stage of console driver reorganization: activate newKazutaka YOKOTA1999-01-111-5/+1
| | | | | | | | | | | | | | | | keyboard and video card drivers. Because of the changes, you are required to update your kernel configuration file now! The files in sys/dev/syscons are still i386-specific (but less so than before), and won't compile for alpha and PC98 yet. syscons still directly accesses the video card registers here and there; this will be rectified in the later stages. Notes: svn path=/head/; revision=42504
* Update #ifdef directive.Kazutaka YOKOTA1999-01-081-2/+2
| | | | | | | # I forgot this bit when I committed VESA KLD update a few days ago ;-< Notes: svn path=/head/; revision=42395
* Cosmetic change: adjust copyright notice.Kazutaka YOKOTA1998-09-251-17/+14
| | | | Notes: svn path=/head/; revision=39643
* Add VESA support to syscons.Søren Schmidt1998-09-151-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Kazu writes: The VESA support code requires vm86 support. Make sure your kernel configuration file has the following line. options "VM86" If you want to statically link the VESA support code to the kernel, add the following option to the kernel configuration file. options "VESA" The vidcontrol command now accepts the following video mode names: VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600 The VESA_800x600 mode is a raster display mode. The 80x25 text will be displayed on the 800x600 screen. Useful for some laptop computers. vidcontrol accepts the new `-i <info>' option, where <info> must be either `adapter' or `mode'. When the `-i adapter' option is given, vidcontrol will print basic information (not much) on the video adapter. When the `-i mode' option is specified, vidcontrol will list video modes which are actually supported by the video adapter. Submitted by: Kazutaka YOKOTA yokota@FreeBSD.ORG Notes: svn path=/head/; revision=39287
* Nuke the nonexistend pad bytes from the end of the DMI header structure.Mike Smith1997-08-041-2/+1
| | | | Notes: svn path=/head/; revision=27873
* Support for PC BIOS functions.Mike Smith1997-08-011-0/+113
| | | | Notes: svn path=/head/; revision=27822
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-222-2/+2
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-142-2/+2
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, someRodney W. Grimes1993-10-162-0/+4
| | | | | | | minor cleanup. Added $Id$ to files that did not have any version info, etc Notes: svn path=/head/; revision=621
* Initial import, 0.1 + pk 0.2.4-B1Rodney W. Grimes1993-06-122-0/+106
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=4