summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
AgeCommit message (Collapse)Author
2011-04-20Potential NULL deref in an error case spotted by chl on one copy;Theo de Raadt
correct fix applied to 3 similar drivers ok chl
2011-04-19add some more intel cpuid modelsJonathan Gray
ok kettenis@
2011-04-19use "orl" to test the return value from an interrupt handler not "orq"David Gwynne
since its an int, not a long. ok deraadt@
2011-04-18Revert the sigacts diff: NFS can apparently retain pointers to processesPhilip Guenthe
until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
2011-04-17bigmem works well enough on amd64; we do not need the knob to turn itTheo de Raadt
off anymore. ok miod
2011-04-16Use 'CLR(<buf>->b_flags, B_READ | B_WRITE | B_DONE)' regardless ofKenneth R Westerback
what the previous IO was. Less chance of copy and paste errors. Suggested by miod@.
2011-04-16More than a decade ago, interrupt handlers on sparc started returning 0Theo de Raadt
(interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. ok and help from various people. In snaps for about a week now.
2011-04-15Remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok guenther@
2011-04-15In days of yore one could arbitrarily whack buffer flags. Those daysKenneth R Westerback
are past. Use CLR() and SET() to modify necessary flags while leaving the flags used by the buffer cache in peace. Should make bufcache code much less confused about the state of the bufs used in reading/writing disklabels. Other such flag abuses no doubt await a visit. Errors in original diff found by miod@. ok beck@ deraadt@
2011-04-15Correct the sharing of the signal handling state: stuff that shouldPhilip Guenthe
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
2011-04-15Convert the kernel Makefiles to autogenerate dependencies during compilationPhilip Guenthe
using the -MD option to cc, with -MP, -MT, and -MF where needed, converting "make depend" to a no-op. This increases parallelism for those using "make -j" and keeps the dependencies up to date with each compilation automatically. sparc and vax users will need to rebuild gcc with support for the -M[PTF] options before config'ing with this diff.
2011-04-13Unrevert the FS.base diff: the issues were actually elsewherePhilip Guenthe
Additional testing by jasper@ and pea@
2011-04-10Merge viapm and viaenvAlexandr Shadchin
Pluses: - Add support SMBus for VT82C596, VT82C596B, VT82C686A, VT8231 - Add support ACPI timer for all VIA South Bridges ok deraadt@, tested sthen@
2011-04-10Extend the PCI memory address space to 36-bit. The first BIOSen that assignMark Kettenis
addresses >4GB to 64-bit BARs have started to appear. But as long as machines still support running 32-bit operating systems we don't expect to see BARs that aren't addressable using PAE. Fixes a panic reported by william@. ok deraadt@
2011-04-10Revert bulk of the FS.base diff, as it causes issues on some machinesPhilip Guenthe
and the problem isn't obvious yet.
2011-04-09don't tell the inline assembly here it will take a 64 bit io portJonathan Gray
value when this isn't possible in practice, use a 32 bit value. ok kettenis@ miod@ oga@
2011-04-08remove uneeded inlines here as was done in rev 1.24 ofJonathan Gray
the equivalent i386 file ok kettenis@ deraadt@
2011-04-07Do not use NULL in integer comparisons. No functional change.Miod Vallat
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
2011-04-06The various read*label() have stopped returning error strings for quiteMiod Vallat
some time, and return errnos instead. Fix or remove out-of-date comments mentioning the error strings, and make their callers check the return value against zero, not NULL.
2011-04-05Add support for per-rthread base-offset for the %fs selector on amd64.Philip Guenthe
Add pcb_fsbase to the PCB for tracking what the value for the thread is, and ci_cur_fsbase to struct cpu_info for tracking the CPU's current value for FS.base, then on return to user-space, skip the setting if the CPU has the right value already. Non-threaded processes without TLS leave FS.base zero, which can be conveniently optimized: setting %fs zeros FS.base for fewer cycles than wrmsr. ok kettenis@
2011-04-03Move PPWAIT flag from struct proc to process, so that rthreads inPhilip Guenthe
a vforked child behave correctly. Have the parent in a vfork() wait on a (different) flag in *its* process instead of the child to prevent a possible use-after-free. When ktracing the child return from a fork, call it rfork if an rthread was created. ok blambert@
2011-04-03Re-enable bce(4) now that it is fixed.Claudio Jeker
2011-04-02just some spaces; no binary change.Marco Peereboom
2011-04-02Remove the AMD GART based iommu code.Owain Ainsworth
With current strategies to put memory in the ``correct'' place it isn't needed. There's also the problem that it did not work on all machines, failing completely on some and utterly breaking DMA. So just remove it. If anyone needs it it will be in the Attic. ok deraadt@
2011-04-02Enable bigmem by default on amd64.Bob Beck
ok deraadt@
2011-04-02Constraint checking - ensure that physical addresses for dma are belowBob Beck
the top of the dma constraint range and panic if they are not. ok deraadt@, thib@, oga@
2011-04-01Fix comment: amd64's list of callee-saved registers isn't the same as i386Philip Guenthe
2011-03-24remove whitespaceRobert Nagy
2011-03-23Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.Paul Irofti
Discussed and okay drahn@. Okay deraadt@.
2011-03-22renegade spaces; no binary changeMarco Peereboom
2011-03-20When reading MXCSR from userland sigcontext or a ptrace request,Philip Guenthe
mask out invalid bits to prevent a protect fault. Original diff by joshe@; further feedback and ok kettenis@
2011-03-19Make amd64/i386 installboot error out if /boot would cross theKenneth R Westerback
BOOTBIOS_MAXSEC line. ok deraadt@.
2011-03-18Old-style MTRRs were never used on amd64, so remove the remaining tracesPhilip Guenthe
of them, as well as some other unused proc md_flags bits: MDP_COMPAT and MDP_SYSCALL. ok mikeb@
2011-03-17Make the various findopenbsd() functions non-recursive, eliminatingKenneth R Westerback
a global, a couple of parameters, and opening up possibility of traversing much longer EBR lists without blowing the stack. Make seach algorithm the same as used in kern/subr_disk.c by checking all primary partitions in the MBR/EBR before moving to next EBR. This makes it more likely that everybody finds the same OpenBSD partition. Largely from a diff posted to tech@ by ucsavl.
2011-03-15Bunch of white space and style adjustments to make amd64 versionKenneth R Westerback
the same as i386 version. No change to .o file except for the one %lld -> %u format fix.
2011-03-14Clamp BIOS io attempts to < 2 ^28 - 1 sectors (a.k.a. 128GB forKenneth R Westerback
512-byte sectors) as some BIOSen get confused when we ask for sectors higher up. Uss u_int throughout the boot code to calculate sector addresses, since 32 bits is enough to do 28 ^ 1 - 1 arithmetic. Add checks for wraparound. I can now install and boot from the 7th extended partition below 128GB. Much feedback & guidance from deraadt@. Also from weingart@ on BIOS io. ok deraadt@ (less a couple of minor tweaks found in testing)
2011-03-14Fix spelling in commentPhilip Guenthe
2011-03-13Change daddr_t to daddr32_t. The bootblocks on our architectures onlyTheo de Raadt
do 32-bit block spanning. If later on we get some that can/should do 64-bit, that can be done now using daddr64_t (but of course, we are taking this step to finalize the daddr_t 64-bit conversion). ok miod krw
2011-03-12Implement swap64 with the bswapq instruction. (Commit stolen from mikeb@)Philip Guenthe
Add missing __statement modifiers and correct %1 to %0 in the asm. ok mikeb@, pirofti@, drahn@
2011-03-11Zap stack garbage before passing buffer to biosd_io(), which mayKenneth R Westerback
be lied to by the BIOS about successfully reading data. ok deraadt@ weingart@
2011-03-11Use _MACHINE_ENDIAN_H_ for this is The Right Thing To Do.Paul Irofti
Okay guenther@, millert@.
2011-03-08Fix extended partition searching so we don't get lost. The offsetKenneth R Westerback
of the next EBR is relative to the start of the extended partition described in the first MBR, not relative to the EBR specifying the offset in its extended partition entry. Clean up installboot -v output. Use daddr64_t for all sector numbers. Not a complete fix, but better than what we had. More tweaks to come. Inspired by a diff and cluebat from uscav on tech@ a few weeks ago. Feedback from matthew@, weingart@. ok deraadt@
2011-03-06The global_int information acpi collects is not used by amd64.Theo de Raadt
ok ketttenis
2011-03-02- change recieved -> received in comments, as well as two unused definesJasper Lievisse Adriaanse
in pxe.h. ok deraadt@ sthen@
2011-02-26Force the DUID cache used to generate hw.disknames to be updatedKenneth R Westerback
after every disklabel read or write. This keeps the DUID cache more in sync with the physical world. De-syncing noted by drahn@ while zapping disklabels with dd. ok jsing@ deraadt@
2011-02-17Disable sbt and ubt devices. The bluetooth code will sometimes sleep whileMiod Vallat
holding locks, this is not allowed, and nobody has stepped up to fix this, so better not lure people into using bluetooth devices.
2011-01-28you use ; to end a statement, not a :.David Gwynne
2011-01-27Atom uses the same value for bus clock 200 MHz as Core, thoughJonathan Gray
this is not documented by Intel. tested by henning on d525
2011-01-23Add support to installboot(8) for installing biosboot(8) and boot(8) onJoel Sing
softraid volumes. If installboot is run on a softraid volume, a fake single inode FFS filesystem is constructed to contain boot(8). This is then installed onto the softraid volume via the BIOCINSTALLBOOT ioctl. biosboot(8) is then patched and installed onto each disk that is a member of the softraid volume. Joint work with otto@ who came up with the concept of constructing a fake FFS filesystem and wrote the code to do so. No objection from miod@
2011-01-14- use nitems()Jasper Lievisse Adriaanse
"doesn't hurt" deraadt@