summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2015-08-28The PDE covering the APTE space should not confer exec permissions.Mike Larkin
ok deraadt
2015-08-26MBR must have priority over GPT.Kenneth R Westerback
Found, fix tested & thus ok ajacoutot@
2015-08-25typo in commentMike Larkin
2015-08-25Enforce kernel w^x policy by properly setting NX (as needed) forMike Larkin
kernel text, PTEs, .rodata, data, bss and the symbol regions. This has been in snaps for a while with no reported fallout. The APTE space and MP/ACPI trampolines will be fixed next. ok deraadt@
2015-08-25Re-enabling GPT on amd64 and i386. Discussed with and OK krw@Brandon Mercer
2015-08-22delete some wrong commentsMike Larkin
2015-08-21use vaddr_t for kernel va range calculation instead of paddr_t. No binaryMike Larkin
change but using paddr_t here wasn't correct - better to clean it up.
2015-08-20remove unused vesafb code, had been commented out and not compiled in forMike Larkin
7 years (for some parts, 9 years), and was only ever referenced in i386 anyway. ok jsg@, matthieu@, armani@
2015-08-20Remove an unused #include file from i386 and amd64 pmap.hMike Larkin
ok miod@, millert@, deraadt@
2015-08-15Increase the size of the masks used in i386 ldscript to account for largerMike Larkin
sections that may be encountered when using larger than normal ramdisks. No binary change. Requested by and diff provided by Nathanael Rensen <nathanael at list.polymorpheus.com>
2015-08-12Use a linker script when building i386 kernels to allow section padding onMike Larkin
PAGE_SIZE boundaries. This is required to enforce proper separation of sections when adding page protections (coming shortly). This was in snaps before release with no reported side effects. ok deraadt@
2015-08-10Explicitly NULL-terminate mpbios_icu_table as required by the code whichTheo de Raadt
uses it. On ramdisk kernels built with -Os, (accidental termination) did not occur, leading to heisenbug occurances....
2015-08-04Remove some ancient code in PAE mode that was part of supporting > 4GBMike Larkin
physmem on i386, which we don't support anymore. And since we removed the physmem ranges above 4GB in machdep.c, this code did nothing anyway. ok beck@, deraadt@
2015-07-23Revert attempted GPT code cleanup. Too much code, too little testing.Kenneth R Westerback
Requested by deraadt@
2015-07-23Attach pvbus(4) later just before pci(4). Same change was done for amd64.Reyk Floeter
Tested on VMware-GENERIC-i386. OK mlarkin@
2015-07-23GPT appears to create broken spoofed labels for empty disks (at least vnd,Theo de Raadt
maybe related to the small size of such media)
2015-07-21Sync with amd64; add LAPIC timer definitions.Masao Uebayashi
2015-07-21Add pvbus(4), a pseudo-bus to attach non-PCI paravirtual devices and buses.Reyk Floeter
vmt(4) is moved from mainbus0 to pvbus0, more devices will follow. OK sf@ deraadt@
2015-07-21A few more daddr_t fixes. Rename 'phys_off' variables to 'offset'Kenneth R Westerback
since they are now relative to chunks. Use 'blkno' as normal variable name for daddr_t items rather than mix of 'blkno, blk, offset. Change field name ssd_data_offset to ssd_data_blkno since it is a block and not byte quantity. No intentional functional change.
2015-07-19Make i386_send_ipi() return voidStefan Fritsch
Nobody uses its return value.
2015-07-19Enable GPT kernel support. Discussed with a few. OK miod@Brandon Mercer
2015-07-19Use DEV_BSIZE instead of 512 where appropriate. Use DL_SECTOBLK()Kenneth R Westerback
where appropriate. Noop for disks with 512-byte sectors. i.e. the only kind currently allowed in softraid volumes. But starts laying the groundwork to allow disks with other sector sizes. ok jsing@
2015-07-18Make {x86,i82489,x2apic,i386}_ipi return voidStefan Fritsch
They always returned 0 ok mlarkin@ kettenis@
2015-07-18Make *_ipi_init return void on i386/amd64Stefan Fritsch
They always returned 0 ok mlarkin@ kettenis@
2015-07-18Set all the cr4 bits we want at once, instead of one by onePhilip Guenther
ok jsg@ mlarkin@
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-17Avoid assigning low addresses to PCI BARs. Some machines don't claim theseMark Kettenis
memory addresses in their BIOS memory map making us believe they are available. However these addresses will never actually be routed to the PCI bus and therefore guaranteed not to work. ok krw@, mlarkin@
2015-07-17Remove/reword some odd comments and a #define that looks like it was leftMike Larkin
over from someone's debugging.
2015-07-17Include executable mapping for BIOS32 pages. Fixes a problem where mappingsMike Larkin
done in this region using PAE w/NX caused #PFs (as they lacked the exec permission previously). Also unmap the region when we're finished. No sense in leaving extra executable regions lying around. Fixes non-ACPI uniprocessor i386 machines that have NX/PAE (these would previously panic in pcibiosattach). ok deraadt@
2015-07-17Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outMiod Vallat
kernels and we no longer have any.
2015-07-16Remove 4 second delay on reboot/shutdown that was added 8 yearsStefan Fritsch
ago to "workaround MP timeout/splhigh/scsi race at reboot time". Probably the issue has been fixed by now. And if not, the relevant scsi controller drivers should add a workaround in their DVACT_POWERDOWN hook. While there, change the default final reset delay on amd64 to 0. People who like looking at the final reboot message may still set the CPURESET_DELAY define. OK deraadt@ kettenis@ mlarkin@ uebayasi@
2015-07-16Remove a piece of code that has been commented out for 16 years and wasMike Larkin
wrong to begin with.
2015-07-16Move grab/release of the kernel_lock for softintrs from the ASM stubs toPhilip Guenther
softintr_dispatch(). Delete traces of long superseded stats code. ok beck@ mpi@ uebayasi@
2015-07-13remove unused isa_nodefaultirq; ok kettenis, mlarkinMike Belopuhov
2015-07-10Committed from the wrong tree. So now for real:Mark Kettenis
Don't call pool_put(9) while holding a mutex. Instead collect pv entries in a list and put them back into the pool after releasing the mutex. This prevents a lock ordering problem between the per-pmap mutexes and the kernel lock that arises because pool_put(9) may grab the kernel lock when it decides to free a pool page. This seems to make the i386 pmap mpsafe enough to run the reaper without holding the kernel lock. ok sthen@ (who helped me a lot debugging this)
2015-07-10Don't call pool_put(9) while holding a mutex. Instead collect pv entries inMark Kettenis
a list and put them back into the pool after releasing the mutex. This prevents a lock ordering problem between the per-pmap mutexes and the kernel lock that arises because pool_put(9) may grab the kernel lock when it decides to free a pool page. This seems to make the i386 pmap mpsafe enough to run the reaper without holding the kernel lock. ok sthen@ (who helped me a lot debugging this)
2015-07-10Don't call pool_put(9) while holding a mutex. Instead collect pv entries inMark Kettenis
a list and put them back into the pool after releasing the mutex. This prevents a lock ordering problem between the per-pmap mutexes and the kernel lock that arises because pool_put(9) may grab the kernel lock when it decides to free a pool page. This seems to make the i386 pmap mpsafe enough to run the reaper without holding the kernel lock. ok sthen@ (who helped me a lot debugging this)
2015-07-09Remove unused prototype.Mark Kettenis
2015-07-02tweak MUTEX_ASSERT_LOCKED and MUTEX_ASSERT_UNLOCKED to only lookDavid Gwynne
at the owner. every other arch does it the same, so this is to reduce differences between our platforms. ok miod@
2015-07-02Make the i386 pmap (almost) mpsafe by protecting the pmap itself, the pvMark Kettenis
lists and the apte with a mutex. Rearrange some code to avoid sleeping/spinning with one of these locks held. This should make pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) safe to use without holding the kernel lock. Unfortunately there still seems to be an issue that causes deadlocks under pressure. That shouldn't be an issue as long as uvm still calls the pmap functions with the kernel lock held. Hopefully committed this will help finding the last bugs. ok mlarkin@, deraadt@
2015-07-02introduce srp, which according to the manpage i wrote is short forDavid Gwynne
"shared reference pointers". srp allows concurrent access to a data structure by multiple cpus while avoiding interlocking cpu opcodes. it manages its own reference counts and the garbage collection of those data structure to avoid use after frees. internally srp is a twisted version of hazard pointers, which are a relative of RCU. jmatthew wrote the bulk of a hazard pointer implementation and changed bpf to use it to allow mpsafe access to bpfilters. however, at s2k15 we were trying to apply it to other data structures but the memory overhead of every hazard pointer would have blown out significantly in several uses cases. a bulk of our time at s2k15 was spent reworking hazard pointers into srp. this diff adds the srp api and adds the necessary metadata to struct cpuinfo on our MP architectures. srp on uniprocessor platforms has alternate code that is optimised because it knows there'll be no concurrent access to data by multiple cpus. srp is made available to the system via param.h, so it should be available everywhere in the kernel. the docs likely need improvement cos im too close to the implementation. ok mpi@
2015-06-28Split AST handling from trap() into ast() and get rid of T_ASTFLTPhilip Guenther
testing by krw@, and then many via snapshots
2015-06-24Uninitialized variables; pedro@Miod Vallat
2015-06-22Make it possible to create write combing mappings through /dev/mem. This isMark Kettenis
done by introducining a magic offset. Pages below this offset are mapped with default memory attributes. Above this offset pages are mapped write combining. ok mlarkin@
2015-06-22document that boot.conf can contain comments;Jason McIntyre
from tilo stritzky thanks miod for help with the diff, and who also noted that leading whitespace gets stripped too;
2015-06-13Parse _CST objects and use the C-states they describe when they're sane.Philip Guenther
testing by many, particularly krw@ and jcs@ tweaks by kettenis@ ok deraadt@
2015-06-07Add a default panic case to a switch statement where code after assumesJonathan Gray
one of the cases was reached. Matches other parts of the mpbios code.
2015-06-07Add CR4_FSGSBASEPhilip Guenther
2015-06-07Enable use of mwait in non-MP boxes and report # of C-substates up to C7,Philip Guenther
truncating trailing zeros. Testing by many as part of a larger change to use ACPI _CST objects ok krw@
2015-06-06Enable rtwn(4) on RAMDISK_CD kernels for upgrades. ok deraadtStefan Sperling