summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add IPI support for preempting a thread on another CPU.ups2005-06-092-1/+18
| | | | MFC after: 3 weeks
* Regen after addition of linux_getpriority wrapper.sobomax2005-06-083-5/+10
| | | | | | PR: kern/81951 Submitted by: Andriy Gapon <avg@icyb.net.ua> MFC after: 1 week
* Properly convert FreeBSD priority values into Linux values in thesobomax2005-06-081-1/+1
| | | | | | | getpriority(2) syscall. PR: kern/81951 Submitted by: Andriy Gapon <avg@icyb.net.ua>
* Rebuild generated system call definition files following the addition ofrwatson2005-05-303-271/+272
| | | | | | | the audit event field to the syscalls.master file format. Submitted by: wsalamon Obtained from: TrustedBSD Project
* Introduce a new field in the syscalls.master file format to hold therwatson2005-05-301-312/+397
| | | | | | | | | | | | | audit event identifier associated with each system call, which will be stored by makesyscalls.sh in the sy_auevent field of struct sysent. For now, default the audit identifier on all system calls to AUE_NULL, but in the near future, other BSM event identifiers will be used. The mapping of system calls to event identifiers is many:one due to multiple system calls that map to the same end functionality across compatibility wrappers, ABI wrappers, etc. Submitted by: wsalamon Obtained from: TrustedBSD Project
* Kernel hooks to support PMC sampling modes.jkoshy2005-05-301-0/+16
| | | | Reviewed by: alc
* Create nexus in configure_first() instead of in configure(). Thismarcel2005-05-291-3/+3
| | | | | makes sure that sysinit tasks that run after configure_first(), but before configure() have a nexus to hang devices off.
* Chop a '>' in a feature name (RSVD2>) that snuck in;schweikh2005-05-291-1/+1
| | | | | | | this now balances the <> flags displayed at boot, e.g. without this Features2=0x41d<SSE3,RSVD2>,MON,DS_CPL,CNTX-ID> MFC after: 1 week
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-293-342/+42
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Change the spkr_set_pitch() function to a macro to fix low level profiling.nyan2005-05-281-7/+5
|
* Add new ral(4) and ural(4) drivers.damien2005-05-241-0/+2
| | | | Approved by: silby (mentor)
* Sync the style of these two files.obrien2005-05-231-11/+15
|
* Fix some of the problems Bruce observed with this code.peter2005-05-222-3/+4
|
* MFi386: set PMC vectorpeter2005-05-221-1/+6
|
* MFi386: remove commentpeter2005-05-221-3/+0
|
* For non-profiling kernels, there were two symbols assigned to the samepeter2005-05-211-2/+4
| | | | | | | | | | | address. One was alltraps_with_regs_pushed, the other was calltrap. When the stack tracer walks up, it looks for magic symbol names to determine how to parse non-standard stack frames, such as a trapframe. It was looking for "calltrap". Which of the two symbols you got depended on things like Phase of moon, etc. If you were unlucky, you got a garbage stack trace for things like 'debug.trace_on_panic', which would completely hide the actual source of the problem.
* Adjust the start_ap delay to match i386.obrien2005-05-201-1/+1
|
* Fix mismerge in rev 1.226: wait 5 seconds as the comment documents,obrien2005-05-201-1/+1
| | | | not .5 seconds.
* - Move bus dependent defines to {isa,cbus}_dmareg.h.nyan2005-05-142-5/+2
| | | | | | - Use isa/isareg.h rather than <arch>/isa/isa.h. Tested on: i386, pc98
* - Move timerreg.h to <arch>/include and split i8253 specific defines intonyan2005-05-146-104/+125
| | | | | | | | | i8253reg.h, and add some defines to control a speaker. - Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them. - Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively. - Use isa/isareg.h rather than <arch>/isa/isa.h. Tested on: i386, pc98
* Default hyperthreading on in -CURRENT. No seatbelts in CURRENT (^_^)nectar2005-05-131-1/+1
| | | | Requested by: peter, jhb
* Add a knob for disabling/enabling HTT, "machdep.hyperthreading_allowed".nectar2005-05-132-0/+109
| | | | | | | Default off due to information disclosure on multi-user systems. Submitted by: cperciva Reviewed by: jhb
* Remove unused IO_NPX* defines.nyan2005-05-121-2/+0
|
* Remove unused (besides being initialized) variable.peter2005-05-051-2/+0
|
* Turn on PCB_FULLCTX in set_regs to fully restore contextdavidxu2005-05-041-2/+1
| | | | set by debugger.
* Implement an alternate method to stop CPUs when entering DDB. Normally we usedwhite2005-04-304-0/+93
| | | | | | | | | | | | | | a regular IPI vector, but this vector is blocked when interrupts are disabled. With "options KDB_STOP_NMI" and debug.kdb.stop_cpus_with_nmi set, KDB will send an NMI to each CPU instead. The code also has a context-stuffing feature which helps ddb extract the state of processes running on the stopped CPUs. KDB_STOP_NMI is only useful with SMP and complains if SMP is not defined. This feature only applies to i386 and amd64 at the moment, but could be used on other architectures with the appropriate MD bits. Submitted by: ups
* Remove the ACPI_MAX_THREADS option.scottl2005-04-251-3/+0
|
* Change cpu_set_kse_upcall to more generic style, so we can reuse itdavidxu2005-04-231-5/+20
| | | | | | | in other codes. Add cpu_set_user_tls, use it to tweak user register and setup user TLS. I ever wanted to merge it into cpu_set_kse_upcall, but since cpu_set_kse_upcall is also used by M:N threads which may not need this feature, so I wrote a separated cpu_set_user_tls.
* Revert previous commit: The hwpmc(4) driver compiles on all platforms.marcel2005-04-201-13/+0
|
OpenPOWER on IntegriCloud