summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Introduce pmap_pml4e_to_pdpe() and pmap_pdpe_to_pde() and use them to avoidalc2005-08-201-12/+28
| | | | | recomputation of the pml4e and pdpe in pmap_copy(), pmap_protect(), and pmap_remove().
* Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and renamestefanf2005-08-202-8/+6
| | | | | | | | | | it to __MINSIGSTKSZ. Define MINSIGSTKSZ in <sys/signal.h>. This is done in order to use MINSIGSTKSZ for the macro PTHREAD_STACK_MIN in <pthread.h> (soon <limits.h>) without having to include the whole <sys/signal.h> header. Discussed with: bde
* Avoid code duplication and implement bitcount32() function in systm.h only.pjd2005-08-191-53/+1
| | | | | Reviewed by: cperciva MFC after: 3 days
* Correct a performance bug in revision 1.462. The effect of the bug is toalc2005-08-191-14/+7
| | | | | | | execute the outer loop in procedures such as pmap_protect() many more times than necessary. Reviewed by: tegge
* Add aliases for atomic operations on 64-bit integers just like otherjhb2005-08-181-0/+20
| | | | | | 64-bit platforms. MFC after: 1 week
* Simplify the page table page reference counting by pmap_enter()'s change ofalc2005-08-141-9/+8
| | | | | | | | mapping case. Eliminate a stale comment from pmap_enter(). Reviewed by: tegge
* Eliminate unneeded diagnostic code.alc2005-08-111-7/+0
| | | | | Eliminate an unused #include. (Kernel stack allocation and deallocation long ago migrated to the machine-independent code.)
* Eliminate unneeded diagnostic code.alc2005-08-111-7/+0
| | | | Reviewed by: tegge
* Decouple the unrefing of a page table page from the removal of a pv entry.alc2005-08-111-25/+16
| | | | | | | In other words, change pmap_remove_entry() such that it no longer unrefs the page table page. Now, it only removes the pv entry. Reviewed by: tegge
* When support for 2MB/4MB pages was added in revision 1.148 an error wasalc2005-08-071-1/+0
| | | | | | | | | made in pmap_protect(): The pmap's resident count should not be reduced unless mappings are removed. The errant change to the pmap's resident count could result in a later pmap_remove() failing to remove any mappings if the errant change has set the pmap's resident count to zero.
* - Add support for saving stack traces and displaying them via printf(9)jeff2005-08-031-0/+23
| | | | | | | and KTR. Contributed by: Antoine Brodin <antoine.brodin@laposte.net> Concept code from: Neal Fachan <neal@isilon.com>
* - Improve the definition of INKERNEL() to include the DMAP area and thejeff2005-08-031-1/+2
| | | | | | proper start of the kernel area. Discussed with: peter
* Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.cjhb2005-07-291-3/+0
| | | | | so that they aren't duplicated 3 times and are also in the same file as the code that depends on the SYSVIPC modules.
* Add back ed(4) in amd64 GENERIC. It now works nicely and since thosemux2005-07-241-2/+1
| | | | | | | | | chips are commonly found, it makes sense to have it in GENERIC. This is a candidate for a RELENG_6 MFC. Approved by; peter Requested by: pav Tested by: pav
* Fallout from the previous revision: lnc isn't quite ready for amd64 yet.ru2005-07-221-1/+2
|
* Fix $FreeBSD$.obrien2005-07-221-1/+2
|
* Like on i386, bypass lock prefix for atomic ops on !SMP kernels.peter2005-07-211-0/+27
|
* MFi386: add vpd driver (vital product data.. model & serial numbers etc)peter2005-07-211-1/+3
|
* Add the ed driver for lint building. The PCI instances are still useful.peter2005-07-211-6/+5
| | | | | In theory, there are no isa slots on any amd64/em64t systems, but it doesn't hurt to keep these tiny fragments compiling.
* Actually create the double fault stack page for AP cpus so that we have apeter2005-07-211-1/+6
| | | | | chance of getting a working double fault instead of converting it to an instant triple fault reset.
* Make the facility for recognizing BIOS-signatures more generalphk2005-07-212-16/+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
* Fix smbios(4) and add support for amd64jkim2005-07-211-0/+2
| | | | Approved by: anholt (mentor)
* Add the latest r300 code from r300.sf.net. This is based on the patch suppliedanholt2005-07-201-1/+1
| | | | | | by Vladimir Dergachev for inclusion in DRM CVS, with minor modifications for FreeBSD CVS and the appropriate license from Nicolai Haehnle on r300_reg.h. Fixes hangs when using r300.sf.net userland, tested on a Radeon 9600 on amd64.
* Convert the atomic_ptr() operations over to operating on uintptr_tjhb2005-07-151-52/+18
| | | | | | | | | | variables rather than void * variables. This makes it easier and simpler to get asm constraints and volatile keywords correct. MFC after: 3 days Tested on: i386, alpha, sparc64 Compiled on: ia64, powerpc, amd64 Kernel toolchain busted on: arm
* Add recently invented COMPAT_FREEBSD5 option.kensmith2005-07-141-0/+1
| | | | MFC after: 3 days
* Regen.jhb2005-07-133-118/+118
|
* Make a pass through all the compat ABIs sychronizing the MP safe flagsjhb2005-07-131-115/+115
| | | | | | | with the master syscall table as well as marking several ABI wrapper functions safe. MFC after: 1 week
* Fixup some more fallout from the lapic/i8254 changes:jhb2005-07-131-23/+15
| | | | | | | | | | | | - Make sure timer0_max_count is set to a correct value in the lapic case. - Revert i8254_restore() to explicitly reprogram timer 0 rather than calling set_timer_freq() to do it. set_timer_freq() only reprograms the counter if the max count changes which it never does on resume. This unbreaks suspend/resume for several people. Tested by: marks, others Reviewed by: bde MFC after: 3 days
* Validate if the value written into {FS,GS}.base is a canonicaldavidxu2005-07-102-13/+44
| | | | | | | | | address, writting non-canonical address can cause kernel a panic, by restricting base values to 0..VM_MAXUSER_ADDRESS, ensuring only canonical values get written to the registers. Reviewed by: peter, Josepha Koshy < joseph.koshy at gmail dot com > Approved by: re (scottl)
* Some cleanups and tweaks to some of the atomic.h files in preparation forjhb2005-07-091-79/+63
| | | | | | | | | | | | | | | further changes and fixes in the future: - Use aliases via macros rather than duplicated inlines wherever possible. - Move all the aliases to the bottom of these files and the inline functions to the top. - Add various comments. - On alpha, drop atomic_{load_acq,store_rel}_{8,char,16,short}(). - On i386 and amd64, don't duplicate the extern declarations for functions in the two non-inline cases (KLD_MODULE and compiler doesn't do inlines), instead, consolidate those two cases. - Some whitespace fixes. Approved by: re (scottl)
* Remove a || 1 that crept into the i8254 commit and was subsequentlyjhb2005-07-051-1/+1
| | | | | | | | | copied and pasted. I had actually tested without this change in my trees as had the other testers. Reported by: bde, Rostislav Krasny rosti dot bsd at gmail dot com Approved by: re (scottl) Pointy hat to: jhb
* Check the alignment of the IP header before passing the packet up to thethompsa2005-07-021-0/+2
| | | | | | | | | | | | | | | | | | | packet filter. This would cause a panic on architectures that require strict alignment such as sparc64 (tier1) and ia64/ppc (tier2). This adds two new macros that check the alignment, these are compile time dependent on __NO_STRICT_ALIGNMENT which is set for i386 and amd64 where alignment isn't need so the cost is avoided. IP_HDR_ALIGNED_P() IP6_HDR_ALIGNED_P() Move bridge_ip_checkbasic()/bridge_ip6_checkbasic() up so that the alignment is checked for ipfw and dummynet too. PR: ia64/81284 Obtained from: NetBSD Approved by: re (dwhite), mlaier (mentor)
* Fix a buglet that was present in the ia64 code and that got inheritedmarcel2005-07-021-0/+1
| | | | | | | | | | | | | | | | | | by amd64 and i386: For buffered writes we collect data and write it out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used to keep track of how much data we have collected in the buffer so far and it's reset to zero immediately after writing a block to the dump device. When the last, possibly partially filled buffer is flushed, we didn't reset fragsz to 0 and as such would stop reflecting reality. Since we currently only need to do buffered writes once, this isn't a problem. However, when kernel dumps are made by hand (say by callling doadump from within DDB), the improperly cleared state from the first call to dumpsys causes the next call to dumpsys to create an invalid code file. This change resets fragsz after flushing the partially filled buffer so that it fixes the two problems at once. Approved by: re (scottl)
* MFi386: r1.221: use simple timecounter that is aware of irq0 being off.peter2005-07-011-7/+34
| | | | Approved by: re
* Jumbo-commit to enhance 32 bit application support on 64 bit kernels.peter2005-06-301-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | This is good enough to be able to run a RELENG_4 gdb binary against a RELENG_4 application, along with various other tools (eg: 4.x gcore). We use this at work. ia32_reg.[ch]: handle the 32 bit register file format, used by ptrace, procfs and core dumps. procfs_*regs.c: vary the format of proc/XXX/*regs depending on the client and target application. procfs_map.c: Don't print a 64 bit value to 32 bit consumers, or their sscanf fails. They expect an unsigned long. imgact_elf.c: produce a valid 32 bit coredump for 32 bit apps. sys_process.c: handle 32 bit consumers debugging 32 bit targets. Note that 64 bit consumers can still debug 32 bit targets. IA64 has got stubs for ia32_reg.c. Known limitations: a 5.x/6.x gdb uses get/setcontext(), which isn't implemented in the 32/64 wrapper yet. We also make a tiny patch to gdb pacify it over conflicting formats of ld-elf.so.1. Approved by: re
* Sync i386->amd64.peter2005-06-302-7/+30
| | | | | | | | | | | * Add ichwd (The Intel EM64T folks have an ICH) * Cosmetic comment syncs * Merge cpufreq change over to NOTES * add pbio (it compiles, but isn't useful since no boxes have ISA slots) * copy ath settings (note: wlan disabled here since its in global NOTES) * copy profiling, including fixing a previous i386->amd64 merge typo. Approved by: re (blanket i386 <-> amd64 sync/convergence)
* Add a special-case handler for general protection faults. It appears topeter2005-06-301-3/+26
| | | | | | | | | | be possible to get the swapgs state reversed if doreti traps during the iretq. Attempt to handle this. load_gs() might need special handling too. Running the kernel with the user's TLS and the kernel's PCPU space interchanged would be bad(TM). Discovered as a result of a conversation with: bde Approved by: re
* Move the KDB_STOP_NMI option from opt_global.h to opt_kdb.hpeter2005-06-292-0/+2
| | | | Approved by: re
* Switch AMD64 and i386 platforms to using ELF as their kernel crashpeter2005-06-293-104/+360
| | | | | | | | | | | | | | | | | | | | | | | | | dump format. The key reason to do this is so that we can dump sparse address space. For example, we need to be able to skip the PCI hole just below the 4GB boundary. Trying to destructively dump MMIO device registers is Really Bad(TM). The frequent result of trying to do a crash dump on a machine with 4GB or more ram was ugly (lockup or reboot). This code has been taken directly from the IA64 dump_machdep.c code, with just a few (mostly minor) mods. Introduce a dump_avail[] array in the machdep.c code so that we have a source of truth for what memory is present in a machine that needs to be dumped. We can't use phys_avail[] because all sorts of things slice memory out of it that we really need to dump. eg: the vm page array and the dmesg buffer. dump_avail[] is pretty much an unmolested version of phys_avail[]. It does have Maxmem correction. Bump the i386 and amd64 dump format to version 2, but nothing actually uses this. amd64 was actually using the i386 dump version number. libkvm support to follow. Approved by: re
* Increase MAXCPU to 16 in SMP kernels so that APIC IDs from 0 to 15 arejhb2005-06-291-1/+1
| | | | | | | | allowed for CPUs. Tested by: amd64 at cybernetwork dot org Approved by: re (scottl) MFC after: 1 week
* Disable the interrupts in trap_fatal before calling kdb_trap.ups2005-06-251-2/+9
| | | | | | | | (required now that critical sections no longer block interrupts) Reviewed by: jhb@ Approved by: re (scottl) Tested by: kris@,glebius@
* Correct the amount of data to allocate in these local copies ofjhb2005-06-241-1/+2
| | | | | | | | | exec_copyin_strings() to catch up to rev 1.266 of kern_exec.c. This fixes panics on amd64 with compat binaries since exec_free_args() was freeing more memory than these functions were allocating and the mismatch could cause memory to be freed out from under other concurrent execs. Approved by: re (scottl)
* Various trivial comment fixespeter2005-06-244-12/+6
| | | | Approved by: re
* Eliminate a source of 'trap xx with interrupts disabled'. I was jumping topeter2005-06-241-1/+1
| | | | | | | the wrong backend code and neglecting to re-enable interrupts after the stack prep. Approved by: re
* MFi386: 1.258: Minor cleanupspeter2005-06-241-4/+4
| | | | Approved by: re (blanket i386<->amd64 sync)
* Move HWPMC_HOOKS into its own opt_hwpmc_hooks.h file. It doesn't meritpeter2005-06-242-0/+3
| | | | | | | being in opt_global.h and forcing a global recompile when only a few files reference it. Approved by: re
* Add .cvsignore files just like in sys/<arch>/compiled, this keeps CVS fromobrien2005-06-201-0/+1
| | | | | | questing kernel config files not in CVS. Approved by: re(kensmith)
* Move IPI_PREEMPTION option from global NOTES file to i386+amd64 specificups2005-06-141-0/+3
| | | | | | NOTES files. Approved by: re (scottl)
* Introduce a procedure, pmap_page_init(), that initializes thealc2005-06-101-29/+17
| | | | | | | | | | | | | | | | | | | vm_page's machine-dependent fields. Use this function in vm_pageq_add_new_page() so that the vm_page's machine-dependent and machine-independent fields are initialized at the same time. Remove code from pmap_init() for initializing the vm_page's machine-dependent fields. Remove stale comments from pmap_init(). Eliminate the Boolean variable pmap_initialized from the alpha, amd64, i386, and ia64 pmap implementations. Its use is no longer required because of the above changes and earlier changes that result in physical memory that is being mapped at initialization time being mapped without pv entries. Tested by: cognet, kensmith, marcel
* MFP4:jkoshy2005-06-091-32/+19
| | | | | | | | | | | | | | | | - Implement sampling modes and logging support in hwpmc(4). - Separate MI and MD parts of hwpmc(4) and allow sharing of PMC implementations across different architectures. Add support for P4 (EMT64) style PMCs to the amd64 code. - New pmcstat(8) options: -E (exit time counts) -W (counts every context switch), -R (print log file). - pmc(3) API changes, improve our ability to keep ABI compatibility in the future. Add more 'alias' names for commonly used events. - bug fixes & documentation.
OpenPOWER on IntegriCloud