272461 |
03-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
271999 |
22-Sep-2014 |
jhb |
MFC 270850,271053,271192,271717: Save and restore FPU state across suspend and resume on i386. - Create a separate structure for per-CPU state saved across suspend and resume that is a superset of a pcb. - Store the FPU state for suspend and resume in the new structure (for amd64, this moves it out of the PCB) - On both i386 and amd64, all of the FPU suspend/resume handling is now done in C.
Approved by: re (hrs)
|
268033 |
30-Jun-2014 |
kib |
MFC r267767: Add FPU_KERN_KTHR flag to fpu_kern_enter(9). Apply the flag to padlock(4) and aesni(4). In aesni_cipher_process(), do not leak FPU context state on error.
|
267964 |
27-Jun-2014 |
jhb |
MFC 261781: Don't waste a page of KVA for the boot-time memory test on x86. For amd64, reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386, remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.
|
266204 |
16-May-2014 |
ian |
MFC r257854 (discussed with alc@)
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional.
Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity.
|
264118 |
04-Apr-2014 |
royger |
MFC r263001
Move asm IPIs handlers to C code, so both Xen and native IPI handlers share the same code.
Approved by: gibbs Sponsored by: Citrix Systems R&D
|
262192 |
18-Feb-2014 |
jhb |
MFC 261517,261520: Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses.
|
262141 |
18-Feb-2014 |
jhb |
MFC 259140: Move constants for indices in the local APIC's local vector table from apicvar.h to apicreg.h.
|
258559 |
25-Nov-2013 |
emaste |
MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
Debuggers may need to change PSL_RF. Note that tf_eflags is already stored in the signal context during signal handling and PSL_RF previously could be modified via sigreturn, so this change should not provide any new ability to userspace.
For background see the thread at: http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html
Reviewed by: jhb, kib
Sponsored by: DARPA, AFRL Approved by: re (gjb)
|
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
256115 |
07-Oct-2013 |
dim |
Remove redundant declaration of force_evtchn_callback() in the i386-specific xen-os.h, to silence a gcc warning.
Approved by: re (gjb) MFC after: 3 days
|
256073 |
05-Oct-2013 |
gibbs |
Formalize the concept of virtual CPU ids by adding a per-cpu vcpu_id field. Perform vcpu enumeration for Xen PV and HVM environments and convert all Xen drivers to use vcpu_id instead of a hard coded assumption of the mapping algorithm (acpi or apic ID) in use.
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen)
amd64/include/pcpu.h: i386/include/pcpu.h: Add vcpu_id to the amd64 and i386 pcpu structures.
dev/xen/timer/timer.c x86/xen/xen_intr.c Use new vcpu_id instead of assuming acpi_id == vcpu_id.
i386/xen/mp_machdep.c: i386/xen/mptable.c x86/xen/hvm.c: Perform Xen HVM and Xen full PV vcpu_id mapping.
x86/xen/hvm.c: x86/acpica/madt.c Change SYSINIT ordering of acpi CPU enumeration so that it is guaranteed to be available at the time of Xen HVM vcpu id mapping.
|
255781 |
22-Sep-2013 |
gibbs |
Fix compilation of the i386 PAE kernel config.
sys/i386/include/xen/xenvar.h: Provide vtomach() when PAE is defined.
Approved by: re (blanket Xen)
|
255744 |
20-Sep-2013 |
gibbs |
Merge Xen PVHVM support into the GENERIC kernel config for both amd64 and i386.
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks
sys/amd64/amd64/mp_machdep.c: sys/amd64/include/cpu.h: sys/i386/i386/mp_machdep.c: sys/i386/include/cpu.h: - Introduce two new CPU hooks for initialization and resume purposes. This allows us to get rid of the XENHVM ifdefs in mp_machdep, and also sets some hooks into common code that can be used by other hypervisor implementations.
sys/amd64/conf/XENHVM: sys/i386/conf/XENHVM: - Remove these configs now that GENERIC has builtin support for Xen HVM.
sys/kern/subr_smp.c: - Make sure there are no pending IPIs when suspending a system.
sys/x86/xen/hvm.c: - Add cpu init and resume vectors that are called from mp_machdep using the new hooks. - Only clear the vcpu_info mapping data on resume. It is already clear for the BSP on a cold boot and is set correctly as APs are started. - Gate xen_hvm_init_cpu only to systems running under Xen.
sys/x86/xen/xen_intr.c: - Gate the setup of event channels only to systems running under Xen.
|
255726 |
20-Sep-2013 |
gibbs |
Add support for suspend/resume/migration operations when running as a Xen PVHVM guest.
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks
sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: - Make sure that are no MMU related IPIs pending on migration. - Reset pending IPI_BITMAP on resume. - Init vcpu_info on resume.
sys/amd64/include/intr_machdep.h: sys/i386/include/intr_machdep.h: sys/x86/acpica/acpi_wakeup.c: sys/x86/x86/intr_machdep.c: sys/x86/isa/atpic.c: sys/x86/x86/io_apic.c: sys/x86/x86/local_apic.c: - Add a "suspend_cancelled" parameter to pic_resume(). For the Xen PIC, restoration of interrupt services differs between the aborted suspend and normal resume cases, so we must provide this information.
sys/dev/acpica/acpi_timer.c: sys/dev/xen/timer/timer.c: sys/timetc.h: - Don't swap out "suspend safe" timers across a suspend/resume cycle. This includes the Xen PV and ACPI timers.
sys/dev/xen/control/control.c: - Perform proper suspend/resume process for PVHVM: - Suspend all APs before going into suspension, this allows us to reset the vcpu_info on resume for each AP. - Reset shared info page and callback on resume.
sys/dev/xen/timer/timer.c: - Implement suspend/resume support for the PV timer. Since FreeBSD doesn't perform a per-cpu resume of the timer, we need to call smp_rendezvous in order to correctly resume the timer on each CPU.
sys/dev/xen/xenpci/xenpci.c: - Don't reset the PCI interrupt on each suspend/resume.
sys/kern/subr_smp.c: - When suspending a PVHVM domain make sure there are no MMU IPIs in-flight, or we will get a lockup on resume due to the fact that pending event channels are not carried over on migration. - Implement a generic version of restart_cpus that can be used by suspended and stopped cpus.
sys/x86/xen/hvm.c: - Implement resume support for the hypercall page and shared info. - Clear vcpu_info so it can be reset by APs when resuming from suspension.
sys/dev/xen/xenpci/xenpci.c: sys/x86/xen/hvm.c: sys/x86/xen/xen_intr.c: - Support UP kernel configurations.
sys/x86/xen/xen_intr.c: - Properly rebind per-cpus VIRQs and IPIs on resume.
|
255331 |
06-Sep-2013 |
gibbs |
Implement PV IPIs for PVHVM guests and further converge PV and HVM IPI implmementations.
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Submitted by: gibbs (misc cleanup, table driven config) Reviewed by: gibbs MFC after: 2 weeks
sys/amd64/include/cpufunc.h: sys/amd64/amd64/pmap.c: Move invltlb_globpcid() into cpufunc.h so that it can be used by the Xen HVM version of tlb shootdown IPI handlers.
sys/x86/xen/xen_intr.c: sys/xen/xen_intr.h: Rename xen_intr_bind_ipi() to xen_intr_alloc_and_bind_ipi(), and remove the ipi vector parameter. This api allocates an event channel port that can be used for ipi services, but knows nothing of the actual ipi for which that port will be used. Removing the unused argument and cleaning up the comments surrounding its declaration helps clarify its actual role.
sys/amd64/amd64/mp_machdep.c: sys/amd64/include/cpu.h: sys/i386/i386/mp_machdep.c: sys/i386/include/cpu.h: Implement a generic framework for amd64 and i386 that allows the implementation of certain CPU management functions to be selected at runtime. Currently this is only used for the ipi send function, which we optimize for Xen when running on a Xen hypervisor, but can easily be expanded to support more operations.
sys/x86/xen/hvm.c: Implement Xen PV IPI handlers and operations, replacing native send IPI.
sys/amd64/include/pcpu.h: sys/i386/include/pcpu.h: sys/i386/include/smp.h: Remove NR_VIRQS and NR_IPIS from FreeBSD headers. NR_VIRQS is defined already for us in the xen interface files. NR_IPIS is only needed in one file per Xen platform and is easily inferred by the IPI vector table that is defined in those files.
sys/i386/xen/mp_machdep.c: Restructure to more closely match the HVM implementation by performing table driven IPI setup.
|
255318 |
06-Sep-2013 |
glebius |
Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers.
|
255046 |
29-Aug-2013 |
gibbs |
Introduce a new, HVM compatible, paravirtualized timer driver for Xen. Use this new driver for both PV and HVM instances.
This driver requires a Xen hypervisor that supports vector callbacks, VCPUOP hypercalls, and reports that it has a "safe PV clock".
New timer driver: Submitted by: will Sponsored by: Spectra Logic Corporation
PV port to new driver, and bug fixes: Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D
sys/dev/xen/timer/timer.c: - Register a PV timer device driver which (currently) implements device_{identify,probe,attach} and stubs device_detach. The detach routine requires functionality not provided by timecounters(4). The suspend and resume routines need additional work (due to Xen requiring that the hypercalls be executed on the target VCPU), and aren't needed for our purposes.
- Make sure there can only be one device instance of this driver, and that it only registers one eventtimers(4) and one timecounters(4) device interface. Make both interfaces use PCPU data as needed.
- Match, with a few style cleanups & API differences, the Xen versions of the "fetch time" functions.
- Document the magic scale_delta() better for the i386 version.
- When registering the event timer, bind a separate event channel for the timer VIRQ to the device's event timer interrupt handler for each active VCPU. Describe each interrupt as "xen_et:c%d", so they can be identified per CPU in "vmstat -i" or "show intrcnt" in KDB.
- When scheduling a timer into the hypervisor, try up to 60 times if the hypervisor rejects the time as being in the past. In the common case, this retry shouldn't happen, and if it does, it should only happen once. This is because the event timer advertises a minimum period of 100usec, which is only less than the usual hypercall round trip time about 1 out of every 100 tries. (Unlike other similar drivers, this one actually checks whether the hypervisor accepted the singleshot timer set hypercall.)
- Implement a RTC PV clock based on the hypervisor wallclock.
sys/conf/files: - Add dev/xen/timer/timer.c if the kernel configuration includes either the XEN or XENHVM options.
sys/conf/files.i386: sys/i386/include/xen/xen_clock_util.h: sys/i386/xen/clock.c: sys/i386/xen/xen_clock_util.c: sys/i386/xen/mp_machdep.c: sys/i386/xen/xen_rtc.c: - Remove previous PV timer used in i386 XEN PV kernels, the new timer introduced in this change is used instead (so we share the same code between PVHVM and PV).
MFC after: 2 weeks
|
255040 |
29-Aug-2013 |
gibbs |
Implement vector callback for PVHVM and unify event channel implementations
Re-structure Xen HVM support so that: - Xen is detected and hypercalls can be performed very early in system startup. - Xen interrupt services are implemented using FreeBSD's native interrupt delivery infrastructure. - the Xen interrupt service implementation is shared between PV and HVM guests. - Xen interrupt handlers can optionally use a filter handler in order to avoid the overhead of dispatch to an interrupt thread. - interrupt load can be distributed among all available CPUs. - the overhead of accessing the emulated local and I/O apics on HVM is removed for event channel port events. - a similar optimization can eventually, and fairly easily, be used to optimize MSI.
Early Xen detection, HVM refactoring, PVHVM interrupt infrastructure, and misc Xen cleanups:
Sponsored by: Spectra Logic Corporation
Unification of PV & HVM interrupt infrastructure, bug fixes, and misc Xen cleanups:
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D
sys/x86/x86/local_apic.c: sys/amd64/include/apicvar.h: sys/i386/include/apicvar.h: sys/amd64/amd64/apic_vector.S: sys/i386/i386/apic_vector.s: sys/amd64/amd64/machdep.c: sys/i386/i386/machdep.c: sys/i386/xen/exception.s: sys/x86/include/segments.h: Reserve IDT vector 0x93 for the Xen event channel upcall interrupt handler. On Hypervisors that support the direct vector callback feature, we can request that this vector be called directly by an injected HVM interrupt event, instead of a simulated PCI interrupt on the Xen platform PCI device. This avoids all of the overhead of dealing with the emulated I/O APIC and local APIC. It also means that the Hypervisor can inject these events on any CPU, allowing upcalls for different ports to be handled in parallel.
sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: Map Xen per-vcpu area during AP startup.
sys/amd64/include/intr_machdep.h: sys/i386/include/intr_machdep.h: Increase the FreeBSD IRQ vector table to include space for event channel interrupt sources.
sys/amd64/include/pcpu.h: sys/i386/include/pcpu.h: Remove Xen HVM per-cpu variable data. These fields are now allocated via the dynamic per-cpu scheme. See xen_intr.c for details.
sys/amd64/include/xen/hypercall.h: sys/dev/xen/blkback/blkback.c: sys/i386/include/xen/xenvar.h: sys/i386/xen/clock.c: sys/i386/xen/xen_machdep.c: sys/xen/gnttab.c: Prefer FreeBSD primatives to Linux ones in Xen support code.
sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: sys/xen/xen-os.h: sys/dev/xen/balloon/balloon.c: sys/dev/xen/blkback/blkback.c: sys/dev/xen/blkfront/blkfront.c: sys/dev/xen/console/xencons_ring.c: sys/dev/xen/control/control.c: sys/dev/xen/netback/netback.c: sys/dev/xen/netfront/netfront.c: sys/dev/xen/xenpci/xenpci.c: sys/i386/i386/machdep.c: sys/i386/include/pmap.h: sys/i386/include/xen/xenfunc.h: sys/i386/isa/npx.c: sys/i386/xen/clock.c: sys/i386/xen/mp_machdep.c: sys/i386/xen/mptable.c: sys/i386/xen/xen_clock_util.c: sys/i386/xen/xen_machdep.c: sys/i386/xen/xen_rtc.c: sys/xen/evtchn/evtchn_dev.c: sys/xen/features.c: sys/xen/gnttab.c: sys/xen/gnttab.h: sys/xen/hvm.h: sys/xen/xenbus/xenbus.c: sys/xen/xenbus/xenbus_if.m: sys/xen/xenbus/xenbusb_front.c: sys/xen/xenbus/xenbusvar.h: sys/xen/xenstore/xenstore.c: sys/xen/xenstore/xenstore_dev.c: sys/xen/xenstore/xenstorevar.h: Pull common Xen OS support functions/settings into xen/xen-os.h.
sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: sys/xen/xen-os.h: Remove constants, macros, and functions unused in FreeBSD's Xen support.
sys/xen/xen-os.h: sys/i386/xen/xen_machdep.c: sys/x86/xen/hvm.c: Introduce new functions xen_domain(), xen_pv_domain(), and xen_hvm_domain(). These are used in favor of #ifdefs so that FreeBSD can dynamically detect and adapt to the presence of a hypervisor. The goal is to have an HVM optimized GENERIC, but more is necessary before this is possible.
sys/amd64/amd64/machdep.c: sys/dev/xen/xenpci/xenpcivar.h: sys/dev/xen/xenpci/xenpci.c: sys/x86/xen/hvm.c: sys/sys/kernel.h: Refactor magic ioport, Hypercall table and Hypervisor shared information page setup, and move it to a dedicated HVM support module.
HVM mode initialization is now triggered during the SI_SUB_HYPERVISOR phase of system startup. This currently occurs just after the kernel VM is fully setup which is just enough infrastructure to allow the hypercall table and shared info page to be properly mapped.
sys/xen/hvm.h: sys/x86/xen/hvm.c: Add definitions and a method for configuring Hypervisor event delievery via a direct vector callback.
sys/amd64/include/xen/xen-os.h: sys/x86/xen/hvm.c:
sys/conf/files: sys/conf/files.amd64: sys/conf/files.i386: Adjust kernel build to reflect the refactoring of early Xen startup code and Xen interrupt services.
sys/dev/xen/blkback/blkback.c: sys/dev/xen/blkfront/blkfront.c: sys/dev/xen/blkfront/block.h: sys/dev/xen/control/control.c: sys/dev/xen/evtchn/evtchn_dev.c: sys/dev/xen/netback/netback.c: sys/dev/xen/netfront/netfront.c: sys/xen/xenstore/xenstore.c: sys/xen/evtchn/evtchn_dev.c: sys/dev/xen/console/console.c: sys/dev/xen/console/xencons_ring.c Adjust drivers to use new xen_intr_*() API.
sys/dev/xen/blkback/blkback.c: Since blkback defers all event handling to a taskqueue, convert this task queue to a "fast" taskqueue, and schedule it via an interrupt filter. This avoids an unnecessary ithread context switch.
sys/xen/xenstore/xenstore.c: The xenstore driver is MPSAFE. Indicate as much when registering its interrupt handler.
sys/xen/xenbus/xenbus.c: sys/xen/xenbus/xenbusvar.h: Remove unused event channel APIs.
sys/xen/evtchn.h: Remove all kernel Xen interrupt service API definitions from this file. It is now only used for structure and ioctl definitions related to the event channel userland device driver.
Update the definitions in this file to match those from NetBSD. Implementing this interface will be necessary for Dom0 support.
sys/xen/evtchn/evtchnvar.h: Add a header file for implemenation internal APIs related to managing event channels event delivery. This is used to allow, for example, the event channel userland device driver to access low-level routines that typical kernel consumers of event channel services should never access.
sys/xen/interface/event_channel.h: sys/xen/xen_intr.h: Standardize on the evtchn_port_t type for referring to an event channel port id. In order to prevent low-level event channel APIs from leaking to kernel consumers who should not have access to this data, the type is defined twice: Once in the Xen provided event_channel.h, and again in xen/xen_intr.h. The double declaration is protected by __XEN_EVTCHN_PORT_DEFINED__ to ensure it is never declared twice within a given compilation unit.
sys/xen/xen_intr.h: sys/xen/evtchn/evtchn.c: sys/x86/xen/xen_intr.c: sys/dev/xen/xenpci/evtchn.c: sys/dev/xen/xenpci/xenpcivar.h: New implementation of Xen interrupt services. This is similar in many respects to the i386 PV implementation with the exception that events for bound to event channel ports (i.e. not IPI, virtual IRQ, or physical IRQ) are further optimized to avoid mask/unmask operations that aren't necessary for these edge triggered events.
Stubs exist for supporting physical IRQ binding, but will need additional work before this implementation can be fully shared between PV and HVM.
sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: sys/i386/xen/mp_machdep.c sys/x86/xen/hvm.c: Add support for placing vcpu_info into an arbritary memory page instead of using HYPERVISOR_shared_info->vcpu_info. This allows the creation of domains with more than 32 vcpus.
sys/i386/i386/machdep.c: sys/i386/xen/clock.c: sys/i386/xen/xen_machdep.c: sys/i386/xen/exception.s: Add support for new event channle implementation.
|
254623 |
21-Aug-2013 |
jkim |
Reimplement atomic operations on PDEs and PTEs in pmap.h. This change significantly reduces duplicate code and make it easier to read.
Reviewed by: alc, bde
|
254620 |
21-Aug-2013 |
jkim |
Implement atomic_cmpset_64() and atomic_swap_64() for i386.
|
254619 |
21-Aug-2013 |
jkim |
Reimplement atomic_load_acq_64() and atomic_store_rel_64() for i386. These functions are now real functions rather than function pointers. Supposedly, it is faster for modern processors.
Suggested by: bde
|
254618 |
21-Aug-2013 |
jkim |
Remove empty lines before return statements for style consistency.
|
254617 |
21-Aug-2013 |
jkim |
Implement atomic_swap() and atomic_testandset().
Reviewed by: arch, bde, jilles, kib
|
254614 |
21-Aug-2013 |
jkim |
- Remove the "a" constraint from main output operand for atomic_cmpset(). - Use "+" modifier for the "expect" because it is also an output (unused).
|
254612 |
21-Aug-2013 |
jkim |
Use '+' modifier for a memory operand that is both an input and an output. It was actually done in r86301 but reverted in r150182 because GCC 3.x was not able to handle it for a memory operand. Apparently, this problem was fixed in GCC 4.1+ and several contrib sources already rely on this feature.
|
254611 |
21-Aug-2013 |
jkim |
Remove bogus labels. No functional change.
|
254610 |
21-Aug-2013 |
jkim |
Use consistent style. No functional change.
|
254463 |
17-Aug-2013 |
jilles |
libc: Access _logname_valid more efficiently.
The variable _logname_valid is not exported via the version script; therefore, change C and i386/amd64 assembler code to remove indirection (which allowed interposition). This makes the code slightly smaller and faster.
Also, remove #define PIC_GOT from i386/amd64 in !PIC mode. Without PIC, there is no place containing the address of each variable, so there is no possible definition for PIC_GOT.
|
254305 |
13-Aug-2013 |
jkim |
Merge acpica_machdep.h for amd64 and i386 and move to x86. In fact, these two files were functionally identical.
|
254300 |
13-Aug-2013 |
jkim |
Tidy up global locks for ACPICA. There is no functional change.
|
253750 |
28-Jul-2013 |
avg |
Revert r253748,253749
This WIP should not have been committed yet.
Pointyhat to: avg
|
253748 |
28-Jul-2013 |
avg |
put contents of cpu.h under _KERNEL
no userland-serviceable parts inside
MFC after: 20 days
|
253747 |
28-Jul-2013 |
avg |
x86: detect mwait capabilities and extensions, when present
Reviewed by: kib (earlier amd64-only version) MFC after: 2 weeks
|
252434 |
01-Jul-2013 |
kib |
Fix issues with zeroing and fetching the counters, on x86 and ppc64. Issues were noted by Bruce Evans and are present on all architectures.
On i386, a counter fetch should use atomic read of 64bit value, otherwise carry from the increment on other CPU could be lost for the given fetch, making error of 2^32. If 64bit read (cmpxchg8b) is not available on the machine, it cannot be SMP and it is enough to disable preemption around read to avoid the split read.
On x86 the counter increment is not atomic on purpose, which makes it possible for the store of the incremented result to override just zeroed per-cpu slot. The effect would be a counter going off by arbitrary value after zeroing. Perform the counter zeroing on the same processor which does the increments, making the operations mutually exclusive. On i386, same as for the fetching, if the cmpxchg8b is not available, machine is not SMP and we disable preemption for zeroing.
PowerPC64 is treated the same as amd64.
For other architectures, the changes made to allow the compilation to succeed, without fixing the issues with zeroing or fetching. It should be possible to handle them by using the 64bit loads and stores atomic WRT preemption (assuming the architectures also converted from using critical sections to proper asm). If architecture does not provide the facility, using global (spin) mutex would be non-optimal but working solution.
Noted by: bde Sponsored by: The FreeBSD Foundation
|
252280 |
27-Jun-2013 |
jkim |
Move definitions required by userland applications out of acpica_machdep.h.
|
251824 |
17-Jun-2013 |
gibbs |
Adjust i386 Xen PV support for updated Xen interface files.
sys/i386/include/xen/xenvar.h: sys/i386/xen/xen_machdep.c: sys/xen/interface/foreign/structs.py: sys/xen/evtchn/evtchn.c: MAX_VIRT_CPUS => XEN_LEGACY_MAX_VCPUS
Submitted by: Roger Pau Monné Reviewed by: gibbs
|
251767 |
14-Jun-2013 |
gibbs |
Upgrade Xen interface headers to Xen 4.2.1.
Move FreeBSD from interface version 0x00030204 to 0x00030208. Updates are required to our grant table implementation before we can bump this further.
sys/xen/hvm.h: Replace the implementation of hvm_get_parameter(), formerly located in sys/xen/interface/hvm/params.h. Linux has a similar file which primarily stores this function.
sys/xen/xenstore/xenstore.c: Include new xen/hvm.h header file to get hvm_get_parameter().
sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: Correctly protect function definition and variables from being included into assembly files in xen-os.h
Xen memory barriers are now prefixed with "xen_" to avoid conflicts with OS native primatives. Define Xen memory barriers in terms of the native FreeBSD primatives.
Sponsored by: Spectra Logic Corporation Reviewed by: Roger Pau Monné Tested by: Roger Pau Monné Obtained from: Roger Pau Monné (bug fixes)
|
250840 |
21-May-2013 |
marcel |
Add basic support for FDT to i386 & amd64. This change includes: 1. Common headers for fdt.h and ofw_machdep.h under x86/include with indirections under i386/include and amd64/include. 2. New modinfo for loader provided FDT blob. 3. Common x86_init_fdt() called from hammer_time() on amd64 and init386() on i386. 4. Split-off FDT specific low-level console functions from FDT bus methods for the uart(4) driver. The low-level console logic has been moved to uart_cpu_fdt.c and is used for arm, mips & powerpc only. The FDT bus methods are shared across all architectures. 5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the fdt_pic_table[] arrays. Both are empty right now.
FDT addresses are I/O ports on x86. Since the core FDT code does not handle different address spaces, adding support for both I/O ports and memory addresses requires some thought and discussion. It may be better to use a compile-time option that controls this.
Obtained from: Juniper Networks, Inc.
|
250338 |
07-May-2013 |
attilio |
Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in order to match the MAXCPU concept. The change should also be useful for consolidation and consistency.
Sponsored by: EMC / Isilon storage division Obtained from: jeff Reviewed by: alc
|
249722 |
21-Apr-2013 |
tijl |
Remove redundant definitions of _ALIGN and _ALIGNBYTES.
|
249314 |
09-Apr-2013 |
kib |
Pass the segmented address of the counter, based on %fs, i.e. offset from the pcpu[0] to the counter base, instead of the linear address.
|
249268 |
08-Apr-2013 |
glebius |
Merge from projects/counters: counter(9).
Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data.
See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details.
In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc.
|
249265 |
08-Apr-2013 |
glebius |
Merge from projects/counters:
Pad struct pcpu so that its size is denominator of PAGE_SIZE. This is done to reduce memory waste in UMA_PCPU_ZONE zones.
Sponsored by: Nginx, Inc.
|
248789 |
27-Mar-2013 |
kib |
Fix the VM_BCACHE_SIZE_MAX definition on i386 to match the maximal buffer map size, auto-tuned on the 4GB machine. Having the maxbcache bigger than the buffer map causes the transient bio map sizing logic to assume that there is enough KVA to use approximately 90MB (buffer map is sized to 110MB, and maxbcache is 200MB). The increase in the KVA usage caused other big KVA consumers, like nvidia.ko, to fail the initialization.
Change the definition for both PAE and non-PAE cases, since PAE is even more KVA-starved.
Reported and tested by: David Wolfskill Discussed with: alc Sponsored by: The FreeBSD Foundation
|
248449 |
18-Mar-2013 |
attilio |
Sync back vmcontention branch into HEAD: Replace the per-object resident and cached pages splay tree with a path-compressed multi-digit radix trie. Along with this, switch also the x86-specific handling of idle page tables to using the radix trie.
This change is supposed to do the following: - Allowing the acquisition of read locking for lookup operations of the resident/cached pages collections as the per-vm_page_t splay iterators are now removed. - Increase the scalability of the operations on the page collections.
The radix trie does rely on the consumers locking to ensure atomicity of its operations. In order to avoid deadlocks the bisection nodes are pre-allocated in the UMA zone. This can be done safely because the algorithm needs at maximum one new node per insert which means the maximum number of the desired nodes is the number of available physical frames themselves. However, not all the times a new bisection node is really needed.
The radix trie implements path-compression because UFS indirect blocks can lead to several objects with a very sparse trie, increasing the number of levels to usually scan. It also helps in the nodes pre-fetching by introducing the single node per-insert property.
This code is not generalized (yet) because of the possible loss of performance by having much of the sizes in play configurable. However, efforts to make this code more general and then reusable in further different consumers might be really done.
The only KPI change is the removal of the function vm_page_splay() which is now reaped. The only KBI change, instead, is the removal of the left/right iterators from struct vm_page, which are now reaped.
Further technical notes broken into mealpieces can be retrieved from the svn branch: http://svn.freebsd.org/base/user/attilio/vmcontention/
Sponsored by: EMC / Isilon storage division In collaboration with: alc, jeff Tested by: flo, pho, jhb, davide Tested by: ian (arm) Tested by: andreast (powerpc)
|
247622 |
02-Mar-2013 |
attilio |
Merge from vmc-playground branch: Rename the pv_entry_t iterator from pv_list to pv_next. Besides being more correct technically (as the name seems to suggest this is a list while it is an iterator), it will also be needed by vm_radix work to avoid a nameclash on macro expansions.
Sponsored by: EMC / Isilon storage division Reviewed by: alc, jeff Tested by: flo, pho, jhb, davide
|
247047 |
20-Feb-2013 |
kib |
Convert machine/elf.h, machine/frame.h, machine/sigframe.h, machine/signal.h and machine/ucontext.h into common x86 includes, copying from amd64 and merging with i386.
Kernel-only compat definitions are kept in the i386/include/sigframe.h and i386/include/signal.h, to reduce amd64 kernel namespace pollution. The amd64 compat uses its own definitions so far.
The _MACHINE_ELF_WANT_32BIT definition is to allow the sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions on the amd64 compile host. The same hack could be usefully abused by other code too.
|
246247 |
02-Feb-2013 |
avg |
x86 suspend/resume: suspend pics and pseudo-pics in reverse order
- change 'pics' from STAILQ to TAILQ - ensure that Local APIC is always first in 'pics'
Reviewed by: jhb Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>, KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> MFC after: 12 days
|
246207 |
01-Feb-2013 |
andre |
Remove unused VM_MAX_AUTOTUNE_NMBCLUSTERS define.
|
244191 |
13-Dec-2012 |
jimharris |
Revert r243960 based on feedback regarding keeping x86 headers unified (mdf@, tijl@) and use of KASSERT/systm.h in bus.h (zeising@, bde@).
Alternate implementation will be made in a separate commit.
|
243960 |
06-Dec-2012 |
jimharris |
Add amd64 implementations for 8-byte bus_space routines.
Submitted by: Carl Delsey <carl.r.delsey@intel.com> Discussed with: jhb, rwatson Reviewed by: jimharris MFC after: 1 week
|
242847 |
10-Nov-2012 |
alfred |
Allow maxusers to scale on machines with large address space.
Some hooks are added to clamp down maxusers and nmbclusters for small address space systems.
VM_MAX_AUTOTUNE_MAXUSERS - the max maxusers that will be autotuned based on physical memory. VM_MAX_AUTOTUNE_NMBCLUSTERS - max nmbclusters based on physical memory.
These are set to the old values on i386 to preserve the clamping that was being done to all arches.
Another macro VM_AUTOTUNE_NMBCLUSTERS is provided to allow an override for the calculation on a MD basis. Currently no arch defines this.
Reviewed by: peter MFC after: 2 weeks
|
241374 |
09-Oct-2012 |
attilio |
Add an unified macro to deny ability from the compiler to reorder instruction loads/stores at its will. The macro __compiler_membar() is currently supported for both gcc and clang, but kernel compilation will fail otherwise.
Reviewed by: bde, kib Discussed with: dim, theraven MFC after: 2 weeks
|
241371 |
09-Oct-2012 |
attilio |
Reverts r234074,234105,234564,234723,234989,235231-235232 and part of r234247. Use, instead, the static intializer introduced in r239923 for x86 and sparc64 intr_cpus, unwinding the code to the initial version.
Reviewed by: marius
|
241027 |
28-Sep-2012 |
jhb |
- Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 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
|
240520 |
14-Sep-2012 |
eadler |
s/teh/the/g
Approved by: cperciva MFC after: 3 days
|
239730 |
27-Aug-2012 |
des |
Parly revert r239255: reinstate a default maxswzone on i386, where KVA is scarce, but set it slightly higher so we can handle 8 GB of swap.
|
239255 |
14-Aug-2012 |
des |
As discussed on -current, remove the hardcoded default maxswzone.
MFC after: 3 weeks
|
238972 |
01-Aug-2012 |
kib |
Add lfence().
MFC after: 1 week
|
238792 |
26-Jul-2012 |
kib |
MFamd64 r238623: Introduce curpcb magic variable.
Requested and reviewed by: bde MFC after: 3 weeks
|
238678 |
21-Jul-2012 |
kib |
MFCamd64 r238598: Provide siginfo.si_code for floating point errors when error occurs using the SSE math processor.
MFC after: 3 weeks
|
238311 |
09-Jul-2012 |
jhb |
Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h> on x86 and use that to implement stop_emulating() in the fpu/npx code. Reimplement start_emulating() in the non-XEN case by using load_cr0() and rcr0() instead of the 'lmsw' and 'smsw' instructions. Intel explicitly discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in the description of these instructions in Volume 2 of the ADM.
Reviewed by: kib MFC after: 1 month
|
237435 |
22-Jun-2012 |
kib |
Enable shared page on i386, now it has a use for vdso_timehands.
MFC after: 1 month
|
237433 |
22-Jun-2012 |
kib |
Implement mechanism to export some kernel timekeeping data to usermode, using shared page. The structures and functions have vdso prefix, to indicate the intended location of the code in some future.
The versioned per-algorithm data is exported in the format of struct vdso_timehands, which mostly repeats the content of in-kernel struct timehands. Usermode reading of the structure can be lockless. Compatibility export for 32bit processes on 64bit host is also provided. Kernel also provides usermode with indication about currently used timecounter, so that libc can fall back to syscall if configured timecounter is unknown to usermode code.
The shared data updates are initiated both from the tc_windup(), where a fast task is queued to do the update, and from sysctl handlers which change timecounter. A manual override switch kern.timecounter.fast_gettime allows to turn off the mechanism.
Only x86 architectures export the real algorithm data, and there, only for tsc timecounter. HPET counters page could be exported as well, but I prefer to not further glue the kernel and libc ABI there until proper vdso-based solution is developed.
Minimal stubs neccessary for non-x86 architectures to still compile are provided.
Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
|
237430 |
22-Jun-2012 |
kib |
Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to timekeeping information.
MFC after: 1 week
|
237168 |
16-Jun-2012 |
alc |
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer.
Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer.
As an added bonus, tidy up some nearby comments concerning page flags.
Reviewed by: kib MFC after: 6 weeks
|
237027 |
13-Jun-2012 |
jkim |
- Fix resumectx() prototypes to reflect reality. - For i386, simply jump to resumectx() with PCB in %ecx. - Fix a style(9) nit while I am here.
|
236938 |
12-Jun-2012 |
iwasaki |
Share IPI init and startup code of mp_machdep.c with acpi_wakeup.c as ipi_startup().
|
236772 |
09-Jun-2012 |
iwasaki |
Add x86/acpica/acpi_wakeup.c for amd64 and i386. Difference of suspend/resume procedures are minimized among them.
common: - Add global cpuset suspended_cpus to indicate APs are suspended/resumed. - Remove acpi_waketag and acpi_wakemap from acpivar.h (no longer used). - Add some variables in acpi_wakecode.S in order to minimize the difference among amd64 and i386. - Disable load_cr3() because now CR3 is restored in resumectx().
amd64: - Add suspend/resume related members (such as MSR) in PCB. - Modify savectx() for above new PCB members. - Merge acpi_switch.S into cpu_switch.S as resumectx().
i386: - Merge(and remove) suspendctx() into savectx() in order to match with amd64 code.
Reviewed by: attilio@, acpi@
|
236456 |
02-Jun-2012 |
kib |
Use plain store for atomic_store_rel on x86, instead of implicitly locked xchg instruction. IA32 memory model guarantees that store has release semantic, since stores cannot pass loads or stores.
Reviewed by: bde, jhb Tested by: pho MFC after: 2 weeks
|
236045 |
26-May-2012 |
alc |
Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Instead, the pmap now maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses this list to select pv entries for reclamation.
Note: The old pmap_collect() tried to avoid reclaiming mappings for pages that have either a hold_count or a busy field that is non-zero. However, this isn't necessary for correctness, and the locking in pmap_collect() was insufficient to guarantee that such mappings weren't reclaimed. The new pmap_pv_reclaim() doesn't even try.
MFC after: 5 weeks
|
235941 |
24-May-2012 |
bz |
MFp4 bz_ipv6_fast:
in_cksum.h required ip.h to be included for struct ip. To be able to use some general checksum functions like in_addword() in a non-IPv4 context, limit the (also exported to user space) IPv4 specific functions to the times, when the ip.h header is present and IPVERSION is defined (to 4).
We should consider more general checksum (updating) functions to also allow easier incremental checksum updates in the L3/4 stack and firewalls, as well as ponder further requirements by certain NIC drivers needing slightly different pseudo values in offloading cases. Thinking in terms of a better "library".
Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
Reviewed by: gnn (as part of the whole) MFC After: 3 days
|
235683 |
20-May-2012 |
iwasaki |
Remove cpususpend IDT vector for XEN. This broke XEN kernel building.
|
235622 |
18-May-2012 |
iwasaki |
Add SMP/i386 suspend/resume support. Most part is merged from amd64.
- i386/acpica/acpi_wakecode.S Replaced with amd64 code (from realmode to paging enabling code).
- i386/acpica/acpi_wakeup.c Replaced with amd64 code (except for wakeup_pagetables stuff).
- i386/include/pcb.h - i386/i386/genassym.c Added PCB new members (CR0, CR2, CR4, DS, ED, FS, SS, GDT, IDT, LDT and TR) needed for suspend/resume, not for context switch.
- i386/i386/swtch.s Added suspendctx() and resumectx(). Note that savectx() was not changed and used for suspending (while amd64 code uses it). BSP and AP execute the same sequence, suspendctx(), acpi_wakecode() and resumectx() for suspend/resume (in case of UP system also).
- i386/i386/apic_vector.s Added cpususpend().
- i386/i386/mp_machdep.c - i386/include/smp.h Added cpususpend_handler().
- i386/include/apicvar.h - kern/subr_smp.c - sys/smp.h Added IPI_SUSPEND and suspend_cpus().
- i386/i386/initcpu.c - i386/i386/machdep.c - i386/include/md_var.h - pc98/pc98/machdep.c Moved initializecpu() declarations to md_var.h.
MFC after: 3 days
|
235391 |
13-May-2012 |
avg |
i386 bootinfo: re-arrange EFI fields for natural alignment and packing
Suggested by: bde MFC after: 2 weeks
|
234989 |
03-May-2012 |
attilio |
Revert part of r234723 by re-enabling the SMP protection for intr_bind() on x86. This has been requested by jhb and I strongly disagree with this, but as long as he is the x86 and interrupt subsystem maintainer I will follow his directives.
The disagreement cames from what we should really consider as a public KPI. IMHO, if we really need a selection between the kernel functions, we may need an explicit protection like _KERNEL_KPI, which defines which subset of the kernel function might really be considered as part of the KPI (for thirdy part modules) and which not. As long as we don't have this mechanism I just consider any possible function as usable by thirdy part code, thus intr_bind() included.
MFC after: 1 week
|
234785 |
29-Apr-2012 |
dim |
Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork).
MFC after: 2 weeks
|
234723 |
26-Apr-2012 |
attilio |
Clean up the intr* MD KPI from the SMP dependency, removing a cause of discrepancy between modules and kernel, but deal with SMP differences within the functions themselves.
As an added bonus this also helps in terms of code readability.
Requested by: gibbs Reviewed by: jhb, marius MFC after: 1 week
|
234207 |
13-Apr-2012 |
avg |
bump INTRCNT_COUNT values to reflect actual numbers of IPI counters
Maybe the numbers should be conditionalized on COUNT_IPIS
Reviewed by: jhb MFC after: 1 week
|
233707 |
30-Mar-2012 |
jhb |
Move the legacy(4) driver to x86.
|
233676 |
29-Mar-2012 |
jhb |
Use a more proper fix for enabling HT MSI mapping windows on Host-PCI bridges. Rather than blindly enabling the windows on all of them, only enable the window when an MSI interrupt is enabled for a device behind the bridge, similar to what already happens for HT PCI-PCI bridges.
To implement this, each x86 Host-PCI bridge driver has to be able to locate it's actual backing device on bus 0. For ACPI, use the _ADR method to find the slot and function of the device. For the non-ACPI case, the legacy(4) driver already scans bus 0 looking for Host-PCI bridge devices. Now it saves the slot and function of each bridge that it finds as ivars that the Host-PCI bridge driver can then use in its pcib_map_msi() method.
This fixes machines where non-MSI interrupts were broken by the previous round of HT MSI changes.
Tested by: bapt MFC after: 1 week
|
233671 |
29-Mar-2012 |
jhb |
- Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to be less ambiguous and more clearly identify what it means. This attribute is what Intel refers to as UC-, and it's only difference relative to normal UC memory is that a WC MTRR will override a UC- PAT entry causing the memory to be treated as WC, whereas a UC PAT entry will always override the MTRR. - Remove the VM_MEMATTR_UNCACHED alias from powerpc.
|
233628 |
28-Mar-2012 |
fabient |
Add software PMC support.
New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8).
Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions.
Sponsored by: NETASQ MFC after: 1 month
|
233291 |
22-Mar-2012 |
alc |
Handle spurious page faults that may occur in no-fault sections of the kernel.
When access restrictions are added to a page table entry, we flush the corresponding virtual address mapping from the TLB. In contrast, when access restrictions are removed from a page table entry, we do not flush the virtual address mapping from the TLB. This is exactly as recommended in AMD's documentation. In effect, when access restrictions are removed from a page table entry, AMD's MMUs will transparently refresh a stale TLB entry. In short, this saves us from having to perform potentially costly TLB flushes. In contrast, Intel's MMUs are allowed to generate a spurious page fault based upon the stale TLB entry. Usually, such spurious page faults are handled by vm_fault() without incident. However, when we are executing no-fault sections of the kernel, we are not allowed to execute vm_fault(). This change introduces special-case handling for spurious page faults that occur in no-fault sections of the kernel.
In collaboration with: kib Tested by: gibbs (an earlier version)
I would also like to acknowledge Hiroki Sato's assistance in diagnosing this problem.
MFC after: 1 week
|
233209 |
19-Mar-2012 |
tijl |
Copy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace amd64/i386/pc98 sysarch.h with stubs.
|
233207 |
19-Mar-2012 |
tijl |
Copy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace amd64/i386/pc98 specialreg.h with stubs.
|
233204 |
19-Mar-2012 |
tijl |
Copy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs.
|
233203 |
19-Mar-2012 |
tijl |
Move userland bits (and some common kernel bits) from amd64 and i386 segments.h to a new x86 segments.h.
Add __packed attribute to some structs (just to be sure). Also make it clear that i386 GDT and LDT entries are used in ia64 code.
|
233124 |
18-Mar-2012 |
tijl |
Copy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98 reg.h with stubs.
The tREGISTER macros are only made visible on i386. These macros are deprecated and should not be available on amd64.
The i386 and amd64 versions of struct reg have been renamed to struct __reg32 and struct __reg64. During compilation either __reg32 or __reg64 is defined as reg depending on the machine architecture. On amd64 the i386 struct is also available as struct reg32 which is used in COMPAT_FREEBSD32 code.
Most of compat/ia32/ia32_reg.h is now IA64 only.
Reviewed by: kib (previous version)
|
233123 |
18-Mar-2012 |
tijl |
Use exact width integer types in amd64/i386 reg.h to prepare for a merge. The only real change is replacing long with int on i386.
|
233044 |
16-Mar-2012 |
tijl |
Move userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h. Remove FPU types from compat/ia32/ia32_reg.h that are no longer needed. Create machine/npx.h on amd64 to allow compiling i386 code that uses this header.
The original npx.h and fpu.h define struct envxmm differently. Both definitions have been included in the new x86 header as struct __envxmm32 and struct __envxmm64. During compilation either __envxmm32 or __envxmm64 is defined as envxmm depending on machine architecture. On amd64 the i386 struct is also available as struct envxmm32.
Reviewed by: kib
|
233043 |
16-Mar-2012 |
tijl |
Use exact width integer types instead of long in struct env87 in preparation to merge with amd64.
Reviewed by: kib
|
233026 |
16-Mar-2012 |
tijl |
Remove prototypes of _amd64_get_fsbase et al. The functions were removed in r145571.
|
232744 |
09-Mar-2012 |
jhb |
Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on amd64, if 'device isa' is present quiesce the 8259A's during boot and resume from suspend.
While here, be more selective on amd64 about which kernel configurations need elcr.c.
MFC after: 2 weeks
|
232520 |
04-Mar-2012 |
tijl |
Copy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace amd64/i386/pc98 ptrace.h with stubs.
For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the i386 values. The old values are still supported but should no longer be used.
Reviewed by: kib
|
232492 |
04-Mar-2012 |
tijl |
Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs.
|
232491 |
04-Mar-2012 |
tijl |
Copy amd64 float.h to x86 and merge with i386 float.h. Replace amd64/i386/pc98 float.h with stubs.
|
232276 |
28-Feb-2012 |
tijl |
Copy amd64 stdarg.h to x86 and replace amd64/i386/pc98 stdarg.h with stubs.
|
232275 |
28-Feb-2012 |
tijl |
Copy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs.
|
232266 |
28-Feb-2012 |
tijl |
Copy amd64 endian.h to x86 and merge with i386 endian.h. Replace amd64/i386/pc98 endian.h with stubs.
In __bswap64_const(x) the conflict between 0xffUL and 0xffULL has been resolved by reimplementing the macro in terms of __bswap32(x). As a side effect __bswap64_var(x) is now implemented using two bswap instructions on i386 and should be much faster. __bswap32_const(x) has been reimplemented in terms of __bswap16(x) for consistency.
|
232264 |
28-Feb-2012 |
tijl |
Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace amd64/i386/pc98 _stdint.h with stubs.
|
232262 |
28-Feb-2012 |
tijl |
Copy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace amd64/i386/pc98 _limits.h with stubs.
|
232261 |
28-Feb-2012 |
tijl |
Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing amd64/i386/pc98 _types.h with stubs.
|
232230 |
27-Feb-2012 |
jhb |
Remove completely duplicate '#ifdef XEN' section.
|
232228 |
27-Feb-2012 |
jhb |
Resort the IDT_DTRACE_RET constant after it was changed to be less than IDT_SYSCALL.
|
230916 |
02-Feb-2012 |
ken |
Fix the netback driver build for i386.
netback.c: Add missing VM includes.
xen/xenvar.h, xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to <machine/xen/xenvar.h> on i386 to match the amd64 headers.
conf/files: Add netback to the build.
Submitted by: jhb MFC after: 3 days
|
230765 |
30-Jan-2012 |
kib |
Synchronize the struct sigcontext definitions on x86 with mcontext_t.
Pointed out by: bde MFC after: 1 month
|
230475 |
23-Jan-2012 |
das |
Add C11 macros describing subnormal numbers to float.h.
Reviewed by: bde
|
230426 |
21-Jan-2012 |
kib |
Add support for the extended FPU states on amd64, both for native 64bit and 32bit ABIs. As a side-effect, it enables AVX on capable CPUs.
In particular:
- Query the CPU support for XSAVE, list of the supported extensions and the required size of FPU save area. The hw.use_xsave tunable is provided for disabling XSAVE, and hw.xsave_mask may be used to select the enabled extensions.
- Remove the FPU save area from PCB and dynamically allocate the (run-time sized) user save area on the top of the kernel stack, right above the PCB. Reorganize the thread0 PCB initialization to postpone it after BSP is queried for save area size.
- The dumppcb, stoppcbs and susppcbs now do not carry the FPU state as well. FPU state is only useful for suspend, where it is saved in dynamically allocated suspfpusave area.
- Use XSAVE and XRSTOR to save/restore FPU state, if supported and enabled.
- Define new mcontext_t flag _MC_HASFPXSTATE, indicating that mcontext_t has a valid pointer to out-of-struct extended FPU state. Signal handlers are supplied with stack-allocated fpu state. The sigreturn(2) and setcontext(2) syscall honour the flag, allowing the signal handlers to inspect and manipilate extended state in the interrupted context.
- The getcontext(2) never returns extended state, since there is no place in the fixed-sized mcontext_t to place variable-sized save area. And, since mcontext_t is embedded into ucontext_t, makes it impossible to fix in a reasonable way. Instead of extending getcontext(2) syscall, provide a sysarch(2) facility to query extended FPU state.
- Add ptrace(2) support for getting and setting extended state; while there, implement missed PT_I386_{GET,SET}XMMREGS for 32bit binaries.
- Change fpu_kern KPI to not expose struct fpu_kern_ctx layout to consumers, making it opaque. Internally, struct fpu_kern_ctx now contains a space for the extended state. Convert in-kernel consumers of fpu_kern KPI both on i386 and amd64.
First version of the support for AVX was submitted by Tim Bird <tim.bird am sony com> on behalf of Sony. This version was written from scratch.
Tested by: pho (previous version), Yamagi Burmeister <lists yamagi org> MFC after: 1 month
|
230270 |
17-Jan-2012 |
kib |
Add definitions for the FPU extended state header, legacy extended state and AVX state.
MFC after: 1 week
|
230261 |
17-Jan-2012 |
kib |
Add definitions related to XCR0.
MFC after: 1 week
|
230132 |
15-Jan-2012 |
uqs |
Convert files to UTF-8
|
229562 |
05-Jan-2012 |
ed |
Also import WEAK_ALIAS() from the MIPS code.
|
229367 |
03-Jan-2012 |
ed |
Add support for strong aliasing of symbols in i386 assembly.
This macro is a literal copy from the MIPS version of <machine/asm.h>.
|
229104 |
31-Dec-2011 |
kib |
Make the comment in i386/include/ucontext.h identical to the one in amd64/include/ucontext.h. The later is better worded.
Requested by: deischen MFC after: 3 days
|
228469 |
13-Dec-2011 |
ed |
Replace __signed by signed.
The signed keyword is an integral part of the C syntax. There's no need to use __signed.
|
228398 |
10-Dec-2011 |
alc |
Avoid the possibility of integer overflow in the calculation of VM_KMEM_SIZE_MAX. Specifically, if the user/kernel address space split was changed such that the kernel address space was greater than or equal to 2 GB, then overflow would occur.
PR: 161721 MFC after: 3 weeks
|
227399 |
09-Nov-2011 |
kib |
Attempt to improve formatting and content of several comments for amd64 and i386 MD code.
Based on suggestions by: bde MFC after: 1 week
|
227290 |
07-Nov-2011 |
rstone |
Fix the DTrace pid return trap interrupt vector. Previously we were using 31, but that vector is reserved.
Without this fix, running dtrace -p <pid> would either cause the target process to crash or the kernel to page fault.
Obtained from: rpaulo MFC after: 3days
|
226607 |
21-Oct-2011 |
das |
People porting FreeBSD to new architectures ought not have to implement a deprecated FPU control interface in addition to the standard one. To make this clearer, further deprecate ieeefp.h by not declaring the function prototypes except on architectures that implement them already.
Currently i386 and amd64 implement the ieeefp.h interface for compatibility, and for fp[gs]etprec(), which doesn't exist on most other hardware. Powerpc, sparc64, and ia64 partially implement it and probably shouldn't, and other architectures don't implement it at all.
|
226112 |
07-Oct-2011 |
kib |
Remove unused define.
MFC after: 1 month
|
224207 |
19-Jul-2011 |
attilio |
Add the possibility to specify from kernel configs MAXCPU value. This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU.
No MFC is previewed for this patch.
Tested by: pluknet Approved by: re (kib)
|
223796 |
05-Jul-2011 |
jkim |
Correct cpu_monitor() and cpu_mwait() for amd64. These instructions take %rcx as "extensions" in long mode. If any unused bit is set in %rcx, these instructions cause general protection fault. Fix style nits and synchronize i386 with amd64.
|
223440 |
22-Jun-2011 |
jhb |
Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to the x86 tree. The $PIR code is still only enabled on i386 and not amd64. While here, make the qpi(4) driver on conditional on 'device pci'.
|
223433 |
22-Jun-2011 |
jhb |
Oops, missed these in 223424.
Reported by: jkim
|
222853 |
08-Jun-2011 |
avg |
remove code for dynamic offlining/onlining of CPUs on x86
The code has definitely been broken for SCHED_ULE, which is a default scheduler. It may have been broken for SCHED_4BSD in more subtle ways, e.g. with manually configured CPU affinities and for interrupt devilery purposes. We still provide a way to disable individual CPUs or all hyperthreading "twin" CPUs before SMP startup. See the UPDATING entry for details.
Interaction between building CPU topology and disabling CPUs still remains fuzzy: topology is first built using all availble CPUs and then the disabled CPUs should be "subtracted" from it. That doesn't work well if the resulting topology becomes non-uniform.
This work is done in cooperation with Attilio Rao who in addition to reviewing also provided parts of code.
PR: kern/145385 Discussed with: gcooper, ambrisko, mdf, sbruno Reviewed by: attilio Tested by: pho, pluknet X-MFC after: never
|
222813 |
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
222043 |
17-May-2011 |
jkim |
Update CPUID bits to reflect AMD Bulldozer and Intel Sandy Bridge features. Note AMD dropped SSE5 extensions in order to avoid ISA overlap with Intel AVX instructions. The SSE5 bit was recycled as XOP extended instruction bit, CVT16 was deprecated in favor of F16C (half-precision float conversion instructions for AVX), and the remaining FMA4 (4-operand FMA instructions) gained a separate CPUID bit. Replace non-existent references with today's CPUID specifications.
|
222041 |
17-May-2011 |
attilio |
Remove an unused typedef.
Tested by: sbruno, pluknet
|
221855 |
13-May-2011 |
mdf |
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware.
Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment).
Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit.
Requested by: alc MFC after: 1 week MFC with: r221853
|
221703 |
09-May-2011 |
jkim |
Implement boot-time TSC synchronization test for SMP. This test is executed when the user has indicated that the system has synchronized TSCs or it has P-state invariant TSCs. For the former case, we may clear the tunable if it fails the test to prevent accidental foot-shooting. For the latter case, we may set it if it passes the test to notify the user that it may be usable.
|
221527 |
06-May-2011 |
avg |
prepare code that does topology detection for amd cpus for bulldozer
This also introduces a new detection path for family 10h and newer pre-bulldozer cpus, pre-10h hardware should not be affected.
Tested by: Gary Jennejohn <gljennjohn@googlemail.com> (with pre-10h hardware) MFC after: 2 weeks
|
221188 |
28-Apr-2011 |
jkim |
Define "Hypervisor Present" bit. This bit is used by several hypervisors to identify CPUs running under emulation. Currently QEMU-KVM, Xen-HVM, VMware, and MS Hyper-V are known to set this bit.
MFC after: 3 days
|
220803 |
18-Apr-2011 |
kib |
Make pmap_invalidate_cache_range() available for consumption on amd64.
Add pmap_invalidate_cache_pages() method on x86. It flushes the CPU cache for the set of pages, which are not neccessary mapped. Since its supposed use is to prepare the move of the pages ownership to a device that does not snoop all CPU accesses to the main memory (read GPU in GMCH), do not rely on CPU self-snoop feature.
amd64 implementation takes advantage of the direct map. On i386, extract the helper pmap_flush_page() from pmap_page_set_memattr(), and use it to make a temporary mapping of the flushed page.
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
|
220631 |
14-Apr-2011 |
jkim |
Add a function rdtsc32() to read lower 32 bits from TSC and discard upper 32 bits. Some times compiler inserts unnecessary instructions to preserve unused upper 32 bits even when it is casted to a 32-bit value. It reduces such compiler mistakes where every cycle counts.
|
220629 |
14-Apr-2011 |
jkim |
Consistently use __volatile as the rest of this file.
|
220627 |
14-Apr-2011 |
jkim |
Consistently use C99 standard integers as the rest of this file.
|
220580 |
12-Apr-2011 |
jkim |
Add forgotten declarations for tsc_perf_stat from the previous commit.
|
220578 |
12-Apr-2011 |
jkim |
Add definitions for CPUID instruction 6, ECX information.
|
220404 |
07-Apr-2011 |
jkim |
Implement atomic_load_acq_64(9) and atomic_store_rel_64(9) for i386. These functions are implemented with CMPXCHG8B instruction where it is available, i. e., all Pentium-class and later processors. Note this instruction is also used for atomic_store_rel_64() because a simple XCHG-like instruction for 64-bit memory access does not exist, unfortunately. If the processor lacks the instruction, i. e., 80486-class CPUs, two 32-bit load/store are performed with interrupt temporarily disabled, assuming it does not support SMP. Although this assumption may be little naive, it is true in reality. This implementation is inspired by Linux.
|
220347 |
04-Apr-2011 |
jkim |
Use cpu_ticks() for get_cyclecount(9) rather than checking existence of TSC at run-time on i386. cpu_ticks() is set to use RDTSC early enough on i386 where it is available. Otherwise, cpu_ticks() is driven by the current timecounter hardware as binuptime(9) does. This also avoids unnecessary namespace pollution from <machine/cputypes.h>.
|
219920 |
23-Mar-2011 |
alc |
Modestly increase the maximum allowed size of the kmem map on i386. Also, express this new maximum as a fraction of the kernel's address space size rather than a constant so that increasing KVA_PAGES will automatically increase this maximum. As a side-effect of this change, kern.maxvnodes will automatically increase by a proportional amount.
While I'm here ensure that this change doesn't result in an unintended increase in maxpipekva on i386. Calculate maxpipekva based upon the size of the kernel address space and the amount of physical memory instead of the size of the kmem map. The memory backing pipes is not allocated from the kmem map. It is allocated from its own submap of the kernel map. In short, it has no real connection to the kmem map. (In fact, the commit messages for the maxpipekva auto-sizing talk about using the kernel map size, cf. r117325 and r117391, even though the implementation actually used the kmem map size.) Although the calculation is now done differently, the resulting value for maxpipekva should remain almost the same on i386. However, on amd64, the value will be reduced by 2/3. This is intentional. The recent change to VM_KMEM_SIZE_SCALE on amd64 for the benefit of ZFS also had the unnecessary side-effect of increasing maxpipekva. This change is effectively restoring maxpipekva on amd64 to its prior value.
Eliminate init_param3() since it is no longer used.
|
219819 |
21-Mar-2011 |
jeff |
- Merge changes to the base system to support OFED. These include a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND, and other miscellaneous small features.
|
219698 |
16-Mar-2011 |
jkim |
Rework r219679. Always check CPU class at run-time to make it predictable. Unfortunately, it pulls in <machine/cputypes.h> but it is small enough and namespace pollution is minimal, I hope.
Pointed out by: bde Pointy hat: jkim
|
219679 |
15-Mar-2011 |
jkim |
Partially revert r219672. After r198295, kernel need to seed randomness as soon as possible for stack protector. However, dummy timecounter does not have enough entropy and we don't need to sacrifice Pentium class and later.
Pointed out by: Maxim Dounin (mdounin at mdounin dot ru)
|
219675 |
15-Mar-2011 |
jkim |
Remove tsc_present from this file, really.
|
219672 |
15-Mar-2011 |
jkim |
Unconditionally use binuptime(9) for get_cyclecount(9) on i386. Since this function is almost exclusively used for random harvesting, there is no need for micro-optimization. Adjust the manual page accordingly.
|
219653 |
14-Mar-2011 |
jkim |
Make get_cyclecount(9) little bit more useful where binuptime(9) is used.
|
219461 |
10-Mar-2011 |
jkim |
Deprecate rarely used tsc_is_broken. Instead, we zero out tsc_freq because it is almost always used with tsc_freq any way.
|
218950 |
22-Feb-2011 |
jhb |
Fix whitespace nit.
|
218773 |
17-Feb-2011 |
alc |
Remove pmap fields that are either unused or not fully implemented.
Discussed with: kib
|
218744 |
16-Feb-2011 |
dchagin |
To avoid excessive code duplication create wrapper for fill regs from stack frame. Change the trap() code to use newly created function instead of explicit regs assignment.
|
217515 |
17-Jan-2011 |
jkim |
Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits.
MFC after: 1 month
|
217192 |
09-Jan-2011 |
kib |
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. Update the outdated comments describing MAXSLP and the process selection algorithm for swap out.
Comments wording and reviewed by: alc
|
217157 |
08-Jan-2011 |
tijl |
Copy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98 headers with stubs.
Approved by: kib (mentor)
|
217147 |
08-Jan-2011 |
tijl |
On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1]
Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX.
Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency.
Suggested by: bde [1] Approved by: kib (mentor)
|
217146 |
08-Jan-2011 |
tijl |
On 32 bit architectures define (u)int64_t as (unsigned) long long instead of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t has type (unsigned) long long.
The mode attribute was used because long long wasn't standardised until C99. Nowadays compilers should support long long and use of the mode attribute is discouraged according to GCC Internals documentation.
The type definition has to be marked with __extension__ to support compilation with "-std=c89 -pedantic".
Discussed with: bde Approved by: kib (mentor)
|
217145 |
08-Jan-2011 |
tijl |
Fix types of some values in machine/_limits.h.
On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int. However, lacking integer suffixes for types smaller than int, their type should correspond to that of an object of type unsigned char (or short) when used in an expression with objects of type int. In that case unsigned char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and USHRT_MAX should also be int.
Where MIN/MAX constants implicitly have the correct type the suffix has been removed.
While here, correct some comments.
Reviewed by: bde Approved by: kib (mentor)
|
217128 |
07-Jan-2011 |
tijl |
Remove unused support for 64 bit long on 32 bit architectures.
It was used mainly to discover and fix some 64-bit portability problems before 64-bit arches were widely available.
Discussed with: bde Approved by: kib (mentor)
|
217097 |
07-Jan-2011 |
kib |
Add AT_STACKPROT elf aux vector. Will be used to inform rtld about the initial stack protection set by the kernel image activator.
|
216956 |
04-Jan-2011 |
rwatson |
Make "options XENHVM" compile for i386, not just amd64 -- a largely mechanical change. This opens the door for using PV device drivers under Xen HVM on i386, as well as more general harmonisation of i386 and amd64 Xen support in FreeBSD.
Reviewed by: cperciva MFC after: 3 weeks
|
216847 |
31-Dec-2010 |
cperciva |
Make i386_set_ldt work on i386/XEN, step 5/5.
When cleaning up a thread, reset its LDT to the default LDT.
Note: Casting the LDT pointer to an int and storing it in pc_currentldt is wildly bogus, but is harmless since pc_currentldt is a write-only variable.
MFC after: 3 days
|
216844 |
31-Dec-2010 |
cperciva |
Make i386_set_ldt work on i386/XEN, step 2/5.
Don't map physical to machine page numbers in pte_load_store, since it uses PT_SET_VA (which takes a physical page number and converts it to a machine page number).
MFC after: 3 days
|
216592 |
20-Dec-2010 |
tijl |
Merge amd64 and i386 bus.h and move the resulting header to x86. Replace the original amd64 and i386 headers with stubs.
Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere.
Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
|
216524 |
18-Dec-2010 |
kib |
Inform a compiler which asm statements in the x86 implementation of atomics change eflags.
Reviewed by: jhb MFC after: 2 weeks
|
216279 |
07-Dec-2010 |
jkim |
Use int for 'tsc_present' instead of u_int. It is just a boolean.
|
216143 |
03-Dec-2010 |
brucec |
Revert r216134. This checkin broke platforms where bus_space are macros: they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
|
216134 |
02-Dec-2010 |
brucec |
Disallow passing in a count of zero bytes to the bus_space(9) functions.
Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero.
PR: kern/80980 Discussed with: jhb
|
215865 |
26-Nov-2010 |
kib |
Remove npxgetregs(), npxsetregs(), fpugetregs() and fpusetregs() functions, they are unused. Remove 'user' from npxgetuserregs() etc. names.
For {npx,fpu}{get,set}regs(), always use pcb->pcb_user_save for FPU context storage. This eliminates the need for ugly copying with overwrite of the newly added and reserved fields in ucontext on i386 to satisfy alignment requirements for fpusave() and fpurstor().
pc98 version was copied from i386.
Suggested and reviewed by: bde Tested by: pho (i386 and amd64) MFC after: 1 week
|
215856 |
26-Nov-2010 |
tijl |
Merge amd64/i386 _align.h by aligning on the size of register_t (copied from powerpc).
Reviewed by: imp, jhb Approved by: kib (mentor)
|
215818 |
25-Nov-2010 |
cperciva |
Rename HYPERVISOR_multicall (which performs the multicall hypercall) to _HYPERVISOR_multicall, and create a new HYPERVISOR_multicall function which invokes _HYPERVISOR_multicall and checks that the individual hypercalls all succeeded.
|
215748 |
23-Nov-2010 |
avg |
specialreg.h: add definitions for some useful bits found in CPUID.6 EAX and ECX
CPUID.6 is defined as Thermal and Power Management Leaf by both Intel and AMD.
Reviewed by: jhb MFC after: 7 days
|
215587 |
20-Nov-2010 |
cperciva |
Add VTOM(va) macro as xpmap_ptom(VTOP(va)) to convert to machine addresses.
Clean up the code by converting xpmap_ptom(VTOP(...)) to VTOM(...) and converting xpmap_ptom(VM_PAGE_TO_PHYS(...)) to VM_PAGE_TO_MACH(...). In a few places we take advantage of the fact that xpmap_ptom can commute with setting PG_* flags.
This commit should have no net effect save to improve the readability of this code.
|
215524 |
19-Nov-2010 |
avg |
specialreg.h: add definitions for MPERF/APERF pair of MSRs
These MSRs can be used to determine actual (average) performance as compared to a maximum defined performance. Availability of these MSRs is indicated by bit0 in CPUID.6.ECX on both Intel and AMD processors.
MFC after: 5 days
|
215523 |
19-Nov-2010 |
avg |
specialreg.h: add AMD-specific "Hardware Configuration Register" MSR
It seems that this MSR has been available in a range of AMD processors families for quite a while now.
Note1: not all AMD MSRs that are found in amd64 specialreg.h are also in the i386 version. Note2: perhaps some additional name component is needed to distinguish AMD-specific MSRs.
MFC after: 5 days
|
215522 |
19-Nov-2010 |
avg |
specialreg.h: add definition for AMD Core Performance Boost bit
This bit indicates availability of the feature.
MFC after: 4 days
|
215140 |
11-Nov-2010 |
jkim |
Move identical copies of apm_bios.h to sys/x86/include, replace them with stubs, and adjust PC98 stub accordingly.
Reviewed by: imp, nyan
|
215054 |
09-Nov-2010 |
jhb |
- Remove <machine/mutex.h>. Most of the headers were empty, and the contents of the ones that were not empty were stale and unused. - Now that <machine/mutex.h> no longer exists, there is no need to allow it to override various helper macros in <sys/mutex.h>. - Rename various helper macros for low-level operations on mutexes to live in the _mtx_* or __mtx_* namespaces. While here, change the names to more closely match the real API functions they are backing. - Drop support for including <sys/mutex.h> in assembly source files.
Suggested by: bde (1, 2)
|
215051 |
09-Nov-2010 |
attilio |
Move the mptable.h under x86/include/.
Sponsored by: Sandvine Incorporated MFC after: 14 days
|
214631 |
01-Nov-2010 |
jhb |
Move <machine/apicreg.h> to <x86/apicreg.h>.
|
214630 |
01-Nov-2010 |
jhb |
Move the <machine/mca.h> header to <x86/mca.h>.
|
214346 |
25-Oct-2010 |
jhb |
Use intr_disable() and intr_restore() instead of frobbing the flags register directly to disable interrupts.
Reviewed by: bde (earlier version) MFC after: 2 weeks
|
213455 |
05-Oct-2010 |
alc |
Initialize KPTmap in locore so that vm86.c can call vtophys() (or really pmap_kextract()) before pmap_bootstrap() is called.
Document the set of pmap functions that may be called before pmap_bootstrap() is called.
Tested by: bde@ Reviewed by: kib@ Discussed with: jhb@ MFC after: 6 weeks
|
213452 |
05-Oct-2010 |
kib |
Display PCID capability of CPU and add CPUID define for it.
MFC after: 1 week
|
212541 |
13-Sep-2010 |
mav |
Refactor timer management code with priority to one-shot operation mode. The main goal of this is to generate timer interrupts only when there is some work to do. When CPU is busy interrupts are generating at full rate of hz + stathz to fullfill scheduler and timekeeping requirements. But when CPU is idle, only minimum set of interrupts (down to 8 interrupts per second per CPU now), needed to handle scheduled callouts is executed. This allows significantly increase idle CPU sleep time, increasing effect of static power-saving technologies. Also it should reduce host CPU load on virtualized systems, when guest system is idle.
There is set of tunables, also available as writable sysctls, allowing to control wanted event timer subsystem behavior: kern.eventtimer.timer - allows to choose event timer hardware to use. On x86 there is up to 4 different kinds of timers. Depending on whether chosen timer is per-CPU, behavior of other options slightly differs. kern.eventtimer.periodic - allows to choose periodic and one-shot operation mode. In periodic mode, current timer hardware taken as the only source of time for time events. This mode is quite alike to previous kernel behavior. One-shot mode instead uses currently selected time counter hardware to schedule all needed events one by one and program timer to generate interrupt exactly in specified time. Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. kern.eventtimer.singlemul - in periodic mode specifies how much times higher timer frequency should be, to not strictly alias hardclock() and statclock() events. Default values are 2 and 4, but could be reduced to 1 if extra interrupts are unwanted. kern.eventtimer.idletick - makes each CPU to receive every timer interrupt independently of whether they busy or not. By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are generating.
As soon as this patch modifies cpu_idle() on some platforms, I have also refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate, as fast alternative to other methods. It allows SMP scheduler to wake up sleeping CPUs much faster without using IPI, significantly increasing performance on some highly task-switching loads.
Tested by: many (on i386, amd64, sparc64 and powerc) H/W donated by: Gheorghe Ardelean Sponsored by: iXsystems, Inc.
|
212177 |
03-Sep-2010 |
rdivacky |
Change the parameter passed to the inline assembly to u_short as we are dealing with 16bit segment registers. Change mov to movw.
Approved by: rpaulo (mentor) Reviewed by: kib, rink
|
211924 |
28-Aug-2010 |
rpaulo |
Register an interrupt vector for DTrace return probes. There is some code missing in lapic to make sure that we don't overwrite this entry, but this will be done on a sequent commit.
Sponsored by: The FreeBSD Foundation
|
211825 |
25-Aug-2010 |
jkim |
Increase maximum number of page table entries per VM86 context from 8 to 24 pages, yet again. Now we can allocate a whole segment, which is required for shadowing option ROM images, for example.
|
211752 |
24-Aug-2010 |
rpaulo |
Add two DTrace trap type values. Used by fasttrap.
Sponsored by: The FreeBSD Foundation
|
211412 |
17-Aug-2010 |
kib |
Supply some useful information to the started image using ELF aux vectors. In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate.
Tested by: marius (sparc64) MFC after: 1 month
|
210939 |
06-Aug-2010 |
jhb |
Add a new ipi_cpu() function to the MI IPI API that can be used to send an IPI to a specific CPU by its cpuid. Replace calls to ipi_selected() that constructed a mask for a single CPU with calls to ipi_cpu() instead. This will matter more in the future when we transition from cpumask_t to cpuset_t for CPU masks in which case building a CPU mask is more expensive.
Submitted by: peter, sbruno Reviewed by: rookie Obtained from: Yahoo! (x86) MFC after: 1 month
|
210877 |
05-Aug-2010 |
jkim |
Implement a simple native VM86 backend for X86BIOS. Now i386 uses native VM86 calls instead of the real mode emulator as a backend. VM86 has been proven reliable for very long time and it is actually few times faster than emulation. Increase maximum number of page table entries per VM86 context from 3 to 8 pages. It was (ridiculously) low and insufficient for new VM86 backend, which shares one context globally. Slighly rearrange and clean up the emulator backend to accommodate new code. The only visible change here is stack size, which is decreased from 64K to 4K bytes to sync. with VM86. Actually, it seems there is no need for big stack in real mode.
MFC after: 1 month
|
210624 |
29-Jul-2010 |
delphij |
Improve cputemp(4) driver wrt newer Intel processors, especially Xeon 5500/5600 series:
- Utilize IA32_TEMPERATURE_TARGET, a.k.a. Tj(target) in place of Tj(max) when a sane value is available, as documented in Intel whitepaper "CPU Monitoring With DTS/PECI"; (By sane value we mean 70C - 100C for now); - Print the probe results when booting verbose; - Replace cpu_mask with cpu_stepping; - Use CPUID_* macros instead of rolling our own.
Approved by: rpaulo MFC after: 1 month
|
210623 |
29-Jul-2010 |
jhb |
Mark the __curthread() functions as __pure2 and remove the volatile keyword from the inline assembly. This allows the compiler to cache invocations of curthread since it's value does not change within a thread context.
Submitted by: zec (i386) MFC after: 1 week
|
210577 |
28-Jul-2010 |
jhb |
The corrected error count field is dependent on CMCI, not TES.
MFC after: 1 week
|
210550 |
27-Jul-2010 |
jhb |
Very rough first cut at NUMA support for the physical page allocator. For now it uses a very dumb first-touch allocation policy. This will change in the future. - Each architecture indicates the maximum number of supported memory domains via a new VM_NDOMAIN parameter in <machine/vmparam.h>. - Each cpu now has a PCPU_GET(domain) member to indicate the memory domain a CPU belongs to. Domain values are dense and numbered from 0. - When a platform supports multiple domains, the default freelist (VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain. The MD code is required to populate an array of mem_affinity structures. Each entry in the array defines a range of memory (start and end) and a domain for the range. Multiple entries may be present for a single domain. The list is terminated by an entry where all fields are zero. This array of structures is used to split up phys_avail[] regions that fall in VM_FREELIST_DEFAULT into per-domain freelists. - Each memory domain has a separate lookup-array of freelists that is used when fulfulling a physical memory allocation. Right now the per-domain freelists are listed in a round-robin order for each domain. In the future a table such as the ACPI SLIT table may be used to order the per-domain lookup lists based on the penalty for each memory domain relative to a specific domain. The lookup lists may be examined via a new vm.phys.lookup_lists sysctl. - The first-touch policy is implemented by using PCPU_GET(domain) to pick a lookup list when allocating memory.
Reviewed by: alc
|
210357 |
21-Jul-2010 |
rpaulo |
MFamd64: Add USD_GETBASE(), USD_SETBASE(), USD_GETLIMIT() and USD_SETLIMIT().
|
210131 |
15-Jul-2010 |
mav |
Move functions declaration to MI code, following implementation.
|
209995 |
13-Jul-2010 |
imp |
Remove obsolete undef of COPY_SIGCODE. It appears to have not been used in FreeBSD in quite some time (maybe since before 4.4-lite :)
Submitted by: bde
|
209866 |
09-Jul-2010 |
kib |
Fix spacing.
Noted by: pgollucci MFC after: 3 weeks
|
209862 |
09-Jul-2010 |
kib |
For both i386 and amd64 pmap, - change the type of pm_active to cpumask_t, which it is; - in pmap_remove_pages(), compare with PCPU(curpmap), instead of dereferencing the long chain of pointers [1]. For amd64 pmap, remove the unneeded checks for validity of curpmap in pmap_activate(), since curpmap should be always valid after r209789.
Submitted by: alc [1] Reviewed by: alc MFC after: 3 weeks
|
209461 |
23-Jun-2010 |
kib |
Remove the support for int13 FPU exception reporting on i386. It is believed that all 486-class CPUs FreeBSD is capable to run on, either have no FPU and cannot use external coprocessor, or have FPU on the package and can use #MF.
Reviewed by: bde Tested by: pho (previous version)
|
209460 |
23-Jun-2010 |
kib |
Remove unused i586 optimized bcopy/bzero/etc implementations that utilize FPU registers for copying. Remove the switch table and jumps from bcopy/bzero/... to the actual implementation. As a side-effect, i486-optimized bzero is removed.
Reviewed by: bde Tested by: pho (previous version)
|
209371 |
20-Jun-2010 |
mav |
Implement new event timers infrastructure. It provides unified APIs for writing event timer drivers, for choosing best possible drivers by machine independent code and for operating them to supply kernel with hardclock(), statclock() and profclock() events in unified fashion on various hardware.
Infrastructure provides support for both per-CPU (independent for every CPU core) and global timers in periodic and one-shot modes. MI management code at this moment uses only periodic mode, but one-shot mode use planned for later, as part of tickless kernel project.
For this moment infrastructure used on i386 and amd64 architectures. Other archs are welcome to follow, while their current operation should not be affected.
This patch updates existing drivers (i8254, RTC and LAPIC) for the new order, and adds event timers support into the HPET driver. These drivers have different capabilities: LAPIC - per-CPU timer, supports periodic and one-shot operation, may freeze in C3 state, calibrated on first use, so may be not exactly precise. HPET - depending on hardware can work as per-CPU or global, supports periodic and one-shot operation, usually provides several event timers. i8254 - global, limited to periodic mode, because same hardware used also as time counter. RTC - global, supports only periodic mode, set of frequencies in Hz limited by powers of 2.
Depending on hardware capabilities, drivers preferred in following orders, either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC. User may explicitly specify wanted timers via loader tunables or sysctls: kern.eventtimer.timer1 and kern.eventtimer.timer2. If requested driver is unavailable or unoperational, system will try to replace it. If no more timers available or "NONE" specified for second, system will operate using only one timer, multiplying it's frequency by few times and uing respective dividers to honor hz, stathz and profhz values, set during initial setup.
|
209212 |
15-Jun-2010 |
jhb |
Restore the machine check register banks on resume. For banks being monitored via CMCI, reset the interrupt threshold to 1 on resume.
Reviewed by: jkim MFC after: 2 weeks
|
208833 |
05-Jun-2010 |
kib |
Introduce the x86 kernel interfaces to allow kernel code to use FPU/SSE hardware. Caller should provide a save area that is chained into the stack of the areas; pcb save_area for usermode FPU state is on top. The pcb now contains a pointer to the current FPU saved area, used during FPUDNA handling and context switches. There is also a facility to allow the kernel thread to use pcb save_area.
Change the dreaded warnings "npxdna in kernel mode!" into the panics when FPU usage is not registered.
KPI discussed with: fabient Tested by: pho, fabient Hardware provided by: Sentex Communications MFC after: 1 month
|
208742 |
02-Jun-2010 |
jhb |
MFamd64: Add a new macro PCPU_XEN_FIELDS to hold XEN-specific per-CPU fields that is always included in PCPU_MD_FIELDS. The macro is empty for non-XEN kernels. This avoids duplicating non-XEN per-CPU fields in two places. While here, remove several unused fields from the XEN-specific structure.
Reviewed by: kmacy, gibbs MFC after: 1 month
|
208507 |
24-May-2010 |
jhb |
Add support for corrected machine check interrupts. CMCI is a new local APIC interrupt that fires when a threshold of corrected machine check events is reached. CMCI also includes a count of events when reporting corrected errors in the bank's status register. Note that individual banks may or may not support CMCI. If they do, each bank includes its own threshold register that determines when the interrupt fires. Currently the code uses a very simple strategy where it doubles the threshold on each interrupt until it succeeds in throttling the interrupt to occur only once a minute (this interval can be tuned via sysctl). The threshold is also adjusted on each hourly poll which will lower the threshold once events stop occurring.
Tested by: Sailaja Bangaru sbappana at yahoo com MFC after: 1 month
|
208494 |
24-May-2010 |
mav |
- Implement MI helper functions, dividing one or two timer interrupts with arbitrary frequencies into hardclock(), statclock() and profclock() calls. Same code with minor variations duplicated several times over the tree for different timer drivers and architectures. - Switch all x86 archs to new functions, simplifying the code and removing extra logic from timer drivers. Other archs are also welcome.
|
208453 |
23-May-2010 |
kib |
Reorganize syscall entry and leave handling.
Extend struct sysvec with three new elements: sv_fetch_syscall_args - the method to fetch syscall arguments from usermode into struct syscall_args. The structure is machine-depended (this might be reconsidered after all architectures are converted). sv_set_syscall_retval - the method to set a return value for usermode from the syscall. It is a generalization of cpu_set_syscall_retval(9) to allow ABIs to override the way to set a return value. sv_syscallnames - the table of syscall names.
Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding the call to cpu_set_syscall_retval().
The new functions syscallenter(9) and syscallret(9) are provided that use sv_*syscall* pointers and contain the common repeated code from the syscall() implementations for the architecture-specific syscall trap handlers.
Syscallenter() fetches arguments, calls syscall implementation from ABI sysent table, and set up return frame. The end of syscall bookkeeping is done by syscallret().
Take advantage of single place for MI syscall handling code and implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the thread is stopped at syscall entry or return point respectively. The EXEC flag augments SCX and notifies debugger that the process address space was changed by one of exec(2)-family syscalls.
The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are changed to use syscallenter()/syscallret(). MIPS and arm are not converted and use the mostly unchanged syscall() implementation.
Reviewed by: jhb, marcel, marius, nwhitehorn, stas Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc), stas (mips) MFC after: 1 month
|
208332 |
20-May-2010 |
phk |
Rename an argument from "exp" to "expect" since the former makes FlexeLint uneasy, in case anybody think it might be exp(3) in libm.
This also makes it consistent with other archs.
|
208311 |
19-May-2010 |
jhb |
Add constants for the optional EOI suppression support in local APICs and EOI registers in I/O APICs.
|
207676 |
05-May-2010 |
kib |
Add definitions for Intel AESNI CPUID bits and print the capabilities on boot.
Hardware provided by: Sentex Communications MFC after: 1 week
|
207673 |
05-May-2010 |
joel |
Switch to our preferred 2-clause BSD license.
Approved by: kmacy
|
207410 |
30-Apr-2010 |
kmacy |
On Alan's advice, rather than do a wholesale conversion on a single architecture from page queue lock to a hashed array of page locks (based on a patch by Jeff Roberson), I've implemented page lock support in the MI code and have only moved vm_page's hold_count out from under page queue mutex to page lock. This changes pmap_extract_and_hold on all pmaps.
Supported by: Bitgravity Inc.
Discussed with: alc, jeffr, and kib
|
207329 |
28-Apr-2010 |
attilio |
- Extract the IODEV_PIO interface from ia64 and make it MI. In the end, it does help fixing /dev/io usage from multithreaded processes. - On i386 and amd64 the old behaviour is kept but multithreaded processes must use the new interface in order to work well. - Support for the other architectures is greatly improved, where necessary, by the necessity to define very small things now.
Manpage update will happen shortly.
Sponsored by: Sandvine Incorporated PR: threads/116181 Reviewed by: emaste, marcel MFC after: 3 weeks
|
207269 |
27-Apr-2010 |
kib |
Style: use #define<TAB> instead of #define<SPACE>.
Noted by: bde, pluknet gmail com MFC after: 11 days
|
207152 |
24-Apr-2010 |
kib |
Move the constants specifying the size of struct kinfo_proc into machine-specific header files. Add KINFO_PROC32_SIZE for struct kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add CTASSERT for the size of struct kinfo_proc32.
Submitted by: pluknet Reviewed by: imp, jhb, nwhitehorn MFC after: 2 weeks
|
206381 |
07-Apr-2010 |
rpaulo |
Add EFI boot info fields.
|
206089 |
02-Apr-2010 |
fabient |
- Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token.
Sponsored by: NETASQ
|
205851 |
29-Mar-2010 |
jhb |
Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires.
MFC after: 1 week
|
205573 |
24-Mar-2010 |
alc |
Adapt r204907 and r205402, the amd64 implementation of the workaround for AMD Family 10h Erratum 383, to i386.
Enable machine check exceptions by default, just like r204913 for amd64.
Enable superpage promotion only if the processor actually supports large pages, i.e., PG_PS.
MFC after: 2 weeks
|
205448 |
22-Mar-2010 |
jhb |
Remove unneeded type specifiers from 64-bit constants. The compiler infers their natural type from the constants' values.
Submitted by: bde MFC after: 3 days
|
205214 |
16-Mar-2010 |
jhb |
- Extend the machine check record structure to include several fields useful for parsing model-specific and other fields in machine check events including the global machine check capabilities and status registers, CPU identification, and the FreeBSD CPU ID. - Report these added fields in the console log of a machine check so that a record structure can be reconstituted from the console messages. - Parse new architectural errors including memory controller errors.
MFC after: 1 week
|
205210 |
16-Mar-2010 |
jhb |
Use unsigned long long constants for fields in 64-bit machine check registers instead of unsigned long constants.
MFC after: 3 days
|
204646 |
03-Mar-2010 |
joel |
The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software.
Obtained from: NetBSD
|
204641 |
03-Mar-2010 |
attilio |
Improving the clocks auto-tunning by firstly checking if the atrtc may be correctly initialized and just then assign to softclock/profclock. Right now, some atrtc seems reporting strange diagnostic error* making the current pattern bogus.
In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64, now accepts as arguments the desired sources to handle, and returns the actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no meaning in calling such function). This allows to bring out into commont x86 code the handling part for machdep.lapic_allclocks tunable, which is retained.
Sponsored by: Sandvine Incorporated Tested by: yongari, Richard Todd <rmtodd at ichotolot dot servalan dot com> MFC: 3 weeks X-MFC: r202387, 204309
|
202894 |
23-Jan-2010 |
alc |
Handle a race between pmap_kextract() and pmap_promote_pde(). This race is known to cause a kernel crash in ZFS on i386 when superpage promotion is enabled.
Tested by: netchild MFC after: 1 week
|
202387 |
15-Jan-2010 |
attilio |
Handling all the three clocks (hardclock, softclock, profclock) with the LAPIC may lead to aliasing for softclock and profclock because frequencies are sized in order to fit mainly hardclock. atrtc used to take care of the softclock and profclock and it does still do, if the LAPIC can't handle the clocks properly.
Revert the change when the LAPIC started taking charge of all three of them and let atrtc handle softclock and profclock if not explicitly requested. Such request can be made setting != 0 the new tunable machdep.lapic_allclocks or if the new device ATPIC is not present within the i386 kernel config (atrtc is linked to atpic presence).
Diagnosed by: Sandvine Incorporated Reviewed by: jhb, emaste Sponsored by: Sandvine Incorporated MFC: 3 weeks
|
202097 |
11-Jan-2010 |
marcel |
Use io(4) for I/O port access on ia64, rather than through sysarch(2). I/O port access is implemented on Itanium by reading and writing to a special region in memory. To hide details and avoid misaligned memory accesses, a process did I/O port reads and writes by making a MD system call. There's one fatal problem with this approach: unprivileged access was not being prevented. /dev/io serves that purpose on amd64/i386, so employ it on ia64 as well. Use an ioctl for doing the actual I/O and remove the sysarch(2) interface.
Backward compatibility is not being considered. The sysarch(2) approach was added to support X11, but support for FreeBSD/ia64 was never fully implemented in X11. Thus, nothing gets broken that didn't need more work to begin with.
MFC after: 1 week
|
201751 |
07-Jan-2010 |
alc |
Make pmap_set_pg() static.
|
201369 |
01-Jan-2010 |
obrien |
Quiet variable "shadows" warning: sys/vmmeter.h: warning: shadowed declaration is here machine/cpufunc.h: In function 'insw': machine/cpufunc.h: warning: declaration of 'cnt' shadows a global declaration ..snip..
|
200033 |
02-Dec-2009 |
avg |
mca: improve status checking, recording and reporting
- directly print mca information in case we fail to allocate memory for a record - include bank number into mca record - print raw mca status value for extended information
Reviewed by: jhb MFC after: 10 days
|
199968 |
30-Nov-2009 |
avg |
x86 cpu features: add MOVBE reporting and flag
The check is glimpsed from Linux and OpenSolaris. MOVBE instruction is found in Intel Atom processors.
|
198134 |
15-Oct-2009 |
jhb |
Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64 and i386 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler().
Requested by: many Reviewed by: scottl MFC after: 2 weeks
|
197933 |
10-Oct-2009 |
kib |
Define architectural load bases for PIE binaries. Addresses were selected by looking at the bases used for non-relocatable executables by gnu ld(1), and adjusting it slightly.
Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
|
197910 |
09-Oct-2009 |
attilio |
atomic_cmpset_barr_* was added in order to cope with compilers willing to specify their own version of atomic_cmpset_* which could have been different than the membar version.
Right now, however, FreeBSD is bound mostly to GCC-like compilers and it is desired to add new support and compat shim mostly when there is a real necessity, in order to avoid too much compatibility bloats.
In this optic, bring back atomic_cmpset_{acq, rel}_* to be the same as atomic_cmpset_* and unwind the atomic_cmpset_barr_* introduction.
Requested by: jhb Reviewed by: jhb Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
|
197824 |
06-Oct-2009 |
attilio |
- All the functions in atomic.h needs to be in "physical" form (like not defined through macros or similar) in order to be later compiled in the kernel and offer this way the support for modules (and compatibility among the UP case and SMP case). Fix this for the newly introduced atomic_cmpset_barr_* cases by defining and specifying a template. Note that the new DEFINE_CMPSET_GEN() template save more typing on amd64 than the current code. [1] - Fix the style for memory barriers on amd64.
[1] Reported by: Paul B. Mahol <onemda at gmail dot com>
|
197803 |
06-Oct-2009 |
attilio |
Per their definition, atomic instructions used in conjuction with memory barriers should also ensure that the compiler doesn't reorder paths where they are used. GCC, however, does that aggressively, even in presence of volatile operands. The most reliable way GCC offers for avoid instructions reordering is clobbering "memory" even if that is theoretically an heavy-weight operation, flushing the content of all the registers and forcing reload of them (We could rely, however, on gcc DTRT by just understanding the purpose as this is a well-known pattern for many modern operating-systems).
Not all our memory barriers, right now, clobber memory for GCC-like compilers. The most notable cases are IA32 and amd64 where the memory barrier are treacted the same as normal atomic instructions. Fix this by offering the possibility to implement atomic instructions with memory barriers separately from the normal version and implement the GCC-like specific one using memory clobbering. Thanks to Chris Lattner (@apple) for his discussion on llvm specifics.
Reported by: jhb Reviewed by: jhb Tested by: rdivacky, Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
|
197693 |
01-Oct-2009 |
kmacy |
make read_eflags and write_eflags accomplish the same effect on PVM as native, simplifying interrupt handling
|
197647 |
30-Sep-2009 |
avg |
cpufunc.h: unify/correct style of c extension names
i386 and amd64 archs only. inline => __inline. [1] __asm__ => __asm. [2]
Reviewed by: kib, jhb [1] Suggested by: kib [2] MFC after: 1 week
|
197536 |
27-Sep-2009 |
jkim |
Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and install apm(8) and apm_bios.h on amd64.
|
197439 |
23-Sep-2009 |
jhb |
Extract the code to find and map the MADT ACPI table during early kernel startup and genericize it so it can be reused to map other tables as well: - Add a routine to walk a list of ACPI subtables such as those used in the APIC and SRAT tables in the MI acpi(4) driver. - Move the routines for mapping and unmapping an ACPI table as well as mapping the RSDT or XSDT and searching for a table with a given signature out into acpica_machdep.c for both amd64 and i386.
|
197316 |
18-Sep-2009 |
alc |
Add a new sysctl for reporting all of the supported page sizes.
Reviewed by: jhb MFC after: 3 weeks
|
197108 |
11-Sep-2009 |
kmacy |
fix UP compilation
|
197070 |
10-Sep-2009 |
jkim |
Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce unnecessary #ifdef's for shared code between them.
|
197025 |
09-Sep-2009 |
delphij |
- Teach vesa(4) and dpms(4) about x86emu. [1] - 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)
|
196994 |
08-Sep-2009 |
phk |
Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an architecture specific include file containing the _ALIGN* stuff which <sys/socket.h> needs.
|
196816 |
04-Sep-2009 |
julian |
whitespace commit
Submitted by: bde@
|
196811 |
04-Sep-2009 |
julian |
Bring i386 up to date with amd64 and others. The macros for PCPU can be slightly simplified, which makes the resulting tangle qa lot easier to understand when trying to read them.
MFC after: 4 weeks
|
196705 |
31-Aug-2009 |
jhb |
Improve pmap_change_attr() so that it is able to demote a large (2/4MB) page into 4KB pages as needed. This should be fairly rare in practice on i386. This includes merging the following changes from the amd64 pmap: 180430, 180485, 180845, 181043, 181077, and 196318. - Add basic support for changing attributes on PDEs to pmap_change_attr() similar to the support in the initial version of pmap_change_attr() on amd64 including inlines for pmap_pde_attr() and pmap_pte_attr(). - Extend pmap_demote_pde() to include the ability to instantiate a new page table page where none existed before. - Enhance pmap_change_attr(). Use pmap_demote_pde() to demote a 2/4MB page mapping to 4KB page mappings when the specified attribute change only applies to a portion of the 2/4MB page. Previously, in such cases, pmap_change_attr() gave up and returned an error. - Correct a critical accounting error in pmap_demote_pde().
Reviewed by: alc MFC after: 3 days
|
196224 |
14-Aug-2009 |
jhb |
Adjust the handling of the local APIC PMC interrupt vector: - Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs.
Reported by: rnoland Reviewed by: jkoshy Approved by: re (kib) MFC after: 2 weeks
|
196196 |
13-Aug-2009 |
attilio |
* Completely Remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Adds an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding
This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists.
Please don't forget to update your config file with the STOP_NMI option removal
Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib)
|
195940 |
29-Jul-2009 |
kib |
As was done in r195820 for amd64, use clflush for flushing cache lines when memory page caching attributes changed, and CPU does not support self-snoop, but implemented clflush, for i386.
Take care of possible mappings of the page by sf buffer by utilizing the mapping for clflush, otherwise map the page transiently. Amd64 used direct map.
Proposed and reviewed by: alc Approved by: re (kensmith)
|
195649 |
12-Jul-2009 |
alc |
Add support to the virtual memory system for configuring machine- dependent memory attributes:
Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the fact that there are machine-dependent memory attributes that have nothing to do with controlling the cache's behavior.
Introduce vm_object_set_memattr() for setting the default memory attributes that will be given to an object's pages.
Introduce and use pmap_page_{get,set}_memattr() for getting and setting a page's machine-dependent memory attributes. Add full support for these functions on amd64 and i386 and stubs for them on the other architectures. The function pmap_page_set_memattr() is also responsible for any other machine-dependent aspects of changing a page's memory attributes, such as flushing the cache or updating the direct map. The uses include kmem_alloc_contig(), vm_page_alloc(), and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes for the real or fictitious page according to the object's default memory attributes.
Update the various pmap functions on amd64 and i386 that map pages to incorporate each page's memory attributes in the mapping.
Notes: (1) Inherent to this design are safety features that prevent the specification of inconsistent memory attributes by different mappings on amd64 and i386. In addition, the device pager provides a warning when a device driver creates a fictitious page with memory attributes that are inconsistent with the real page that the fictitious page is an alias for. (2) Storing the machine-dependent memory attributes for amd64 and i386 as a dedicated "int" in "struct md_page" represents a compromise between space efficiency and the ease of MFCing these changes to RELENG_7.
In collaboration with: jhb
Approved by: re (kib)
|
195376 |
05-Jul-2009 |
sam |
Cleanup ALIGNED_POINTER: o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v) o define as "1" on amd64 and i386 where there is no restriction o make the type returned consistent with ALIGN o remove _ALIGNED_POINTER o make associated comments consistent
Reviewed by: bde, imp, marcel Approved by: re (kensmith)
|
195249 |
01-Jul-2009 |
jhb |
Improve the handling of cpuset with interrupts. - For x86, change the interrupt source method to assign an interrupt source to a specific CPU to return an error value instead of void, thus allowing it to fail. - If moving an interrupt to a CPU fails due to a lack of IDT vectors in the destination CPU, fail the request with ENOSPC rather than panicing. - For MSI interrupts on x86 (but not MSI-X), only allow cpuset to be used on the first interrupt in a group. Moving the first interrupt in a group moves the entire group. - Use the icu_lock to protect intr_next_cpu() on x86 instead of the intr_table_lock to fix a LOR introduced in the last set of MSI changes. - Add a new privilege PRIV_SCHED_CPUSET_INTR for using cpuset with interrupts. Previously, binding an interrupt to a CPU only performed a privilege check if the interrupt had an interrupt thread. Interrupts without a thread could be bound by non-root users as a result. - If an interrupt event's assign_cpu method fails, then restore the original cpuset mask for the associated interrupt thread.
Approved by: re (kib)
|
195060 |
26-Jun-2009 |
alc |
Correct the #endif comment.
Noticed by: jmallett Approved by: re (kib)
|
195033 |
26-Jun-2009 |
alc |
This change is the next step in implementing the cache control functionality required by video card drivers. Specifically, this change introduces vm_cache_mode_t with an appropriate VM_CACHE_DEFAULT definition on all architectures. In addition, this changes adds a vm_cache_mode_t parameter to kmem_alloc_contig() and vm_phys_alloc_contig(). These will be the interfaces for allocating mapped kernel memory and physical memory, respectively, with non-default cache modes.
In collaboration with: jhb
|
195002 |
25-Jun-2009 |
jhb |
Fix kernels compiled without SMP support. Make intr_next_cpu() available for UP kernels but as a stub that always returns the single CPU's local APIC ID.
Reported by: kib
|
194985 |
25-Jun-2009 |
jhb |
- Restore the behavior of pre-allocating IDT vectors for MSI interrupts. This is mostly important for the multiple MSI message case where the IDT vectors for the entire group need to be allocated together. This also restores the assumptions made by the PCI bus code that it could invoke PCIB_MAP_MSI() once MSI vectors were allocated. - To avoid whiplash with CPU assignments, change the way that CPUs are assigned to interrupt sources on activation. Instead of assigning the CPU via pic_assign_cpu() before calling enable_intr(), allow the different interrupt source drivers to ask the MD interrupt code which CPU to use when they allocate an IDT vector. I/O APIC interrupt pins do this in their pic_enable_intr() routines giving the same behavior as before. MSI sources do it when the IDT vectors are allocated during msi_alloc() and msix_alloc(). - Change the intr_table_lock from an sx lock to a mutex.
Tested by: rnoland
|
194611 |
22-Jun-2009 |
alc |
Eliminate dead code. These definitions should have been deleted with the introduction of i686_mem.c in r45405.
Merge adjacent #ifdef _KERNEL/#endif blocks.
|
194295 |
16-Jun-2009 |
jhb |
Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h. specialreg.h now consists solely of register-related macros.
|
194115 |
13-Jun-2009 |
ed |
Clobber "cc" instead of using volatile.
Submitted by: Christoph Mallon
|
194111 |
13-Jun-2009 |
ed |
Clobber "cc" instead of using volatile; remove obsolete register keyword.
Submitted by: Christoph Mallon
|
194110 |
13-Jun-2009 |
ed |
Simplify the inline assembler (and correct potential error) of pte_load_store().
Submitted by: Christoph Mallon
|
194018 |
11-Jun-2009 |
avg |
strict kobj signatures: fix legacy i386 pcib_write_config impl
Reviewed by: imp, current@ Approved by: jhb (mentor)
|
193662 |
07-Jun-2009 |
adrian |
Decouple the i386 native and i386 Xen APIC definitions a little further.
I'm experimenting locally with xen APIC emulation a bit and this makes it easier to migrate APIC entries between being bitmapped and not being bitmapped.
|
193154 |
31-May-2009 |
adrian |
Fix the MP IPI code to differentiate between bitmapped IPIs and function IPIs.
This attempts to fix the IPI handling code to correctly differentiate between bitmapped IPIs and function IPIs. The Xen IPIs were on low numbers which clashed with the bitmapped IPIs.
This commit bumps those IPI numbers up to 240 and above (just like in the i386 code) and fiddles with the ipi_vectors[] logic to call the correct function.
This still isn't "right". Specifically, the IPI code may work fine for TLB shootdown events but the rendezvous/lazypmap IPIs are thrown by calling ipi_*() routines which don't set the call_func stuff (function id, addr1, addr2) that the TLB shootdown events are. So the Xen SMP support is still broken.
PR: 135069
|
193034 |
29-May-2009 |
adrian |
Revert to 2-clause.
|
193032 |
29-May-2009 |
adrian |
Migrate the Xen hypervisor clock reading routines into something sharable.
|
192331 |
18-May-2009 |
jhb |
Bump CACHE_LINE_SIZE to 128 for x86. Intel's manuals explicitly recommend using 128 byte alignment for locks. (See IA-32 SDM Vol 3A 7.11.6.7)
|
192114 |
14-May-2009 |
attilio |
FreeBSD right now support 32 CPUs on all the architectures at least. With the arrival of 128+ cores it is necessary to handle more than that. One of the first thing to change is the support for cpumask_t that needs to handle more than 32 bits masking (which happens now). Some places, however, still assume that cpumask_t is a 32 bits mask. Fix that situation by using always correctly cpumask_t when needed.
While here, remove the part under STOP_NMI for the Xen support as it is broken in any case.
Additively make ipi_nmi_pending as static.
Reviewed by: jhb, kmacy Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
|
192050 |
13-May-2009 |
jhb |
Implement simple machine check support for amd64 and i386. - For CPUs that only support MCE (the machine check exception) but not MCA (i.e. Pentium), all this does is print out the value of the machine check registers and then panic when a machine check exception occurs. - For CPUs that support MCA (the machine check architecture), the support is a bit more involved. - First, there is limited support for decoding the CPU-independent MCA error codes in the kernel, and the kernel uses this to output a short description of any machine check events that occur. - When a machine check exception occurs, all of the MCx banks on the current CPU are scanned and any events are reported to the console before panic'ing. - To catch events for correctable errors, a periodic timer kicks off a task which scans the MCx banks on all CPUs. The frequency of these checks is controlled via the "hw.mca.interval" sysctl. - Userland can request an immediate scan of the MCx banks by writing a non-zero value to "hw.mca.force_scan". - If any correctable events are encountered, the appropriate details are stored in a 'struct mca_record' (defined in <machine/mca.h>). The "hw.mca.count" is a count of such records and each record may be queried via the "hw.mca.records" tree by specifying the record index (0 .. count - 1) as the next name in the MIB similar to using PIDs with the kern.proc.* sysctls. The idea is to export machine check events to userland for more detailed processing. - The periodic timer and hw.mca sysctls are only present if the CPU supports MCA.
Discussed with: emaste (briefly) MFC after: 1 month
|
191766 |
03-May-2009 |
mav |
Rename statclock_disable variable to atrtcclock_disable that it actually is, and hide it inside of atrtc driver. Add new tunable hint.atrtc.0.clock controlling it. Setting it to 0 disables using RTC clock as stat-/ profclock sources.
Teach i386 and amd64 SMP platforms to emulate stat-/profclocks using i8254 hardclock, when LAPIC and RTC clocks are disabled.
This allows to reduce global interrupt rate of idle system down to about 100 interrupts per core, permitting C3 and deeper C-states provide maximum CPU power efficiency.
|
191745 |
02-May-2009 |
mav |
Add support for using i8254 and rtc timers as event sources for i386 SMP system. Redistribute hard-/stat-/profclock events to other CPUs using IPI.
|
191648 |
29-Apr-2009 |
jeff |
- Add support for cpuid leaf 0xb. This allows us to determine the topology of nehalem/corei7 based systems. - Remove the cpu_cores/cpu_logical detection from identcpu. - Describe the layout of the system in cpu_mp_announce().
Sponsored by: Nokia
|
191309 |
20-Apr-2009 |
rwatson |
Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizing a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1]
Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2]
Suggested by: bde [1], jhb [2] MFC after: 2 weeks
|
191278 |
19-Apr-2009 |
rwatson |
Add description and cautionary note regarding CACHE_LINE_SIZE.
MFC after: 2 weeks Suggested by: alc
|
191276 |
19-Apr-2009 |
rwatson |
For each architecture, define CACHE_LINE_SHIFT and a derived CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available.
Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems).
MFC after: 2 weeks Discussed on: arch@
|
191111 |
15-Apr-2009 |
jkim |
A simple rewrite of biossmap.c:
- 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
|
190919 |
11-Apr-2009 |
ed |
Simplify in/out functions (for i386 and AMD64).
Remove a hack to generate more efficient code for port numbers below 0x100, which has been obsolete for at least ten years, because GCC has an asm constraint to specify that.
Submitted by: Christoph Mallon <christoph mallon gmx de>
|
190854 |
08-Apr-2009 |
ed |
Also remove the unused __word_swap_int*() macros.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
190853 |
08-Apr-2009 |
ed |
Implement __bswap16() without using inline assembly.
Most compilers nowadays (including GCC) are smart enough to know what's going on and generate more efficient code anyway.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
190705 |
04-Apr-2009 |
alc |
Retire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization, but I see no benefit from it today.
VM_PROT_READ_IS_EXEC was only intended for use on processors that do not distinguish between read and execute permission. On an mmap(2) or mprotect(2), it automatically added execute permission if the caller specified permissions included read permission. The hope was that this would reduce the number of vm map entries needed to implement an address space because there would be fewer neighboring vm map entries that differed only in the presence or absence of VM_PROT_EXECUTE. (See vm/vm_mmap.c revision 1.56.)
Today, I don't see any real applications that benefit from VM_PROT_READ_IS_EXEC. In any case, vm map entries are now organized as a self-adjusting binary search tree instead of an ordered list. So, the need for coalescing vm map entries is not as great as it once was.
|
190627 |
01-Apr-2009 |
dfr |
Fix the Xen build for i386 PV mode.
|
190623 |
01-Apr-2009 |
kib |
Sync definitions for struct sigcontext for i386 and amd64 architectures to struct mcontext.
|
190616 |
01-Apr-2009 |
kib |
Add all segment registers for the amd64 CPU to struct reg and mcontext. To keep these structures ABI-compatible, half the size of r_trapno, r_err, mc_trapno, mc_flags.
Add fsbase and gsbase to mcontext on both amd64 and i386. Add flags to amd64 mcontext to indicate that it contains valid segments or bases.
In collaboration with: pho Discussed with: peter Reviewed by: jhb
|
190272 |
22-Mar-2009 |
alc |
Update stale comments. The alternate address space mapping was eliminated when PAE support was added to i386. The direct mapping exists on amd64.
|
189926 |
17-Mar-2009 |
kib |
Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointer to the full path of the image that is being executed. Increase AT_COUNT.
Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries.
Reviewed by: kan
|
189699 |
11-Mar-2009 |
dfr |
Merge in support for Xen HVM on amd64 architecture.
|
189423 |
05-Mar-2009 |
jhb |
A better fix for handling different FPU initial control words for different ABIs: - Store the FPU initial control word in the pcb for each thread. - When first using the FPU, load the initial control word after restoring the clean state if it is not the standard control word. - Provide a correct control word for Linux/i386 binaries under FreeBSD/amd64. - Adjust the control word returned for fpugetregs()/npxgetregs() when a thread hasn't used the FPU yet to reflect the real initial control word for the current ABI. - The Linux/i386 ABI for FreeBSD/i386 now properly sets the right control word instead of trashing whatever the current state of the FPU is.
Reviewed by: bde
|
189418 |
05-Mar-2009 |
jhb |
Some cleanups to the i386 FPU support: - Remove the control word parameter to npxinit(). It was always set to __INITIAL_NPXCW__. - Remove npx_cleanstate_ready as the cleanstate is always initalized when it is used. - Improve the handling of the case when the FPU isn't present. Now the npx0 device no longer succeeds in its probe so all of npx_attach() is skipped. Also, we allow this case with SMP (though that shouldn't actually occur as all i386 systems that support SMP have FPUs) now. SMP was only an issue back when we had an FPU emulator which was not per-CPU. - MFamd64: Clear some of the state in npx_cleanstate rather than leaving it as garbage. - MFamd64: When a user thread first uses the FPU, use npx_cleanstate for the initial FPU state.
Reviewed by: bde
|
187948 |
31-Jan-2009 |
obrien |
Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions for moving between a segment register and a 32-bit memory location.
Looked at by: jhb
|
187880 |
29-Jan-2009 |
jeff |
- Allocate apic vectors on a per-cpu basis. This allows us to allocate more irqs as we have more cpus. This is principally useful on systems with msi devices which may want many irqs per-cpu.
Discussed with: jhb Sponsored by: Nokia
|
186557 |
29-Dec-2008 |
kmacy |
merge 186535, 186537, and 186538 from releng_7_xen
Log: - merge in latest xenbus from dfr's xenhvm - fix race condition in xs_read_reply by converting tsleep to mtx_sleep
Log: unmask evtchn in bind_{virq, ipi}_to_irq
Log: - remove code for handling case of not being able to sleep - eliminate tsleep - make sleeps atomic
|
186212 |
17-Dec-2008 |
imp |
AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
Reviewed by: peter
|
186009 |
12-Dec-2008 |
jkim |
Add more CPUID bits from AMD CPUID Specification Rev. 2.28.
|
185933 |
11-Dec-2008 |
jhb |
Add constants for fields in the local APIC error status register and a routine to read it.
|
185720 |
06-Dec-2008 |
kib |
Restore memory clobber, to cause mb on the compiler level too. Use more sane formatting of the assembler.
Pointed out by: bde
|
185651 |
05-Dec-2008 |
kib |
Unconditionally use locked addition of zero to tip of the stack for memory barriers on i386. It works as a serialization instruction on all IA32 CPUs.
Alternative solution of using {s,l,}fence requires run-time checking of the presense of the corresponding SSE or SSE2 extensions, and possible boot-time patching of the kernel text.
Suggested by: many
|
185605 |
04-Dec-2008 |
kmacy |
Integrate 185578 from dfr Use newbus to managed devices
|
185363 |
27-Nov-2008 |
jkoshy |
- Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and model 0x1C (Atom).
In these CPUs, the actual numbers, kinds and widths of PMCs present need to queried at run time. Support for specific "architectural" events also needs to be queried at run time.
Model 0xE CPUs support programmable PMCs, subsequent CPUs additionally support "fixed-function" counters.
- Use event names that are close to vendor documentation, taking in account that: - events with identical semantics on two or more CPUs in this family can have differing names in vendor documentation, - identical vendor event names may map to differing events across CPUs, - each type of CPU supports a different subset of measurable events.
Fixed-function and programmable counters both use the same vendor names for events. The use of a class name prefix ("iaf-" or "iap-" respectively) permits these to be distinguished.
- In libpmc, refactor pmc_name_of_event() into a public interface and an internal helper function, for use by log handling code.
- Minor code tweaks: staticize a global, freshen a few comments.
Tested by: gnn
|
185341 |
26-Nov-2008 |
jkim |
Introduce cpu_vendor_id and replace a lot of strcmp(cpu_vendor, "...").
Reviewed by: jhb, peter (early amd64 version)
|
185162 |
22-Nov-2008 |
kmacy |
- bump __FreeBSD version to reflect added buf_ring, memory barriers, and ifnet functions
- add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
|
184802 |
09-Nov-2008 |
jkoshy |
- Separate PMC class dependent code from other kinds of machine dependencies. A 'struct pmc_classdep' structure describes operations on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep' structures depending on the CPU in question.
Inside PMC class dependent code, row indices are relative to the PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates global row indices before invoking class dependent operations.
- Augment the OP_GETCPUINFO request with the number of PMCs present in a PMC class.
- Move code common to Intel CPUs to file "hwpmc_intel.c".
- Move TSC handling to file "hwpmc_tsc.c".
|
184224 |
24-Oct-2008 |
kmacy |
Fix general issues with IPI support
|
184198 |
23-Oct-2008 |
kmacy |
Fix IPI support
|
184146 |
22-Oct-2008 |
jkim |
Set kern.timecounter.invariant_tsc to 1 for AMD CPU family 10h and higher even if BIOS does not advertise it.
|
184113 |
21-Oct-2008 |
kmacy |
don't globally define ipi_bitmap_handler on xen
|
184110 |
21-Oct-2008 |
kmacy |
Header cleanups and addition of IPI declarations for xen
|
184102 |
21-Oct-2008 |
jkim |
Turn off CPU frequency change notifiers when the TSC is P-state invariant or it is forced by setting 'kern.timecounter.invariant_tsc' tunable to non-zero.
|
184101 |
21-Oct-2008 |
jkim |
Detect Advanced Power Management Information for AMD CPUs.
|
184040 |
19-Oct-2008 |
kmacy |
- move gdt, ldt allocation to before KPT allocation - fix bugs where we would: - try to map the hypervisors address space - accidentally kick out an existing kernel mapping for some domain creation memory allocation sizes - accidentally skip a 2MB kernel mapping for some domain creation memory allocation sizes - don't rely on trapping in to xen to read rcr2, reference through vcpu - whitespace cleanups
|
184039 |
19-Oct-2008 |
kmacy |
GC unused values
|
183525 |
01-Oct-2008 |
jhb |
Bump MAXCPU to 32 now that 32 CPU x86 systems exist.
Tested by: rwatson, mdtansca Approved by: peter
|
183439 |
28-Sep-2008 |
marius |
Remove ipi_all() and ipi_self() as the former hasn't been used at all to date and the latter also is only used in ia64 and powerpc code which no longer serves a real purpose after bring-up and just can be removed as well. Note that architectures like sun4u also provide no means of implementing IPI'ing a CPU itself natively in the first place.
Suggested by: jhb Reviewed by: arch, grehan, jhb
|
183379 |
26-Sep-2008 |
kmacy |
move ipi_pcpu to evtchn.c
|
183344 |
25-Sep-2008 |
kmacy |
add ipi mapping
MFC after: 1 month
|
183343 |
25-Sep-2008 |
kmacy |
add NPGPTD_SHIFT for the nkpt calculation
MFC after: 1 month
|
183128 |
17-Sep-2008 |
jhb |
MFamd64: More CPUID feature flags: SSE4, X2APIC, POPCNT, DTES64, and 1GB large pages.
MFC after: 1 month
|
183033 |
15-Sep-2008 |
jkoshy |
Correct a callchain capture bug on the i386.
On the i386 architecture, the processor only saves the current value of `%esp' on stack if a privilege switch is necessary when entering the interrupt handler. Thus, `frame->tf_esp' is only valid for an entry from user mode. For interrupts taken in kernel mode, we need to determine the top-of-stack for the interrupted kernel procedure by adding the appropriate offset to the current frame pointer.
Reported by: kris, Fabien Thomas Tested by: Fabien Thomas <fabien.thomas at netasq dot com>
|
182961 |
12-Sep-2008 |
kib |
When doing rfork(0), i.e. separating curproc VM from any other user of the same vmspace, decrement the reference count of the shared LDT instead of a newly-made copy. Code factually removed LDT from the process that did rfork(0).
Introduce user_ldt_deref() function that does decrement of refcount for the struct proc_ldt, and call it in the rfork(0) case on the shared LDT.
Reviewed by: jhb MFC after: 1 week
|
182902 |
10-Sep-2008 |
kmacy |
Get initial bootstrap of APs working under xen. Note that the APs still blow up in sched_throw().
MFC after: 1 month
|
182790 |
05-Sep-2008 |
jkoshy |
Correct a copy-paste error---do not look for REX prefixes in i386 code.
|
181987 |
22-Aug-2008 |
jhb |
Extend the support for PCI-e memory mapped configuration space access: - Rename pciereg_cfgopen() to pcie_cfgregopen() and expose it to the rest of the kernel. It now also accepts parameters via function arguments rather than global variables. - Add a notion of minimum and maximum bus numbers and reject requests for an out of range bus. - Add more range checks on slot/func/reg/bytes parameters to the cfg reg read/write routines. Don't panic on any invalid parameters, just fail the request (writes do nothing, reads return -1). This matches the behavior of the other cfg mechanisms. - Port the memory mapped configuration space access to amd64. On amd64 we simply use the direct map (via pmap_mapdev()) for the memory mapped window. - During acpi_attach() just after loading the ACPI tables, check for a MCFG table. If it exists, call pciereg_cfgopen() on each subtable (memory mapped window). For now we only support windows for domain 0 that start with bus 0. This removes the need for more chipset-specific quirks in the MD code. - Remove the chipset-specific quirks for the Intel 5000P/V/Z chipsets since these machines should all have MCFG tables via ACPI. - Updated pci_cfgregopen() to DTRT if ACPI had invoked pcie_cfgregopen() earlier.
MFC after: 2 weeks
|
181911 |
20-Aug-2008 |
kmacy |
- clean up interrupt handling for xen a tiny bit - parse the command line in to kenv - defer shutdown watcher until later in boot
MFC after: 1 month
|
181875 |
19-Aug-2008 |
jhb |
Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data.
MFC after: 1 week
|
181864 |
19-Aug-2008 |
kmacy |
remove redundant PT_SET_MA declaration
MFC after: 1 month
|
181854 |
18-Aug-2008 |
kmacy |
PT_UPDATES_FLUSH() is used in common code so it needs to be defined even in the !defined(XEN) case
MFC after: 1 month
|
181810 |
17-Aug-2008 |
kmacy |
Ensure that machine / physical addresses are treated as vm_paddr_t
MFC after: 1 month
|
181775 |
15-Aug-2008 |
kmacy |
Integrate support for xen in to i386 common code.
MFC after: 1 month
|
181747 |
15-Aug-2008 |
kmacy |
Compile fixes for xen build.
MFC after: 1 month.
|
181638 |
12-Aug-2008 |
kmacy |
Import xen sub-arch includes.
MFC after: 2 weeks
|
181430 |
08-Aug-2008 |
stas |
- Add cpuctl(4) pseudo-device driver to provide access to some low-level features of CPUs like reading/writing machine-specific registers, retrieving cpuid data, and updating microcode. - Add cpucontrol(8) utility, that provides userland access to the features of cpuctl(4). - Add subsequent manpages.
The cpuctl(4) device operates as follows. The pseudo-device node cpuctlX is created for each cpu present in the systems. The pseudo-device minor number corresponds to the cpu number in the system. The cpuctl(4) pseudo- device allows a number of ioctl to be preformed, namely RDMSR/WRMSR/CPUID and UPDATE. The first pair alows the caller to read/write machine-specific registers from the correspondent CPU. cpuid data could be retrieved using the CPUID call, and microcode updates are applied via UPDATE.
The permissions are inforced based on the pseudo-device file permissions. RDMSR/CPUID will be allowed when the caller has read access to the device node, while WRMSR/UPDATE will be granted only when the node is opened for writing. There're also a number of priv(9) checks.
The cpucontrol(8) utility is intened to provide userland access to the cpuctl(4) device features. The utility also allows one to apply cpu microcode updates.
Currently only Intel and AMD cpus are supported and were tested.
Approved by: kib Reviewed by: rpaulo, cokane, Peter Jeremy MFC after: 1 month
|
181284 |
04-Aug-2008 |
alc |
Make pmap_kenter_attr() static.
|
180756 |
23-Jul-2008 |
luoqi |
Unbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer when stack realignment is turned on (it is ALWAYS on for main), however in a profiling build %ecx would be clobbered by mcount(), this would lead to a segmentation fault when the code tries to reference any argument. This fix changes mcount() to preserve %ecx.
PR: bin/119709 Reviewed by: bde MFC after: 1 week
|
179991 |
25-Jun-2008 |
ed |
Remove the unused M_MEMDEV from the kernel.
The M_MEMDEV memory allocation pool does not seem to be used. We can live without it.
Approved by: philip (mentor)
|
179990 |
25-Jun-2008 |
ed |
Remove the unused major/minor numbers from iodev and memdev.
Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem.
Approved by: philip (mentor)
|
179785 |
14-Jun-2008 |
wkoszek |
Remove obselete PECOFF image activator support.
PRs assigned at the time of removal: kern/80742
Discussed on: freebsd-current (silence), IRC Tested by: make universe Approved by: cognet (mentor)
|
178471 |
25-Apr-2008 |
jeff |
- Add an integer argument to idle to indicate how likely we are to wake from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted.
Sponsored by: Nokia
|
178429 |
22-Apr-2008 |
phk |
Now that all platforms use genclock, shuffle things around slightly for better structure.
Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait.
In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only.
Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h>
<sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof.
Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references.
Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere.
Remove a lot of unnecessary <sys/clock.h> includes.
Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
|
178299 |
18-Apr-2008 |
jeff |
- Add inlines for the monitor and mwait instructions.
Sponsored by: Nokia
|
178193 |
14-Apr-2008 |
phk |
Convert amd64 and i386 to share the atrtc device driver.
|
177661 |
27-Mar-2008 |
jb |
When building a kernel module, define MAXCPU the same as SMP so that modules work with and without SMP.
|
177659 |
27-Mar-2008 |
alc |
MFamd64 with few changes:
1. Add support for automatic promotion of 4KB page mappings to 2MB page mappings. Automatic promotion can be enabled by setting the tunable "vm.pmap.pg_ps_enabled" to a non-zero value. By default, automatic promotion is disabled. Tested by: kris
2. To date, we have assumed that the TLB will only set the PG_M bit in a PTE if that PTE has the PG_RW bit set. However, this assumption does not hold on recent processors from Intel. For example, consider a PTE that has the PG_RW bit set but the PG_M bit clear. Suppose this PTE is cached in the TLB and later the PG_RW bit is cleared in the PTE, but the corresponding TLB entry is not (yet) invalidated. Historically, upon a write access using this (stale) TLB entry, the TLB would observe that the PG_RW bit had been cleared and initiate a page fault, aborting the setting of the PG_M bit in the PTE. Now, however, P4- and Core2-family processors will set the PG_M bit before observing that the PG_RW bit is clear and initiating a page fault. In other words, the write does not occur but the PG_M bit is still set.
The real impact of this difference is not that great. Specifically, we should no longer assert that any PTE with the PG_M bit set must also have the PG_RW bit set, and we should ignore the state of the PG_M bit unless the PG_RW bit is set.
|
177642 |
26-Mar-2008 |
phk |
The "free-lance" timer in the i8254 is only used for the speaker these days, so de-generalize the acquire_timer/release_timer api to just deal with speakers.
The new (optional) MD functions are: timer_spkr_acquire() timer_spkr_release() and timer_spkr_setfreq()
the last of which configures the timer to generate a tone of a given frequency, in Hz instead of 1/1193182th of seconds.
Drop entirely timer2 on pc98, it is not used anywhere at all.
Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if they exist, and do nothing otherwise.
Remove prototypes and empty acquire-/release-timer() and sysbeep() functions from the non-beeping archs.
This eliminate the need for the speaker driver to know about i8254frequency at all. In theory this makes the speaker driver MI, contingent on the timer_spkr_*() functions existing but the driver does not know this yet and still attaches to the ISA bus.
Syscons is more tricky, in one function, sc_tone(), it knows the hz and things are just fine.
In the other function, sc_bell() it seems to get the period from the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode the 1193182 and leave it at that. It's probably not important.
Change a few other sysbeep() uses which obviously knew that the argument was in terms of i8254 frequency, and leave alone those that look like people thought sysbeep() took frequency in hertz.
This eliminates the knowledge of i8254_freq from all but the actual clock.c code and the prof_machdep.c on amd64 and i386, where I think it would be smart to ask for help from the timecounters anyway [TBD].
|
177631 |
26-Mar-2008 |
phk |
Rename timer0_max_count to i8254_max_count. Rename timer0_real_max_count to i8254_real_max_count and make it static. Rename timer_freq to i8254_freq and make it a loader tunable.
|
177628 |
26-Mar-2008 |
phk |
The RTC related pscnt and psdiv variables have no business being public.
|
177624 |
26-Mar-2008 |
alc |
Enable the automatic creation of superpage reservations.
|
177276 |
16-Mar-2008 |
pjd |
Implement atomic_fetchadd_long() for all architectures and document it.
Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)
|
177181 |
14-Mar-2008 |
jhb |
Add preliminary support for binding interrupts to CPUs: - Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing:
intr_bind(rman_get_start(irq_res), cpu);
however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally.
Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER}
|
177157 |
13-Mar-2008 |
jhb |
Rework how the nexus(4) device works on x86 to better handle the idea of different "platforms" on x86 machines. The existing code already handles having two platforms: ACPI and legacy. However, the existing approach was rather hardcoded and difficult to extend. These changes take the approach that each x86 hardware platform should provide its own nexus(4) driver (it can inherit most of its behavior from the default legacy nexus(4) driver) which is responsible for probing for the platform and performing appropriate platform-specific setup during attach (such as adding a platform-specific bus device). This does mean changing the x86 platform busses to no longer use an identify routine for probing, but to move that logic into their matching nexus(4) driver instead. - Make the default nexus(4) driver in nexus.c on i386 and amd64 handle the legacy platform. It's probe routine now returns BUS_PROBE_GENERIC so it can be overriden. - Expose a nexus_init_resources() routine which initializes the various resource managers so that subclassed nexus(4) drivers can invoke it from their attach routine. - The legacy nexus(4) driver explicitly adds a legacy0 device in its attach routine. - The ACPI driver no longer contains an new-bus identify method. Instead it exposes a public function (acpi_identify()) which is a probe routine that the MD nexus(4) drivers can use to probe for ACPI. All of the probe logic in acpi_probe() is now moved into acpi_identify() and acpi_probe() is just a stub. - On i386 and amd64, an ACPI-specific nexus(4) driver checks for ACPI via acpi_identify() and claims the nexus0 device if the probe succeeds. It then explicitly adds an acpi0 device in its attach routine. - The legacy(4) driver no longer knows anything about the acpi0 device. - On ia64 if acpi_identify() fails you basically end up with no devices. This matches the previous behavior where the old acpi_identify() would fail to add an acpi0 device again leaving you with no devices.
Discussed with: imp Silence on: arch@
|
177125 |
12-Mar-2008 |
jhb |
The variable MTRR registers actually have variable-sized PhysBase and PhysMask fields based on the number of physical address bits supported by the current CPU. The old code assumed 36 bits on i386 and 40 bits on amd64. In truth, all Intel CPUs up until recently used 36 bits (a newer Intel CPU uses 38 bits) and all the Opteron CPUs used 40 bits.
In at least one case (the new Intel CPU) having the size of the mask field wrong resulted in writing questionable values into the MTRR registers on the application processors (BSP as well if you modify the MTRRs via memcontrol or running X, etc.). The result of the questionable physmask was that all of memory was apparently treated as uncached rather than write-back resulting in a very significant performance hit.
Fix this by constructing a run-time mask for the PhysBase and PhysMask fields based on the number of physical address bits supported by the CPU. All 64-bit capable CPUs provide a count of PA bits supported via the 0x80000008 extended CPUID feature, so use that if it is available. If that feature is not available, then assume 36 PA bits.
While I'm here, expand the (now-unused) macros for the PhysBase and PhysMask fields to the current largest possible value (52 PA bits).
MFC after: 1 week PR: i386/120516 Reported by: Nokia
|
177069 |
11-Mar-2008 |
jhb |
Add constants for the various fields in MTRR registers.
MFC after: 1 week Verified by: md5(1)
|
176827 |
05-Mar-2008 |
bde |
Change float_t and double_t to long double on i386. All floating point expressions on i386 are evaluated in the range of the long double type, so this is wrong in a different but hopefully less worse way than before. Since expressions are evaluated in long double registers, there is no runtime cost to using long double instead of double to declare intermediate values (except in cases where this avoids compiler bugs), and by careful use of float_t or double_t it is possible to avoid some of the compiler bugs in this area, provided these types are declared as long double.
I was going to change float.h to be less broken and more usable in combination with the change here (in particular, it is more necessary to know the effective number of bits in a double_t when double_t != double, since DBL_MANT_DIG no longer logically gives this, and LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default rounding precision. However, this was too hard for now. In particular, LDBL_MANT_DIG is used a lot in libm, so it cannot be changed. One thing that is completely broken now is LDBL_MAX. This may have sort of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at runtime gave +Inf, but you could at least compare with it), but starting with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at compile time in the default rounding precision.
|
176826 |
05-Mar-2008 |
bde |
Oops, back out previous commit since it was to the wrong file.
|
176825 |
05-Mar-2008 |
bde |
Change float_t and double_t to long double on i386. All floating point expressions on i386 are evaluated in the range of the long double type, so this is wrong in a different but hopefully less worse way than before. Since expressions are evaluated in long double registers, there is no runtime cost to using long double instead of double to declare intermediate values (except in cases where this avoids compiler bugs), and by careful use of float_t or double_t it is possible to avoid some of the compiler bugs in this area, provided these types are declared as long double.
I was going to change float.h to be less broken and more usable in combination with the change here (in particular, it is more necessary to know the effective number of bits in a double_t when double_t != double, since DBL_MANT_DIG no longer logically gives this, and LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default rounding precision. However, this was too hard for now. In particular, LDBL_MANT_DIG is used a lot in libm, so it cannot be changed. One thing that is completely broken now is LDBL_MAX. This may have sort of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at runtime gave +Inf, but you could at least compare with it), but starting with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at compile time in the default rounding precision.
|
176734 |
02-Mar-2008 |
jeff |
- Remove the old smp cpu topology specification with a new, more flexible tree structure that encodes the level of cache sharing and other properties. - Provide several convenience functions for creating one and two level cpu trees as well as a default flat topology. The system now always has some topology. - On i386 and amd64 create a seperate level in the hierarchy for HTT and multi-core cpus. This will allow the scheduler to intelligently load balance non-uniform cores. Presently we don't detect what level of the cache hierarchy is shared at each level in the topology. - Add a mechanism for testing common topologies that have more information than the MD code is able to provide via the kern.smp.topology tunable. This should be considered a debugging tool only and not a stable api.
Sponsored by: Nokia
|
175846 |
31-Jan-2008 |
mav |
Move GET_STACK_USAGE from MI header to i386/amd64 MD ones. Somebody who can, please feel free to implement it for other archs or copy this one if it suits.
|
175329 |
14-Jan-2008 |
peter |
Update the KVA_PAGES comments for the effect that PAE has on it. It becomes a unit size of 2MB instead of 4MB and must be a multiple of 8 to get a valid KERNBASE.
|
175234 |
11-Jan-2008 |
bde |
MFamd64 (everything possible up to 1.19; mainly the amd64 implementations of fpget*() and fpset*()).
The i386 fpget*() were efficient but a bit obfuscated (using macros and a case statement to demultiplex them through a single inline). The demultiplexing mainly gave smaller source code.
The i386 fpset*() were obfuscated in the same way and were very inefficient due to the case statement not having enough cases or complexity so all cases used the FP environment.
This also fixes a harmless bug in rev.1.12. fpsetmask() extracted the old value from the bit-field twice, but the doubled shift was harmless since the shift count is 0.
All fp*() interfaces are now inline functions on i386. They used to be macros that call (a different set of) inline functions. This is a small ABI change which shouldn't cause problems since cases where inlining fails (mainly -O0) only give (working) static functions.
|
175233 |
11-Jan-2008 |
bde |
Separate fpresetsticky() from the other fpset functions so that the others can be replaced cleanly by the amd64 versions. There is no current amd64 version to merge, but there is an old one which is similar.
Fix the following bugs in fpresetsticky(): - garbage args clobbered non-sticky bits in the status register - the return value was usually garbage since it was masked with the arg instead of with the field selector.
Optimize fpresetsticky() to avoid using the environment as in feclearexcept() (use only fnclex() if possible) and also to avoid using fnclex() for null changes. The second of these optimizations might not be so good since its branch might cost more than it saves.
|
175232 |
11-Jan-2008 |
bde |
MFamd64 1.15-1.18 (cosmetic changes, mainly to comments). The inline functions haven't been cleaned up here because the amd64 cleanups don't apply directly and the functions here will be merged or rewritten later.
|
175119 |
06-Jan-2008 |
alc |
Shrink the size of struct vm_page on amd64 and i386 by eliminating pv_list_count from struct md_page. Ever since Peter rewrote the pv entry allocator for amd64 and i386 pv_list_count has been correctly maintained but otherwise unused.
|
174938 |
27-Dec-2007 |
alc |
Add configuration knobs for the superpage reservation system. Initially, the reservation will only be enabled on amd64.
|
174395 |
07-Dec-2007 |
jkoshy |
Kernel and hwpmc(4) support for callchain capture.
Sponsored by: FreeBSD Foundation and Google Inc.
|
174195 |
02-Dec-2007 |
rwatson |
Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9). - Introduce per-architecture machine/stack.h to capture any common definitions required between db_trace.c and stack_machdep.c. - Add new kernel option "options STACK"; we will build in stack(9) if it is defined, or also if "options DDB" is defined to provide compatibility with existing users of stack(9).
Add new stack_save_td(9) function, which allows the capture of a stacktrace of another thread rather than the current thread, which the existing stack_save(9) was limited to. It requires that the thread be neither swapped out nor running, which is the responsibility of the consumer to enforce.
Update stack(9) man page.
Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)
|
173592 |
13-Nov-2007 |
peter |
Drastically simplify the i386 pcpu backend by merging parts of the amd64 mechanism over. Instead of page table hackery that isn't actually needed, just use 'struct pcpu __pcpu[MAXCPU]' for backing like all the other platforms do. Get rid of 'struct privatespace' and a while mess of #ifdef SMP garbage that set it up. As a bonus, this returns the 4MB of KVA that we stole to implement it the old way. This also allows you to read the pcpu data for each cpu when reading a minidump.
Background information: Originally, pcpu stuff was implemented as having per-cpu page tables and magic to make different data structures appear at the same actual address. In order to share page tables, we switched to using the GDT and %fs/%gs to access it. But we still did the evil magic to set it up for the old way. The "idle stacks" are not used for the idle process anymore and are just used for a few functions during bootup, then ignored. (excercise for reader: free these afterwards).
|
173118 |
28-Oct-2007 |
jhb |
- Add constants for the different memory types in the SMAP table. - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it.
|
172998 |
26-Oct-2007 |
peter |
Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not refactored it to be a generic device. Instead of being part of the standard kernel, there is now a 'nvram' device for i386/amd64. It is in DEFAULTS like io and mem, and can be turned off with 'nodevice nvram'. This matches the previous behavior when it was first committed.
|
172921 |
24-Oct-2007 |
jhb |
Slightly cleanup the 'bootdev' concept on x86 by changing the various macros to treat the 'slice' field as a real part of the bootdev instead of as hack that spans two other fields (adaptor (sic) and controller) that are not used in any modern FreeBSD boot code.
MFC after: 1 week
|
172835 |
20-Oct-2007 |
bz |
Fold multiple asm statements into one so that the compiler at a certain optimization level (-march=pentium-mmx for example) does not insert intermediate ops which would trash the carry.
Change both sys/i386/i386/in_cksum.c[1] and sys/i386/include/in_cksum.h.
To my best understanding the same problem was addressed in rev. 1.16 of src/sys/i386/include/in_cksum.h for just a single function 3y ago.
Reviewed by: jhb Submitted by: Zhouyi ZHOU <zhouzhouyi FreeBSD.org> (intial version of [1]) MFC after: 5 days PR: 115678, 69257
|
172394 |
30-Sep-2007 |
marius |
Make the PCI code aware of PCI domains (aka PCI segments) so we can support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled.
Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
|
172317 |
25-Sep-2007 |
alc |
Change the management of cached pages (PQ_CACHE) in two fundamental ways:
(1) Cached pages are no longer kept in the object's resident page splay tree and memq. Instead, they are kept in a separate per-object splay tree of cached pages. However, access to this new per-object splay tree is synchronized by the _free_ page queues lock, not to be confused with the heavily contended page queues lock. Consequently, a cached page can be reclaimed by vm_page_alloc(9) without acquiring the object's lock or the page queues lock.
This solves a problem independently reported by tegge@ and Isilon. Specifically, they observed the page daemon consuming a great deal of CPU time because of pages bouncing back and forth between the cache queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE). The source of this problem turned out to be a deadlock avoidance strategy employed when selecting a cached page to reclaim in vm_page_select_cache(). However, the root cause was really that reclaiming a cached page required the acquisition of an object lock while the page queues lock was already held. Thus, this change addresses the problem at its root, by eliminating the need to acquire the object's lock.
Moreover, keeping cached pages in the object's primary splay tree and memq was, in effect, optimizing for the uncommon case. Cached pages are reclaimed far, far more often than they are reactivated. Instead, this change makes reclamation cheaper, especially in terms of synchronization overhead, and reactivation more expensive, because reactivated pages will have to be reentered into the object's primary splay tree and memq.
(2) Cached pages are now stored alongside free pages in the physical memory allocator's buddy queues, increasing the likelihood that large allocations of contiguous physical memory (i.e., superpages) will succeed.
Finally, as a result of this change long-standing restrictions on when and where a cached page can be reclaimed and returned by vm_page_alloc(9) are eliminated. Specifically, calls to vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and return a formerly cached page. Consequently, a call to malloc(9) specifying M_NOWAIT is less likely to fail.
Discussed with: many over the course of the summer, including jeff@, Justin Husted @ Isilon, peter@, tegge@ Tested by: an earlier version by kris@ Approved by: re (kensmith)
|
172256 |
20-Sep-2007 |
attilio |
Fix some entries in the locks static table of witness. In particular: - smp_tlb_mtx is no longer used, so it is axed. - smp rendezvous lock isn't really a leaf spin-mutex. Its bad placement in the table, however, has been the source of a false positive LOR reporting with the dt_lock. However, smp rendezvous lock would have had sched_lock there for older lock, so it wasn't still a leaf lock. - allpmaps is only used in ia32 architecture, so it is inserted in the appropriate stub.
Addictionally: - kse_zombie_lock is no longer present, so its definition is axed out. - zombie_lock doesn't need to have an exported symbol, so just let's it be declared as static.
Tested by: kris Approved by: jeff (mentor) Approved by: re
|
171914 |
22-Aug-2007 |
jkoshy |
Define an END() macro for use in i386 and amd64 assembly code, akin to the one available on the ia64, sparc64, and sun4v architectures.
Approved by: re (kensmith)
|
171854 |
15-Aug-2007 |
des |
Add a driver for the on-die digital thermal sensor found on Intel Core and newer CPUs (including Core 2 and Core / Core 2 based Xeons). The driver attaches to each cpu device and creates a sysctl node in that device's sysctl context (dev.cpu.N.temperature). When invoked, the handler binds to the appropriate CPU to ensure a correct reading.
Submitted by: Rui Paulo <rpaulo@fnop.net> Sponsored by: Google Summer of Code 2007 Tested by: des, marcus, Constantine A. Murenin, Ian FREISLICH Approved by: re (kensmith) MFC after: 3 weeks
|
171797 |
09-Aug-2007 |
njl |
Add "show sysregs" command to ddb. On i386, this gives gdt, idt, ldt, cr0-4, etc. Support should be added for other platforms that have a different set of registers for system use.
Loosely based on: OpenBSD Approved by: re
|
171382 |
11-Jul-2007 |
mjacob |
Remove the internal use of __packed and put it on the structures themselves.
Reviewed by: nate, peter, warner, robert Approved by: re (ken)
|
171273 |
06-Jul-2007 |
bz |
I4B header files were repo-copied from sys/i386/include/ to sys/i4b/include/ so they will be available to all architectures once I4B compiles on those.
Approved by: re (kensmith)
|
171241 |
05-Jul-2007 |
peter |
__packed has no effect on u_int8_t's except to cause a warning (and never has had any effect).
Approved by: re (rwatson)
|
170473 |
09-Jun-2007 |
marcel |
Add kdb_cpu_sync_icache(), intended to synchronize instruction caches with data caches after writing to memory. This typically is required to make breakpoints work on ia64 and powerpc. For those architectures the function is implemented.
|
170319 |
05-Jun-2007 |
alc |
Add the machine-specific definitions for configuring the new physical memory allocator.
Set the size of phys_avail[] and dump_avail[] using one of these definitions.
Approved by: re
|
170291 |
04-Jun-2007 |
attilio |
Rework the PCPU_* (MD) interface: - Rename PCPU_LAZY_INC into PCPU_INC - Add the PCPU_ADD interface which just does an add on the pcpu member given a specific value.
Note that for most architectures PCPU_INC and PCPU_ADD are not safe. This is a point that needs some discussions/work in the next days.
Reviewed by: alc, bde Approved by: jeff (mentor)
|
170150 |
31-May-2007 |
des |
Add CPUID2_PDCM
Requested by: jkim MFC after: 3 days
|
170033 |
27-May-2007 |
alc |
Eliminate an unused definition.
|
169802 |
20-May-2007 |
jeff |
- Move GDT/LDT locking into a seperate spinlock, removing the global scheduler lock from this responsibility.
Contributed by: Attilio Rao <attilio@FreeBSD.org> Tested by: jeff, kkenn
|
169730 |
19-May-2007 |
kan |
Include machine/pcb.hto turn extern struct pcb stoppcbs[]; construct into the valid C.
|
169395 |
08-May-2007 |
jhb |
Handle CPUs with APIC IDs higher than 32 (at least one IBM server uses an APIC ID of 38 for its second CPU): - Add a new MAX_APIC_ID constant for the highest valid APIC ID for modern systems. - Size the various arrays in the MADT, MP Table, and SMP code that are indexed by APIC IDs to allow for up to MAX_APIC_ID. - Explicitly go through and assign logical cpu ids to local APICs before starting any of the APs up rather than doing it while starting up the APs. This step is now where we honor MAXCPU.
MFC after: 1 week
|
169391 |
08-May-2007 |
jhb |
Minor fixes and tweaks to the x86 interrupt code: - Split the intr_table_lock into an sx lock used for most things, and a spin lock to protect intrcnt_index. Originally I had this as a spin lock so interrupt code could use it to lookup sources. However, we don't actually do that because it would add a lot of overhead to interrupts, and if we ever do support removing interrupt sources, we can use other means to safely do so w/o locking in the interrupt handling code. - Replace is_enabled (boolean) with is_handlers (a count of handlers) to determine if a source is enabled or not. This allows us to notice when a source is no longer in use. When that happens, we now invoke a new PIC method (pic_disable_intr()) to inform the PIC driver that the source is no longer in use. The I/O APIC driver frees the APIC IDT vector when this happens. The MSI driver no longer needs to have a hack to clear is_enabled during msi_alloc() and msix_alloc() as a result of this change as well. - Add an apic_disable_vector() to reset an IDT vector back to Xrsvd to complement apic_enable_vector() and use it in the I/O APIC and MSI code when freeing an IDT vector. - Add a new nexus hook: nexus_add_irq() to ask the nexus driver to add an IRQ to its irq_rman. The MSI code uses this when it creates new interrupt sources to let the nexus know about newly valid IRQs. Previously the msi_alloc() and msix_alloc() passed some extra stuff back to the nexus methods which then added the IRQs. This approach is a bit cleaner. - Change the MSI sx lock to a mutex. If we need to create new sources, drop the lock, create the required number of sources, then get the lock and try the allocation again.
|
169291 |
05-May-2007 |
alc |
Define every architecture as either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE depending on whether the physical address space is densely or sparsely populated with memory. The effect of this definition is to determine which of two implementations of vm_page_array and PHYS_TO_VM_PAGE() is used. The legacy implementation is obtained by defining VM_PHYSSEG_DENSE, and a new implementation that trades off time for space is obtained by defining VM_PHYSSEG_SPARSE. For now, all architectures except for ia64 and sparc64 define VM_PHYSSEG_DENSE. Defining VM_PHYSSEG_SPARSE on ia64 allows the entirety of my Itanium 2's memory to be used. Previously, only the first 1 GB could be used. Defining VM_PHYSSEG_SPARSE on sparc64 allows USIIIi-based systems to boot without crashing.
This change is a combination of Nathan Whitehorn's patch and my own work in perforce.
Discussed with: kmacy, marius, Nathan Whitehorn PR: 112194
|
169221 |
02-May-2007 |
jhb |
Revamp the MSI/MSI-X code a bit to achieve two main goals: - Simplify the amount of work that has be done for each architecture by pushing more of the truly MI code down into the PCI bus driver. - Don't bind MSI-X indicies to IRQs so that we can allow a driver to map multiple MSI-X messages into a single IRQ when handling a message shortage.
The changes include: - Add a new pcib_if method: PCIB_MAP_MSI() which is called by the PCI bus to calculate the address and data values for a given MSI/MSI-X IRQ. The x86 nexus drivers map this into a call to a new 'msi_map()' function in msi.c that does the mapping. - Retire the pcib_if method PCIB_REMAP_MSIX() and remove the 'index' parameter from PCIB_ALLOC_MSIX(). MD code no longer has any knowledge of the MSI-X index for a given MSI-X IRQ. - The PCI bus driver now stores more MSI-X state in a child's ivars. Specifically, it now stores an array of IRQs (called "message vectors" in the code) that have associated address and data values, and a small virtual version of the MSI-X table that specifies the message vector that a given MSI-X table entry uses. Sparse mappings are permitted in the virtual table. - The PCI bus driver now configures the MSI and MSI-X address/data registers directly via custom bus_setup_intr() and bus_teardown_intr() methods. pci_setup_intr() invokes PCIB_MAP_MSI() to determine the address and data values for a given message as needed. The MD code no longer has to call back down into the PCI bus code to set these values from the nexus' bus_setup_intr() handler. - The PCI bus code provides a callout (pci_remap_msi_irq()) that the MD code can call to force the PCI bus to re-invoke PCIB_MAP_MSI() to get new values of the address and data fields for a given IRQ. The x86 MSI code uses this when an MSI IRQ is moved to a different CPU, requiring a new value of the 'address' field. - The x86 MSI psuedo-driver loses a lot of code, and in fact the separate MSI/MSI-X pseudo-PICs are collapsed down into a single MSI PIC driver since the only remaining diff between the two is a substring in a bootverbose printf. - The PCI bus driver will now restore MSI-X state (including programming entries in the MSI-X table) on device resume. - The interface for pci_remap_msix() has changed. Instead of accepting indices for the allocated vectors, it accepts a mini-virtual table (with a new length parameter). This table is an array of u_ints, where each value specifies which allocated message vector to use for the corresponding MSI-X message. A vector of 0 forces a message to not have an associated IRQ. The device may choose to only use some of the IRQs assigned, in which case the unused IRQs must be at the "end" and will be released back to the system. This allows a driver to use the same remap table for different shortage values. For example, if a driver wants 4 messages, it can use the same remap table (which only uses the first two messages) for the cases when it only gets 2 or 3 messages and in the latter case the PCI bus will release the 3rd IRQ back to the system.
MFC after: 1 month
|
168920 |
21-Apr-2007 |
sepotvin |
Add support for specifying a minimal size for vm.kmem_size in the loader via vm.kmem_size_min. Useful when using ZFS to make sure that vm.kmem size will be at least 256mb (for example) without forcing a particular value via vm.kmem_size.
Approved by: njl (mentor) Reviewed by: alc
|
168668 |
12-Apr-2007 |
alc |
MFamd64 Define PGEX_RSV.
|
168439 |
06-Apr-2007 |
ru |
Add the PG_NX support for i386/PAE.
Reviewed by: alc
|
167814 |
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
167747 |
20-Mar-2007 |
jhb |
Add a new apic0 psuedo-device to claim memory resources for the memory address ranges used by local and I/O APICs in the system. Some systems also reserve these ranges as system resources via either PnPBIOS or ACPI, so this device currently attaches after acpi0 and legacy0 so that the system resources are given precedence.
|
167744 |
20-Mar-2007 |
jkim |
- Add macros for newly added CPUID bits in the corresponding header files. - Use correct capticalization in xTPR as Intel uses in their documents. - Use proper description instead of vendor code name in comment.
|
167668 |
17-Mar-2007 |
alc |
Eliminate an unused parameter.
|
167493 |
12-Mar-2007 |
jkim |
Add another CPUID for AMD CPUs and fix style(9) while I am here.
|
167429 |
11-Mar-2007 |
alc |
Push down the implementation of PCPU_LAZY_INC() into the machine-dependent header file. Reimplement PCPU_LAZY_INC() on amd64 and i386 making it atomic with respect to interrupts.
Reviewed by: bde, jhb
|
167273 |
06-Mar-2007 |
jhb |
Change the x86 interrupt code to use FreeBSD CPU IDs (i.e. PCPU_GET(cpuid)) rather than local APIC IDs to keep track of CPUs which can handle interrupts.
|
167247 |
05-Mar-2007 |
jhb |
Use vm_paddr_t rather than uintptr_t when passing the physical address of APICs to lapic_init() and ioapic_create().
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
166540 |
06-Feb-2007 |
bde |
Fixed some style bugs. Routine except: - don't use __GNUCLIKE___OFFSETOF, since __offsetof() is a standard FreeBSD implementaion detail which has nothing to do with GNUC.
|
166536 |
06-Feb-2007 |
bde |
Simplified PCPU_GET() and PCPU_SET(). We must copy through a temporary variable to avoid invalid constraints in dead code. Use an array of u_char's (inside a struct) instead of a char/short/int/long variable so that the variable and its accesses can be spelled in the same way in all cases and code doesn't need to be cloned just to hold the spelling differences.
Fixed strict-aliasing errors in PCPU_SET() and in the amd64 PCPU_GET(). Cast to (void *) as in rev.1.37 of the i386 version where the errors were fixed for the i386 PCPU_GET() only. It would be more correct to copy to and from the temp. variable using memcpy(), but then an ifdef tangle would be required to ensure using the builtin memcpy(). We depend on fairly aggressive optimization to put the temp. variable only in a register despite it being copied using *(type *)(void *)&anothertype and could depend on this when using memcpy() too. This seems to work right even for -O0, but the -O0 case has not been completely tested.
This change gives identical object code for all object files in LINT on amd64 (except for one file with a __TIME__ stamp). For LINT on i386 it gives unimportant differences in instruction order and padding in a few object files. This was only tested for -O.
This change (actually a previous version of it) gives the following reductions in the number of object files in LINT that fail to compile with -O2 but without the -fno-strict-aliasing kludge: - amd64: 29 (down from 211) - i386: 36 (down from 47)
gcc-3.4.6 actually allows the invalid constraints that result from not using the temp. variable, at least with -O[1-2], but gcc-3.3.3 crashes on them and I don't want to depend on compiler bugs.
|
166186 |
23-Jan-2007 |
bde |
Cleaned up declaration and initialization of clock_lock. It is only used by clock code, so don't export it to the world for machdep.c to initialize. There is a minor problem initializing it before it is used, since although clock initialization is split up so that parts of it can be done early, the first part was never done early enough to actually work. Split it up a bit more and do the first part as late as possible to document the necessary order. The functions that implement the split are still bogusly exported.
Cleaned up initialization of the i8254 clock hardware using the new split. Actually initialize it early enough, and don't work around it not being initialized in DELAY() when DELAY() is called early for initialization of some console drivers.
This unfortunately moves a little more code before the early debugger breakpoint so that it is harder to debug. The ordering of console and related initialization is delicate because we want to do as little as possible before the breakpoint, but must initialize a console.
|
166176 |
22-Jan-2007 |
jhb |
Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support. - First off, device drivers really do need to know if they are allocating MSI or MSI-X messages. MSI requires allocating powerof2() messages for example where MSI-X does not. To address this, split out the MSI-X support from pci_msi_count() and pci_alloc_msi() into new driver-visible functions pci_msix_count() and pci_alloc_msix(). As a result, pci_msi_count() now just returns a count of the max supported MSI messages for the device, and pci_alloc_msi() only tries to allocate MSI messages. To get a count of the max supported MSI-X messages, use pci_msix_count(). To allocate MSI-X messages, use pci_alloc_msix(). pci_release_msi() still handles both MSI and MSI-X messages, however. As a result of this change, drivers using the existing API will only use MSI messages and will no longer try to use MSI-X messages. - Because MSI-X allows for each message to have its own data and address values (and thus does not require all of the messages to have their MD vectors allocated as a group), some devices allow for "sparse" use of MSI-X message slots. For example, if a device supports 8 messages but the OS is only able to allocate 2 messages, the device may make the best use of 2 IRQs if it enables the messages at slots 1 and 4 rather than default of using the first N slots (or indicies) at 1 and 2. To support this, add a new pci_remap_msix() function that a driver may call after a successful pci_alloc_msix() (but before allocating any of the SYS_RES_IRQ resources) to allow the allocated IRQ resources to be assigned to different message indices. For example, from the earlier example, after pci_alloc_msix() returned a value of 2, the driver would call pci_remap_msix() passing in array of integers { 1, 4 } as the new message indices to use. The rid's for the SYS_RES_IRQ resources will always match the message indices. Thus, after the call to pci_remap_msix() the driver would be able to access the first message in slot 1 at SYS_RES_IRQ rid 1, and the second message at slot 4 at SYS_RES_IRQ rid 4. Note that the message slots/indices are 1-based rather than 0-based so that they will always correspond to the rid values (SYS_RES_IRQ rid 0 is reserved for the legacy INTx interrupt). To support this API, a new PCIB_REMAP_MSIX() method was added to the pcib interface to change the message index for a single IRQ.
Tested by: scottl
|
165967 |
12-Jan-2007 |
imp |
Remove 3rd clause, renumber, ok per email
|
165918 |
09-Jan-2007 |
jkim |
Add SSSE3 extensions and correct CNXT-ID spelling for Intel processors.
|
165636 |
29-Dec-2006 |
bde |
Fix oops in previous commit.
|
165635 |
29-Dec-2006 |
bde |
Fixed some style bugs (mainly assorted errors in comments, and inconsistent spelling of `result').
|
165633 |
29-Dec-2006 |
bde |
Fixed some style bugs (whitespace only).
|
165630 |
29-Dec-2006 |
bde |
Try harder to garbage-collect the "LOCORE" (really asm) version of MPLOCKED. The cleaning in rev.1.25 was supposed to have been undone by rev.1.26, but 1.26 could never have actually affected asm files since atomic.h is full of C declarations so including it in asm files would just give syntax errors. The asm MPLOCKED is even less needed than when misplaced definitions of it were first removed, and is now unused in any asm file in the src tree except in anachronismns in sys/i386/i386/support.s.
|
165572 |
27-Dec-2006 |
bde |
Avoid an instruction in atomic_cmpset_{int_long)() in most cases. These functions are used a lot for mutexes, so this reduces the text size of an average kernel by about 0.75%. This wasn't intended to be a significant optimization, but it somehow increased the maximum number of packets per second that can be transmitted by my bge hardware from 320000 to 460000 (this benchmark is CPU-bound and remarkably sensitive to changes in the text section).
Details: we would prefer to leave the result of the cmpxchg in %al, but cannot tell gcc that it is there, so we have to convert it to an integer register. We converted to %al, then to %[re]ax, but the latter step is usually wasted since gcc usually only wants the condition code and can recover it from %al just as easily as from %[re]ax. Let gcc promote %al in the few cases where this is needed.
Nearby style fixes; - let gcc manage the load of `res', and don't abuse `res' for a copy of `exp' - don't echo `res's name in comments - consistently spell the condition code as 'e' after comparison for equality - don't hard-code %al anywhere except in constraints - for the version that doesn't use cmpxchg, there is no requirement to use %al anywhere, so don't hard-code it in the constraints either.
Style non-fix: - for the versions that use cmpxchg, keep using "a" (was %[re]ax, now %al) for the main output operand, although this is not required. The input and output operands that use the "a" constraint are now decoupled, and this makes things clearer except for the reason that the output register is hard-coded. It is now just a hack to tell gcc that the input "a" has been clobbered without increasing the number of operands.
|
165302 |
17-Dec-2006 |
kmacy |
Evidently FreeBSD has long relied on the compiler to treat structures passed by value (trap frames) as if they were in fact being passed by reference. For better or worse, this incorrect behaviour is no longer present in gcc 4.1. In this patch I convert all trapframe arguments to be explicitly pass by reference. I also remove vm86_initflags, pushing the very little work that it actually does up into vm86_prepcall.
Reviewed by: kan Tested by: kan
|
165127 |
12-Dec-2006 |
jhb |
Sort function prototypes.
|
164413 |
19-Nov-2006 |
alc |
The global variable avail_end is redundant and only used once. Eliminate it. Make avail_start static to the pmap on amd64. (It no longer exists on other architectures.)
|
164362 |
17-Nov-2006 |
jhb |
- Add macro constants for the various fields in %dr7 and use them in place of various scattered magic values. - Pretty print the address of hardware watchpoints in 'show watch' rather than just displaying hex. - Expand address field width on amd64 for 64-bit pointers.
|
164303 |
15-Nov-2006 |
jhb |
Various whitespace and style fixes.
|
164265 |
13-Nov-2006 |
jhb |
MD support for PCI Message Signalled Interrupts on amd64 and i386: - Add a new apic_alloc_vectors() method to the local APIC support code to allocate N contiguous IDT vectors (aligned on a M >= N boundary). This function is used to allocate IDT vectors for a group of MSI messages. - Add MSI and MSI-X PICs. The PIC code here provides methods to manage edge-triggered MSI messages as x86 interrupt sources. In addition to the PIC methods, msi.c also includes methods to allocate and release MSI and MSI-X messages. For x86, we allow for up to 128 different MSI IRQs starting at IRQ 256 (IRQs 0-15 are reserved for ISA IRQs, 16-254 for APIC PCI IRQs, and IRQ 255 is reserved). - Add pcib_(alloc|release)_msi[x]() methods to the MD x86 PCI bridge drivers to bubble the request up to the nexus driver. - Add pcib_(alloc|release)_msi[x]() methods to the x86 nexus drivers that ask the MSI PIC code to allocate resources and IDT vectors.
MFC after: 2 months
|
164262 |
13-Nov-2006 |
ru |
Fix NKPT comments to match reality. Note that the current value of NKPT is no longer enough to run amd64 with 16G of RAM, as it doesn't have space for mapping a kernel (16M kernel would require additionally 8 page tables).
|
164250 |
13-Nov-2006 |
ru |
Fix a comment.
|
163735 |
28-Oct-2006 |
bde |
i386/include/profile.h: Fixed a syntax error for the (!__KERNEL && !__GNUCLIKE_ASM) case in rev.1.36. Apparently, this case has never been reached even by lint.
Submitted by: stefanf
{amd64,i386}/include/profile.h: In case the above case is actually reached, break it properly by providing null support that will fail at link time instead of a stub that gives wrong (null) profiling at runtime.
|
163729 |
28-Oct-2006 |
bde |
In MCOUNT_OVERHEAD(label), actually use the `label' parameter. We were still using the global label named "profil", and this worked accidentally because all callers use the same name.
|
163726 |
28-Oct-2006 |
bde |
Removed all traces of HIDENAME() in amd64 and i386 kernel code. Using this used to be slightly cleaner than using ifdefs in a few places to support both a.out and elf, but using it now just causes messes and unportabilities. It seems to be impossible to implement the elf HIDENAME() portably in cpp (since token pasting of "." and <name> is invalid).
*/prof_machdep.c: - Removed all uses of CNAME(). CNAME() is easy enough to use in pure asm code, but using it in inline asm requires messy quoting. The core pure asm code has been hacked on more and all uses of CNAME() in it have already gone away. Just assume the elf convention here too. - Removed now-uneeded include of <machine/asmacros.h>. - Removed the workaround for a namespace conflict with this include.
|
163722 |
27-Oct-2006 |
bde |
Don't call mexitcount or provide a stub mexitcount to call when profiling is configured but high resolution profiling is not configured. Only functions in *.[Ss] called the stub, so efficiency was not significantly affected.
|
163219 |
10-Oct-2006 |
jhb |
Change the x86 interrupt code to suspend/resume interrupt controllers (PICs) rather than interrupt sources. This allows interrupt controllers with no interrupt pics (such as the 8259As when APIC is in use) to participate in suspend/resume. - Always register the 8259A PICs even if we don't use any of their pins. - Explicitly reset the 8259As on resume on amd64 if 'device atpic' isn't included. - Add a "dummy" PIC for the local APIC on the BSP to reset the local APIC on resume. This gets suspend/resume working with APIC on UP systems. SMP still needs more work to bring the APs back to life.
The MFC after is tentative.
Tested by: anholt (i386) Submitted by: Andrea Bittau <a.bittau at cs.ucl.ac.uk> (3) MFC after: 1 week
|
163212 |
10-Oct-2006 |
jhb |
Oops, fix sign bug in #ifdef for value of INTRCNT_COUNT.
PR: kern/99870 Submitted by: jkim MFC after: 3 days
|
163016 |
04-Oct-2006 |
jb |
PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one.
Add the additional ELF types defines in Sun's "Linker and Libraries" manual.
|
162954 |
02-Oct-2006 |
phk |
First part of a little cleanup in the calendar/timezone/RTC handling.
Move relevant variables to <sys/clock.h> and fix #includes as necessary.
Use libkern's much more time- & spamce-efficient BCD routines.
|
162487 |
21-Sep-2006 |
kan |
Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes the former and __builtin_va_start was present in all GCC version 3.1 and later.
|
161223 |
11-Aug-2006 |
jhb |
First pass at allowing memory to be mapped using cache modes other than WB (write-back) on x86 via control bits in PTEs and PDEs (including making use of the PAT MSR). Changes include: - A new pmap_mapdev_attr() function for amd64 and i386 which takes an additional parameter (relative to pmap_mapdev()) specifying the cache mode for this mapping. Note that on amd64 only WB mappings are done with the direct map, all other modes result in a private mapping. - pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached) mappings rather than WB. Previously we relied on the BIOS setting up MTRR's to enforce memio regions being treated as UC. This might make hw.cbb_start_memory unnecessary in some cases now for example. - A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places that used pmap_mapdev() to map non-device memory (such as ACPI tables) to do so using WB as before. - A new pmap_change_attr() function for amd64 and i386 that changes the caching mode for a range of KVA.
Reviewed by: alc
|
160329 |
13-Jul-2006 |
jkim |
Sync specialreg.h changes between amd64 and i386 with few fixes.
|
160309 |
12-Jul-2006 |
mr |
Initialise (if necessary) the VIA C3/C7 features. Store the capabilities for further use by random(4), padlock(4), ...
Obtained from: mostly OpenBSD MFC after: 1 week
|
160305 |
12-Jul-2006 |
mr |
fix typo in identcpu.c and add one define to specialreg.h.
MFC after: 1 week
|
160298 |
12-Jul-2006 |
mr |
First step to identify and initialize the newer VIA C7 CPU as found in a VIA EPIA EN-15000 board.
Obtained from: large parts from OpenBSD
|
160286 |
12-Jul-2006 |
jkim |
Add two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register.
|
160216 |
09-Jul-2006 |
twinterg |
Extend i4b to support CAPI manager based ISDN controllers (CAPI manager is part of c4b, CAPI for BSD). This is a preparation to add CAPI for BSD to the source tree.
Approved by: hm (mentor) MFC after: 2 weeks
|
159768 |
19-Jun-2006 |
davidxu |
Style fix, use low-case.
|
159763 |
19-Jun-2006 |
davidxu |
Clear bit 22 in MSR IA32_MISC_ENABLE, according to Intel document, when the bit 22 is set to 1, CPUID with EAX=0 returns a maximum value in EAX[7..0] of 3, when set to 0(default), CPUID with EAX=0 returns the number corresponding to the maximum standard function supported. On my machine, BIOS sets the bit to 1 to make it to be compatible with old OS, this causes dual-core Pentium-D (two physical cores) to be identified as hyperthreading (two logical cores) by function mp_topology().
|
159087 |
30-May-2006 |
davidxu |
Use the method described in IA-32 Intel Architecture Software Developer's Manual chapter 11.6.6 to get valid mxcsr bits, use the mxcsr mask to clear invalid bits passed by user code.
Reviewed by: bde
|
159027 |
29-May-2006 |
davidxu |
Backout changes trying to inherit floating-point environment, although POSIX (susv3) requires this, but it is unclear what should be inherited, duplicating whole 387 stack for new thread seems to be unnecessary and dangerous. Revert to previous code, force a new thread to be started with clean FP state.
|
158995 |
28-May-2006 |
davidxu |
When creating a new thread, inherit floating-point environment from current thread, this is required by POSIX pthread_create document.
|
158748 |
19-May-2006 |
sobomax |
Move clock_lock prototype into <machine/clock.h>, where it is more appropriate.
Discussed with: jhb
|
158687 |
17-May-2006 |
phk |
Send the pcvt(4) driver off to retirement.
|
158502 |
12-May-2006 |
peter |
Test commit after repoman upgrade. Remove one of my many email addresses from a copyright message.
|
158501 |
12-May-2006 |
peter |
Test commit after repoman upgrade. Remove one of my many email addresses from a coyright message.
|
158445 |
11-May-2006 |
phk |
Clean out sysctl machdep.* related defines.
The cmos clock related stuff should really be in MI code.
|
158238 |
01-May-2006 |
jhb |
Add various constants for the PAT MSR and the PAT PTE and PDE flags. Initialize the PAT MSR during boot to map PAT type 2 to Write-Combining (WC) instead of Uncached (UC-).
MFC after: 1 month
|
158236 |
01-May-2006 |
jhb |
Add a new 'pmap_invalidate_cache()' to flush the CPU caches via the wbinvd() instruction. This includes a new IPI so that all CPU caches on all CPUs are flushed for the SMP case.
MFC after: 1 month
|
158060 |
26-Apr-2006 |
peter |
MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries per page = effectively 12.19 bytes per pv entry after overheads). Instead of using a shared UMA zone for 24 byte pv entries (two 8-byte tailq nodes, a 4 byte pointer, and a 4 byte address), we allocate a page at a time per process. This provides 336 pv entries per process (actually, per pmap address space) and eliminates one of the 8-byte tailq entries since we now can track per-process pv entries implicitly. The pointer to the pmap can be eliminated by doing address arithmetic to find the metadata on the page headers to find a single pointer shared by all 336 entries. There is an 11-int bitmap for the freelist of those 336 entries.
This is mostly a mechanical conversion from amd64, except: * i386 has to allocate kvm and map the pages, amd64 has them outside of kvm * native word size is smaller, so bitmaps etc become 32 bit instead of 64 * no dump_add_page() etc stuff because they are in kvm always. * various pmap internals tweaks because pmap uses direct map on amd64 but on i386 it has to use sched_pin and temporary mappings.
Also, sysctl vm.pmap.pv_entry_max and vm.pmap.shpgperproc are now dynamic sysctls. Like on amd64, i386 can now tune the pv entry limits without a recompile or reboot.
This is important because of the following scenario. If you have a 1GB file (262144 pages) mmap()ed into 50 processes, that requires 13 million pv entries. At 24 bytes per pv entry, that is 314MB of ram and kvm, while at 12 bytes it is 157MB. A 157MB saving is significant.
Test-run by: scottl (Thanks!)
|
157909 |
21-Apr-2006 |
peter |
Merge minidumps from amd64 where they were originally developed.
Major differences: * since there is no direct map region, there is no custom uma memory allocator to modify to include its pages in the dumps. * Various data entries are reduced from 64 bit to 32 bit to match the native size.
dump_add_page() and dump_drop_page() are still present in case one wants to arrange for arbitary pages to be dumped. This is of marginal use though because libkvm+kgdb cannot address physical memory that isn't mapped into kvm.
|
157448 |
03-Apr-2006 |
marcel |
Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to the PCB in which the context of stopped CPUs is stored. To access this PCB from KDB, we introduce a new define, called KDB_STOPPEDPCB. The definition, when present, lives in <machine/kdb.h> and abstracts where MD code saves the context. Define KDB_STOPPEDPCB on i386, amd64, alpha and sparc64 in accordance to previous code.
|
157212 |
28-Mar-2006 |
des |
Use wrapper macros for atomic pointer operations in order to perform the correct casts. This should probably be merged to other architectures.
|
156243 |
03-Mar-2006 |
rink |
Committed the xbox syscons(8)-able console driver.
Reviewed by: arch@ (no comments) Approved by: imp (mentor)
|
156124 |
28-Feb-2006 |
jhb |
Rework how we wire up interrupt sources to CPUs: - Throw out all of the logical APIC ID stuff. The Intel docs are somewhat ambiguous, but it seems that the "flat" cluster model we are currently using is only supported on Pentium and P6 family CPUs. The other "hierarchy" cluster model that is supported on all Intel CPUs with local APICs is severely underdocumented. For example, it's not clear if the OS needs to glean the topology of the APIC hierarchy from somewhere (neither ACPI nor MP Table include it) and setup the logical clusters based on the physical hierarchy or not. Not only that, but on certain Intel chipsets, even though there were 4 CPUs in a logical cluster, all the interrupts were only sent to one CPU anyway. - We now bind interrupts to individual CPUs using physical addressing via the local APIC IDs. This code has also moved out of the ioapic PIC driver and into the common interrupt source code so that it can be shared with MSI interrupt sources since MSI is addressed to APICs the same way that I/O APIC pins are. - Interrupt source classes grow a new method pic_assign_cpu() to bind an interrupt source to a specific local APIC ID. - The SMP code now tells the interrupt code which CPUs are avaiable to handle interrupts in a simpler and more intuitive manner. For one thing, it means we could now choose to not route interrupts to HT cores if we wanted to (this code is currently in place in fact, but under an #if 0 for now). - For now we simply do static round-robin of IRQs to CPUs when the first interrupt handler just as before, with the change that IRQs are now bound to individual CPUs rather than groups of up to 4 CPUs. - Because the IRQ to CPU mapping has now been moved up a layer, it would be easier to manage this mapping from higher levels. For example, we could allow drivers to specify a CPU affinity map for their interrupts, or we could allow a userland tool to bind IRQs to specific CPUs.
The MFC is tentative, but I want to see if this fixes problems some folks had with UP APIC kernels on 6.0 on SMP machines (an SMP kernel would work fine, but a UP APIC kernel (such as GENERIC in RELENG_6) would lose interrupts).
MFC after: 1 week
|
155926 |
22-Feb-2006 |
sam |
guard function decls with _KERNEL so user code can include this file
MFC after: 1 week
|
155510 |
10-Feb-2006 |
rink |
Cleaned the memory initialization up, moved some defines from the framebuffer to an include file.
Reviewed by: imp Approved by: imp (mentor)
|
155049 |
30-Jan-2006 |
rik |
Prepare for sconfig(8) update. Change also my e-mail.
|
154128 |
09-Jan-2006 |
imp |
By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __.
Submitted by: bde, jhb, scottl, many others.
|
153955 |
01-Jan-2006 |
imp |
Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate for each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now.
|
153836 |
29-Dec-2005 |
davidxu |
Remove pcb_switchout, it has not been used for a long time.
|
153726 |
26-Dec-2005 |
davidxu |
Move global variable private_tss into per-cpu area.
Reviewed by: jhb
|
153666 |
22-Dec-2005 |
jhb |
Tweak how the MD code calls the fooclock() methods some. Instead of passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.
Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
|
153179 |
06-Dec-2005 |
jhb |
- Cleanup whitespace and extra ()s in vtophys() macros. - Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments.
Reviewed by: alc
|
153168 |
06-Dec-2005 |
ru |
Drop _MACHINE_ARCH and _MACHINE defines (not to be confused with MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
|
153146 |
05-Dec-2005 |
jhb |
Change the i386 code to pass the interrupt vector as a separate argument rather than embedding it in the intrframe as if_vec. This reduces diffs with amd64 somewhat. - Remove cf_vec from clockframe (it wasn't used anyway) and stop pushing dummy vector arguments for ipi_bitmap_handler() and lapic_handle_timer() since clockframe == trapframe now. - Fix ddb to handle stack traces across interrupt entry points that just have a trapframe on their stack and not a trapframe + vector. - Change intr_execute_handlers() to take a trapframe rather than an intrframe pointer. - Change lapic_handle_intr() and atpic_handle_intr() to take a vector and trapframe rather than an intrframe. - GC struct intrframe now that nothing uses it anymore. - GC CLOCK_TO_TRAPFRAME() and INTR_TO_TRAPFRAME().
Reviewed by: bde Requested by: peter
|
153141 |
05-Dec-2005 |
jhb |
- Move the code to deal with handling an IPI_STOP IPI out of ipi_nmi_handler() and into a new cpustop_handler() function. Change the Xcpustop IPI_STOP handler to call this function instead of duplicating all the same logic in assembly. - EOI the local APIC for the lapic timer interrupt in C rather than assembly. - Bump the lazypmap IPI counter if COUNT_IPIS is defined in C rather than assembly.
|
153135 |
05-Dec-2005 |
jhb |
- Move PUSH_FRAME and POP_FRAME into machine/asmacros.h. - Add a new SET_KERNEL_SREGS macro that sets up %ds and %es to point to kernel data and %fs to point to per-CPU data and use the new macro in several kernel entry points including trap and interrupt handlers. - Convert the IPI_STOP handler Xcpustop to push a standard trap frame rather than an application frame. - Make the TRAP() macro private to exception.s since it is only used there. - Move the PCPU_*() macros in asmacros.h out of the middle of the profiling macros.
Reviewed by: bde Requested by: bde (4, 5)
|
153110 |
05-Dec-2005 |
ru |
Fix -Wundef warnings found when compiling i386 LINT, GENERIC and custom kernels.
|
152702 |
22-Nov-2005 |
jhb |
Garbage collect machine/smptests.h now that it is empty and no longer used.
|
152701 |
22-Nov-2005 |
jhb |
Make COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and take them out of machine/smptests.h.
|
152700 |
22-Nov-2005 |
jhb |
Garbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros.
|
152699 |
22-Nov-2005 |
jhb |
Garbage collect the code to store diagnostics codes in a CMOS register during SMP startup. We haven't had any issues with starting up the APs on i386 in quite a while now which is all this code is really useful for. If someone ever does really need it they can always dig it up out of the attic.
|
152306 |
11-Nov-2005 |
ru |
Add /dev/speaker support to amd64.
The following repo-copies were made (by Mark Murray):
sys/i386/isa/spkr.c -> sys/dev/speaker/spkr.c sys/i386/include/speaker.h -> sys/dev/speaker/speaker.h share/man/man4/man4.i386/spkr.4 -> share/man/man4/spkr.4
|
152219 |
09-Nov-2005 |
imp |
Add support for XBOX to the FreeBSD port. The xbox architecture is nearly identical to wintel/ia32, with a couple of tweaks. Since it is so similar to ia32, it is optionally added to a i386 kernel. This port is preliminary, but seems to work well. Further improvements will improve the interaction with syscons(4), port Linux nforce driver and future versions of the xbox.
This supports the 64MB and 128MB boxes. You'll need the most recent CVS version of Cromwell (the Linux BIOS for the XBOX) to boot.
Rink will be maintaining this port, and is interested in feedback. He's setup a website http://xbox-bsd.nl to report the latest developments.
Any silly mistakes are my fault.
Submitted by: Rink P.W. Springer rink at stack dot nl and Ed Schouten ed at fxq dot nl
|
151979 |
02-Nov-2005 |
jhb |
Change the x86 code to allocate IDT vectors on-demand when an interrupt source is first enabled similar to how intr_event's now allocate ithreads on-demand. Previously, we would map IDT vectors 1:1 to IRQs. Since we only have 191 available IDT vectors for I/O interrupts, this limited us to only supporting IRQs 0-190 corresponding to the first 190 I/O APIC intpins. On many machines, however, each PCI-X bus has its own APIC even though it only has 1 or 2 devices, thus, we were reserving between 24 and 32 IRQs just for 1 or 2 devices and thus 24 or 32 IDT vectors. With this change, a machine with 100 IRQs but only 5 in use will only use up 5 IDT vectors. Also, this change provides an API (apic_alloc_vector() and apic_free_vector()) that will allow a future MSI interrupt source driver to request IDT vectors for use by MSI interrupts on x86 machines.
Tested on: amd64, i386
|
151658 |
25-Oct-2005 |
jhb |
Reorganize the interrupt handling code a bit to make a few things cleaner and increase flexibility to allow various different approaches to be tried in the future. - Split struct ithd up into two pieces. struct intr_event holds the list of interrupt handlers associated with interrupt sources. struct intr_thread contains the data relative to an interrupt thread. Currently we still provide a 1:1 relationship of events to threads with the exception that events only have an associated thread if there is at least one threaded interrupt handler attached to the event. This means that on x86 we no longer have 4 bazillion interrupt threads with no handlers. It also means that interrupt events with only INTR_FAST handlers no longer have an associated thread either. - Renamed struct intrhand to struct intr_handler to follow the struct intr_foo naming convention. This did require renaming the powerpc MD struct intr_handler to struct ppc_intr_handler. - INTR_FAST no longer implies INTR_EXCL on all architectures except for powerpc. This means that multiple INTR_FAST handlers can attach to the same interrupt and that INTR_FAST and non-INTR_FAST handlers can attach to the same interrupt. Sharing INTR_FAST handlers may not always be desirable, but having sio(4) and uhci(4) fight over an IRQ isn't fun either. Drivers can always still use INTR_EXCL to ask for an interrupt exclusively. The way this sharing works is that when an interrupt comes in, all the INTR_FAST handlers are executed first, and if any threaded handlers exist, the interrupt thread is scheduled afterwards. This type of layout also makes it possible to investigate using interrupt filters ala OS X where the filter determines whether or not its companion threaded handler should run. - Aside from the INTR_FAST changes above, the impact on MD interrupt code is mostly just 's/ithread/intr_event/'. - A new MI ddb command 'show intrs' walks the list of interrupt events dumping their state. It also has a '/v' verbose switch which dumps info about all of the handlers attached to each event. - We currently don't destroy an interrupt thread when the last threaded handler is removed because it would suck for things like ppbus(8)'s braindead behavior. The code is present, though, it is just under #if 0 for now. - Move the code to actually execute the threaded handlers for an interrrupt event into a separate function so that ithread_loop() becomes more readable. Previously this code was all in the middle of ithread_loop() and indented halfway across the screen. - Made struct intr_thread private to kern_intr.c and replaced td_ithd with a thread private flag TDP_ITHREAD. - In statclock, check curthread against idlethread directly rather than curthread's proc against idlethread's proc. (Not really related to intr changes)
Tested on: alpha, amd64, i386, sparc64 Tested on: arm, ia64 (older version of patch by cognet and marcel)
|
151634 |
24-Oct-2005 |
jhb |
Rename the KDB_STOP_NMI kernel option to STOP_NMI and make it apply to all IPI_STOP IPIs. - Change the i386 and amd64 MD IPI code to send an NMI if STOP_NMI is enabled if an attempt is made to send an IPI_STOP IPI. If the kernel option is enabled, there is also a sysctl to change the behavior at runtime (debug.stop_cpus_with_nmi which defaults to enabled). This includes removing stop_cpus_nmi() and making ipi_nmi_selected() a private function for i386 and amd64. - Fix ipi_all(), ipi_all_but_self(), and ipi_self() on i386 and amd64 to properly handle bitmapped IPIs as well as IPI_STOP IPIs when STOP_NMI is enabled. - Fix ipi_nmi_handler() to execute the restart function on the first CPU that is restarted making use of atomic_readandclear() rather than assuming that the BSP is always included in the set of restarted CPUs. Also, the NMI handler didn't clear the function pointer meaning that subsequent stop and restarts could execute the function again. - Define a new macro HAVE_STOPPEDPCBS on i386 and amd64 to control the use of stoppedpcbs[] and always enable it for i386 and amd64 instead of being dependent on KDB_STOP_NMI. It works fine in both the NMI and non-NMI cases.
|
151348 |
14-Oct-2005 |
jkim |
- Print number of physical/logical cores and more CPUID info. - Add newer CPUID definitions for future use.
Many thanks to Mike Tancsa <mike at sentex dot net> for providing test cases for Intel Pentium D and AMD Athlon 64 X2.
Approved by: anholt (mentor)
|
151306 |
14-Oct-2005 |
davidxu |
Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal support in kernel.
Earlier patch reviewed by: jhb, deischen
|
150697 |
28-Sep-2005 |
jhb |
Add interrupt counters for IPIs. By default they are disabled, but they can be enabled by enabling COUNT_IPIS in smptests.h. When enabled, each CPU provides an interrupt counter for nearly all of the IPIs it receives (IPI_STOP currently doesn't have a counter) that can be examined using vmstat -i, etc.
MFC after: 3 days Requested by: rwatson
|
150627 |
27-Sep-2005 |
jhb |
Add a new atomic_fetchadd() primitive that atomically adds a value to a variable and returns the previous value of the variable.
Tested on: i386, alpha, sparc64, arm (cognet) Reviewed by: arch@ Submitted by: cognet (arm) MFC after: 1 week
|
150264 |
17-Sep-2005 |
imp |
Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus implementation, like other routines in the legacy bus.
This should fix problems with resource allocation on MP systems without ACPI enabled.
|
150182 |
15-Sep-2005 |
jhb |
Stop using the '+' constraint modifier with inline assembly. The '+' constraint is actually only allowed for register operands. Instead, use separate input and output memory constraints.
Education from: alc Reviewed by: alc Tested on: i386, alpha MFC after: 1 week
|
150173 |
15-Sep-2005 |
jhb |
Explicitly switch to the new TSS by updating the current CPU's TSS selector and reloading it in i386_extend_pcb() rather than trying to force a context switch to reload the TSS via the TDF_NEEDRESCHED flag. Optimizations to avoid calling cpu_switch() when the new thread was identical to the old thread defeated the attempt to force a TSS reload. Explicitly loading the new TSS is what we really want to do anyway.
PR: i386/84842 Reported by: Alexander Best arundel at h3c dot de MFC after: 1 week Reviewed by: bde (mostly)
|
150013 |
12-Sep-2005 |
obrien |
MFamd64: use register_t's.
|
149337 |
20-Aug-2005 |
stefanf |
Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 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
|
148231 |
21-Jul-2005 |
phk |
Make the facility for recognizing BIOS-signatures more general 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
|
148067 |
15-Jul-2005 |
jhb |
Convert the atomic_ptr() operations over to operating on uintptr_t 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
|
147855 |
09-Jul-2005 |
jhb |
Some cleanups and tweaks to some of the atomic.h files in preparation for 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)
|
147744 |
02-Jul-2005 |
thompsa |
Check the alignment of the IP header before passing the packet up to the 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)
|
147691 |
30-Jun-2005 |
peter |
Begin promoting the AMD-originated feature flags to first class flags, now that newer Intel cpu hardware implements them too. This includes things like the NX (pte no-execute) flag for execute protection. We'll need to reference this for implementing no-exec in pmap.c at some point.
Some feature flags are duplicated in both the Intel-orignated bits and the AMD bits. Suppress the the duplicates correctly - the old code assumed they were a 1:1 mapping which is not correct. We can't just mask off the bits present in cpu_feature.
Converge with amd64 where this originated from.
Intel cpu's that implement any AMD features will report them in dmesg now.
Approved by: re
|
147671 |
29-Jun-2005 |
peter |
Switch AMD64 and i386 platforms to using ELF as their kernel crash 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
|
147191 |
09-Jun-2005 |
jkoshy |
MFP4:
- 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.
|
147181 |
09-Jun-2005 |
ups |
Add IPI support for preempting a thread on another CPU.
MFC after: 3 weeks
|
146818 |
31-May-2005 |
dfr |
Add support for XMM registers in GDB for x86 processors that support SSE (or its successors).
Reviewed by: marcel, davidxu MFC After: 2 weeks
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
146721 |
28-May-2005 |
nyan |
Change the spkr_set_pitch() function to a macro to fix low level profiling.
|
146263 |
16-May-2005 |
obrien |
Add the 2nd word of IA32 feature flags. This includes things such as SSE3.
Obtained from: sys/amd64/amd64/identcpu.
|
146211 |
14-May-2005 |
nyan |
- Move timerreg.h to <arch>/include and split i8253 specific defines into 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
|
146170 |
13-May-2005 |
nectar |
Add a knob for disabling/enabling HTT, "machdep.hyperthreading_allowed". Default off due to information disclosure on multi-user systems.
Submitted by: cperciva Reviewed by: jhb
|
146137 |
12-May-2005 |
nyan |
- Move the NPX_DEBUG option to options.{i386,pc98} and use opt_npx.h. - Move npx related defines to {i386,pc98}/include/npx.h to remove #include {isa,cbus}.h.
|
145774 |
01-May-2005 |
jkoshy |
Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc. Have pmcstat(8) and pmccontrol(8) use these APIs.
Return PMC class-related constants (PMC widths and capabilities) with the OP GETCPUINFO call leaving OP PMCINFO to return only the dynamic information associated with a PMC (i.e., whether enabled, owner pid, reload count etc.).
Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to get upto-date values from hardware since we can guarantee that the hardware is running the correct PMC at the time of the call.
Bug fixes: - (x86 class processors) Fix a bug that prevented an RDPMC instruction from being recognized as permitted till after the attached process had context switched out and back in again after a pmc_start() call.
Tighten the rules for using RDPMC class instructions: a GETMSR OP is now allowed only after an OP ATTACH has been done by the PMC's owner to itself. OP GETMSR is not allowed for PMCs that track descendants, for PMCs attached to processes other than their owner processes.
- (P4/HTT processors only) Fix a bug that caused the MI and MD layers to get out of sync. Add a new MD operation 'get_config()' as part of this fix.
- Allow multiple system-mode PMCs at the same row-index but on different CPUs to be allocated.
- Reject allocation of an administratively disabled PMC.
Misc. code cleanups and refactoring. Improve a few comments.
|
145727 |
30-Apr-2005 |
dwhite |
Implement an alternate method to stop CPUs when entering DDB. Normally we use 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
|
145615 |
28-Apr-2005 |
jkoshy |
Return the correct register number in the 'get_msr()' MD function.
Only allow a process to use the x86 RDPMC instruction if it has allocated and attached a PMC to itself.
Inform the MD layer of the "pseudo context switch out" that needs to be done when the last thread of a process is exiting.
|
145337 |
20-Apr-2005 |
marcel |
o Reverse the inclusion chain from MD->MI to MI->MD by removing the inclusion of <sys/pmc.h> and depending on being included from that header file. o Include any MD specific header files that otherwise need to be included from MI files.
Ok'd: jkoshy@
|
145256 |
19-Apr-2005 |
jkoshy |
Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities and documentation into -CURRENT.
Bump FreeBSD_version.
Reviewed by: alc, jhb (kernel changes)
|
145253 |
18-Apr-2005 |
imp |
Break out the definition of bus_space_{tag,handle}_t and a few other types into _bus.h to help with name space polution from including all of bus.h. In a few days, I'll commit changes to the MI code to take advantage of thse sepration (after I've made sure that these changes don't break anything in the main tree, I've tested in my trees, but you never know...).
Suggested by: bde (in 2002 or 2003 I think) Reviewed in principle by: jhb
|
145080 |
14-Apr-2005 |
jhb |
Remove support for mixed mode altogether now that we no longer use IRQ 0 when using an APIC. This simplifies the APIC code somewhat and also allows us to be pedantically more compliant with ACPI which mandates no use of mixed mode.
|
145047 |
14-Apr-2005 |
peter |
It seems I introduced a new prerequisite for <machine/pcb.h> on i386, which is included from <sys/user.h>. Add a bandaid for userland.
|
145034 |
13-Apr-2005 |
peter |
Change the segment limits to 4GB, we set the user accessible bit on all of the kernel address space already. Intel recommend this anyway, because using a non-4GB limit adds an additional clock cycle to address generation. We were able to install 4GB segments into the LDT, so any limits we imposed on %cs and %ds were academic anyway. More importantly, this allows us to make a page in the kernel readable to user applications, for holding things like the signal trampoline and other fun things.
Move the user %cs/%ds segments from the LDT to the GDT. There was no good reason for them to be there anyway. The old LDT entries are still there but we can now relax the restriction that prevented users from emptying the default LDT entries.
Putting user and kernel %cs and %ds together allows us to access the fast sysenter/sysexit/syscall/sysret instructions. syscall/sysret in particular require that the user/kernel segments be laid out this way. Reserve a slot specifically for NDIS while here.
Create two user controllable slots in the GDT that are context switched with the (kernel) thread. This allows user applications to set two user privilige selectors to arbitary values. Create i386_set_fsbase(void *base) and friends. (get/set, fs/gs). For i386, %gs is used by tls and the thread libraries and this means that user processes no longer have to have the cost of having a custom LDT, and we will no longer to do a ldt switch when activating a kthread/ithread in the usual case any more.
In other words, we can now set the base address for %fs and %gs to arbitary addresses without the pain of messing with ldt segments.
|
145025 |
13-Apr-2005 |
peter |
Fix an evil bug that appeared in September 2003. VM86 bios calls use two of the __pcb_spare longs. Except that fields were changed and one of the spare values was used and the __pcb_spare field was reduced from two to one long. Now VM86 bios calls can trash the first 4 bytes of the next page following the kernel stack/pcb. This Is Bad(TM). This bug has been present in 5.2-release and onwards, and is still in RELENG_5.
Instead of tempting fate and trying to use "spare" fields, explicitly reserve them.
|
145010 |
13-Apr-2005 |
nyan |
Move pc98 specific parts to the pc98 specific file.
|
144637 |
04-Apr-2005 |
jhb |
Divorce critical sections from spinlocks. Critical sections as denoted by critical_enter() and critical_exit() are now solely a mechanism for deferring kernel preemptions. They no longer have any affect on interrupts. This means that standalone critical sections are now very cheap as they are simply unlocked integer increments and decrements for the common case.
Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter() and spinlock_exit(). This KPI is responsible for providing whatever MD guarantees are needed to ensure that a thread holding a spin lock won't be preempted by any other code that will try to lock the same lock. For now all archs continue to block interrupts in a "spinlock section" as they did formerly in all critical sections. Note that I've also taken this opportunity to push a few things into MD code rather than MI. For example, critical_fork_exit() no longer exists. Instead, MD code ensures that new threads have the correct state when they are created. Also, we no longer try to fixup the idlethreads for APs in MI code. Instead, each arch sets the initial curthread and adjusts the state of the idle thread it borrows in order to perform the initial context switch.
This change is largely a big NOP, but the cleaner separation it provides will allow for more efficient alternative locking schemes in other parts of the kernel (bare critical sections rather than per-CPU spin mutexes for per-CPU data for example).
Reviewed by: grehan, cognet, arch@, others Tested on: i386, alpha, sparc64, powerpc, arm, possibly more
|
144611 |
03-Apr-2005 |
imp |
Move pc98 specific parts to the pc98 specific file.
|
144604 |
03-Apr-2005 |
imp |
With pc98/include, we can have pc98 and i386 specific bus space implementations in their own files named $MACHINE/include/bus.h. Copy the contents appropriately.
|
144544 |
02-Apr-2005 |
netchild |
The file machine/ieeefp.h needs sys/cdefs.h on amd64 and i386 after my compiler features tests. This is ok, since machine/ieeefp.h is an internal interface. But floatingpoint.h is a public interface and some ports use it, so include sys/cdefs.h in the amd64 and i386 version of floatingpoint.h.
Note: some architectures don't provide recursive inclusion protection in floatingpoint.h, namely alpha and ia64. Except for this part and now the include of sys/cdefs.h, all those files are equal (from a compiler POV), so they could be moved to only one version in src/include/.
Approved by: joerg
|
143768 |
17-Mar-2005 |
das |
Initialize the mxcsr properly, so the initial value in a process isn't just the value that was left over from some other application.
|
143658 |
15-Mar-2005 |
das |
Remove fpsetsticky(). This was added for SysV compatibility, but due to mistakes from day 1, it has always had semantics inconsistent with SVR4 and its successors. In particular, given argument M:
- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags and *sets* the new flag word to M. (NetBSD, too?) - On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M and leaves the remaining flags unchanged (modulo a small bug on amd64.) - On FreeBSD/ia64, it is not implemented.
There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps and apps ported from other operating systems, so the best approach seems to be to kill the function and fix any apps that break. I couldn't find any ports that use it, and any such ports would already be broken on FreeBSD/ia64 and Linux anyway.
By the way, the routine has always been undocumented in FreeBSD, except for an MLINK to a manpage that doesn't describe it. This manpage has stated since 5.3-RELEASE that the functions it describes are deprecated, so that must mean that functions that it is *supposed* to describe but doesn't are even *more* deprecated. ;-)
Note that fpresetsticky() has been retained on FreeBSD/i386. As far as I can tell, no other operating systems or ports of FreeBSD implement it, so there's nothing for it to be inconsistent with.
PR: 75862 Suggested by: bde
|
143598 |
14-Mar-2005 |
scottl |
Refactor the bus_dma header files so that the interface is described in sys/bus_dma.h instead of being copied in every single arch. This slightly reorders a flag that was specific to AXP and thus changes the ABI there. The interface still relies on bus_space definitions found in <machine/bus.h> so it cannot be included on its own yet, but that will be fixed at a later date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to allow for future MD augmentation of the API. sparc64 makes heavy use of this right now due to its different bus_dma implemenation.
|
143428 |
11-Mar-2005 |
peter |
Remove an OBE set of comments, fix a minor whitespace nit while here.
|
143324 |
09-Mar-2005 |
jhb |
- Remove the BURN_BRIDGES marked support for hooking into the ISA timer 0 interrupt. - Remove the timer_func variable as it now has a static value of hardclock() and is only used in one place.
Axe borrowed from: phk
|
143063 |
02-Mar-2005 |
joerg |
netchild's mega-patch to isolate compiler dependencies into a central place.
This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.
By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course.
Submitted by: netchild Reviewed by: various developers on arch@, some time ago
|
142107 |
19-Feb-2005 |
ru |
Use a common multi-inclusion protection, and add such a protection to alpha/include/exec.h.
|
142087 |
19-Feb-2005 |
marius |
Together with the changes to compile kernels with the Intel C/C++ compiler preliminary support for using the GCC-compatibility of ICC was committed but couldn't be tested at that time due to problems with ICC itself. Since ICC 8.1 it's possible to use its GCC-compatibility under FreeBSD and it turned out that a typedef for __gnuc_va_list is required in that case. Revert the part of rev. 1.8 which #ifdef'ed out __gnuc_va_list for ICC.
MFC after: 1 week
|
141784 |
13-Feb-2005 |
alc |
Implement support for CPU private mappings within sf_buf_alloc().
|
141538 |
08-Feb-2005 |
jhb |
Use the local APIC timer to drive the various kernel clocks on SMP machines rather than forwarding interrupts from the clock devices around using IPIs: - Add an IDT vector that pushes a clock frame and calls lapic_handle_timer(). - Add functions to program the local APIC timer including setting the divisor, and setting up the timer to either down a periodic countdown or one-shot countdown. - Add a lapic_setup_clock() function that the BSP calls from cpu_init_clocks() to setup the local APIC timer if it is going to be used. The setup uses a one-shot countdown to calibrate the timer. We then program the timer on each CPU to fire at a frequency of hz * 3. stathz is defined as freq / 23 (hz * 3 / 23), and profhz is defined as freq / 2 (hz * 3 / 2). This gives the clocks relatively prime divisors while keeping a low LCM for the frequency of the clock interrupts. Thanks to Peter Jeremy for suggesting this approach. - Remove the hardclock and statclock forwarding code including the two associated IPIs. The bitmap IPI handler has now effectively degenerated to just IPI_AST. - When the local APIC timer is used we don't turn the RTC on at all, but we still enable interrupts on the ISA timer 0 (i8254) for timecounting purposes.
|
140862 |
26-Jan-2005 |
sobomax |
o Move copyin()/copyout() out of i386_{get,set}_ldt() and i386_{get,set}_ioperm() and make those APIs visible in the kernel namespace;
o use i386_{get,set}_ldt() and i386_{get,set}_ioperm() instead of sysarch() in the linuxlator, which allows to kill another two stackgaps.
MFC after: 2 weeks
|
140451 |
18-Jan-2005 |
jhb |
Tweak the ELCR support slightly. Explicitly probe the ELCR during boot instead of burying that in the atpic(4) code as atpic(4) is not the only user of elcr(4). Change the elcr(4) code to export a global elcr_found variable that other code can check to see if a valid ELCR was found.
MFC after: 1 month
|
139840 |
07-Jan-2005 |
scottl |
Introduce bus_dmamap_load_mbuf_sg(). Instead of taking a callback arg, this cuts to the chase and fills in a provided s/g list. This is meant to optimize out the cost of the callback since the callback doesn't serve much purpose for mbufs since mbuf loads will never be deferred. This is just for amd64 and i386 at the moment, other arches will be coming shortly.
|
139790 |
06-Jan-2005 |
imp |
/* -> /*- for copyright notices, minor format tweaks as necessary
|
139789 |
06-Jan-2005 |
imp |
Remove left over include file from stallion driver.
|
139788 |
06-Jan-2005 |
imp |
Expand indirect reference to BSD license with the current one.
|
139787 |
06-Jan-2005 |
imp |
This doesn't seem to have been used since 386BSD days
|
139732 |
05-Jan-2005 |
imp |
These appear to be unused in our tree, so remove them.
|
139243 |
23-Dec-2004 |
jhb |
Add some constants for the local APIC timer.
|
139242 |
23-Dec-2004 |
jhb |
Add a simple 'intrcnt_add' function that other MD code can use to add a single named counter to the interrupt counts without having to fake up an entire interrupt source.
|
139240 |
23-Dec-2004 |
jhb |
- Add a function to set the Task Priority Register (TPR) of the local APIC. Currently this is only used to initiailize the TPR to 0 during initial setup. - Reallocate vectors for the local APIC timer, error, and thermal LVT entries. The timer entry is allocated from the top of the I/O interrupt range reducing the number of vectors available for hardware interrupts to 191. Linux happens to use the same exact vector for its timer interrupt as well. If the timer vector shared the same priority queue as the IPI handlers, then the frequency that the timer vector will eventually be firing at can interact badly with the IPIs resulting in the queue filling and the dreaded IPI stuck panics, hence it being located at the top of the previous priority queue instead. - Fixup various minor nits in comments.
|
138528 |
07-Dec-2004 |
ups |
Avoid more than two pending IPI interrupt vectors per local APIC as this may cause deadlocks.
This should fix kern/72123.
Discussed with: jhb Tested by: Nik Azim Azam, Andy Farkas, Flack Man, Aykut KARA Izzet BESKARDES, Jens Binnewies, Karl Keusgen Approved by: sam (mentor)
|
138253 |
01-Dec-2004 |
marcel |
Change gdb_cpu_setreg() to not take the value to which to set the specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value.
This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that.
Tested on: alpha, amd64, i386, ia64, sparc64
|
137914 |
20-Nov-2004 |
das |
Remove UAREA_PAGES.
Reviewed by: arch@
|
137784 |
16-Nov-2004 |
jhb |
Initiate deorbit burn sequence for 80386 support in FreeBSD: Remove 80386 (I386_CPU) support from the kernel.
|
137623 |
12-Nov-2004 |
jhb |
Spell _KERNEL correctly so that UP kernels are actually optimized again.
Submitted by: pjd
|
137622 |
12-Nov-2004 |
jhb |
- Use the SMP style ops for atomic_load/store() in userland so that libraries and binaries will work on both UP and SMP machines. - Remove unnecessary gcc memory barrier from the UP atomic_store() op.
Submitted by: bde
|
137591 |
11-Nov-2004 |
jhb |
- Place the gcc memory barrier hint in the right place in the 80386 version of atomic_store_rel(). - Use the 80386 versions of atomic_load_acq() and atomic_store_rel() that do not use serializing instructions on all UP kernels since a UP machine does need to synchronize with other CPUs. This trims lots of cycles from spin locks on UP kernels among other things.
Benchmarked by: rwatson
|
137289 |
06-Nov-2004 |
peter |
Begin an invasion of i386-land by amd64.
Expose some of the amd64-specific sysarch functions to allow alternative implementations of the %fs/%gs code for TLS, threads, etc. USER_LDT does not exist on the amd64 kernel, so we have to implement things other ways.
|
136366 |
11-Oct-2004 |
njl |
Move the code for halting the CPU (acpi_cpu_c1) into machdep files. This removes the last MD portion of acpi_cpu.c.
MFC after: 2 weeks
|
136252 |
08-Oct-2004 |
alc |
Make pte_load_store() an atomic operation in all cases, not just i386 PAE.
Restructure pmap_enter() to prevent the loss of a page modified (PG_M) bit in a race between processors. (This restructuring assumes the newly atomic pte_load_store() for correct operation.)
Reviewed by: tegge@ PR: i386/61852
|
135939 |
29-Sep-2004 |
alc |
Prevent the unexpected deallocation of a page table page while performing pmap_copy(). This entails additional locking in pmap_copy() and the addition of a "flags" parameter to the page table page allocator for specifying whether it may sleep when memory is unavailable. (Already, pmap_copy() checks the availability of memory, aborting if it is scarce. In theory, another CPU could, however, allocate memory between pmap_copy()'s check and the call to the page table page allocator, causing the current thread to release its locks and sleep. This change makes this scenario impossible.)
Reviewed by: tegge@
|
135283 |
15-Sep-2004 |
julian |
Fix breakpoint handling for i386. not sure yet about 5.x... MFC if needed. Also fixes small problems with examining some registers and some specific gdb transfer problems.
As the patch says: This is not a pretty patch and only meant as a temporary fix until a better solution is committed.
PR: i386/71715 Submitted by: Stephan Uphoff <ups@tree.com> MFC after: 1 week
|
135065 |
11-Sep-2004 |
scottl |
Double the number of kernel page tables for amd64 and for i386/PAE. The old value was only enough for 8GB of RAM, the new value can do 16GB. This still isn't optimal since it doesn't scale. Fixing this for amd64 looks to be fairly easy, but for i386 will be quite difficult.
Reviewed by: peter
|
134649 |
02-Sep-2004 |
scottl |
Turn PREEMPTION into a kernel option. Make sure that it's defined if FULL_PREEMPTION is defined. Add a runtime warning to ULE if PREEMPTION is enabled (code inspired by the PREEMPTION warning in kern_switch.c). This is a possible MT5 candidate.
|
134616 |
01-Sep-2004 |
julian |
Give up trying to make preemption dependent on SCHED_4BSD the list of breakages was getting too long
|
134610 |
01-Sep-2004 |
julian |
Don't ask for this for modules. no modules need to know about preemption at the moment
|
134599 |
01-Sep-2004 |
scottl |
Protect the PREEMPTION logic with #ifdef _KERNEL to fix the build.
|
134598 |
01-Sep-2004 |
julian |
Only turn preemption for 4bsd. it's still poison for ULE.
|
134591 |
01-Sep-2004 |
julian |
Give the 4bsd scheduler the ability to wake up idle processors when there is new work to be done.
MFC after: 5 days
|
134398 |
27-Aug-2004 |
marcel |
Move the kernel-specific logic to adjust frompc from MI to MD. For these two reasons: 1. On ia64 a function pointer does not hold the address of the first instruction of a functions implementation. It holds the address of a function descriptor. Hence the user(), btrap(), eintr() and bintr() prototypes are wrong for getting the actual code address. 2. The logic forces interrupt, trap and exception entry points to be layed-out contiguously. This can not be achieved on ia64 and is generally just bad programming.
The MCOUNT_FROMPC_USER macro is used to set the frompc argument to some kernel address which represents any frompc that falls outside the kernel text range. The macro can expand to ~0U to bail out in that case. The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to some kernel address to represent a call to a trap or interrupt handler. This to avoid that the trap or interrupt handler appear to be called from everywhere in the call graph. The macro can expand to ~0U to prevent adjusting frompc. Note that the argument is selfpc, not frompc.
This commit defines the macros on all architectures equivalently to the original code in sys/libkern/mcount.c. People can take it from here...
Compile-tested on: alpha, amd64, i386, ia64 and sparc64 Boot-tested on: i386
|
134300 |
25-Aug-2004 |
obrien |
Fix a bug in in_cksum_hdr w/o -O.
The C code assumes that the carry bit is always kept from the previous operation. However, the pointer indexing requires another add operation. Thus, the carry bit from the first operation is tromped over by the "addl" operation that ends up following it, so the "adcl" that follows that has no effect because the carry bit is cleared before it. The result is checksum failure on received packets.
The larger issue is that there isn't any other way of preventing the compiler inserting arbitrary instructions between different __asm statements (and that the commit message in revision 1.13 of in_cksum.h is wrong on this point). From http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Extended-Asm.html ---8<---8<---8<--- You can't expect a sequence of volatile asm instructions to remain perfectly consecutive. If you want consecutive output, use a single asm. Also, GCC will perform some optimizations across a volatile asm instruction; GCC does not "forget everything" when it encounters a volatile asm instruction the way some other compilers do. ---8<---8<---8<---
Also, this change also makes the ASM code much easier to read.
PR: 69257 Submitted by: Mike Bristow <mike@urgle.com>, Qing Li <qing.li@bluecoat.com>
|
133827 |
16-Aug-2004 |
obrien |
Increase the scaling of VM_KMEM_SIZE_MAX.
Submitted by: alc
|
133759 |
15-Aug-2004 |
rwatson |
Add an "options MP_WATCHDOG" to i386. This option allows one of the logical CPUs on a system to be used as a dedicated watchdog to cause a drop to the debugger and/or generate an NMI to the boot processor if the kernel ceases to respond. A sysctl enables the watchdog running out of the processor's idle thread; a callout is launched to reset a timer in the watchdog. If the callout fails to reset the timer for ten seconds, the watchdog will fire. The sysctl allows you to select which CPU will run the watchdog.
A sample "debug.leak_schedlock" is included, which causes a sysctl to spin holding sched_lock in order to trigger the watchdog. On my Xeons, the watchdog is able to detect this failure mode and break into the debugger, which cannot otherwise be done without an NMI button.
This option does not currently work with sched_ule due to ule's push notion of scheduling, similar to machdep.hlt_logical_cpus failing to work with that scheduler.
On face value, this might seem somewhat inefficient, but there are a lot of dual-processor Xeons with HTT around, so using one as a watchdog for testing is not as inefficient as one might fear.
|
133084 |
03-Aug-2004 |
mux |
Instead of calling ia32_pause() conditionally on __i386__ or __amd64__ being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical.
Name of the macro found by: jhb Reviewed by: jhb
|
133027 |
02-Aug-2004 |
dfr |
Add definitions for TLS relocations.
|
133017 |
02-Aug-2004 |
scottl |
Optimize intr_execute_handlers() by combining the pic_disable_source() and pic_eoi_source() into one call. This halves the number of spinlock operations and indirect function calls in the normal case of handling a normal (ithread) interrupt. Optimize the atpic and ioapic drivers to use inlines where appropriate in supporting the intr_execute_handlers() change.
This knocks 900ns, or roughly 1350 cycles, off of the time spent servicing an interrupt in the common case on my 1.5GHz P4 uniprocessor system. SMP systems likely won't see as much of a gain due to the ioapic being more efficient than the atpic. I'll investigate porting this to amd64 soon.
Reviewed by: jhb
|
132961 |
01-Aug-2004 |
scottl |
Turn off PREEMPTION by default while it gets debugged. It's been causing 4 weeks of problems including deadlocks and instant panics. Note that the real bugs are likely in the scheduler.
|
132956 |
01-Aug-2004 |
markm |
Break out the MI part of the /dev/[k]mem and /dev/io drivers into their own directory and module, leaving the MD parts in the MD area (the MD parts _are_ part of the modules). /dev/mem and /dev/io are now loadable modules, thus taking us one step further towards a kernel created entirely out of modules. Of course, there is nothing preventing the kernel from having these statically compiled.
|
132700 |
27-Jul-2004 |
rwatson |
Pass a thread argument into cpu_critical_{enter,exit}() rather than dereference curthread. It is called only from critical_{enter,exit}(), which already dereferences curthread. This doesn't seem to affect SMP performance in my benchmarks, but improves MySQL transaction throughput by about 1% on UP on my Xeon.
Head nodding: jhb, bmilekic
|
132383 |
19-Jul-2004 |
das |
Make FLT_ROUNDS correctly reflect the dynamic rounding mode.
|
131952 |
10-Jul-2004 |
marcel |
Mega update for the KDB framework: turn DDB into a KDB backend. Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads.
The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace.
With this change, ia64 has support for breakpoints.
|
131936 |
10-Jul-2004 |
marcel |
Update for the KDB framework: o s/ddb_on_nmi/kdb_on_nmi/g o Rename sysctl machdep.ddb_on_nmi to machdep.kdb_on_nmi o Make debugging support conditional upon KDB instead of DDB. o Call kdb_reenter() when kdb_active is non-zero. o Call kdb_trap() to enter the debugger when not already active. o Update comments accordingly. o Remove misplaced prototype of kdb_trap().
|
131905 |
10-Jul-2004 |
marcel |
Implement makectx(). The makectx() function is used by KDB to create a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit.
|
131903 |
10-Jul-2004 |
marcel |
Introduce the KDB debugger frontend. The frontend provides a framework in which multiple (presumably different) debugger backends can be configured and which provides basic services to those backends. Besides providing services to backends, it also serves as the single point of contact for any and all code that wants to make use of the debugger functions, such as entering the debugger or handling of the alternate break sequence. For this purpose, the frontend has been made non-optional. All debugger requests are forwarded or handed over to the current backend, if applicable. Selection of the current backend is done by the debug.kdb.current sysctl. A list of configured backends can be obtained with the debug.kdb.available sysctl. One can enter the debugger by writing to the debug.kdb.enter sysctl.
|
131899 |
10-Jul-2004 |
marcel |
Introduce the GDB debugger backend for the new KDB framework. The backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support.
|
131481 |
02-Jul-2004 |
jhb |
Implement preemption of kernel threads natively in the scheduler rather than as one-off hacks in various other parts of the kernel: - Add a function maybe_preempt() that is called from sched_add() to determine if a thread about to be added to a run queue should be preempted to directly. If it is not safe to preempt or if the new thread does not have a high enough priority, then the function returns false and sched_add() adds the thread to the run queue. If the thread should be preempted to but the current thread is in a nested critical section, then the flag TDF_OWEPREEMPT is set and the thread is added to the run queue. Otherwise, mi_switch() is called immediately and the thread is never added to the run queue since it is switch to directly. When exiting an outermost critical section, if TDF_OWEPREEMPT is set, then clear it and call mi_switch() to perform the deferred preemption. - Remove explicit preemption from ithread_schedule() as calling setrunqueue() now does all the correct work. This also removes the do_switch argument from ithread_schedule(). - Do not use the manual preemption code in mtx_unlock if the architecture supports native preemption. - Don't call mi_switch() in a loop during shutdown to give ithreads a chance to run if the architecture supports native preemption since the ithreads will just preempt DELAY(). - Don't call mi_switch() from the page zeroing idle thread for architectures that support native preemption as it is unnecessary. - Native preemption is enabled on the same archs that supported ithread preemption, namely alpha, i386, and amd64.
This change should largely be a NOP for the default case as committed except that we will do fewer context switches in a few cases and will avoid the run queues completely when preempting.
Approved by: scottl (with his re@ hat)
|
131272 |
29-Jun-2004 |
peter |
Reduce the size of pv entries by 15%. This saves 1MB of KVA for mapping pv entries per 1GB of user virtual memory. (eg: if we had 1GB file was mmaped into 30 processes, that would theoretically reduce the KVA demand by 30MB for pv entries. In reality though, we limit pv entries so we don't have that many at once.)
We used to store the vm_page_t for the page table page. But we recently had the pa of the ptp, or can calculate it fairly quickly. If we wanted to avoid the shift/mask operation in pmap_pde(), we could recover the pa but that means we have to store it for a while.
This does not measurably change performance.
Suggested by: alc Tested by: alc
|
131225 |
28-Jun-2004 |
imp |
bde points out that this can't do anything useful. The full patch has other parts that I can't locat at the moment, so back it out until I can.
|
131220 |
28-Jun-2004 |
imp |
When opening /dev/io, preserve iopl properly. Otherwise, if you open /dev/io multiple times, the first close remove the privs.
|
131219 |
28-Jun-2004 |
imp |
remove needless blankline
|
130980 |
23-Jun-2004 |
jhb |
Various cleanups in support of a future ioapic_config_intr() function: - Allow ioapic_set_{nmi,smi,extint}() to be called multiple times on the same pin so long as the pin's mode is the same as the mode being requested. - Add a notion of bus type for the interrupt associated with interrupt pin. This is needed so that we can force all EISA interrupts to be active high in the forthcoming ioapic_config_intr(). - Fix a bug for EISA systems that didn't remap IRQs. This would have broken EISA systems that tried to disable mixed mode for IRQ 0.
|
130764 |
20-Jun-2004 |
bde |
Backed out previous commit. Blind substitution of dev_t by `struct cdev *' was just wrong here because the dev_t's are user dev_t's.
|
130755 |
20-Jun-2004 |
bde |
Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including the former, not after.
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130573 |
16-Jun-2004 |
alc |
MFamd64 Introduce pmap locking to many of the pmap functions.
|
130399 |
13-Jun-2004 |
alc |
- Remove an unused declaration. - Move a definition inside the scope of a #ifdef _KERNEL.
|
130313 |
10-Jun-2004 |
jhb |
- Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is 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.
|
130312 |
10-Jun-2004 |
jhb |
Remove atdevbase and replace it's remaining uses with direct references to KERNBASE instead.
|
130040 |
03-Jun-2004 |
phk |
Add new bios_string() which will hunt for a string inside a given range of the BIOS. This can be used for finding arbitrary magic in the BIOS in order to recognize particular platforms.
|
130036 |
03-Jun-2004 |
phk |
The NatSemi (now AMD) Geode SC1100 needs special treatment here and there because it is an embedded gadget. Give it it's own value for the "cpu" variable and add code to reset it lacking a keyboard controller.
|
129872 |
30-May-2004 |
phk |
struct cpu_nameclass is a private to identcpu.c, move it there.
|
129498 |
20-May-2004 |
bde |
Moved i386 asms to an i386 header. The asms are for calibration of high resolution kernel profiling (options GUPROF. "U" in GUPROF stands for microseconds resolution, but the resolution is now smaller than 1 nanosecond on multi-GHz machines and the accuracy is heading towards 1 nanosecond too). Arches that support GUPROF must now provide certain macros for the calibration. GUPROF is now only supported for i386's, so the absence of the new macros for other arches doesn't break anything that wasn't already broken. amd64's have uncommitted support for GUPROF, and sparc64's have support that seems to be complete except here (there was an #error for non-i386 cases; now there are undefined macros).
Changed the asms a little: - declare them as __volatile. They must not be moved, and exporting a label across asms is technically incorrect, so try harder to stop gcc moving them. - don't put the non-clobbered register "bx" in the clobber list. The clobber lists are still more conservative than necessary. - drop the non-support for gcc-1. It just gave a better error message, and this is not useful since compiling with gcc-1 would cause thousands of worse error messages. - drop the support for aout.
|
129445 |
19-May-2004 |
bde |
Fixed some style bugs (mainly misalignment of backslashes).
|
129444 |
19-May-2004 |
bde |
Moved most of the "MI" definitions and declarations from <machine/profile.h> to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version.
|
129393 |
18-May-2004 |
stefanf |
<stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all.
PR: 64956 Approved by: das (mentor)
|
129097 |
10-May-2004 |
jhb |
Rework the APIC mixed mode support a bit: - Require the APIC enumerators to explicitly enable mixed mode by calling ioapic_enable_mixed_mode(). Calling this function tells the apic driver that the PC-AT 8259A PICs are present and routable through the first I/O APIC via an ExtINT pin. The mptable enumerator always calls this function for now. The MADT enumerator only enables mixed mode if the PC-AT compatability flag is set in the MADT header. - Allow mixed mode to be enabled or disabled via a 'hw.apic.mixed_mode' tunable. By default this tunable is set to 1 (true). The kernel option NO_MIXED_MODE changes the default to 0 to preserve existing behavior, but adding 'hw.apic.mixed_mode=0' to loader.conf achieves the same effect. - Only use mixed mode to route IRQ 0 if it is both enabled by the APIC enumerator and activated by the loader tunable. Note that both conditions must be true, so if the APIC enumerator does not enable mixed mode, then you can't set the tunable to try to override the enumerator.
|
128979 |
05-May-2004 |
njl |
Add an MI implementation of the ACPI global lock routines and retire the individual asm versions. The global lock is shared between the BIOS and OS and thus cannot use our mutexes. It is defined in section 5.2.9.1 of the ACPI specification.
Reviewed by: marcel, bde, jhb
|
128933 |
04-May-2004 |
jhb |
- Create a pir0 psuedo device as a child of legacy0 if we attach a legacy host-PCI bridge device and find a valid $PIR. - Make pci_pir_parse() private to pci_pir.c and have pir0's attach routine call it instead of having legacy_pcib_attach() call it. - Implement suspend/resume support for the $PIR by giving pir0 a resume method that calls the BIOS to reroute each link that was already routed before the machine was suspended. - Dump the state of the routed flag in the links display code. - If a link's IRQ is set by a tunable, then force that link to be re-routed the first time it is used. - Move the 'Found $PIR' message under bootverbose as the pir0 description line lists the number of entries already. The pir0 line also only shows up if we are actually using the $PIR which is a bonus. - Use BUS_CONFIG_INTR() to ensure that any IRQs used by a PCI link are set to level/low trigger/polarity.
|
128931 |
04-May-2004 |
jhb |
- Add a new pic method pic_config_intr() to set the trigger mode and polarity for a specified IRQ. The intr_config_intr() function wraps this pic method hiding the IRQ to interrupt source lookup. - Add a config_intr() method to the atpic(4) driver that reconfigures the interrupt using the ELCR if possible and returns an error otherwise. - Add a config_intr() method to the apic(4) driver that just logs any requests that would change the existing programming under bootverbose. Currently, the only changes the apic(4) driver receives are due to bugs in the acpi(4) driver and its handling of link devices, hence the reason for such requests currently being ignored. - Have the nexus(4) driver on i386 implement the bus_config_intr() function by calling intr_config_intr().
|
128930 |
04-May-2004 |
jhb |
- Change the APIC code to mostly use the recently added intr_trigger and intr_polarity enums for passing around interrupt trigger modes and polarity rather than using the magic numbers 0 for level/low and 1 for edge/high. - Convert the mptable parsing code to use the new ELCR wrapper code rather than reading the ELCR directly. Also, use the ELCR settings to control both the trigger and polarity of EISA IRQs instead of just the trigger mode. - Rework the MADT's handling of the ACPI SCI again: - If no override entry for the SCI exists at all, use level/low trigger instead of the default edge/high used for ISA IRQs. - For the ACPI SCI, use level/low values for conforming trigger and polarity rather than the edge/high values we use for all other ISA IRQs. - Rework the tunables available to override the MADT. The hw.acpi.force_sci_lo tunable is no longer supported. Instead, there are now two tunables that can independently override the trigger mode and/or polarity of the SCI. The hw.acpi.sci.trigger tunable can be set to either "edge" or "level", and the hw.acpi.sci.polarity tunable can be set to either "high" or "low". To simulate hw.acpi.force_sci_lo, set hw.acpi.sci.trigger to "level" and hw.acpi.sci.polarity to "low". If you are having problems with ACPI either causing an interrupt storm or not working at all (e.g., the power button doesn't turn invoke a shutdown -p now), you can try tweaking these two tunables to find the combination that works.
|
128928 |
04-May-2004 |
jhb |
Add a simple mini-driver for the ELCR register. Originally, the ELCR register controlled the trigger mode and polarity of EISA interrupts. However, it appears that most (all?) PCI systems use the ELCR to manage the trigger mode and polarity of ISA interrupts as well since ISA IRQs used to route PCI interrupts need to be level triggered with active low polarity. We check to see if the ELCR exists by sanity checking the value we get back ensuring that IRQS 0 (8254), 1 (atkbd), 2 (the link from the slave PIC), and 8 (RTC) are all clear indicating edge trigger and active high polarity.
This mini-driver will be used by the atpic driver to manage the trigger and polarity of ISA IRQs. Also, the mptable parsing code will use this mini driver rather than examining the ELCR directly.
|
128910 |
04-May-2004 |
nyan |
Increase BUS_SPACE_IAT_MAXSIZE to 33 for the ed driver.
|
128874 |
03-May-2004 |
jhb |
Make the legacy_pcib_attach() function static.
|
128693 |
27-Apr-2004 |
jhb |
Belatedly remove a file from the earlier apic code that is no longer used.
|
128629 |
25-Apr-2004 |
das |
Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilation environments.
PR: 63935 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
|
128100 |
11-Apr-2004 |
alc |
- is_physical_memory()'s parameter, which is a physical address, should be a vm_paddr_t not a vm_offset_t.
|
128098 |
10-Apr-2004 |
alc |
- pmap_kenter_temporary()'s first parameter, which is a physical address, should be declared as vm_paddr_t not vm_offset_t.
|
128097 |
10-Apr-2004 |
alc |
- pmap_kenter_temporary() is unused by machine-independent code. Therefore, move its declaration to the machine-dependent header file on those machines that use it. In principle, only i386 should have it. Alpha and AMD64 should use their direct virtual-to-physical mapping. - Remove pmap_kenter_temporary() from ia64. It is unused. Approved by: marcel@
|
128019 |
07-Apr-2004 |
imp |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson.
Approved by: core, peter, alc, rwatson
|
127875 |
05-Apr-2004 |
alc |
Remove avail_start on those platforms that no longer use it. (Only amd64 does anything with it beyond simple initialization.)
|
127813 |
03-Apr-2004 |
marcel |
Move the definition of rss() from db_interface.c to cpufunc.h where it belongs. Change the implementation to match those of rfs() and rgs() for consistency and irrespective of whether the original was more correct or not (technically speaking).
|
127239 |
20-Mar-2004 |
marcel |
Introduce the cpumask_t type. The purpose of the type is to create a level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned.
With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-)
Compile-tested on: i386
|
126990 |
14-Mar-2004 |
imp |
The gsc driver uses the old COMPAT_ISA api. Retire it so we can retire the COMPAT_ISA shims. If someone were to redo this driver with the new APIs and test it, it can return.
|
126984 |
14-Mar-2004 |
imp |
The spigot driver uses the old COMPAT_ISA interface. Retire it since that's going away soon. Should someone reimplement it using modern APIs and can test the driver, it can return.
|
126964 |
14-Mar-2004 |
imp |
stl and stli use the old COMPAT_ISA api. slt also uses the really old COMPAT_PCI api. This API is going away, so this driver is going away also.
If users are interested in updating this, please contact the author since he has some preliminary work to move this to newer APIs.
|
126957 |
14-Mar-2004 |
imp |
remove the ioctl files from the asc, ctx and wt drivers just removed
|
126928 |
13-Mar-2004 |
peter |
Move the non-MD machine/dvcfg.h and machine/physio_proc.h to a common MI area before they proliferate more.
|
126891 |
12-Mar-2004 |
trhodes |
These are changes to allow to use the Intel C/C++ compiler (lang/icc) to build the kernel. It doesn't affect the operation if gcc.
Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary.
Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c
1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c
1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c
and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes)
Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc.
Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: -arch Submitted by: netchild
|
126846 |
11-Mar-2004 |
bde |
Don't implement anything in the ffs family in <machine/cpufunc.h> in the non-_KERNEL case. This "fixes" applications that include this "kernel-only" header and also include <strings.h> (or get <strings.h> via the default _BSD_VISIBLE pollution in <string.h>. In C++ there was a fatal error: the declaration specifies C linkage but the implementation gives C++ linkage. In C there was only a static/extern mismatch if the headers were included in a certain order order, and a partially redundant declaration for all include orders; gcc emits incomplete or wrong diagnostics for these, but only for compiling with -Wsystem-headers and certain other warning options, so the problem was usually not seen for C.
Ports breakage reported by: kris
|
126715 |
07-Mar-2004 |
alc |
Remove unused declarations. (Some time ago, these variables became fields of vm/vm.h's struct kva_md_info.)
|
126656 |
05-Mar-2004 |
bde |
Fixed insertion sort errors in prototype list.
|
126655 |
05-Mar-2004 |
bde |
Removed garbage: - completely unused things - all of rev.1.102 (C++ support). <sys/cdefs.h> is included by the prerequisite <sys/types.h>. __BEGIN_DECLS/__END_DECLS has no effect (except possibly if undefined behaviour is invoked using a hack like defining away __inline) since this header doesn't really support any extern functions.
|
126649 |
05-Mar-2004 |
le |
Fix syntax errors and wrong function prototypes in several MD header files when using non-GNUC compilers.
PR: kern/58515 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Approved by: grog (mentor), obrien
|
125981 |
18-Feb-2004 |
jhb |
Switch to using the new $PIR interrupt routing code and remove the old code. The pci_cfgreg.c file now just controls reading/writing PCI config registers.
|
124685 |
18-Jan-2004 |
sobomax |
Add new CPU_ENABLE_TCC option, from NOTES:
CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected, TCC allows to restrict power consumption by using machdep.cpuperf* sysctls. This operates independently of SpeedStep and is useful on systems where other mechanisms such as apm(4) or acpi(4) don't work.
Given the fact that many, even modern, notebooks don't work properly with Intel ACPI, this is indeed very useful option for notebook owners.
Obtained from: OpenBSD MFC after: 2 weeks
|
124296 |
09-Jan-2004 |
nectar |
Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'm at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation.
Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts.
Reviewed by: bde
|
124180 |
06-Jan-2004 |
nectar |
Use ANSI C function definition for `_mcount' and remove `static' prototype from header file.
Discussed with: bde, maybe one year ago
|
124144 |
05-Jan-2004 |
phk |
Add struct definition of the Elan MMCR registers (from jb@)
Put a CTASSERT() on the size of the struct.
Use the struct where it is easy to do so in elan_mmcr.c
Add the Elan specific hardware reset code (also from jb@).
|
123791 |
24-Dec-2003 |
peter |
GC the unused <machine/kse.h> file.
|
123580 |
17-Dec-2003 |
green |
Hey, how about we NOT make modules crash 486s?
|
123431 |
11-Dec-2003 |
jeff |
- Add the mp_topology() function to mp_machdep.c. This function builds up the smp_topology structure to reflect the layout of HTT enabled machines. - Add a prototype for mp_topology() in smp.h
|
123406 |
10-Dec-2003 |
jhb |
Delete old and unused APIC_IRQ defines.
|
123368 |
10-Dec-2003 |
obrien |
Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.h such that 'ispcvt' can build. Unforunately 'ispcvt' is needed in order for /etc/rc.d/syscons to run. This fixes the bug where I could not get my keymap effective at boot.
|
123288 |
08-Dec-2003 |
obrien |
Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr as these ioctl's aren't MD. This also means they are installed in /usr/include/dev/bktr now. Also provide compatability wrappers for where these headers lived in 4.x.
|
123266 |
07-Dec-2003 |
alc |
Don't remove the virtual-to-physical mapping when an sf_buf is freed. Instead, allow the mapping to persist, but add the sf_buf to a free list. If a later sendfile(2) or zero-copy send resends the same physical page, perhaps with the same or different contents, then the mapping overhead is avoided and the sf_buf is simply removed from the free list.
In other words, the i386 sf_buf implementation now behaves as a cache of virtual-to-physical translations using an LRU replacement policy on inactive sf_bufs. This is similar in concept to a part of http://www.cs.princeton.edu/~yruan/debox/ patch, but much simpler in implementation. Note: none of this is required on alpha, amd64, or ia64. They now use their direct virtual-to-physical mapping to avoid any emphemeral mapping overheads in their sf_buf implementations.
|
123223 |
07-Dec-2003 |
imp |
Ooops. These are still used by the bktr driver. David O'Brien has plans for dealing, but I'll let him deal.
Pointy hat to: imp@
|
123213 |
07-Dec-2003 |
imp |
Remote meteor driver. It hasn't compiled in over 3 years. If someone makes it compile again, and can test it, we can restore the driver to the tree.
|
123158 |
05-Dec-2003 |
imp |
File forgotten in the cx shuffle.
Pointed out by: Roman Kurakin Approved by: re@ <scottl> (under go ahead and commit new cx approval)
|
123120 |
03-Dec-2003 |
imp |
Updated cx driver commit part 1: bring in the new kernel driver.
This is the vastly updated cx drvier from Roman Kurakin <rik@cronyx.ru> who has been patiently waiting for this update for sometime.
The driver is mostly a rewrite from the version we have in the tree. While some similarities remain, losing the little history that the old driver has is not a big loss, and the re@ felt it was easier this way (less error prone).
The userland parts of this update will be committed shortly.
The driver is not connected to the build yet. I want to make sure I don't break any platform at any time, so I want to test that with these files in the tree before I continue (on the off chance I'm forgetting a file).
I changed the DEBUG macro to CX_DEBUG from the code that was submitted (to not break when we go to building with opt_global.h after the release), as well adding $FreeBSD$.
Submitted by: Roman Kurakin Approved by: re@ <scottl>
|
122931 |
20-Nov-2003 |
peter |
MFamd64: use a less compiler-intensive MD implementation of 'curthread' so that the compiler doesn't have to do so much work.
Approved by: re (jhb)
|
122860 |
17-Nov-2003 |
alc |
- Change the i386's sf_buf implementation so that it never allocates more than one sf_buf for one vm_page. To accomplish this, we add a global hash table mapping vm_pages to sf_bufs and a reference count to each sf_buf. (This is similar to the patches for RELENG_4 at http://www.cs.princeton.edu/~yruan/debox/.)
For the uninitiated, an sf_buf is nothing more than a kernel virtual address that is used for temporary virtual-to-physical mappings by sendfile(2) and zero-copy sockets. As such, there is no reason for one vm_page to have several sf_bufs mapping it. In fact, using more than one sf_buf for a single vm_page increases the likelihood that sendfile(2) blocks, hurting throughput. (See http://www.cs.princeton.edu/~yruan/debox/.)
|
122833 |
17-Nov-2003 |
bde |
Fixed pedantic warnings for statement-expressions using __extension__ and by not using a statement-expression for the non-expression __PCPU_SET().
|
122829 |
17-Nov-2003 |
bde |
Fixed a pedantic syntax error (a stray semicolon at the end of PCPU_MD_FIELDS).
|
122827 |
17-Nov-2003 |
bde |
Fixed pedantic syntax errors. Many macros didn't permit a semicolon after their invocation in the !KLD_MODULE case, but a semicolon is provided after all invocations and is required in the KLD_MODULE case.
|
122826 |
17-Nov-2003 |
bde |
Avoid a warning for compiling with `gcc -Wbad-function cast'. (This is the warning that points to the bug in `(char *)malloc(...)' where malloc() is implicitly declared as returning int. We do similar things here, but they work because u_int is the same as uintptr_t on i386's.)
|
122780 |
16-Nov-2003 |
alc |
- Modify alpha's sf_buf implementation to use the direct virtual-to- physical mapping. - Move the sf_buf API to its own header file; make struct sf_buf's definition machine dependent. In this commit, we remove an unnecessary field from struct sf_buf on the alpha, amd64, and ia64. Ultimately, we may eliminate struct sf_buf on those architecures except as an opaque pointer that references a vm page.
|
122771 |
16-Nov-2003 |
bde |
Localized the cy driver's locking.
|
122711 |
14-Nov-2003 |
peter |
Convert a couple of pointers to integers for source compatability with amd64.
|
122710 |
14-Nov-2003 |
peter |
Whitespace nit (sorry, couldn't help it)
|
122690 |
14-Nov-2003 |
jhb |
Shuffle the APIC interrupt vectors around a bit: - Move the IPI and local APIC interrupt vectors up into the 0xf0 - 0xff range. The pmap lazyfix IPI was reordered down next to the TLB shootdowns to avoid conflicting with the spurious interrupt vector. - Move the base of APIC interrupts up 16 so that the first 16 APIC interrupts do not overlap the vectors used by the ATPIC. - Remove bogus interrupt vector reservations for LINT[01]. - Now that 0xc0 - 0xef are available, use them for device interrupts. This increases the number of APIC device interrupts to 191. - Increase the system-wide number of global interrupts to 191 to catch up to more APIC interrupts.
Requested by: peter (2)
|
122617 |
13-Nov-2003 |
jhb |
Fix a typo.
|
122572 |
12-Nov-2003 |
jhb |
- Move manipulation of td_intr_nesting_level out of assembly interrupt vector stubs and into the C functions they call. - Move disabling and EOIing of interrupt sources out of PIC driver entry points and into intr_execute_handlers(). Intr_execute_handlers() only disables a source for an interrupt if it is a stray interrupt or has threaded handlers. Sources with fast handlers no longer disable (mask) the source while executing the handlers. - Move the setting of clkintr_pending into intr_execute_handlers() and set the variable for any interrupt source with a vector of 0. (Should only be true for IRQ 0.) This fixes clkintr_pending in the NO_MIXED_MODE case. - Implement lapic_eoi() and use it to implement ioapic_eoi_source(). - Rename atpic_sched_ithd() to atpic_handle_intr() since it is used to handle all atpic interrupts and not just threaded ones.
Inspired by: peter's changes to amd64 in p4 (1) Requested by: bde (2)
|
122284 |
08-Nov-2003 |
alc |
- Similar to post-PAE RELENG_4 split pmap_pte_quick() into two cases, pmap_pte() and pmap_pte_quick(). The distinction being based upon the locks that are held by the caller. When the given pmap is not the current pmap, pmap_pte() should be used when Giant is held and pmap_pte_quick() should be used when the vm page queues lock is held. - When assigning to PMAP1 or PMAP2, include PG_A anf PG_M. - Reenable the inlining of pmap_is_current().
In collaboration with: tegge
|
122266 |
07-Nov-2003 |
scottl |
Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in the busdma headers.
|
122154 |
05-Nov-2003 |
anholt |
Spelling and grammar fixes.
PR: kern/54658 Submitted by: Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
|
122012 |
03-Nov-2003 |
jhb |
Remove old APIC header.
|
121999 |
03-Nov-2003 |
jhb |
Catch up to interrupt code changes.
|
121996 |
03-Nov-2003 |
jhb |
New i386 SMP code:
- The MP code no longer knows anything specific about an MP Table. Instead, the local APIC code adds CPUs via the cpu_add() function when a local APIC is enumerated by an APIC enumerator. - Don't divide the argument to mp_bootaddress() by 1024 just so that we can turn around and mulitply it by 1024 again. - We no longer panic if SMP is enabled but we are booted on a UP machine. - init_secondary(), the asm code between init_secondary() and ap_init() in mpboot.s and ap_init() have all been merged together in C into init_secondary(). - We now use the cpuid feature bits to determine if we should enable PSE, PGE, or VME on each AP. - Due to the change in the implementation of critical sections, acquire the SMP TLB mutex around a slightly larger chunk of code for TLB shootdowns. - Remove some of the debug code from the original SMP implementation that is no longer used or no longer applies to the new APIC code. - Use a temporary hack to disable the ACPI module until the SMP code has been further reorganized to allow ACPI to work as a module again. - Add a DDB command to dump the interesting contents of the IDT.
|
121991 |
03-Nov-2003 |
jhb |
Add the MP Table APIC enumerator. This code uses the BIOS MP Table to enumerate I/O APICs as well as local APICs. It also provides Host-PCI and PCI-PCI bridge drivers to use the MP Table to route PCI interrupts.
|
121986 |
03-Nov-2003 |
jhb |
New APIC support code:
- The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR registers to determine which vector in its assigned range was triggered. Thus, the apic code can support 159 different interrupt vectors with only 5 entry points. - We now always to disable the local APIC to work around an errata in certain PPros and then re-enable it again if we decide to use the APICs to route interrupts. - We no longer map IO APICs or local APICs using special page table entries. Instead, we just use pmap_mapdev(). We also no longer export the virtual address of the local APIC as a global symbol to the rest of the system, but only in local_apic.c. To aid this, the APIC ID of each CPU is exported as a per-CPU variable. - Interrupt sources are provided for each intpin on each IO APIC. Currently, each source is given a unique interrupt vector meaning that PCI interrupts are not shared on most machines with an I/O APIC. That mapping for interrupt sources to interrupt vectors is up to the APIC enumerator driver however. - We no longer probe to see if we need to use mixed mode to route IRQ 0, instead we always use mixed mode to route IRQ 0 for now. This can be disabled via the 'NO_MIXED_MODE' kernel option. - The npx(4) driver now always probes to see if a built-in FPU is present since this test can now be performed with the new APIC code. However, an SMP kernel will panic if there is more than one CPU and a built-in FPU is not found. - PCI interrupts are now properly routed when using APICs to route interrupts, so remove the hack to psuedo-route interrupts when the intpin register was read. - The apic.h header was moved to apicreg.h and a new apicvar.h header that declares the APIs used by the new APIC code was added.
|
121984 |
03-Nov-2003 |
jhb |
Add a per-thread variable for saving the state of eflags to support the critical section code.
|
121982 |
03-Nov-2003 |
jhb |
New device interrupt code. This defines an interrupt source abstraction that provides methods via a PIC driver to do things like mask a source, unmask a source, enable it when the first interrupt handler is added, etc. The interrupt code provides a table of interrupt sources indexed by IRQ numbers, or vectors. These vectors are what new-bus uses for its IRQ resources and for bus_setup_intr()/bus_teardown_intr(). The interrupt code then maps that vector a given interrupt source object. When an interrupt comes in, the low-level interrupt code looks up the interrupt source for the source that triggered the interrupt and hands it off to this code to execute the appropriate handlers.
By having an interrupt source abstraction, this allows us to have different types of interrupt source providers within the shared IRQ address space. For example, IRQ 0 may map to pin 0 of the master 8259A PIC, IRQs 1 through 60 may map to pins on various I/O APICs, and IRQs 120 through 128 may map to MSI interrupts for various PCI devices.
|
121981 |
03-Nov-2003 |
jhb |
- Always use 256 IDT entries since it is now a runtime decison as to how many entries we use. - Add a constant IDT_IO_INTS for the first IDT entry used for device interrupts.
|
121978 |
03-Nov-2003 |
jhb |
Define IDTVEC() and TRAP() assembly macros so that they can be shared with several files.
|
121977 |
03-Nov-2003 |
jhb |
Revert the critical section implementation to disable interrupts via cli/sti now that we support many more than 32 interrupt sources.
|
121754 |
30-Oct-2003 |
jhb |
Always export r_gdt and r_idt and give them extern declarations in machine/segments.h.
|
121481 |
24-Oct-2003 |
jhb |
A few whitespace and comment tweaks.
|
120831 |
06-Oct-2003 |
bms |
Move pmap_resident_count() from the MD pmap.h to the MI pmap.h. Add a definition of pmap_wired_count(). Add a definition of vmspace_wired_count().
Reviewed by: truckman Discussed with: peter
|
120654 |
01-Oct-2003 |
peter |
Commit Bosko's patch to clean up the PSE/PG_G initialization to and avoid problems with some Pentium 4 cpus and some older PPro/Pentium2 cpus. There are several problems, some documented in Intel errata. This patch: 1) moves the kernel to the second page in the PSE case. There is an errata that says that you Must Not point a 4MB page at physical address zero on older cpus. We avoided bugs here due to sheer luck. 2) sets up PSE page tables right from the start in locore, rather than trying to switch from 4K to 4M (or 2M) pages part way through the boot sequence at the same time that we're messing with PG_G.
For some reason, the pmap work over the last 18 months seems to tickle the problems, and the PAE infrastructure changes disturb the cpu bugs even more.
A couple of people have reported a problem with APM bios calls during boot. I'll work with people to get this resolved.
Obtained from: bmilekic
|
120620 |
01-Oct-2003 |
jeff |
- Add ss2_pagezero() for zeroing pages using the movnti instruction. This instruction is enabled with SSE2 but does not use SSE registers. It is a "non-temporal" move which bypasses the cache and does not dirty lines.
|
120602 |
30-Sep-2003 |
jeff |
- On my Pentium4-M laptop, invalpg takes ~1100 cycles if the page is found in the TLB and ~1600 if it is not. Therefore, it is more effecient to invalidate the TLB after operations that use CMAP rather than before. - So that the tlb is invalidated prior to switching off of a processor, we must change the switchin functions to switchout functions. - Remove td_switchout from the thread and move it to the x86 pcb. - Move the code that calls switchout into swtch.s. These changes make this optimization truely x86 specific.
|
120424 |
25-Sep-2003 |
alc |
- Eliminate the pte object. - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() to allocate KVA space for the page directory page(s). Submitted by: tegge
|
120422 |
25-Sep-2003 |
peter |
Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit systems where the data/stack/etc limits are too big for a 32 bit process.
Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c.
Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy.
Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced.
Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does.
Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
|
120404 |
24-Sep-2003 |
imp |
Per TRB vote: restore the aquire_timer0 and associated goo. This will be gone in FreeBSD 6, so put BURN_BRIDGES around it. The TRB also felt that if something better comes along sooner, it can be used to replace this code.
Delayed by: BSDcon and subsequent disk crash.
|
120375 |
23-Sep-2003 |
nyan |
Implement the bus_space_map() function to allocate resources and initialize a bus_handle, but currently it does only initializing a bus_handle.
|
120344 |
22-Sep-2003 |
peter |
Microoptimization to allow the compiler to evaluate ntohl() etc on known constants at compile time rather than at run time. We have a number of nasty hacks around the place to cache ntohl() of constants (eg: nfs). This change allows the compiler to compile-time evaluate ntohl(1) as 0x01000000 rather than having to emit assembler code to do it. This has other smaller flow-on effects because the compiler can see that ntohl(constant) itself has a constant value now and can propagate the compile time evaluation.
Obtained from: Ideas from NetBSD and Linux, and some code from NetBSD
|
120205 |
18-Sep-2003 |
jhb |
Fix a busted constant related to PCI configuration acess method #1. The reserved bits in the port that must be zero are 24:30, not 20:30. Bits 16:23 are used to set the bus number. This meant that when we tested for config mechanism #1, if the previous PCI configuration transaction sent used a bus number greater than 15, one of the bits in 20:23 would be non-zero and we would fail to use config mechanism #1 and thus fail to see that PCI existed on the machine at all.
Obtained from: Shanley's PCI System Architecture book Tested by: des Proxied through: njl
|
119941 |
10-Sep-2003 |
jhb |
Remove an XXX comment by using the per CPU mask added after this comment was added.
|
119940 |
10-Sep-2003 |
jhb |
Add a acpi_SetDefaultIntrModel() method to allow drivers to set the interrupt model prior to the acpi0 device being probed and attached.
|
119938 |
10-Sep-2003 |
jhb |
Fix a typo.
|
119935 |
10-Sep-2003 |
jhb |
Add constants for entries in the IDT and use those instead of magic numbers.
|
119628 |
01-Sep-2003 |
kan |
Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_ symbol.
|
119452 |
25-Aug-2003 |
obrien |
Fix copyright comment & FBSDID style nits.
Requested by: bde
|
118990 |
16-Aug-2003 |
marcel |
Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MI prototypes of cpu_halt(), cpu_reset() and swi_vm() from md_var.h to cpu.h. This affects db_command.c and kern_shutdown.c.
ia64: move all MD prototypes from cpu.h to md_var.h. This affects madt.c, interrupt.c and mp_machdep.c. Remove is_physical_memory(). It's not used (vm_machdep.c).
alpha: the MD prototypes have been left in cpu.h with a comment that they should be there. Moving them is left for later. It was expected that the impact would be significant enough to be done in a seperate commit.
powerpc: MD prototypes left in cpu.h. Comment added.
Suggested by: bde Tested with: make universe (pc98 incomplete)
|
118956 |
15-Aug-2003 |
phk |
remove acquire_timer0() and release_timer0() and related stuff.
|
118954 |
15-Aug-2003 |
jhb |
- Add macros describing some new MSR's in the Pentium 4 and some older MSR's in the original Pentium. - Add macros describing the bit fields in the APICBASE MSR.
|
118953 |
15-Aug-2003 |
jhb |
- Fix a duplicated typo. - Add a macro for the logical shift needed to extract an APIC ID from either from the local APIC ICR Hi register or the APIC ID registers of the local and IO APICs.
|
118848 |
12-Aug-2003 |
imp |
Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon's copyrighted files.
Approved by: Matt Dillon
|
118832 |
12-Aug-2003 |
ps |
Halted CPU's should not accumulate time.
Reviewed by: jhb
|
118559 |
06-Aug-2003 |
bde |
Backed out previous commit. This restores the warning about pessimized (short) types for the port arg of inb() (rev.1.56). The warning started working for u_short types with gcc-3.3. The pessimizations exposed by this been fixed except for the cx and oltr drivers where the breakage of the warning has been pushed to the drivers.
|
118550 |
06-Aug-2003 |
phk |
Dont initialize a TSC timecounter until we know if it is broken or not.
|
118444 |
04-Aug-2003 |
jhb |
- GC unused cpu_thread_link(). - Move the enabling of interrupts out of assembly and into C a few instructions later at cpu_critical_fork_exit(). This puts more of the MD critical section implementation under the MD critical section API making it easier to test and develop alternative implementations.
|
118440 |
04-Aug-2003 |
julian |
Allow foot shooting as Linux emulation needs it. Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet.
Discussed with: Davidxu
|
118382 |
03-Aug-2003 |
obrien |
Style sync.
|
118188 |
30-Jul-2003 |
peter |
Detour via (void *) to defeat gcc's strict-aliasing warnings when using -O2 or -Os (such as 'make release').
This commit brought to you by the warning: dereferencing type-punned pointer will break strict-aliasing rules
|
118081 |
27-Jul-2003 |
mux |
- Introduce a new busdma flag BUS_DMA_ZERO to request for zero'ed memory in bus_dmamem_alloc(). This is possible now that contigmalloc() supports the M_ZERO flag. - Remove the locking of Giant around calls to contigmalloc() since contigmalloc() now grabs Giant itself.
|
117937 |
23-Jul-2003 |
phk |
Stop GCC from whining when people use a 16 bit port number for inb() and outb()
|
117928 |
23-Jul-2003 |
jhb |
Use macros from apic.h to when writing to the ICR to send IPIs to startup APs rather than magic numbers.
Tested by: scottl
|
117927 |
23-Jul-2003 |
jhb |
Add a new macro APIC_ICRLO_RESV_MASK that contains all of the reserved fields in the low 32 bits of the local APIC ICR register. Use this macro in place of APIC_RESV2_MASK when masking off existing bits from the ICR when writing to it to send an IPI.
Tested by: scottl
|
117911 |
23-Jul-2003 |
peter |
Remove _ARCH_INDIRECT, it was the glue to enable having both hardware and software versions of the floating point code in libm. The runtime selection was done by reading the hw.floatingpoint sysctl via __get_hw_float().
|
117870 |
22-Jul-2003 |
peter |
Initiate de-orbit burn for fpu-less operation. 386+387 is still theoretically supportable, but you'd really be happier with FreeBSD 2.1.8 on it.
|
117385 |
10-Jul-2003 |
markm |
Protect lint(1) from a #error.
|
117372 |
10-Jul-2003 |
peter |
unifdef -DLAZY_SWITCH and start to tidy up the associated glue.
|
117126 |
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
117006 |
28-Jun-2003 |
jeff |
- Construct a cpu topology map for Hyper Threading systems so that ULE may take advantage of them.
|
116930 |
27-Jun-2003 |
peter |
Tidy up leftover lazy_switch instrumentation that is no longer needed. This cleans up some #ifdef hell.
|
116926 |
27-Jun-2003 |
peter |
Fix the false IPIs on smp when using LAZY_SWITCH caused by pmap_activate() not releasing the pm_active bit in the old pmap.
|
116355 |
14-Jun-2003 |
alc |
Migrate the thread stack management functions from the machine-dependent to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms.
Two details:
1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0.
2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab().
|
115954 |
07-Jun-2003 |
jhb |
Reinstate the bug fix in revision 1.2 as it is correct. The errors I saw on my laptop after this change were the result of a bug in the ACPICA code.
|
115908 |
06-Jun-2003 |
jhb |
- Rename nexus_pcib to legacy_pcib. I've been meaning to do this for a while after the legacy device was added since this driver hangs from legacy and not nexus. - Make several methods non-static so they can be reused in a mptable host -> pci bridge driver that will be added at a later date. - Let legacy_pcib() use pcibios_pcib_route_interrupt() directly instead of wrapping it in a private function. Originally, I thought I was going to have the nexus_pcib() driver make a runtime APIC vs. 8259A check and call the appropriate routing method (MPTable vs. PIR) that way, but it ended up being cleaner to make nexus_pcib() just work with PIR and have a separate host -> pci bridge driver for the mptable/apic case.
|
115905 |
06-Jun-2003 |
jhb |
- Document the thermal and performance counter LVT entries in the local APIC. - Add a lvt_thermal member to the LAPIC struct. - Add constants for the SMI and INIT LVT delivery modes.
|
115779 |
03-Jun-2003 |
jhb |
Bah, revert the previous commit for the time being due to inadequate testing on my part. The output asm looks correct with the previous commit in place and it works on amd64, but on my laptop I got a spew of AE_BAD_PARAMETER errors trying to unlock the acpi global lock.
|
115775 |
03-Jun-2003 |
jhb |
Fix the asm constraints so that we use the correct constants when acquiring and releasing ACPI global locks instead of (ab)using the pointers to those locks as the constants. Also, rather than require that the address of the lock be stored in a register, use a memory constraint allowing the memory address to be used directly.
Noticed by: peter
|
115683 |
02-Jun-2003 |
obrien |
Use __FBSDID().
|
115671 |
02-Jun-2003 |
obrien |
Don't use ## to concatinate to two things that don't together make a C token. Two tokens that don't together form a vaid preprocssor token cannot be pasted together using ANSI-C token concatinatation. GCC 3.2's cpp, at least, produces the desired result w/o using "##".
|
115659 |
02-Jun-2003 |
obrien |
Use C99 compatable asm statements.
|
115416 |
30-May-2003 |
hmp |
Rename BUS_DMAMEM_NOSYNC to BUS_DMA_COHERENT.
The current name is confusing, because it indicates to the client that a bus_dmamap_sync() operation is not necessary when the flag is specified, which is wrong.
The main purpose of this flag is to hint the underlying architecture that DMA memory should be mapped in a coherent way, but the architecture can ignore it. But if the architecture does supports coherent mapping of memory, then it makes bus_dmamap_sync() calls cheap.
This flag is the same as the one in NetBSD's Bus DMA.
Reviewed by: gibbs, scottl, des (implicitly) Approved by: re@ (jhb)
|
115343 |
27-May-2003 |
scottl |
Bring back bus_dmasync_op_t. It is now a typedef to an int, though the BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'.
Approved by: re (bmah)
|
115316 |
26-May-2003 |
scottl |
De-orbit bus_dmamem_alloc_size(). It's a hack and was never used anyways. No need for it to pollute the 5.x API any further.
Approved by: re (bmah)
|
115164 |
19-May-2003 |
kan |
sys/sys/limits.h:
- Fix visibilty test for LONG_BIT and WORD_BIT. `#if defined(__FOO_VISIBLE)' is alays wrong because __FOO_VISIBLE is always defined (to 0 for invisibility).
sys/<arch>/include/limits.h sys/<arch>/include/_limits.h:
- Style fixes.
Submitted by: bde Reviewed by: bsdmike Approved by: re (scottl)
|
115016 |
15-May-2003 |
alc |
Initialize logical_cpus_mask when the logical CPUs are enumerated in the mptable. (Previously, logical_cpus_mask was only initialized if the hyperthreading fixup was executed.)
Approved by: re (jhb) Reviewed by: ps
|
114678 |
04-May-2003 |
kan |
Style fixes. Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong.
|
114377 |
01-May-2003 |
peter |
Hack to enable getting two different elf32 and elf64 loaders in the same i386 loader binary.
|
114376 |
01-May-2003 |
peter |
<b30> is 'IA64' - ie: you're running on an ia64 in 32 bit mode.
|
114373 |
01-May-2003 |
peter |
Slight reorg and added AMD64 support. A couple of the MODINFOMD_* values that were added to sparc64 and later powerpc, really should have been in the MI area. But changing that now with insufficient preperation will just cause too much pain.
Move MD_FETCH() to the MI sys/linker.h file to avoid another two copies of it.
|
114348 |
01-May-2003 |
peter |
KPT_MIN_ADDRESS and KPT_MAX_ADDRESS are not used anywhere. And if they were, they are not safe to use outside of the kernel since these values can change at kernel compile time - ie: we do not want them compiled into userland binaries.
|
114216 |
29-Apr-2003 |
kan |
Deprecate machine/limits.h in favor of new sys/limits.h. Change all in-tree consumers to include <sys/limits.h>
Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
|
114177 |
28-Apr-2003 |
jake |
Use inlines for loading and storing page table entries. Use cmpxchg8b for the PAE case to ensure idempotent 64 bit loads and stores.
Sponsored by: DARPA, Network Associates Laboratories
|
113941 |
23-Apr-2003 |
kan |
Add a new sys/limits.h file which in turn depends on machine/_limits.h to get actual constant values. This is in preparation for machine/limits.h retirement.
Discussed on: standards@ Submitted by: Craig Rodrigues <rodrigc@attbi.com> (*) Modified by: kan
|
113728 |
20-Apr-2003 |
davidxu |
Backout my last commit.
Requested by: bde
|
113704 |
19-Apr-2003 |
davidxu |
Don't return garbage in high 16 bits.
|
113347 |
10-Apr-2003 |
mux |
Change the operation parameter of bus_dmamap_sync() from an enum to an int and redefine the BUS_DMASYNC_* constants as flags. This allows us to specify several operations in one call to bus_dmamap_sync() as in NetBSD.
|
113266 |
08-Apr-2003 |
jake |
Remove invalid cast to vm_offset_t to avoid truncating a physical address when doing pmap_kextract on a 2MB page.
Spotted by: peter Sponsored by: DARPA, Network Associates Laboratories
|
113225 |
07-Apr-2003 |
jake |
Better fix for previous previous which still allows the 4megs of kva at the top of the address space to be reclaimed. The problem is that with the APTD gone the mapable kernel address space runs right to the end of the 32 bit address space. As a max this is 0x100000000, which can't be represented in 32 bits, so we have to use ptd entry n-1 and pte offset n-1, instead of ptd entry n and pte offset 0. There's still 1 page we can't use, but we gain just under 4 megs of kva (8 megs with PAE).
Sponsored by: DARPA, Network Associates Laboratories
|
113090 |
04-Apr-2003 |
des |
Define ovbcopy() as a macro which expands to the equivalent bcopy() call, to take care of the KAME IPv6 code which needs ovbcopy() because NetBSD's bcopy() doesn't handle overlap like ours.
Remove all implementations of ovbcopy().
Previously, bzero was a function pointer on i386, to save a jmp to bzero_vector. Get rid of this microoptimization as it only confuses things, adds machine-dependent code to an MD header, and doesn't really save all that much.
This commit does not add my pagezero() / pagecopy() code.
|
113083 |
04-Apr-2003 |
phk |
Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>
Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well.
Adjust includes in sys/boot accordingly.
|
113064 |
04-Apr-2003 |
jake |
Bandaid fix for previous commit while I figure out why it broke. This caused crashes early in boot on i386 UP machines.
Reported by: phk Pointy hat to: jake
|
113040 |
03-Apr-2003 |
jake |
- Removed APTD and associated macros, it is no longer used.
BANG BANG BANG etc.
Sponsored by: DARPA, Network Associates Laboratories
|
112993 |
02-Apr-2003 |
peter |
Commit a partial lazy thread switch mechanism for i386. it isn't as lazy as it could be and can do with some more cleanup. Currently its under options LAZY_SWITCH. What this does is avoid %cr3 reloads for short context switches that do not involve another user process. ie: we can take an interrupt, switch to a kthread and return to the user without explicitly flushing the tlb. However, this isn't as exciting as it could be, the interrupt overhead is still high and too much blocks on Giant still. There are some debug sysctls, for stats and for an on/off switch.
The main problem with doing this has been "what if the process that you're running on exits while we're borrowing its address space?" - in this case we use an IPI to give it a kick when we're about to reclaim the pmap.
Its not compiled in unless you add the LAZY_SWITCH option. I want to fix a few more things and get some more feedback before turning it on by default.
This is NOT a replacement for Bosko's lazy interrupt stuff. This was more meant for the kthread case, while his was for interrupts. Mine helps a little for interrupts, but his helps a lot more.
The stats are enabled with options SWTCH_OPTIM_STATS - this has been a pseudo-option for years, I just added a bunch of stuff to it.
One non-trivial change was to select a new thread before calling cpu_switch() in the first place. This allows us to catch the silly case of doing a cpu_switch() to the current process. This happens uncomfortably often. This simplifies a bit of the asm code in cpu_switch (no longer have to call choosethread() in the middle). This has been implemented on i386 and (thanks to jake) sparc64. The others will come soon. This is actually seperate to the lazy switch stuff.
Glanced at by: jake, jhb
|
112931 |
01-Apr-2003 |
phk |
Don't include <sys/buf.h> needlessly.
|
112841 |
30-Mar-2003 |
jake |
- Add support for PAE and more than 4 gigs of ram on x86, dependent on the kernel opition 'options PAE'. This will only work with device drivers which either use busdma, or are able to handle 64 bit physical addresses.
Thanks to Lanny Baron from FreeBSD Systems for the loan of a test machine with 6 gigs of ram.
Sponsored by: DARPA, Network Associates Laboratories, FreeBSD Systems
|
112837 |
30-Mar-2003 |
jake |
- Remove invalid casts.
Sponsored by: DARPA, Network Associates Laboratories
|
112836 |
30-Mar-2003 |
jake |
- Convert all uses of pmap_pte and get_ptbase to pmap_pte_quick. When accessing an alternate address space this causes 1 page table page at a time to be mapped in, rather than using the recursive mapping technique to map in an entire alternate address space. The recursive mapping technique changes large portions of the address space and requires global tlb flushes, which seem to cause problems when PAE is enabled. This will also allow IPIs to be avoided when mapping in new page table pages using the same technique as is used for pmap_copy_page and pmap_zero_page.
Sponsored by: DARPA, Network Associates Laboratories
|
112687 |
26-Mar-2003 |
ps |
Nuke options HTT infavor of machdep.hlt_logical_cpus tunable/sysctl. This keeps the logical cpu's halted in the idle loop. By default the logical cpu's are halted at startup. It is also possible to halt any cpu in the idle loop now using machdep.hlt_cpus.
Examples of how to use this: machdep.hlt_cpus=1 halt cpu0 machdep.hlt_cpus=2 halt cpu1 machdep.hlt_cpus=4 halt cpu2 machdep.hlt_cpus=3 halt cpu0,cpu1
Reviewed by: jhb, peter
|
112569 |
25-Mar-2003 |
jake |
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long.
Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms.
Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
|
112558 |
24-Mar-2003 |
mdodd |
Use __packed;
|
112350 |
17-Mar-2003 |
jhb |
Expand the APIC ID mask field of the ICR register to 8 bits intead of just 4 bits. This reportedly fixes booting on the SW7500CW2. Much thanks to the submitter for tracking this down!
Submitted by: Brian Buchanan <brian@ncircle.com> Reviewed by: peter MFC after: 3 days
|
112312 |
16-Mar-2003 |
jake |
Made the prototypes for pmap_kenter and pmap_kremove MD. These functions are machine dependent because they are not required to update the tlb when mappings are added or removed, and doing so is machine dependent. In addition, an implementation may require that pages mapped with pmap_kenter have a backing vm_page_t, which is not necessarily true of all physical pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the physical address in order to make this requirement clear.
|
112104 |
11-Mar-2003 |
jake |
Use bus_space_handle_t to represent host port and virtual addresses; bus_addr_t may not be appropriate.
Sponsored by: DARPA, Network Associates Laboratories
|
111878 |
04-Mar-2003 |
jhb |
Wrap the hyperthreading support code with the HTT kernel option. Hyperthreading support is now off unless the HTT option is added.
MFC-after: 3 days
|
111636 |
27-Feb-2003 |
alc |
Remove some long unused declarations. (For example, the PV flags have not been used since revision 1.8, roughly nine years ago.)
|
111524 |
26-Feb-2003 |
mux |
Correctly set BUS_SPACE_MAXSIZE in all the busdma backends. It was bogusly set to 64 * 1024 or 128 * 1024 because it was bogusly reused in the BUS_DMAMAP_NSEGS definition.
|
111493 |
25-Feb-2003 |
jake |
- Added inlines pmap_is_current, pmap_is_alternate and pmap_set_alternate for testing and setting the current and alternate address spaces. - Changed PTDpde and APTDpde to arrays to support multiple page directory pages.
ponsored by: DARPA, Network Associates Laboratories
|
111440 |
24-Feb-2003 |
jake |
- Removed UMAXPTDI and UMAXPTEOFF. - Changed VM_MAXUSER_ADDRESS to be defined in terms of PTDPTDI. In order for assumptions about the recursive page table map to work it must be the base of the recursive map. Any pte offset that's not NPTEPG will break these assumptions.
Sponsored by: DARPA, Network Associates Laboratories
|
111428 |
24-Feb-2003 |
nyan |
The mpbiosreason variable does not used for pc98.
|
111382 |
23-Feb-2003 |
tegge |
Allow machines with one CPU and a valid mp table to boot an SMP kernel.
|
111372 |
23-Feb-2003 |
jake |
Previous commit missed a 1 that should be NGPTD, and an NPDEPG that should be NPDEPTD. Grumble.
Sponsored by: DARPA, Network Associates Laboratories
|
111363 |
23-Feb-2003 |
jake |
- Added macros NPGPTD, NBPTD, and NPDEPTD, for dealing with the size of the page directory. - Use these instead of the magic constants 1 or PAGE_SIZE where appropriate. There are still numerous assumptions that the page directory is exactly 1 page.
Sponsored by: DARPA, Network Associates Laboratories
|
111299 |
23-Feb-2003 |
jake |
- Added macros PDESHIFT and PTESHIFT, use these instead of magic constants in locore. - Removed the macros PTESIZE and PDESIZE, use sizeof instead in C.
Sponsored by: DARPA, Network Associates Laboratories
|
111272 |
22-Feb-2003 |
alc |
The root of the splay tree maintained within the pm_pteobj always refers to the last accessed pte page. Thus, the pm_ptphint is redundant and can be removed.
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
111068 |
18-Feb-2003 |
peter |
Initiate de-orbit burn for USE_PCI_BIOS_FOR_READ_WRITE. This has been #if'ed out for a while. Complete the deed and tidy up some other bits.
We need to be able to call this stuff from outer edges of interrupt handlers for devices that have the ISR bits in pci config space. Making the bios code mpsafe was just too hairy. We had also stubbed it out some time ago due to there simply being too much brokenness in too many systems. This adds a leaf lock so that it is safe to use pci_read_config() and pci_write_config() from interrupt handlers. We still will use pcibios to do interrupt routing if there is no acpi.. [yes, I tested this]
Briefly glanced at by: imp
|
111002 |
16-Feb-2003 |
phk |
Remove #include <sys/dkstat.h>
|
110566 |
08-Feb-2003 |
mike |
Implement fpclassify(): o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'.
This was developed by David Schultz and myself with input from bde and fenner.
PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions)
|
110370 |
05-Feb-2003 |
phk |
i386/i386/tsc.c was repo-copied from i386/isa/clock.c.
Remove all the stuff that does not relate to the TSC.
Change the calibration to use DELAY(1000000) rather than trying to check it against the CMOS RTC, this drastically increases precision:
Using 25 samples on a Athlon 700MHz UP machine I find:
stddev min max average CMOS 22200 Hz -74980 Hz 34301 Hz 704928721 Hz DELAY 1805 Hz -1984 Hz 2678 Hz 704937583 Hz
(The difference between the two averages is not statistically significant.)
expressed in PPM of the frequency: stddev min max CMOS 31.49 PPM -106.37 PPM 48.66 PPM DELAY 2.56 PPM 2.81 PPM 3.80 PPM
This code will not be used until a followup commit to sys/isa/clock.c and sys/pc98/pc98/clock.c which will only happen after some field testing.
|
110368 |
05-Feb-2003 |
phk |
Make get_cyclecount() use binuptime() when no tsc is available: it is cheaper.
|
110296 |
03-Feb-2003 |
jake |
Split statclock into statclock and profclock, and made the method for driving statclock based on profhz when profiling is enabled MD, since most platforms don't use this anyway. This removes the need for statclock_process, whose only purpose was to subdivide profhz, and gets the profiling clock running outside of sched_lock on platforms that implement suswintr. Also changed the interface for starting and stopping the profiling clock to do just that, instead of changing the rate of statclock, since they can now be separate.
Reviewed by: jhb, tmm Tested on: i386, sparc64
|
110190 |
01-Feb-2003 |
julian |
Reversion of commit by Davidxu plus fixes since applied.
I'm not convinced there is anything major wrong with the patch but them's the rules..
I am using my "David's mentor" hat to revert this as he's offline for a while.
|
110039 |
29-Jan-2003 |
phk |
Make tsc_freq a 64bit quantity.
Inspired by: http://www.theinquirer.net/?article=7481
|
110030 |
29-Jan-2003 |
scottl |
Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() as counterparts to bus_dmamem_alloc() and bus_dmamem_free(). This allows the caller to specify the size of the allocation instead of it defaulting to the max_size field of the busdma tag.
This is intended to aid in converting drivers to busdma. Lots of hardware cannot understand scatter/gather lists, which forces the driver to copy the i/o buffers to a single contiguous region before sending it to the hardware. Without these new methods, this would require a new busdma tag for each operation, or a complex internal allocator/cache for each driver.
Allocations greater than PAGE_SIZE are rounded up to the next PAGE_SIZE by contigmalloc(), so this is not suitable for multiple static allocations that would be better served by a single fixed-length subdivided allocation.
Reviewed by: jake (sparc64)
|
109994 |
28-Jan-2003 |
jake |
Remove BDE_DEBUGGER.
Discussed with: bde
|
109898 |
26-Jan-2003 |
julian |
Fix KSE related patch. Make it compile for the SMP case.. statclock_process() has changed prototypes.
|
109718 |
23-Jan-2003 |
peter |
Clean up some junk defines, and GC the TPR options.
|
109717 |
23-Jan-2003 |
peter |
Nuke CHEAP_TPR stuff, including LOPRIO_LEVEL (bogus) and ALLHWI_LEVEL (which we never used). There is no need to tweak the TPR anymore and only causes problems.
|
109700 |
22-Jan-2003 |
jhb |
- Move enable_sse()'s prototype to machine/md_var.h. - Sort definition of cpu_* variables appropriately. - Move cpu_fxsr out of the magic non-BSS set of variables and stick it in the BSS along with hw_instruction_sse (make the latter static as well).
Submitted by: bde (partially)
|
109696 |
22-Jan-2003 |
jhb |
Rename cpuid_cpuinfo to cpu_procinfo. bde requested that I rename this variable to something in the cpu_* namespace since that's what all the other cpuid variables were named and cpu_procinfo is what I came up with.
Requested by: bde
|
109691 |
22-Jan-2003 |
jhb |
Bah, add in a missing space char I noticed when MFC'ing this.
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
109520 |
19-Jan-2003 |
marcel |
o Move the contents of <machine/floatingpoint.h> over to <machine/ieeefp.h> where it belongs. o Remove the i386 specific inclusion of <machine/floatingpoint.h> from <ieeefp.h>, now that including <machine/ieeefp.h> is enough for all architectures. o Allow <machine/ieeefp.h> to inline the functions exposed by the headers by checking for _IEEEFP_INLINED_ in the MI header. When defined, prototypes are not given and it is assumed that the MD headers, when inlining only a subset of the functions provide prototypes for the functions not being inlined.
Based on patch from: Terry Lambert <tlambert2@mindspring.com> Tested with: make release.
|
109412 |
17-Jan-2003 |
mdodd |
A driver for the System Management Application Program Interface (SMAPI) BIOS, which is present on some IBM Thinkpad models (560, 600, 770 to name a few.)
The SMAPI BIOS provides access to System Information, System Configuration, and Power Management.
|
109026 |
09-Jan-2003 |
jhb |
Rework part of the previous processor name changes so that we read cpu_exthigh and cpu_brand in printcpuinfo() instead of in identify_cpu(). We also only do it for known-good values of cpu_vendor which is a bit more conservative.
Reviewed by: bde (mostly)
|
108947 |
08-Jan-2003 |
jhb |
- Add a cpu_exthigh variable to hold the highest extended cpuid value returned from cpuid 0x80000000. - Add a cpu_brand char array to hold the processor name returned by cpuid 0x80000002-0x80000004 on AMD, Intel, Transmeta, and possibly other CPUs. - Use cpuid to set cpu_exthigh and read the processor name if it is present in identify_cpu().
|
108914 |
08-Jan-2003 |
jhb |
Enumerate logical hyperthread CPUs manually if they aren't already listed in the mptable. The way this works is that we determine if the system has hyperthreading and how many logical CPU's should be in each physical CPU by using the information returned by cpuid. During the first pass of the mptable, we build a bitmask of the APIC IDs of the CPUs listed in the mptable. We then scan that bitmask to see if the CPUs are already listed by the mptable, or if there are any APIC IDs already in use that would conflict with the APIC IDs of the logical CPUs. If that test succeeds, then we fixup the count of application processors. Later on during the second pass of the mptable we create fake processor entries for logical CPUs and add them to the system.
We only need this type of fixup hack when using the mptable to enumerate CPUs. The ACPI MADT table properly enumerates all logical CPUs.
|
108911 |
08-Jan-2003 |
jhb |
Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid with %eax of 1 and set it in identify_cpu().
|
108909 |
08-Jan-2003 |
jhb |
- Fix the name of the hyperthreading cpuid feature flag to be HTT instead of HHT. - Document fields returned in %ebx by a cpuid with %eax of 1.
|
108533 |
01-Jan-2003 |
schweikh |
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, especially in troff files.
|
108175 |
22-Dec-2002 |
tjr |
MB_LEN_MAX is not MD, move it to the MI limits.h.
|
107521 |
02-Dec-2002 |
deischen |
Align the FPU state in the ucontext and sigcontext to 16 bytes to accomodate the new SSE/XMM floating point save/restore instructions.
This commit is mostly from bde and includes some style nits.
Approved by: re (jhb)
|
107317 |
27-Nov-2002 |
obrien |
Fix for non-GCC compilers.
Approved by: re (jhb)
|
106977 |
16-Nov-2002 |
deischen |
Add getcontext, setcontext, and swapcontext as system calls. Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one.
A few style nits and comments from bde are also included.
Tested on alpha by: gallatin
|
106598 |
07-Nov-2002 |
alfred |
Properly parenthesize the DBREG_DRX macro's variables to allow for DBREG_DRX(&dbregs, n) usage.
|
106542 |
07-Nov-2002 |
davidxu |
1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code, remove global variable in_vm86call, set vm86 calling flag in PCB flags.
2.Fix vm86 BIOS calling preempted problem by changing vm86_lock mutex type from MTX_DEF to MTX_SPIN. vm86pcb is not remembered in thread struct, when the thread calling vm86 BIOS is preempted by interrupt thread, and later switching back to the thread would cause incorrect context be loaded into CPU registers, this leads to kernel crash.
|
105955 |
25-Oct-2002 |
jhb |
Note that the sched_lock protects md_ldt of struct mdproc.
|
105950 |
25-Oct-2002 |
peter |
Split 4.x and 5.x signal handling so that we can keep 4.x signal handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound.
Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc.
Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
|
105910 |
25-Oct-2002 |
imp |
Use the correct values for LDBL_*. Libc doesn't completely support long doubles at the moment (printf truncates them to doubles). However, long doubles to appear to work to the ranges listed in this commit on both -stable (4.5) and -current. There may be some slight rounding issues with long doubles, but that's an orthogonal issue to these constants.
I've had this in my local tree for 3 months, and in my company's local tree for 15 months with no ill effects.
Obtained from: NetBSD Not likely to like it: bde
|
105777 |
23-Oct-2002 |
markm |
Very minor whitespace/style nit.
|
105554 |
20-Oct-2002 |
phk |
Change the definition of the debugging registers to be an array, so that we can index into it, rather than do pointer gymnastics on a structure containing 8 elements.
Verified by: MD5 hash on the produced .o files.
|
105347 |
17-Oct-2002 |
pirzyk |
Add the !define(COMPILING_LINT)
pass the pointy hat...
Requested by: Juli Mallett <jmallett@FreeBSD.org>
|
105311 |
17-Oct-2002 |
pirzyk |
put an #error directive when SMP and CPU_DISABLE_CMPXCHG are set together.
Requested by: Lars Eggart <larse@isi.edu> Enlighted how to do it by: John Baldwin <jhb@freebsd.org>
|
105216 |
16-Oct-2002 |
phk |
Be consistent about functions being static.
Spotted by: FlexeLint.
|
105138 |
15-Oct-2002 |
peter |
The a.out md_coredump stuff isn't referenced anywhere anymore, and hasn't been filled in for ages.. Nuked.
|
105117 |
14-Oct-2002 |
pirzyk |
Add a knob to turn on and off the CMPXCHG instruction on > i386 IA32 systems. This is most beneficial for vmware client os installs.
Reviewed by: jmallet, iedowse, tlambert2@mindspring.com MFC After: never, -STABLE does not currently use this instruction
|
105014 |
13-Oct-2002 |
mike |
Add standards visibility conditionals. Change any uses of sigset_t to struct __sigset to avoid depending on objects from <sys/signal.h>.
|
104584 |
06-Oct-2002 |
mike |
Add conditionals to allow va_list to be defined in other headers.
|
104583 |
06-Oct-2002 |
mike |
o Add conditionals to allow va_list to be defined in other headers. o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes. o Restrict the definition of va_copy() to C99 environments.
|
104505 |
05-Oct-2002 |
mike |
Fix namespace issues by using visibility conditionals from <sys/cdefs.h>.
|
104493 |
04-Oct-2002 |
mike |
style(9) <machine/setjmp.h> headers so they look mostly the same.
|
104486 |
04-Oct-2002 |
sam |
New bus_dma interfaces for use by crypto device drivers:
o bus_dmamap_load_mbuf o bus_dmamap_load_uio
Test on i386. Known to compile on alpha and sparc64, but not tested. Otherwise untried.
|
104460 |
04-Oct-2002 |
deischen |
Add another temporary hack to allow running older i386 binaries. This will be removed when new versions of syscalls sigreturn() and sigaction() are added (mini is working on this but is in the middle of a move).
This should fix the problem of cvsupd dying.
|
104340 |
02-Oct-2002 |
bde |
Removed bits related to MBRs now that they have a proper home in <sys/diskmbr.h>.
|
104294 |
01-Oct-2002 |
phk |
It is too much work convincing lint why we would want empty structures, so make the non-empty #ifdef lint.
|
104293 |
01-Oct-2002 |
phk |
Use long long to indicate 64bitness in #ifdef lint.
|
104291 |
01-Oct-2002 |
phk |
A more lint friendly #ifdef lint section.
|
104215 |
30-Sep-2002 |
obrien |
Turn back on the "SMP: AP CPU #N Launched!" message on normal boots. Peter's rev 1.189 should fix the lost console on SCSI-based systems due to this message.
|
104175 |
30-Sep-2002 |
obrien |
Only print out the "SMP: AP CPU #N Launched!" message on verbose boots. The kernel printf() isn't race-free
|
104110 |
28-Sep-2002 |
peter |
There is no need for start/num to be signed in i386_ldt_args.
|
103987 |
26-Sep-2002 |
peter |
ISMEMSDP(), IS286GDP(), IS386GDP(), ISGDP(), ISSDP() and ISSYSSDP() are not used anywhere anymore.
|
103965 |
25-Sep-2002 |
markm |
Fix a declaration that is actually supposed to be a macro definition.
Submitted by: marius@alchemy.franken.de
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
103865 |
23-Sep-2002 |
jhb |
Update the nexus driver for the addition of the legacy driver: - nexus no longer has PCI bridges as direct children, so the PCI bus ivar is no longer used and is removed. - Don't attach default EISA, ISA, or MCA busses. Instead, if we do not have an acpi0 device after bus_generic_probe(), add a legacy0 child device. - Remove machine/nexusvar.h.
|
103862 |
23-Sep-2002 |
jhb |
Add a new legacy(4) device driver for use on machines that do not have ACPI or for when ACPI support is disabled or not present in the kernel. Basically, the nexus device is now split into two with some parts (such as adding default ISA, MCA, and EISA busses if they aren't found as well as support for PCI bus device ivars) being moved to the legacy driver.
|
103850 |
23-Sep-2002 |
peter |
PIC_GOTOFF is OBE.
|
103847 |
23-Sep-2002 |
peter |
use __packed, rather than __attribute__((packed)).
|
103834 |
23-Sep-2002 |
peter |
At great personal risk, add a __packed and __aligned(x) define that expand to __attribute__((packed)) and __attribute__((aligned(x))) respectively. Replace the handful of gcc-ism's that use __attribute__((aligned(16))) etc around the kernel with __aligned(16).
There are over 400 __attribute__((packed)) to deal with, that can come later. I just want to use __packed in new code rather than add more gcc-ism's.
|
103824 |
23-Sep-2002 |
peter |
Delete a whole bunch of compatability defines that we dont use anymore.
|
103814 |
23-Sep-2002 |
mike |
Be careful not to define GCC-specific optimizations in the non-GCC case.
|
103778 |
22-Sep-2002 |
peter |
Create inlines for ltr(sel), lldt(sel), lidt(addr) rather than functions that have one instruction.
|
103749 |
21-Sep-2002 |
markm |
Provide in inline function for the (GNUC) assembler "hlt" instruction.
|
103596 |
19-Sep-2002 |
peter |
Repo copied to <sys/smbus/smb.h>
|
103595 |
19-Sep-2002 |
peter |
Repo copied to <sys/iicbus/iic.h>
|
103526 |
18-Sep-2002 |
mike |
Implement C99's va_copy() macro.
|
103436 |
17-Sep-2002 |
peter |
Initiate deorbit burn for the i386-only a.out related support. Moves are under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that.
Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
103408 |
16-Sep-2002 |
mini |
Add kernel support needed for the KSE-aware libpthread: - Maintain fpu state across signals. - Save and restore FPU state properly in ucontext_t's.
Reviewed by: deischen, julian Approved by: -arch
|
103043 |
06-Sep-2002 |
jhb |
Add a function pci_probe_route_table() that returns true if our PCI BIOS supports interrupt routing and if the specified PCI bus is present in the routing table.
|
103025 |
06-Sep-2002 |
jhb |
- Add a pci_cfgintr_valid() function to see if a given IRQ is a valid IRQ for an entry in a PCIBIOS interrupt routing ($PIR) table. - Change pci_cfgintr() to except the current IRQ of a device as a fourth argument and to use that IRQ for the device if it is valid. - If an intpin entry in a $PIR entry has a link of 0, it means that that intpin isn't connected to anything that can trigger an interrupt. Thus, test the link against 0 to find invalid entries in the table instead of implicitly relying on the irqs field to be zero. In the machines I have looked at, intpin entries with a link of 0 often have the bits for all possible interrupts for PCI devices set.
|
102932 |
04-Sep-2002 |
jhb |
Function prototypes don't need 'extern'.
|
102874 |
03-Sep-2002 |
mike |
Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all architectures, move the definition directly into <time.h> and finish the removal of <machine/ansi.h>.
|
102738 |
31-Aug-2002 |
dillon |
Reduce the maximum KVA reserved for swap meta structures from 70 to 32 MB. Reduce the swap meta calculation by a factor of 2, it's still massive overkill.
X-MFC after: immediately
|
102600 |
30-Aug-2002 |
peter |
Change hw.physmem and hw.usermem to unsigned long like they used to be in the original hardwired sysctl implementation.
The buf size calculator still overflows an integer on machines with large KVA (eg: ia64) where the number of pages does not fit into an int. Use 'long' there.
Change Maxmem and physmem and related variables to 'long', mostly for completeness. Machines are not likely to overflow 'int' pages in the near term, but then again, 640K ought to be enough for anybody. This comes for free on 32 bit machines, so why not?
|
102561 |
29-Aug-2002 |
jake |
Renamed poorly named setregs to exec_setregs. Moved its prototype to imgact.h with the other exec support functions.
|
102543 |
28-Aug-2002 |
peter |
OK, I have had it with losing my console because the AP's print their "I am alive!" message right as the scsi probe messages happen. This is a bit nasty, but it seems to work. At the point that we unlock the AP's, briefly wait till they are all done while we hold the console on their behalf.
|
102315 |
23-Aug-2002 |
mike |
Move several MI types from <machine/_types.h> to <sys/_types.h>. These types are unlikely to ever become very MD. They include: clockid_t, ct_rune_t, fflags_t, intrmask_t, mbstate_t, off_t, pid_t, rune_t, socklen_t, timer_t, wchar_t, and wint_t.
While moving them, make a few adjustments (submitted by bde): o __ct_rune_t needs to be precisely `int', not necessarily __int32_t, since the arg type of the ctype functions is int. o __rune_t, __wchar_t and __wint_t inherit this via a typedef of __ct_rune_t. o Some minor wording changes in the comment blocks for ct_rune_t and mbstate_t.
Submitted by: bde (partially)
|
102243 |
22-Aug-2002 |
mike |
Make __clock_t use `unsigned long' rather than a fixed 32-bit integer so that it changes to the correct size in IP32L64 mode. Other architectures don't have this issue.
|
102227 |
21-Aug-2002 |
mike |
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif
Concept by: bde Reviewed by: jake, obrien
|
102179 |
20-Aug-2002 |
mux |
Use the __BUS_ACCESSOR macro for NEXUS_ACCESSOR instead of rolling our own implementation.
Reviewed by: tmm
|
101716 |
12-Aug-2002 |
hm |
add support properly displaying and logging incoming telephone numbers (MSNs) by looking at the "type of number" field and providing configurable hooks to correct the numbers accordingly. See keywords add-prefix, prefix-national and prefix-international in isdnd.rc(5). This feature was implemented by Christian Ullrich <chris@chrullrich.de>
|
101689 |
11-Aug-2002 |
hm |
add experimental support for Data over Voice (DoV) outgoing calls. based on patches received from Guy Ellis (guy@traverse.com.au), Chris Collins (xfire@xware.cx) and Phillip Musumeci (phillip@cs.jcu.edu.au).
|
101349 |
05-Aug-2002 |
alc |
o Introduce pmap_page_is_mapped(). Its purpose is to obsolete the PG_MAPPED flag.
|
101235 |
02-Aug-2002 |
phk |
Move a prototype to the least wrong place.
Suggested by: bde
|
101054 |
31-Jul-2002 |
phk |
The Elan SC520 MMCR is actually 16bit wide, so u_char is inconvenient.
|
100969 |
30-Jul-2002 |
iwasaki |
Resolve conflicts arising from the ACPI CA 20020725 import.
|
100882 |
29-Jul-2002 |
mike |
Create a new header <machine/_stdint.h> for storing MD parts of <stdint.h>. Previously, parts were defined in <machine/ansi.h> and <machine/limits.h>. This resulted in two problems: (1) Defining macros in <machine/ansi.h> gets in the way of that header only defining types. (2) Defining C99 limits in <machine/limits.h> adds pollution to <limits.h>.
|
100432 |
21-Jul-2002 |
peter |
Move SWTCH_OPTIM_STATS related code out of cpufunc.h. (This sort of stat gathering is not an x86 cpu feature)
|
100327 |
18-Jul-2002 |
markm |
Beautify. This has the side effect of improving portability and making lint work cleaner.
Inspired to do this by: jhb
|
100321 |
18-Jul-2002 |
phk |
Add initialization code for the AMD Elan sc520 which maps the MMCR into KVM and sets the i8254 frequency to the correct value.
|
100251 |
17-Jul-2002 |
markm |
Clean up the syntax WRT semicolons at the end of function-like-macros, and protect GCCisms from non-GNU compilers and lint.
|
100079 |
15-Jul-2002 |
markm |
Wrap GNU specific code in ifdefs, and help lint out by providing some alternative definitions.
|
100078 |
15-Jul-2002 |
markm |
Cast to prevent "signed/unsigned comparison" warnings.
|
100077 |
15-Jul-2002 |
markm |
Warnings and lint-assisting fixes; mark unused function parameters as unused; wrap GNUisms (asm code) in appropriate #ifdefs.
|
99862 |
12-Jul-2002 |
peter |
Revive backed out pmap related changes from Feb 2002. The highlights are: - It actually works this time, honest! - Fine grained TLB shootdowns for SMP on i386. IPI's are very expensive, so try and optimize things where possible. - Introduce ranged shootdowns that can be done as a single IPI. - PG_G support for i386 - Specific-cpu targeted shootdowns. For example, there is no sense in globally purging the TLB cache for where we are stealing a page from the local unshared process on the local cpu. Use pm_active to track this. - Add some instrumentation for the tlb shootdown code. - Rip out SMP code from <machine/cpufunc.h> - Try and fix some very bogus PG_G and PG_PS interactions that were bad enough to cause vm86 bios calls to break. vm86 depended on our existing bugs and this was the cause of the VESA panics last time. - Fix the silly one-line error that caused the 'panic: bad pte' last time. - Fix a couple of other silly one-line errors that should have caused more pain than they did.
Some more work is needed: - pmap_{zero,copy}_page[_idle]. These can be done without IPI's if we have a hook in cpu_switch. - The IPI handlers need some cleanup. I have a bogus %ds load that can be avoided. - APTD handling is rather bogus and appears to be a large source of global TLB IPI shootdowns for no really good reason.
I see speedups of between 1.5% and ~4% on buildworlds in a while 1 loop. I expect to see a bigger difference when there is significant pageout activity or the system otherwise has memory shortages.
I have backed out a few optimizations that I had been using over the last few days in order to be a little more conservative. I'll revisit these again over the next few days as the dust settles.
New option: DISABLE_PG_G - In case I missed something.
|
99766 |
11-Jul-2002 |
peter |
Bah, move the invltlb counter to C code and hook a debug sysctl onto it.
|
99742 |
10-Jul-2002 |
dillon |
Remove the critmode sysctl - the new method for critical_enter/exit (already the default) is now the only method for i386.
Remove the paraphanalia that supported critmode. Remove td_critnest, clean up the assembly, and clean up (mostly remove) the old junk from cpu_critical_enter() and cpu_critical_exit().
|
99733 |
10-Jul-2002 |
mike |
Remove label_t and physadr, which seem to have never been used in FreeBSD.
Submitted by: bde
|
99629 |
09-Jul-2002 |
mike |
Move the type definition of ointhand2_t from i386/include/types.h to i386/isa/isa_device.h. This is a more appropriate location and helps restrict <machine/types.h> to only types that exist on all platforms.
|
99594 |
08-Jul-2002 |
mike |
Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's hardly MD, since all our platforms share the same macro. It's not really compiler dependent either, but this helps in reducing <machine/ansi.h> to only type definitions.
|
99582 |
08-Jul-2002 |
peter |
Remove #define APIC_INTR_HIGHPRI_CLOCK - this is no longer used (see i386/isa/intr_machdep.c 1.72)
|
99578 |
08-Jul-2002 |
peter |
Cosmetic. Remove #if 0 definition of vtophys() - it predates 4MB pages. Remove avtophys(), it isn't referenced anywhere.
|
99117 |
30-Jun-2002 |
mike |
Since printf(3) now supports the `j' conversion specifier, use that when printing intmax_t and uintmax_t.
Forgotten by: mike Noticed by: bde
|
99026 |
29-Jun-2002 |
julian |
Add files that are new for KSE.
|
98710 |
23-Jun-2002 |
iedowse |
Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid overflows with the large file sizes that UFS2 permits.
Reviewed by: dillon, alc, tegge
|
98650 |
22-Jun-2002 |
mp |
Add additional cpuid feature flags and put into a canonical format.
MFC after: 1 week
|
98648 |
22-Jun-2002 |
jdp |
Fix several bugs in the i386 asm statements used to speed up Internet checksumming. These bugs could possibly cause bad code to be generated at elevated optimization levels.
First, eliminate the use of preprocessor magic to form the address fields of asm instructions. It hid the actual addresses being referenced from the compiler. Without knowledge of all the data dependencies, the compiler might possibly use optimizations which would result in incorrect code.
Use "__asm __volatile" rather than "__asm" for instruction sequences that pass information through the condition codes (the carry bit, in this case). Without __volatile, the compiler might add unrelated code between consecutive __asm instructions, modifying the condition codes. I have seen GCC insert stack pointer adjustments in this way, for example. Unfortunately, GCC doesn't provide a way to specify dependencies on the condition codes. You can specify that they are clobbered, but not that you are going to use them as input.
Finally, simplify the LOAD macro. This macro is used as a poor man's prefetch. The simpler version gives the compiler more leeway about just how it performs the prefetch.
MFC after: 1 week
|
98469 |
20-Jun-2002 |
peter |
Move the "- 1" into the RQB_FFS(mask) macro itself so that implementations can provide a base zero ffs function if they wish. This changes #define RQB_FFS(mask) (ffs64(mask)) foo = RQB_FFS(mask) - 1; to #define RQB_FFS(mask) (ffs64(mask) - 1) foo = RQB_FFS(mask); On some platforms we can get the "- 1" for free, eg: those that use the C code for ffs64().
Reviewed by: jake (in principle)
|
97748 |
02-Jun-2002 |
schweikh |
Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by: des MFC after: 3 weeks
|
97721 |
01-Jun-2002 |
alfred |
Silence preprocessor warning, No need to use CONCAT with "," and "word".
|
97713 |
01-Jun-2002 |
bde |
Fixed the return value of fpsetmask(). The API requires inversion of the mask on both input and output to fpsetmask(), but this was only done for input, so fpsetmask() returned the complement of the old mask (ANDed with the mask bitfield).
PR: 38170 MFC after: 4 weeks
|
97711 |
01-Jun-2002 |
bde |
Fixed style bugs in rev.1.9.
|
97564 |
30-May-2002 |
dfr |
Move the definition of ElfN_Hashelt to common headers. The only platform which has a different definition for this is alpha.
|
97261 |
25-May-2002 |
jake |
Make the run queue parameters machine dependent. Optimize 64 bit architectures by using a 64 bit word for the bit array which keeps track of non-empty queues.
Reviewed by: peter
|
97139 |
22-May-2002 |
jhb |
Rename pause() to ia32_pause() so it doesn't conflict with the pause() function defined in <unistd.h>. I didn't #ifdef _KERNEL it because the mutex implementation in libpthread will probably need this.
|
97115 |
22-May-2002 |
jhb |
Debug registers aren't selectors, so use saner names for the variables in the inline functions for reading and writing the debug registers.
|
97114 |
22-May-2002 |
jhb |
- Sort the pause() inline into the appropriate location. - Add many missing prototypes to the non-GCC section.
|
97113 |
22-May-2002 |
jhb |
Rename cpu_pause() to pause(). Originally I was going to make this an MI API with empty cpu_pause() functions on other arch's, but this functionality is definitely unique to IA-32, so I decided to leave it as i386-only and wrap it in #ifdef's. I should have dropped the cpu_ prefix when I made that decision.
Requested by: bde
|
97076 |
21-May-2002 |
jhb |
Add an inline function cpu_pause() for the IA32 'pause' instruction.
|
97064 |
21-May-2002 |
nyan |
Remove unneeded ## for GCC 3.1
|
96606 |
14-May-2002 |
phk |
Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
|
96325 |
10-May-2002 |
obrien |
I reorganized a little bit too much in the backwards case.
|
96317 |
10-May-2002 |
obrien |
Gcc 3.1 varargs support.
|
95710 |
29-Apr-2002 |
peter |
Tidy up some loose ends. i386/ia64/alpha - catch up to sparc64/ppc: - replace pmap_kernel() with refs to kernel_pmap - change kernel_pmap pointer to (&kernel_pmap_store) (this is a speedup since ld can set these at compile/link time) all platforms (as suggested by jake): - gc unused pmap_reference - gc unused pmap_destroy - gc unused struct pmap.pm_count (we never used pm_count - we track address space sharing at the vmspace)
|
95195 |
21-Apr-2002 |
markm |
Stylify (mainly line up macro EOL-continuation \'s), and add a dummy alternative for lint.
|
94967 |
17-Apr-2002 |
tegge |
Fix typo in adjusted panic message.
Submitted by: cokane
|
94962 |
17-Apr-2002 |
tegge |
Update io_apic_ints array properly when revoking an irq mapping. Adjust panic message.
Submitted by: David Xu <bsddiy@yahoo.com>
|
94386 |
10-Apr-2002 |
dwmalone |
Move do_cpuid into the correct place in this file and make the indentation more like the other multi-line assembley in this file.
Someone who understands gcc constraints could update the constraints for do_cpuid.
|
94363 |
10-Apr-2002 |
mike |
Remove the hack for segsz_t from <sys/types.h>; use the normal _BSD_FOO_T_ method for defining segsz_t.
|
94362 |
10-Apr-2002 |
mike |
Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, and _BYTE_ORDER. These are far more useful than their non-underscored equivalents as these can be used in restricted namespace environments. Mark the non-underscored variants as deprecated.
|
94275 |
09-Apr-2002 |
phk |
GC various bits and pieces of USERCONFIG from all over the place.
|
94274 |
09-Apr-2002 |
phk |
machine/uc_device.h was only here for USERCONFIG and kget(1).
We have neither anymore.
|
93818 |
04-Apr-2002 |
jhb |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
93607 |
01-Apr-2002 |
dillon |
Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter() and cpu_critical_exit() and moves associated critical prototypes into their own header file, <arch>/<arch>/critical.h, which is only included by the three MI source files that need it.
Backout and re-apply improperly comitted syntactical cleanups made to files that were still under active development. Backout improperly comitted program structure changes that moved localized declarations to the top of two procedures. Partially re-apply one of the program structure changes to move 'mask' into an intermediate block rather then in three separate sub-blocks to make the code more readable. Re-integrate bug fixes that Jake made to the sparc64 code.
Note: In general, developers should not gratuitously move declarations out of sub-blocks. They are where they are for reasons of structure, grouping, readability, compiler-localizability, and to avoid developer-introduced bugs similar to several found in recent years in the VFS and VM code.
Reviewed by: jake
|
93340 |
28-Mar-2002 |
jhb |
GC #if 0'd assembly mutex micro operations. If someone wants to bring these back later then can get them from the attic. Also, GC, some stale macros to acquire and release sleep mutexes in assembly.
|
93264 |
27-Mar-2002 |
dillon |
Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up).
Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement.
This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary.
Reviewed by: core Approved by: core
|
93226 |
26-Mar-2002 |
hm |
Add support for Q.931 subaddresses.
Submitted by: Steven Looman <fsteevie@wish.net>
|
93092 |
24-Mar-2002 |
obrien |
Guard against redefining __gnuc_va_list.
|
93018 |
23-Mar-2002 |
bde |
Fixed some style bugs in the removal of __P(()). The main ones were not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
|
93017 |
23-Mar-2002 |
bde |
Fixed some style bugs in the removal of __P(()). The main ones were not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
|
92998 |
23-Mar-2002 |
obrien |
ASM versions of __FBSDID.
|
92860 |
21-Mar-2002 |
imp |
Fix abuses of cpu_critical_{enter,exit} by converting to intr_{disable,restore} as well as providing an implemenation of intr_{disable,restore}.
Reviewed by: jake, rwatson, jhb
|
92819 |
20-Mar-2002 |
imp |
Fix minor style(9) violation in de__Ping
|
92770 |
20-Mar-2002 |
alfred |
Remove __P.
|
92761 |
20-Mar-2002 |
alfred |
Remove __P.
|
92487 |
17-Mar-2002 |
hm |
Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, OpenBSD and BSD/OS and respective code, remove pre $FreeBSD CVS id's, remove #if(def)s and respective code for FreeBSD versions < 5 .
|
92383 |
16-Mar-2002 |
des |
Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to the MI ptrace.h, since all platforms define them. Keep the MD ptrace.h around for FIX_SSTEP (which is currently only needed on Alpha).
|
91959 |
09-Mar-2002 |
mike |
o Don't require long long support in bswap64() functions. o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness.
Submitted by: bde
o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code.
Reviewed by: bde
|
91943 |
09-Mar-2002 |
hm |
after joerg's recent merge of i4b's sppp with the main sppp, remove now obsolete file.
|
91778 |
07-Mar-2002 |
jake |
Add needed includes of machine/smp.h, remove nested include in sys/smp.h so that inlines in machine/smp.h can use variables declared in sys/smp.h.
|
91673 |
05-Mar-2002 |
jeff |
Add a new variable mp_maxid. This is used so that per cpu datastructures may be allocated as arrays indexed by the cpu id. Previously the only reliable way to know the max cpu id was through MAXCPU. mp_ncpus isn't useful here because cpu ids may be sparsely mapped, although x86 and alpha do not do this.
Also, call cpu_mp_probe much earlier so the max cpu id is known before the VM starts up. This is intended to help support per cpu queues for the new allocator, but may be useful elsewhere.
Reviewed by: jake Approved by: jake
|
91497 |
28-Feb-2002 |
markm |
Make it a bit clearer where this file is to be used and where it should not be. (Comments only)
Inspired by: bde
|
91469 |
28-Feb-2002 |
bmilekic |
Make MPLOCKED work again in asm files and stringify it explicitly where necessary.
Reviewed by: jake
|
91429 |
27-Feb-2002 |
jhb |
Back out part of KSE/M2 that snuck in under the radar: changing the prototype of bzero() on the i386 to have a volatile first argument.
Requested by: bde, jake
|
91394 |
27-Feb-2002 |
tmm |
Add the following functions/macros to support byte order conversions and device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD):
- bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess).
htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land.
Make use of the new functions in a few places where local implementations of the same functionality existed.
Reviewed by: mike, bde Tested on alpha by: mike
|
91367 |
27-Feb-2002 |
peter |
Back out all the pmap related stuff I've touched over the last few days. There is some unresolved badness that has been eluding me, particularly affecting uniprocessor kernels. Turning off PG_G helped (which is a bad sign) but didn't solve it entirely. Userland programs still crashed.
|
91328 |
26-Feb-2002 |
dillon |
revert last commit temporarily due to whining on the lists.
|
91315 |
26-Feb-2002 |
dillon |
STAGE-1 of 3 commit - allow (but do not require) interrupts to remain enabled in critical sections and streamline critical_enter() and critical_exit().
This commit allows an architecture to leave interrupts enabled inside critical sections if it so wishes. Architectures that do not wish to do this are not effected by this change.
This commit implements the feature for the I386 architecture and provides a sysctl, debug.critical_mode, which defaults to 1 (use the feature). For now you can turn the sysctl on and off at any time in order to test the architectural changes or track down bugs.
This commit is just the first stage. Some areas of the code, specifically the MACHINE_CRITICAL_ENTER #ifdef'd code, is strictly temporary and will be cleaned up in the STAGE-2 commit when the critical_*() functions are moved entirely into MD files.
The following changes have been made:
* critical_enter() and critical_exit() for I386 now simply increment and decrement curthread->td_critnest. They no longer disable hard interrupts. When critical_exit() decrements the counter to 0 it effectively calls a routine to deal with whatever interrupts were deferred during the time the code was operating in a critical section.
Other architectures are unaffected.
* fork_exit() has been conditionalized to remove MD assumptions for the new code. Old code will still use the old MD assumptions in regards to hard interrupt disablement. In STAGE-2 this will be turned into a subroutine call into MD code rather then hardcoded in MI code.
The new code places the burden of entering the critical section in the trampoline code where it belongs.
* I386: interrupts are now enabled while we are in a critical section. The interrupt vector code has been adjusted to deal with the fact. If it detects that we are in a critical section it currently defers the interrupt by adding the appropriate bit to an interrupt mask.
* In order to accomplish the deferral, icu_lock is required. This is i386-specific. Thus icu_lock can only be obtained by mainline i386 code while interrupts are hard disabled. This change has been made.
* Because interrupts may or may not be hard disabled during a context switch, cpu_switch() can no longer simply assume that PSL_I will be in a consistent state. Therefore, it now saves and restores eflags.
* FAST INTERRUPT PROVISION. Fast interrupts are currently deferred. The intention is to eventually allow them to operate either while we are in a critical section or, if we are able to restrict the use of sched_lock, while we are not holding the sched_lock.
* ICU and APIC vector assembly for I386 cleaned up. The ICU code has been cleaned up to match the APIC code in regards to format and macro availability. Additionally, the code has been adjusted to deal with deferred interrupts.
* Deferred interrupts use a per-cpu boolean int_pending, and masks ipending, spending, and fpending. Being per-cpu variables it is not currently necessary to lock; bus cycles modifying them.
Note that the same mechanism will enable preemption to be incorporated as a true software interrupt without having to further hack up the critical nesting code.
* Note: the old critical_enter() code in kern/kern_switch.c is currently #ifdef to be compatible with both the old and new methodology. In STAGE-2 it will be moved entirely to MD code.
Performance issues:
One of the purposes of this commit is to enhance critical section performance, specifically to greatly reduce bus overhead to allow the critical section code to be used to protect per-cpu caches. These caches, such as Jeff's slab allocator work, can potentially operate very quickly making the effective savings of the new critical section code's performance very significant.
The second purpose of this commit is to allow architectures to enable certain interrupts while in a critical section. Specifically, the intention is to eventually allow certain FAST interrupts to operate rather then defer.
The third purpose of this commit is to begin to clean up the critical_enter()/critical_exit()/cpu_critical_enter()/ cpu_critical_exit() API which currently has serious cross pollution in MI code (in fork_exit() and ast() for example).
The fourth purpose of this commit is to provide a framework that allows kernel-preempting software interrupts to be implemented cleanly. This is currently used for two forward interrupts in I386. Other architectures will have the choice of using this infrastructure or building the functionality directly into critical_enter()/ critical_exit().
Finally, this commit is designed to greatly improve the flexibility of various architectures to manage critical section handling, software interrupts, preemption, and other highly integrated architecture-specific details.
|
91260 |
25-Feb-2002 |
peter |
Work-in-progress commit syncing up pmap cleanups that I have been working on for a while: - fine grained TLB shootdown for SMP on i386 - ranged TLB shootdowns.. eg: specify a range of pages to shoot down with a single IPI, since the IPI is very expensive. Adjust some callers that used to trigger this inside tight loops to do a ranged shootdown at the end instead. - PG_G support for SMP on i386 (options ENABLE_PG_G) - defer PG_G activation till after we decide what we are going to do with PSE and the 4MB pages at the start of the kernel. This should solve some rumored strangeness about stale PG_G entries getting stuck underneath the 4MB pages. - add some instrumentation for the fine TLB shootdown - convert some asm instruction wrappers from functions to inlines. gcc seems to do a fair bit better with this. - [temporarily!] pessimize the tlb shootdown IPI handlers. I will fix this again shortly.
This has been working fairly well for me for a while, but I have tweaked it again prior to commit since my last major testing round. The only outstanding problem that I know of is PG_G related, which is why there is an option for it (not on by default for SMP). I have seen a world speedups by a few percent (as much as 4 or 5% in one case) but I have *not* accurately measured this - I am a bit sceptical of these numbers.
|
91250 |
25-Feb-2002 |
peter |
Tidy up some warnings
|
91066 |
22-Feb-2002 |
phk |
Convert p->p_runtime and PCPU(switchtime) to bintime format.
|
90947 |
20-Feb-2002 |
peter |
Some more tidy-up of stray "unsigned" variables instead of p[dt]_entry_t etc.
|
90885 |
19-Feb-2002 |
mike |
Add C++ support.
|
90868 |
18-Feb-2002 |
mike |
o Move NTOHL() and associated macros into <sys/param.h>. These are deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland.
Tested on: alpha, i386 Reviewed by: bde, jake, tmm
|
90850 |
18-Feb-2002 |
nyan |
Add bus_space_unmap() and bus_space_free() functions to release a bus_space_handle allocated by bus_space_subregion().
|
90849 |
18-Feb-2002 |
nyan |
Add stubs for bus_space_unmap() and bus_space_free(). They are needed to release a bus_space_handle allocated by bus_space_subregion().
|
90776 |
17-Feb-2002 |
deischen |
Use struct __ucontext in prototypes and associated functions instead of ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included.
While I'm here, also hide osigcontext types from userland; suggested by bde.
Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
|
90770 |
17-Feb-2002 |
nyan |
Correct typo.
|
90763 |
17-Feb-2002 |
nyan |
Move the bus_space_subregion function from the puc driver to the bus_space sutff.
Reviewed by: jhay
|
90762 |
17-Feb-2002 |
nyan |
- Split the routine to initialize a bus_space_handle into the separate function. - Only access a bus_space_handle if the resource type is SYS_RES_MEMORY or SYS_RES_IOPORT. - Add the bus_space_subregion supports.
|
90725 |
16-Feb-2002 |
nyan |
Added #include <sys/systm.h>
|
90711 |
15-Feb-2002 |
wollman |
Resurrect one of the easiest changes from my big include files roll-up patch from a year ago: give file flags their own type. This does not (yet) change the type used by system calls or library functions. The underlying type was chosen to match what is returned by stat().
|
90589 |
12-Feb-2002 |
dwmalone |
Move do_cpuid() from a identcpu.c into cpufunc.h.
|
90515 |
11-Feb-2002 |
bde |
Garbage-collect the "LOCORE" version of MPLOCKED.
|
90411 |
08-Feb-2002 |
jhb |
Apparently during the KSE M2 commit bzero() on the i386 was changed so that it's first parameter was volatile. Catch i486_bzero() and i586_bzero()'s prototypes up to this to quiet warnings.
|
90134 |
03-Feb-2002 |
markm |
Make the style a little bit more consistant by removing parameter names from some prototypes. (Other prototypes here already have these removed).
|
90024 |
31-Jan-2002 |
bde |
Finish revs.1.23 and 1.24 so that MCOUNT_ENTER really actually compiles for SMP in the plain profiling case. It seems to work too.
This error was not detected by LINT because LINT only compiles the GUPROF profiling case, which is is a superset of the plain profiling case for !SMP but which is so broken for SMP that the buggy code is not compiled.
|
89489 |
18-Jan-2002 |
peter |
Avoid __func__ string concatenation
|
89466 |
17-Jan-2002 |
bde |
Changed the type of pcb_flags from u_char to u_int and adjusted things. This removes the only atomic operation on a char type in the entire kernel.
|
89410 |
16-Jan-2002 |
peter |
Ensure that we set all the %cr0 bits to a known state for the AP's before they make it through to userland. This should fix the p5-smp problem without affecting the other cpus (eg: cyrix, see initcpu.c and the special cache handling for these cpu types).
|
89175 |
10-Jan-2002 |
deischen |
Use a spare slot in the machine context for a flags word to indicate whether the machine context is valid and whether the FPU state is valid (saved).
Mark the machine context valid before copying it out when sending a signal.
Approved by: -arch
|
89064 |
08-Jan-2002 |
msmith |
Gut this header; since physio_proc_init is never called, the code never does anything more than multiply declare some unused variables.
|
88903 |
05-Jan-2002 |
peter |
Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask).
|
88404 |
22-Dec-2001 |
gj |
Add support for the AVM Fritz!Card PCI version 2 controller.
MFC after: 4 weeks
|
88322 |
20-Dec-2001 |
jhb |
Introduce a standard name for the lock protecting an interrupt controller and it's associated state variables: icu_lock with the name "icu". This renames the imen_mtx for x86 SMP, but also uses the lock to protect access to the 8259 PIC on x86 UP. This also adds an appropriate lock to the various Alpha chipsets which fixes problems with Alpha SMP machines dropping interrupts with an SMP kernel.
|
88118 |
18-Dec-2001 |
jhb |
Various assembly fixes mostly in the form of using the "+" modifier for output operands to mark them as both input and output rather than listing operands twice.
Reviewed by: bde
|
88117 |
18-Dec-2001 |
jhb |
Allow the ATOMIC_ASM() macro to pass in the constraints on the V parameter since the char versions need to use either ax, bx, cx, or dx.
Submitted by: Peter Jeremy (mostly) Recommended by: bde
|
88107 |
18-Dec-2001 |
obrien |
With GCC 3, we *must* use the GCC stdarg.h. We can no longer just make _BSD_VA_LIST_ match what we think the compiler is doing.
|
88088 |
18-Dec-2001 |
jhb |
Modify the critical section API as follows: - The MD functions critical_enter/exit are renamed to start with a cpu_ prefix. - MI wrapper functions critical_enter/exit maintain a per-thread nesting count and a per-thread critical section saved state set when entering a critical section while at nesting level 0 and restored when exiting to nesting level 0. This moves the saved state out of spin mutexes so that interlocking spin mutexes works properly. - Most low-level MD code that used critical_enter/exit now use cpu_critical_enter/exit. MI code such as device drivers and spin mutexes use the MI wrappers. Note that since the MI wrappers store the state in the current thread, they do not have any return values or arguments. - mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is assigned to curthread->td_savecrit during fork_exit().
Tested on: i386, alpha
|
88085 |
17-Dec-2001 |
jhb |
Small cleanups to the SMP code: - Axe inlvtlb_ok as it was completely redundant with smp_active. - Remove references to non-existent variable and non-existent file in i386/include/smp.h. - Don't perform initializations local to each CPU while holding the ap boot lock on i386 while an AP bootstraps itself. - Reorganize the AP startup code some to unify the latter half of the functions to bring an AP up. Eventually this might be broken out into a MI function in subr_smp.c.
|
87886 |
14-Dec-2001 |
nyan |
Fixed to draw mouse cursor. The syscons driver for PC98 uses different attributes from i386.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) MFC after: 3 days
|
87721 |
12-Dec-2001 |
jhb |
Axe an unneeded PCPU_SET(spinlocks, NULL) that I missed earlier.
|
87702 |
11-Dec-2001 |
jhb |
Overhaul the per-CPU support a bit:
- The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list.
Tested on: alpha, i386 Reviewed by: peter, jake
|
87599 |
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
87572 |
09-Dec-2001 |
obrien |
style(9)
|
87311 |
04-Dec-2001 |
jhb |
Add a missing open paren to a macro that's been broken (and apparently unused) since rev 1.1 so it is at least correct.
Submitted by: Maxime Henrion <mux@qualys.com>
|
87158 |
01-Dec-2001 |
mike |
o Stop abusing MD headers with non-MD types. o Hide nonstandard functions and types in <netinet/in.h> when _POSIX_SOURCE is defined. o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>. o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new __FBSDID() macro. o Fix some miscellaneous issues in <arpa/inet.h>. o Correct final argument for the inet_ntop() function (POSIX.1-200x). o Get rid of the namespace pollution from <sys/types.h> in <arpa/inet.h>.
Reviewed by: fenner Partially submitted by: bde
|
87063 |
28-Nov-2001 |
jhb |
Whitespace fixes so thre 386 versoion of __uint8_swap_uint32 is easier to read.
|
86485 |
17-Nov-2001 |
peter |
Start bringing i386/pmap.c into line with cleanups that were done to alpha pmap. In particular - - pd_entry_t and pt_entry_t are now u_int32_t instead of a pointer. This is to enable cleaner PAE and x86-64 support down the track sor that we can change the pd_entry_t/pt_entry_t types to 64 bit entities. - Terminate "unsigned *ptep, pte" with extreme prejudice and use the correct pt_entry_t/pd_entry_t types. - Various other cosmetic changes to match cleanups elsewhere. - This eliminates a boatload of casts. - use VM_MAXUSER_ADDRESS in place of UPT_MIN_ADDRESS in a couple of places where we're testing user address space limits. Assuming the page tables start directly after the end of user space is not a safe assumption. There is still more to go.
|
86430 |
15-Nov-2001 |
sobomax |
Allow bit 21 of EFLAGS register (PSL_ID) be changed in the use-mode without ill effects. This should fix problems threaded programs are having with auto-detecting CPU type.
Reported by: Joe Clarke <marcus@marcuscom.com> Tested by: Joe Clarke <marcus@marcuscom.com> Reviewed by: jhb MFC after: 1 week
|
86303 |
12-Nov-2001 |
jhb |
Use newer constraints for atomic_cmpset().
Requested by: bde
|
86301 |
12-Nov-2001 |
jhb |
Use newer constraints for inline assembly for an operand that is both an input and an output by using the '+' modifier rather than listing the operand in both the input and output sections.
Reviwed by: bde
|
85892 |
02-Nov-2001 |
mike |
o Add new header <sys/stdint.h>. o Make <stdint.h> a symbolic link to <sys/stdint.h>. o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99. o Remove <sys/inttypes.h>. o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h to reflect new location of integer types in <sys/stdint.h>. o Remove previously symbolicly linked <inttypes.h>, instead create a new file. o Add MD headers <machine/_inttypes.h> from NetBSD. o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and include <machine/_inttypes.h> in <inttypes.h>, to fill in the remaining requirements for <inttypes.h>. o Add additional integer types in <machine/ansi.h> and <machine/limits.h> which are included via <sys/stdint.h>.
Partially obtain from: NetBSD Tested on: alpha, i386 Discussed on: freebsd-standards@bostonradio.org Reviewed by: bde, fenner, obrien, wollman
|
85793 |
31-Oct-2001 |
mjacob |
Remove previous revision. smp_started back in subr_smp where it belongs.
|
85788 |
31-Oct-2001 |
mjacob |
Make the actual volatile int smp_started live *somewhere*. This is a temporary fix so that we can compile kernels. I waited 30 minutes for a response from the person who would likely know, but any longer is too long to wait with breakage at ToT.
|
85733 |
30-Oct-2001 |
green |
Add kmupetext(), a function that expands the range of memory covered by the profiler on a running system. This is not done sparsely, as memory is cheaper than processor speed and each gprof mcount() and mexitcount() operation is already very expensive.
Obtained from: NAI Labs CBOSS project Funded by: DARPA
|
85449 |
25-Oct-2001 |
jhb |
Split the per-process Local Descriptor Table out of the PCB and into struct mdproc.
Submitted by: Andrew R. Reiter <arr@watson.org> Silence on: -current
|
85335 |
23-Oct-2001 |
mike |
Remove funky right justification.
Pointed out by: bde
|
85294 |
21-Oct-2001 |
des |
[partially forced commit due to pilot error in earlier commit attempt]
{set,fill}_{,fp,db}regs() fixup:
- Add dummy {set,fill}_dbregs() on architectures that don't have them.
- KSEfy the powerpc versions (struct proc -> struct thread).
- Some architectures had the prototypes in md_var.h, some in reg.h, and some in both; for consistency, move them to reg.h on all platforms.
These functions aren't really MD (the implementation is MD, but the interface is MI), so they should move to an MI header, but I haven't figured out which one yet.
Run-tested on i386, build-tested on Alpha, untested on other platforms.
|
85278 |
21-Oct-2001 |
hm |
Add a driver for the Compaq Microcom 610 ISDN (Compaq series PSB2222I) ISA PnP card.
Submitted by: Steve Looman Reviewed by: hm MFC after: 1 month
|
85191 |
19-Oct-2001 |
ru |
Fix the typedef of va_list.
|
85187 |
19-Oct-2001 |
obrien |
Try two on the preprocessing logic.
Reviewed by: ru
|
85183 |
19-Oct-2001 |
obrien |
Blah, fix braino where ru had to remind me of proper preprocessor syntax. Bad fingers, no cookie.
|
85108 |
18-Oct-2001 |
obrien |
My attempts at minimizing the number of #def's got me in trouble.
|
85103 |
18-Oct-2001 |
hm |
Add experimental support for sending keypad facility messages. MFC after: 2 months
|
85085 |
18-Oct-2001 |
obrien |
Add support for "__gnuc_va_list". Some overly "smart" libraries assume the existence of the __gnuc_va_list type[*] because our compiler is GCC.
[*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement headerwhich we don't use.
|
85083 |
17-Oct-2001 |
obrien |
Minor comment tweaking.
|
84812 |
11-Oct-2001 |
jhb |
Add missing includes of sys/ktr.h.
|
84783 |
10-Oct-2001 |
ps |
Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader tunable.
Reviewed by: peter MFC after: 2 weeks
|
84679 |
08-Oct-2001 |
jhb |
Allow atomic ops to be somewhat safely used in userland. We always use lock prefixes in the userland case so that the binaries will work on both SMP and UP systems.
|
84615 |
07-Oct-2001 |
nyan |
Rewrite the pc98 bus_space stuff.
The type of bus_space_tag_t is now a pointer to bus_space_tag structure, and the bus_space_tag structure saves pointers to functions for direct access and relocate access.
Added bsh_bam member to the bus_space_handle structure, it saves access method either direct access or relocate access which is called by bus_space_* functions.
Added the mecia device support. If the bs_da and bs_ra in bus tag are set NEPC_io_space_tag and NEPC_mem_space_tag respectively, new bus_space stuff changes the register of mecia automatically for 16bit access.
Obtained from: NetBSD/pc98
|
84593 |
06-Oct-2001 |
nyan |
- Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h. (bus_dma.h is repo-copied from bus_at386.h) - Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
|
84427 |
03-Oct-2001 |
bde |
Fixed a missing proc -> thread substitution.
Broke future detection of this bug in userland by not declaring kernel prototypes in userland.
|
83757 |
21-Sep-2001 |
peter |
Introduce a new option, KVA_SPACE, which can be used to reconfigure the size of the kernel virtual address space relatively painlessly. Userland will adapt via the exported kernbase symbol. Increasing this causes the user part of address space to reduce.
|
83651 |
18-Sep-2001 |
peter |
Cleanup and split of nfs client and server code. This builds on the top of several repo-copies.
|
83644 |
18-Sep-2001 |
jhb |
Whitespace fixes.
|
83643 |
18-Sep-2001 |
jhb |
- If we ever do the per-cpu KTR stuff, the index won't be volatile as it will be private to each CPU. - Re-style(9) the globaldata structures. There really needs to be a MI struct pcpu that has a MD struct mdpcpu member at some point.
|
83506 |
15-Sep-2001 |
dfr |
Fill out some gaps in ia64 DDB support. This involves generalising DDB's breakpoint handling slightly to cope with the fact that ia64 instructions are not located on byte boundaries.
|
83366 |
12-Sep-2001 |
julian |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
83363 |
12-Sep-2001 |
gj |
Increase AUTHNAME to 42 bytes for users of T-Online, which requires 41 bytes.
MFC after: 2 weeks
|
83291 |
10-Sep-2001 |
kris |
Fix some signed/unsigned integer confusion, and add bounds checking of arguments to some functions.
Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
|
83047 |
05-Sep-2001 |
obrien |
style(9) the structure definitions.
|
82971 |
04-Sep-2001 |
iwasaki |
Reenable RTC interrupts after wakeup. Some laptops have a problem with system statistics monitoring tools (such as systat, vmstat...) because of stopping RTC interrupts generation. Restore all the timers (RTC and i8254) atomically.
Reviewed by: bde MFC after: 1 week
|
82845 |
03-Sep-2001 |
yokota |
Fix the argument specifier for the PnP BIOS function 2 (PNP_SET_DEVNODE). The second argument is not a segment:offset pointer, but a 16 bit short.
MFC after: 4 weeks
|
82530 |
30-Aug-2001 |
mike |
o Remove some GCCisms in src/powerpc/include/endian.h. o Unify <machine/endian.h>'s across all architectures. o Make bswapXX() functions use a different spelling of u_int16_t and friends to reduce namespace pollution. The bswapXX() functions don't actually exist, but we'll probably import these at some point. Atleast one driver (if_de) depends on bswapXX() for big endian cases. o Deprecate byteorder(3) prototypes from <sys/types.h>, these are now prototyped indirectly in <arpa/inet.h>. o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these are now typedef'd in <arpa/inet.h>. o Change byteorder(3) prototypes to use standards compliant uint32_t (spelled __uint32_t to reduce namespace pollution). o Document new preferred headers and standards compliance.
Discussed with: bde PR: 29946 Reviewed by: bmilekic
|
82313 |
25-Aug-2001 |
peter |
vm_page_zero_idle() is no longer MD.
|
82309 |
25-Aug-2001 |
peter |
Optionize UPAGES for the i386. As part of this I split some of the low level implementation stuff out of machine/globaldata.h to avoid exposing UPAGES to lots more places. The end result is that we can double the kernel stack size with 'options UPAGES=4' etc.
This is mainly being done for the benefit of a MFC to RELENG_4 at some point. -current doesn't really need this so much since each interrupt runs on its own kstack.
|
82035 |
21-Aug-2001 |
imp |
The general conesnsus on irc was that pci bios for config registers 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
|
82026 |
21-Aug-2001 |
peter |
Detect a certain type of PCIBIOS brain damage. For some reason, some bios vendors took it apon themselves to "censor" the host->pci bridges from PCIBIOS callers, even when the caller explicitly asks for them. This includes certain Compaq machines (eg: DL360) and some laptops.
If we detect this, shut down pcibios and revert to using IO port bashing.
Under -current, apcica does a better job anyway.
|
81933 |
20-Aug-2001 |
dillon |
Limit the amount of KVM reserved for the buffer cache and for swap-meta information. The default limits only effect machines with > 1GB of ram and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and kern.maxbcache. This has the effect of leaving more KVM available for sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad adds memory to a machine and then sees the kernel panic on boot due to running out of KVM.
Also change the default swap-meta auto-sizing calculation to allocate half of what it was previously allocating. The prior defaults were way too high. Note that we cannot afford to run out of swap-meta structures so we still stay somewhat conservative here.
|
81763 |
16-Aug-2001 |
obrien |
style(9) and make consistent across platforms
|
81727 |
15-Aug-2001 |
ache |
OFF_T -> OFF (more standard style)
|
81718 |
15-Aug-2001 |
ache |
Add OFF_T_MAX/OFF_T_MIN
|
81493 |
10-Aug-2001 |
jhb |
- Close races with signals and other AST's being triggered while we are in the process of exiting the kernel. The ast() function now loops as long as the PS_ASTPENDING or PS_NEEDRESCHED flags are set. It returns with preemption disabled so that any further AST's that arrive via an interrupt will be delayed until the low-level MD code returns to user mode. - Use u_int's to store the tick counts for profiling purposes so that we do not need sched_lock just to read p_sticks. This also closes a problem where the call to addupc_task() could screw up the arithmetic due to non-atomic reads of p_sticks. - Axe need_proftick(), aston(), astoff(), astpending(), need_resched(), clear_resched(), and resched_wanted() in favor of direct bit operations on p_sflag. - Fix up locking with sched_lock some. In addupc_intr(), use sched_lock to ensure pr_addr and pr_ticks are updated atomically with setting PS_OWEUPC. In ast() we clear pr_ticks atomically with clearing PS_OWEUPC. We also do not grab the lock just to test a flag. - Simplify the handling of Giant in ast() slightly.
Reviewed by: bde (mostly)
|
81265 |
08-Aug-2001 |
peter |
Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since they are a really nasty interface that should have been killed long ago when 'ptrace(PT_[SG]ETREGS' etc came along. The entity that they operate on (struct user) will not be around much longer since it is part-per-process and part-per-thread in a post-KSE world.
gdb does not actually use this except for the obscure 'info udot' command which does a hexdump of as much of the child's 'struct user' as it can get. It carries its own #defines so it doesn't break compiles.
|
80700 |
31-Jul-2001 |
jake |
Use a machine dependent type, Elf_Hashelt, for the elements of the elf dynamic symbol table buckets and chains. The sparc64 toolchain uses 32 bit .hash entries, unlike other 64 bits architectures (alpha), which use 64 bit entries.
Discussed with: dfr, jdp
|
80399 |
26-Jul-2001 |
bmilekic |
- Do not handle the per-CPU containers in mbuf code as though the cpuids were indices in a dense array. The cpuids are a sparse set and treat them as such, setting up containers only for CPUs activated during mb_init().
- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse map, in accordance with the above.
This allows us to properly boot with certain CPUs disactivated. However, if we later decide to re-activate said CPUs, we will barf until we decide to implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU containers to get configured on their activation.
Reported by: mjacob Partially (sys/ diffs) Submitted by: mjacob
|
80081 |
21-Jul-2001 |
hm |
update step.
|
79734 |
14-Jul-2001 |
jhb |
Fix MCOUNT_ENTER() so it actually compiles in the profiling case.
Pointy hat to: me Submitted by: Danny J. Zerkel <dzerkel@columbus.rr.com>
|
79630 |
12-Jul-2001 |
peter |
The #define for pcb_savefpu seems to do more harm than good.
|
79609 |
12-Jul-2001 |
peter |
Activate SSE/SIMD. This is the extra context switching support that we are required to do if we let user processes use the extra 128 bit registers etc.
This is the base part of the diff I got from: http://www.issei.org/issei/FreeBSD/sse.html I believe this is by: Mr. SUZUKI Issei <issei@issei.org> SMP support apparently by: Takekazu KATO <kato@chino.it.okayama-u.ac.jp> Test code by: NAKAMURA Kazushi <kaz@kobe1995.net>, see http://kobe1995.net/~kaz/FreeBSD/SSE.en.html
I have fixed a couple of style(9) deviations. I have some followup commits to fix a couple of non-style things.
|
78962 |
29-Jun-2001 |
jhb |
Add a new MI pointer to the process' trapframe p_frame instead of using various differently named pointers buried under p_md.
Reviewed by: jake (in principle)
|
78908 |
28-Jun-2001 |
jhb |
Get kernel profiling on SMP systems closer to working by replacing the mcount spin mutex with a very simple non-recursive spinlock implemented using atomic operations.
|
78903 |
28-Jun-2001 |
bsd |
Provide access to the IA32 hardware debug registers from the ddb kernel debugger. Proper use of these registers allows setting hardware watchpoints for use in kernel debugging.
MFC after: 2 weeks
|
78808 |
26-Jun-2001 |
nyan |
Merged from sys/i386/include/bus_at386.h revision 1.14.
|
78425 |
18-Jun-2001 |
jhb |
Include sys/pcpu.h to get the prototype for globaldata_register() to quiet a warning.
|
78353 |
16-Jun-2001 |
alex |
Fix "alignemnt" typo.
|
77931 |
09-Jun-2001 |
obrien |
Fix style of defines.
|
77800 |
06-Jun-2001 |
joerg |
Nuke the various poorly maintained copies of ioctl_fd.h. The file is not machine-dependant, thus it has been moved out (repo-copied) into <sys/fdcio.h>.
|
77626 |
02-Jun-2001 |
phk |
Properly wrap mtx_intr_enable() macro in "do $bla while (0)"
|
77584 |
01-Jun-2001 |
tmm |
This file is not needed any more, the definitions and declarations it contained have been moved to i386/isa/icu.h and sys/interrupt.h.
|
77164 |
25-May-2001 |
hm |
Submitted by: Juha-Matti Liukkonen (Cubical Solutions Ltd) (jml@cubical.fi)
Add a CAPI (hardware independent) driver i4bcapi(4) and hardware driver iavc (4) to support active CAPI-based BRI and PRI cards (currently AVM B1 and T1 cards) to isdn4bsd.
|
77015 |
22-May-2001 |
bde |
Convert npx interrupts into traps instead of vice versa. This is much simpler for npx exceptions that start as traps (no assembly required...) and works better for npx exceptions that start as interrupts (there is no longer a problem for nested interrupts).
Submitted by: original (pre-SMPng) version by luoqi
|
76785 |
18-May-2001 |
obrien |
Make _BSD_TIME_T_ (time_t) an `int' rather than `long'. This will help flag errors where programmers assume time_t is a long, which it is not on 64-bit platforms.
Submitted by: bde
|
76784 |
18-May-2001 |
obrien |
Style changes -- revert ordering to mostly two revs ago. Embellish some comments, fix tab'ing.
Requested by: bde
|
76701 |
16-May-2001 |
obrien |
Consistently define the rune types. Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
|
76700 |
16-May-2001 |
obrien |
Move the int typedefs to the top so they can be used in defining other types. Ensure every platform has __offsetof. Make multiple inclusion detection consistent with other <platform>/include/*.h files.
|
76651 |
15-May-2001 |
jhb |
"Sir, the deorbit burn completed succesfully."
RIP {sys/machine}/ipl.h.
|
76650 |
15-May-2001 |
jhb |
Remove unneeded includes of sys/ipl.h and machine/ipl.h.
|
76588 |
14-May-2001 |
joerg |
Implement a few more floppy ioctl commands and IO options, namely:
. FD_CLRERR clears the error counter, thus re-enables kernel error printf()s,
. FD_GSTAT obtains the last FDC operation state, if any,
. FDOPT_NOERRLOG (temporarily) turns off kernel printf() floppy error logging,
. FDOPT_NOERROR makes the kernel ignore an FDC error, thus can enable the transfer of an erroneous sector to the user application
All options are being cleared on (last) close.
Prime consumer of the last features will be fdread(1), to be committed shortly.
(FD_CLRERR should be wired into fdcontrol(8), but then fdcontrol(8) needs a major rewrite anyway.)
|
76434 |
10-May-2001 |
jhb |
- Use sched_lock and critical regions to ensure that LDT updates are thread safe from preemption and concurrent access to the LDT. - Move the prototype for i386_extend_pcb() to <machine/pcb_ext.h>.
Reviewed by: silence on -hackers
|
76166 |
01-May-2001 |
markm |
Undo part of the tangle of having sys/lock.h and sys/mutex.h included in other "system" header files.
Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files.
Sort sys/*.h includes where possible in affected files.
OK'ed by: bde (with reservations)
|
76078 |
27-Apr-2001 |
jhb |
Overhaul of the SMP code. Several portions of the SMP kernel support have been made machine independent and various other adjustments have been made to support Alpha SMP.
- It splits the per-process portions of hardclock() and statclock() off into hardclock_process() and statclock_process() respectively. hardclock() and statclock() call the *_process() functions for the current process so that UP systems will run as before. For SMP systems, it is simply necessary to ensure that all other processors execute the *_process() functions when the main clock functions are triggered on one CPU by an interrupt. For the alpha 4100, clock interrupts are delievered in a staggered broadcast fashion, so we simply call hardclock/statclock on the boot CPU and call the *_process() functions on the secondaries. For x86, we call statclock and hardclock as usual and then call forward_hardclock/statclock in the MD code to send an IPI to cause the AP's to execute forwared_hardclock/statclock which then call the *_process() functions. - forward_signal() and forward_roundrobin() have been reworked to be MI and to involve less hackery. Now the cpu doing the forward sets any flags, etc. and sends a very simple IPI_AST to the other cpu(s). AST IPIs now just basically return so that they can execute ast() and don't bother with setting the astpending or needresched flags themselves. This also removes the loop in forward_signal() as sched_lock closes the race condition that the loop worked around. - need_resched(), resched_wanted() and clear_resched() have been changed to take a process to act on rather than assuming curproc so that they can be used to implement forward_roundrobin() as described above. - Various other SMP variables have been moved to a MI subr_smp.c and a new header sys/smp.h declares MI SMP variables and API's. The IPI API's from machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h. - The globaldata_register() and globaldata_find() functions as well as the SLIST of globaldata structures has become MI and moved into subr_smp.c. Also, the globaldata list is only available if SMP support is compiled in.
Reviewed by: jake, peter Looked over by: eivind
|
75724 |
20-Apr-2001 |
jhb |
Make the ap_boot_mtx mutex static.
|
75677 |
18-Apr-2001 |
imp |
Back out 1.103. It wasn't approved by the owner of the file and introduced style bugs.
Submited by: bde
|
75570 |
17-Apr-2001 |
jhb |
Blow away the panic mutex in favor of using a single atomic_cmpset() on a panic_cpu shared variable. I used a simple atomic operation here instead of a spin lock as it seemed to be excessive overhead. Also, this can avoid recursive panics if, for example, witness is broken.
|
75518 |
14-Apr-2001 |
markm |
Back out wrapping the asm ... ; bits in #ifndef lint macros. There are some good reasons for not doing this, even if the linting of the code breaks.
1) If lint were ever to understand the stuff inside the macros, that would break the checks.
2) There are ways to use __GNUC__ to exclude overly specific code.
3) (Not yet practical) Lint(1) needs to properlyu understand all of te code we actually run.
Complained about by: bde Education by: jake, jhb, eivind
|
75471 |
13-Apr-2001 |
markm |
Make this more lint-friendly. This file seems to be invoked in just about any .c file that includes a .h, and lint produces copious whining because of the asm ...; stuff.
|
75421 |
11-Apr-2001 |
jhb |
Rename the IPI API from smp_ipi_* to ipi_* since the smp_ prefix is just "redundant noise" and to match the IPI constant namespace (IPI_*).
Requested by: bde
|
75397 |
10-Apr-2001 |
jhb |
Remove constants defining the bitmasks of the old giant kernel lock.
|
75396 |
10-Apr-2001 |
jhb |
Remove the old APIC I/O higher level IPI API in favor of the newer MI API for IPI's that isn't tied to the Intel APIC. MD code can still use the apic_ipi() function or dink with the apic directly if needed to send MD IPI's.
|
75393 |
10-Apr-2001 |
jhb |
Remove the BETTER_CLOCK #ifdef's. The code is on by default and is here to stay for the foreseeable future.
OK'd by: peter (the idea)
|
75392 |
10-Apr-2001 |
jhb |
Add an MI API for sending IPI's. I used the same API present on the alpha because: - it used a better namespace (smp_ipi_* rather than *_ipi), - it used better constant names for the IPI's (IPI_* rather than X*_OFFSET), and - this API also somewhat exists for both alpha and ia64 already.
|
75256 |
06-Apr-2001 |
jhb |
Axe the per-cpu variable witness_spin_check as it was replaced by the per-cpu spinlocks list.
|
75141 |
03-Apr-2001 |
imp |
De __P() while I'm here. Done as a separate commit since it is just stylistic.
# Yes, this break K&R, but this file already used so many gcc extensions # keeping K&R support seemed too anachronistic for me.
Didn't fix the bug where functions that can only be used in the kernel are exported to userland.
|
75139 |
03-Apr-2001 |
imp |
Make this file C++ safe. It defines many useful functions (inb, outb) that people use from userland in C++ programs. I've had this in my tree for ages and just got bit by it not being in the real tree again.
This is a MFC candidate.
|
74912 |
28-Mar-2001 |
jhb |
Rework the witness code to work with sx locks as well as mutexes. - Introduce lock classes and lock objects. Each lock class specifies a name and set of flags (or properties) shared by all locks of a given type. Currently there are three lock classes: spin mutexes, sleep mutexes, and sx locks. A lock object specifies properties of an additional lock along with a lock name and all of the extra stuff needed to make witness work with a given lock. This abstract lock stuff is defined in sys/lock.h. The lockmgr constants, types, and prototypes have been moved to sys/lockmgr.h. For temporary backwards compatability, sys/lock.h includes sys/lockmgr.h. - Replace proc->p_spinlocks with a per-CPU list, PCPU(spinlocks), of spin locks held. By making this per-cpu, we do not have to jump through magic hoops to deal with sched_lock changing ownership during context switches. - Replace proc->p_heldmtx, formerly a list of held sleep mutexes, with proc->p_sleeplocks, which is a list of held sleep locks including sleep mutexes and sx locks. - Add helper macros for logging lock events via the KTR_LOCK KTR logging level so that the log messages are consistent. - Add some new flags that can be passed to mtx_init(): - MTX_NOWITNESS - specifies that this lock should be ignored by witness. This is used for the mutex that blocks a sx lock for example. - MTX_QUIET - this is not new, but you can pass this to mtx_init() now and no events will be logged for this lock, so that one doesn't have to change all the individual mtx_lock/unlock() operations. - All lock objects maintain an initialized flag. Use this flag to export a mtx_initialized() macro that can be safely called from drivers. Also, we on longer walk the all_mtx list if MUTEX_DEBUG is defined as witness performs the corresponding checks using the initialized flag. - The lock order reversal messages have been improved to output slightly more accurate file and line numbers.
|
74900 |
28-Mar-2001 |
jhb |
- Switch from using save/disable/restore_intr to using critical_enter/exit and change the u_int mtx_saveintr member of struct mtx to a critical_t mtx_savecrit. - On the alpha we no longer need a custom _get_spin_lock() macro to avoid an extra PAL call, so remove it. - Partially fix using mutexes with WITNESS in modules. Change all the _mtx_{un,}lock_{spin,}_flags() macros to accept explicit file and line parameters and rename them to use a prefix of two underscores. Inside of kern_mutex.c, generate wrapper functions for _mtx_{un,}lock_{spin,}_flags() (only using a prefix of one underscore) that are called from modules. The macros mtx_{un,}lock_{spin,}_flags() are mapped to the __mtx_* macros inside of the kernel to inline the usual case of mutex operations and map to the internal _mtx_* functions in the module case so that modules will use WITNESS and KTR logging if the kernel is compiled with support for it.
|
74897 |
28-Mar-2001 |
jhb |
- Add the new critical_t type used to save state inside of critical sections. - Add implementations of the critical_enter() and critical_exit() functions and remove restore_intr() and save_intr(). - Remove the somewhat bogus disable_intr() and enable_intr() functions on the alpha as the alpha actually uses a priority level and not simple bit flag on the CPU.
|
74670 |
23-Mar-2001 |
tmm |
Export intrnames and intrcnt as sysctls (hw.nintr, hw.intrnames and hw.intrcnt).
Approved by: rwatson
|
74384 |
17-Mar-2001 |
peter |
Use a generic implementation of the Fowler/Noll/Vo hash (FNV hash). Make the name cache hash as well as the nfsnode hash use it.
As a special tweak, create an unsigned version of register_t. This allows us to use a special tweak for the 64 bit versions that significantly speeds up the i386 version (ie: int64 XOR int64 is slower than int64 XOR int32).
The code layout is a little strange for the string function, but I was able to get between 5 to 10% improvement over the original version I started with. The layout affects gcc code generation choices and this way was fastest on x86 and alpha.
Note that 'CPUTYPE=p3' etc makes a fair difference to this. It is around 45% faster with -march=pentiumpro on a p6 cpu.
|
74283 |
15-Mar-2001 |
peter |
Kill the 4MB kernel limit dead. [I hope :-)]. For UP, we were using $tmp_stk as a stack from the data section. If the kernel text section grew beyond ~3MB, the data section would be pushed beyond the temporary 4MB P==V mapping. This would cause the trampoline up to high memory to fault. The hack workaround I did was to use all of the page table pages that we already have while preparing the initial P==V mapping, instead of just the first one. For SMP, the AP bootstrap process suffered the same sort of problem and got the same treatment.
MFC candidate - this breaks on 4.x just the same..
Thanks to: Richard Todd <rmtodd@ichotolot.servalan.com>
|
74016 |
09-Mar-2001 |
jhb |
Fix mtx_legal2block. The only time that it is bad to block on a mutex is if we hold a spin mutex, since we can trivially get into deadlocks if we start switching out of processes that hold spinlocks. Checking to see if interrupts were disabled was a sort of cheap way of doing this since most of the time interrupts were only disabled when holding a spin lock. At least on the i386. To fix this properly, use a per-process counter p_spinlocks that counts the number of spin locks currently held, and instead of checking to see if interrupts are disabled in the witness code, check to see if we hold any spin locks. Since child processes always start up with the sched lock magically held in fork_exit(), we initialize p_spinlocks to 1 for child processes. Note that proc0 doesn't go through fork_exit(), so it starts with no spin locks held.
Consulting from: cp
|
73875 |
06-Mar-2001 |
dwmalone |
Spell what was originally "unsigned long" as "unsigned long" again, to cut down on some compiler warnings caused by lexically mismatched types.
Reviewed by: bde
|
73324 |
02-Mar-2001 |
kato |
Merged from sys/i386/include/bus_at386.h revision 1.13.
|
73314 |
02-Mar-2001 |
mdodd |
version 1.7 made some changes to correct problems identifed by compiling with egcs-1.1.1. bus_space_write_multi_2() had an extra operation that should have been removed.
Remove it.
This fixes the panic when bus_space_write_multi_2() is used.
Obtained from: jake
|
73013 |
25-Feb-2001 |
peter |
Always use the ELF naming after the demise of asnames.h.
|
73011 |
25-Feb-2001 |
jake |
Remove the leading underscore from all symbols defined in x86 asm and used in C or vice versa. The elf compiler uses the same names for both. Remove asnames.h with great prejudice; it has served its purpose.
Note that this does not affect the ability to generate an aout kernel due to gcc's -mno-underscores option.
moral support from: peter, jhb
|
73001 |
25-Feb-2001 |
jake |
- Rename the lcall system call handler from Xsyscall to Xlcall_syscall to be more like Xint0x80_syscall and less like c function syscall(). - Reduce code duplication between the int0x80 and lcall handlers by shuffling the elfags into the right place, saving the sizeof the instruction in tf_err and jumping into the common int0x80 code.
Reviewed by: peter
|
72930 |
23-Feb-2001 |
peter |
Activate USER_LDT by default. The new thread libraries are going to depend on this. The linux ABI emulator tries to use it for some linux binaries too. VM86 had a bigger cost than this and it was made default a while ago.
Reviewed by: jhb, imp
|
72897 |
22-Feb-2001 |
jhb |
GC unused and now obsolete assertion macros.
|
72746 |
20-Feb-2001 |
jhb |
- Don't call clear_resched() in userret(), instead, clear the resched flag in mi_switch() just before calling cpu_switch() so that the first switch after a resched request will satisfy the request. - While I'm at it, move a few things into mi_switch() and out of cpu_switch(), specifically set the p_oncpu and p_lastcpu members of proc in mi_switch(), and handle the sched_lock state change across a context switch in mi_switch(). - Since cpu_switch() no longer handles the sched_lock state change, we have to setup an initial state for sched_lock in fork_exit() before we release it.
|
72700 |
19-Feb-2001 |
bde |
Removed all traces of T_ASTFLT (except for gaps where it was). It became unused except in dead code when ast() was split off from trap().
|
72683 |
19-Feb-2001 |
bde |
Changed the aston() family to operate on a specified process instead of always on curproc. This is needed to implement signal delivery properly (see a future log message for kern_sig.c).
Debogotified the definition of aston(). aston() was defined in terms of signotify() (perhaps because only the latter already operated on a specified process), but aston() is the primitive.
Similar changes are needed in the ia64 versions of cpu.h and trap.c. I didn't make them because the ia64 is missing the prerequisite changes to make astpending and need_resched per-process and those changes are too large to make without testing.
|
72678 |
19-Feb-2001 |
bde |
Fixed style bugs in clock.c rev.1.164 and cpu.h rev.1.52-1.53 -- declare tsc_present in the right places (together with other variables of the same linkage), and don't use messy ifdefs just to avoid exporting it in some cases.
|
72555 |
17-Feb-2001 |
bde |
Fixed disordering in previous commit. "Fixed" a null comment in previous commit by removing it.
|
72510 |
15-Feb-2001 |
ume |
Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by: itojun
|
72358 |
11-Feb-2001 |
markm |
RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to <i386/include/apic.h> (AKA <machine/apic.h>). Reviewed by: jhb
|
72276 |
10-Feb-2001 |
jhb |
- Make astpending and need_resched process attributes rather than CPU attributes. This is needed for AST's to be properly posted in a preemptive kernel. They are backed by two new flags in p_sflag: PS_ASTPENDING and PS_NEEDRESCHED. They are still accesssed by their old macros: aston(), astoff(), etc. For completeness, an astpending() macro has been added to check for a pending AST, and clear_resched() has been added to clear need_resched(). - Rename syscall2() on the x86 back to syscall() to be consistent with other architectures.
|
72274 |
10-Feb-2001 |
jhb |
Add a macro mtx_intr_enable() to alter a spin lock such that interrupts will be enabled when it is released.
|
72225 |
09-Feb-2001 |
jhb |
Woops, remove an obsolete reference to gd_cpu_lockid.
|
72219 |
09-Feb-2001 |
jhb |
Axe gd_cpu_lockid as it is no longer used.
|
72200 |
09-Feb-2001 |
bmilekic |
Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
similarily, for releasing a lock, we now have:
mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument.
The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind.
Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two:
MTX_QUIET and MTX_NOSWITCH
The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers:
mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively.
Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case.
Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled.
Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those.
Finally, caught up to the interface changes in all sys code.
Contributors: jake, jhb, jasone (in no particular order)
|
72093 |
06-Feb-2001 |
asmodai |
Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
|
71858 |
31-Jan-2001 |
peter |
Zap last remaining references to (and a use use of) of simple_locks.
|
71818 |
30-Jan-2001 |
peter |
Remove some leftovers from the CMAP* stuff in globaldata and the BSP and AP startup.
|
71728 |
28-Jan-2001 |
bmilekic |
Move the setting of curproc to idleproc up earlier in ap_init(). The problem is that a mutex lock, prior to this change, is acquired before the curproc is set to idleproc, so we mess ourselves up by calling the mutex lock routine with curproc == NULL.
Moving it up after the aps_ready spin-wait has us hopefully setting it after idleproc is setup.
Solved by: jake (the allmighty) :-)
|
71727 |
28-Jan-2001 |
tegge |
Defer assignment of low level interrupt handlers for PCI interrupts described in the MP table until something asks for the interrupt number later on.
|
71674 |
26-Jan-2001 |
hm |
Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards. Increment i4b minor revision (=step) so a buildworld or a make install in /usr/src/sys/include is necessary to get isdnd and i4b kernel parts in sync.
|
71576 |
24-Jan-2001 |
jasone |
Convert all simplelocks to mutexes and remove the simplelock implementations.
|
71531 |
24-Jan-2001 |
jhb |
Remove unused locks: cpl, fast_intr, intr, mpintr.
|
71530 |
24-Jan-2001 |
jhb |
- Proc locking. - P_OWEUPC -> PS_OWEUPC. - Remove obsolete prototype for MD fork_return().
|
71529 |
24-Jan-2001 |
jhb |
- Remove Xforward_irq, cpl_lock, and fast_intr_lock. - Add fork_exit.
|
71525 |
24-Jan-2001 |
jhb |
- Relocate portions of this file to get it into an order closer to that of the alpha mp_machdep.c. - Proc locking. - Catch up to the P_FOO -> PS_FOO proc flags changes. - Stick ap_init()'s prototype with the other prototypes. - Remove the Xforwardirq IPI. - Remove unused simplelocks. - Don't try to psignal() from forward_statclock(), but set the appropriate signal pending flag in p_sflag instead. - Add in KTR_SMP tracepoints for various SMP functions. (Brought over from the alpha port)
|
71490 |
24-Jan-2001 |
jhb |
Use queue macros.
|
71352 |
21-Jan-2001 |
jasone |
Move most of sys/mutex.h into kern/kern_mutex.c, thereby making the mutex inline functions non-inlined. Hide parts of the mutex implementation that should not be exposed.
Make sure that WITNESS code is not executed during boot until the mutexes are fully initialized by SI_SUB_MUTEX (the original motivation for this commit).
Submitted by: peter
|
71337 |
21-Jan-2001 |
jake |
Make intr_nesting_level per-process, rather than per-cpu. Setup interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly.
Reviewed By: peter
|
71321 |
21-Jan-2001 |
peter |
Remove APIC_INTR_DIAGNOSTIC - this has been disabled for some time now. Remove some leftovers of removed SMP options.
|
71319 |
21-Jan-2001 |
peter |
Remove the MAYBE_PANIC and GUARD_CPU macros - unused.
|
71318 |
21-Jan-2001 |
jake |
Remove the per-cpu pages used for copy and zero-ing pages of memory for SMP; just use the same ones as UP. These weren't used without holding Giant anyway, and the routines that use them would have to be protected from pre-emption to avoid migrating cpus.
|
71313 |
21-Jan-2001 |
jake |
Implement optimized PCPU accessors. These are necessary to support a pre-emptable kernel. For variables of size 4 bytes or less they compile to a single instruction, which does not allow a process to migrate cpus in the middle, and get the value for the "wrong" cpu.
|
71292 |
20-Jan-2001 |
jake |
Simplify the i386 asm MTX_{ENTER,EXIT} macros to just call the appropriate function, rather than doing a horse-and-buggy acquire. They now take the mutex type as an arg and can be used with sleep as well as spin mutexes.
|
71287 |
20-Jan-2001 |
jake |
- Make npx_intr INTR_MPSAFE and move acquiring Giant into the function itself. - Remove a hack to allow acquiring Giant from the npx asm trap vector.
|
71247 |
19-Jan-2001 |
peter |
EEK! I missed a couple of places with the 24->32 interrupt change.
|
71246 |
19-Jan-2001 |
peter |
Remove #defines for the old lock function names and spl0/splz
|
71243 |
19-Jan-2001 |
peter |
apic_itrace_splz[] is unused
|
71240 |
19-Jan-2001 |
peter |
Remove the static splXXX functions and replace them by static __inline stubs. Remove the xxx_imask variables which have been all but gone for a while.
|
71211 |
18-Jan-2001 |
jhb |
Protect p_stat and p_oncpu with sched_lock in forward_signal().
|
71141 |
17-Jan-2001 |
jhb |
- Sort of lie and say that %eax is an output only and not an input for the non-386 atomic_load_acq(). %eax is an input since its value is used in the cmpxchg instruction, but we don't care what value it is, so setting it to a specific value is just wasteful. Thus, it is being used without being initialized as the warning stated, but it is ok for it to be used because its value isn't important. Thus, we are only sort of lying when we say it is an output only operand. - Add "cc" to the clobber list for atomic_load_acq() since the cmpxchgl changes ZF.
|
71103 |
16-Jan-2001 |
phk |
These files have been on deathrow for a couple of months, no appeal.
|
71092 |
16-Jan-2001 |
jhb |
Argh, disable the micro-ops again. I didn't test these adequately and managed to lock up one of my machines in world again.
Pointy-hat to: me
|
71091 |
16-Jan-2001 |
jhb |
- Use "+a" instead of "=&a" for several constraints. This should fix compiling errors where gcc would run out of registers. - Add "cc" to the list of clobbers for micro-ops where we perform instructions that alter %eflags. - Use xchgl instead of cmpxchgl to release a spin lock. This could allow for more efficient register allocation as we no longer mandate that %eax be used. - Reenable the optimized mutex micro-ops in the non-i386 case.
|
71085 |
16-Jan-2001 |
jhb |
- Fix atomic_load_* and atomic_store_* to generate functions for atomic.c that modules can call. - Remove the old gcc <= 2.8 versions of the atomic ops. - Resort the order of some things in the file so that there is only one #ifdef for KLD_MODULE, and so that all WANT_FUNCTIONS stuff is moved to the bottom of the file. - Remove ATOMIC_ACQ_REL() and just use explicit macros instead.
|
71024 |
14-Jan-2001 |
jhb |
Revert the previous revision now that atomic_store_rel_ptr() actually works.
|
71023 |
14-Jan-2001 |
jhb |
Fix the atomic_load_acq() and atomic_store_rel() functions to properly implement memory fences for the 486+. The 386 still uses versions w/o memory fences as all operations on the 386 are not program ordered. The 386 versions are not MP safe.
|
71005 |
14-Jan-2001 |
jhb |
Work around the broken atomic_store_rel_ptr() on the i386 arch by just using atomic_cmpset_rel_ptr() instead for _release_lock_quick(). When atomic_store_rel_ptr() is functional and MP safe, then this can be reverted.
|
70954 |
12-Jan-2001 |
jake |
Change return ??? to return -1 in some #if 0'ed code.
|
70952 |
12-Jan-2001 |
jake |
Remove unused per-cpu variables inside_intr and ss_eflags.
|
70928 |
11-Jan-2001 |
jake |
- Remove compatibility macros for accessing per-cpu variables. __FreeBSD_version 500015 can be used to detect their disappearance. - Move the symbols for SMP_prvspace and lapic from globals.s to locore.s. - Remove globals.s with extreme prejudice.
|
70926 |
11-Jan-2001 |
hm |
Add infrastructure to support the ISDN itjc hardware driver. Submitted by: Sergio de Souza Prallon <prallon@tmp.com.br>
|
70861 |
10-Jan-2001 |
jake |
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables other then curproc.
|
70814 |
09-Jan-2001 |
peter |
Send the old if_wl in the old location to the Attic after a repo copy to sys/dev/wi/*
|
70798 |
08-Jan-2001 |
jake |
Fix a warning. The type of globaldata.gd_prvspace has changed.
|
70723 |
06-Jan-2001 |
jake |
Implement accessors for per-cpu variables which don't depend on the symbols in globals.s.
PCPU_GET(name) returns the value of the per-cpu variable PCPU_PTR(name) returns a pointer to the per-cpu variable PCPU_SET(name, val) sets the value of the per-cpu variable
In general these are not yet used, compatibility macros remain.
Unifdef SMP struct globaldata, this makes variables such as cpuid available for UP as well.
Rebuilding modules is probably a good idea, but I believe old modules will still work, as most of the old infrastructure remains.
|
70714 |
06-Jan-2001 |
jake |
Use %fs to access per-cpu variables in uni-processor kernels the same as multi-processor kernels. The old way made it difficult for kernel modules to be portable between uni-processor and multi-processor kernels. It is no longer necessary to jump through hoops.
- always load %fs with the private segment on entry to the kernel - change the type of the self referntial pointer from struct privatespace to struct globaldata - make the globaldata symbol have value 0 in all cases, so the symbols in globals.s are always offsets, not aliases for fields in globaldata - define the globaldata space used for uniprocessor kernels in C, rather than assembler - change the assmebly language accessors to use %fs, add a macro PCPU_ADDR(member, reg), which loads the register reg with the address of the per-cpu variable member
|
70224 |
20-Dec-2000 |
takawata |
Add PECOFF (WIN32 Execution file format) support. To use it, some dll is needed. And currently, the dll is only for NetBSD. So one more kernel module is needed. For more infomation, http://chiharu.haun.org/peace/ .
Reviewed by: bp
|
69971 |
13-Dec-2000 |
jake |
Introduce a new potientially cleaner interface for accessing per-cpu variables from i386 assembly language. The syntax is PCPU(member) where member is the capitalized name of the per-cpu variable, without the gd_ prefix. Example: movl %eax,PCPU(CURPROC). The capitalization is due to using the offsets generated by genassym rather than the symbols provided by linking with globals.o. asmacros.h is the wrong place for this but it seemed as good a place as any for now. The old implementation in asnames.h has not been removed because it is still used to de-mangle the symbols used by the C variables for the UP case.
|
69892 |
12-Dec-2000 |
jhb |
Fix the assembly mutex macros to call the appropriate witness functions if the witness code is compiled in. Without this, the witness code doesn't notice that sched_lock is released by fork_trampoline() and thus gets all confused about spin lock order later on.
|
69773 |
08-Dec-2000 |
jake |
Fix a jump to the wrong label, <sigh>. Put a period at the end of a sentence in a comment.
Submitted by: bde
|
69770 |
08-Dec-2000 |
jhb |
Argh, revert the clobber changes. Since %ecx and %edx aren't call safe, calling the C functions mtx_enter_hard() and mtx_exit_hard() clobbers them. Note that %eax is also not call safe, but it is already clobbered due to cmpxchg. However, now we are back to not compiling again, so these macros are still left disabled for now.
|
69743 |
08-Dec-2000 |
jake |
Change the calling conventions of the MTX_ENTER macro to match that of MTX_EXIT. Don't assume that the reg parameter to MTX_ENTER holds curproc, load it explicitly. Put semi-colons at the end of the macros to be more consistent and so its harder to forget them when these change.
|
69740 |
08-Dec-2000 |
jhb |
Well, the previous commit wasn't entirely correct either. For now, just disable the optimized mutex micro-operations for the non-I386_CPU case and fall back to the C stubs that call the atomic_foo() inlines.
|
69728 |
07-Dec-2000 |
phk |
Move extern tsc_present outside function to quelch a warning.
|
69690 |
07-Dec-2000 |
jhb |
Fix broken register restraints that needlessly clobbered registers %ecx and %edx resulting in gcc not having enough registers left to work with.
|
69658 |
06-Dec-2000 |
peter |
This is kind of a nasty hack, but it appears to solve the Compaq DL360 SMP problem. Compaq, in their infinite wisdom, forgot to put the IO apic intpin #0 connection to the 8259 PIC into the mptable. This hack is to look and see if intpin #0 has *no* table entry and adds a fake ExtInt entry for the remap routines to use. isa/clock.c will still test the interrupts. This entry is only ever used on an already broken system.
|
69651 |
06-Dec-2000 |
peter |
Move io_apic_{read,write} from apic_ipl.s (where they do not belong) into mpapic.c. This gives us the benefit of C type checking. These functions are not called in any critical paths and are not used by the interrupt routines.
|
69646 |
06-Dec-2000 |
peter |
GC unused assembler function apic_eoi()
|
69586 |
05-Dec-2000 |
jake |
Remove the last of the MD netisr code. It is now all MI. Remove spending, which was unused now that all software interrupts have their own thread. Make the legacy schednetisr use an atomic op for setting bits in the netisr mask.
Reviewed by: jhb
|
69578 |
04-Dec-2000 |
peter |
Cleanup some leftover lint from the old interrupt system. Also, while here, run up to 32 interrupt sources on APIC systems. Normalize INTREN/INTRDIS so they are the same on both UP and SMP systems rather than sometimes a macro, and sometimes a function.
Reviewed by: jhb, jakeb
|
69570 |
04-Dec-2000 |
jake |
(1) Allow a stray lock prefix to be compiled out with the MPLOCKED macro (2) Use decimal 12 rather than hex 0xc in an addl (3) Implement MTX_ENTER for the I386_CPU case (4) Use semi-colons between instructions to allow MTX_ENTER and MTX_ENTER_WITH_RECURSION to be assembled (5) Use incl instead of incw to increment the recusion count (6) 10 is not a valid label, use 7, 8 and 9 rather than 8, 9 and 10 (7) Sort numeric labels
Submitted by: bde (2, 4, and 5)
|
69521 |
02-Dec-2000 |
markm |
Namespace cleanup. Remove some #includes in favour of an explicit declaration.
Asked for by: bde
|
69379 |
30-Nov-2000 |
marcel |
Don't use p->p_sigstk.ss_flags to keep state of whether the process is on the alternate stack or not. For compatibility with sigstack(2) state is being updated if such is needed.
We now determine whether the process is on the alternate stack by looking at its stack pointer. This allows a process to siglongjmp from a signal handler on the alternate stack to the place of the sigsetjmp on the normal stack. When maintaining state, this would have invalidated the state information and causing a subsequent signal to be delivered on the normal stack instead of the alternate stack.
PR: 22286
|
69377 |
30-Nov-2000 |
peter |
Increase NKPT from 17 to 30. This fixes the 4GB ram boot panic on both -current and RELENG_4 with GENERIC.
NKPT is the number of initial bootstrap page table pages we create for the kernel during startup. Once VM is up, we resize it as needed, but with 4G ram, the size of the vm_page_t structures was pushing it over the limit. The fact that trimmed down kernels boot on 4G ram machines suggests that we were pretty close to the edge.
The "30" is arbitary, but smaller than the 'nkpt' variable on all machines that I checked.
|
69334 |
28-Nov-2000 |
jhb |
Don't wait forever for CPUs to stop or restart. Instead, give up after a timeout. If DIAGNOSTIC is turned on, then display a message to the console with a map of which CPUs failed to stop or restart. This gives an SMP box at least a fighting chance of getting into DDB if one of the other CPUs has interrupts disabled.
|
69133 |
25-Nov-2000 |
alfred |
These files are mpsafe.
|
69006 |
21-Nov-2000 |
markm |
Assembler fixes.
Fix opcodes that were typed as ".byte 0xNN, 0xMM" when an older assembler could not recognise the newer Pentium instructions. Reviewed by: jhb
|
69003 |
21-Nov-2000 |
markm |
Add a consistent API to a feature that most modern CPUs have; a fast counter register in-CPU.
This is to be used as a fast "timer", where linearity is more important than time, and multiple lines in the linearity caused by multiple CPUs in an SMP machine is not a problem.
This adds no code whatsoever to the FreeBSD kernel until it is actually used, and then as a single-instruction inline routine (except for the 80386 and 80486 where it is some more inline code around nanotime(9).
Reviewed by: bde, kris, jhb
|
68974 |
20-Nov-2000 |
phk |
Make programs which still #include <machine/{mouse,console}.h> fail at compiletime, with an explanatory error message. Previously they would only get a warning.
These files will be finally removed 2001-01-15
|
68786 |
15-Nov-2000 |
jhb |
Declare the 'witness_spin_check' properly as a per-CPU variable in the non-SMP case.
|
68684 |
13-Nov-2000 |
jhb |
Fix a bug with handling of the saved interrupt state for spin mutexes in the MTX_EXIT_WITH_RECURSION() assembly macro (currently unused).
Submitted by: bde
|
68520 |
09-Nov-2000 |
marcel |
Make MINSIGSTKSZ machine dependent, and have the sigaltstack syscall compare against a variable sv_minsigstksz in struct sysentvec as to properly take the size of the machine- and ABI dependent struct sigframe into account.
The SVR4 and iBCS2 modules continue to have a minsigstksz of 8192 to preserve behavior. The real values (if different) are not known at this time. Other ABI modules use the real values.
The native MINSIGSTKSZ is now defined as follows:
Arch MINSIGSTKSZ ---- ----------- alpha 4096 i386 2048 ia64 12288
Reviewed by: mjacob Suggested by: bde
|
68517 |
09-Nov-2000 |
takawata |
Farewell our code. We will switch acpica code from Intel. This code has help us comprehence ACPI spec .
Contributors of this code is as follows(except for FreeBSD commiter): Yasuo Yokoyama, Munehiro Matsuda, and ALL acpi-jp@jp.freebsd.org people.
Thanks.
R.I.P.
|
68498 |
08-Nov-2000 |
asmodai |
Fix CMSG and ALIGN macro usage. Previously we had to include <machine/param.h> or <sys/param.h> bogusly due to the fact that <sys/socket.h> CMSG macros needed the ALIGN macro, which was defined in param.h. However, including param.h was a disaster for namespace pollution. This solution, as contributed by shin a while ago, fixes it elegantly by wrapping the definitions around some namespace pollution preventer definitions. This patch was long overdue. This should allow any network programmer to use <sys/socket.h> as before.
PR: 19971, 20530 Submitted by: Martin Kaeske <MartinKaeske@lausitz.net> Mark Andrews <Mark.Andrews@nominum.com> Patch submitted by: shin Reviewed by: bde
|
68330 |
04-Nov-2000 |
obrien |
Our SHRT_MIN definition was actually 4 bits too big.
Submitted by: Bradley T. Hughes <bhughes@trolltech.com>
|
68077 |
31-Oct-2000 |
roger |
Fix typo in comments
|
67769 |
28-Oct-2000 |
bde |
Quick fix for namespace problems which broke many ports. Spell uint16_t as "unsigned short" like it used to be and uint32_t as "unsigned int" not like it used to be (was: "unsigned long").
|
67740 |
28-Oct-2000 |
jhb |
The x86 atomic operations are already locked, so they do not need an additional locked instruction to guarantee a write barrier for the acquire variants.
Approved by: dfr Pointy hat to: jhb
|
67708 |
27-Oct-2000 |
phk |
Convert all users of fldoff() to offsetof(). fldoff() is bad because it only takes a struct tag which makes it impossible to use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various. Significant brucifications by: bde
|
67694 |
27-Oct-2000 |
bde |
Declare or #define per-cpu globals in <machine/globals.h> in all cases. The i386 UP case was messily different.
|
67641 |
26-Oct-2000 |
roger |
Add new ioctls for userland access to the MSP device
|
67603 |
26-Oct-2000 |
hm |
Add infrastructure for Cologne Chip HFC-S PCI driver. Increment isdn4bsd step.
|
67587 |
25-Oct-2000 |
jhb |
- Add atomic_cmpset_{acq_,rel_,}_long - Add in atomic operations for 8-bit, 16-bit, and 32-bit integers
|
67551 |
25-Oct-2000 |
jhb |
- Overhaul the software interrupt code to use interrupt threads for each type of software interrupt. Roughly, what used to be a bit in spending now maps to a swi thread. Each thread can have multiple handlers, just like a hardware interrupt thread. - Instead of using a bitmask of pending interrupts, we schedule the specific software interrupt thread to run, so spending, NSWI, and the shandlers array are no longer needed. We can now have an arbitrary number of software interrupt threads. When you register a software interrupt thread via sinthand_add(), you get back a struct intrhand that you pass to sched_swi() when you wish to schedule your swi thread to run. - Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit more intuitive. Also, prefix all the members of struct intrhand with 'ih_'. - Make swi_net() a MI function since there is now no point in it being MD.
Submitted by: cp
|
67487 |
24-Oct-2000 |
obrien |
* Update comments * convert decimal constants to hex Submitted by: bde
* Add ISO-C99 long long limits
|
67473 |
23-Oct-2000 |
mjacob |
Move bogus proc reference stuff into <machine/globals.h>. There is no more include file including <sys/proc.h>, but there still is this wonky and (causes warnings on i386) reference in globals.h.
CURTHD is now defined in <machine/globals.h> as well. The correct thing to do is provide a platform function for this.
|
67468 |
23-Oct-2000 |
non |
Add PC-Card/ISA SCSI host adpater drivers from NetBSD/pc98 (a NetBSD port for NEC PC-98x1 machines). They are ncv for NCR 53C500, nsp for Workbit Ninja SCSI-3, and stg for TMC 18C30 and 18C50.
I thank NetBSD/pc98 and bsd-nomads people.
Obtained from: NetBSD/pc98
|
67460 |
23-Oct-2000 |
phk |
Get rid of the last traces of ACTUALLY_LKM_NOT_KERNEL
|
67442 |
22-Oct-2000 |
nyan |
Moved prototypes of isa_alloc_resourcev() and isa_load_resourcev() to isa/isavar.h, and added needed includes.
|
67403 |
20-Oct-2000 |
jhb |
Define the mtx_legal2block() macro used in the witness code that managed to get lost during the MI mutex conversion.
Reported by: Steve Kargl <sgk@troutmask.apl.washington.edu>
|
67365 |
20-Oct-2000 |
jhb |
Catch up to moving headers: - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
|
67352 |
20-Oct-2000 |
jhb |
- Make the mutex code almost completely machine independent. This greatly reducues the maintenance load for the mutex code. The only MD portions of the mutex code are in machine/mutex.h now, which include the assembly macros for handling mutexes as well as optionally overriding the mutex micro-operations. For example, we use optimized micro-ops on the x86 platform #ifndef I386_CPU. - Change the behavior of the SMP_DEBUG kernel option. In the new code, mtx_assert() only depends on INVARIANTS, allowing other kernel developers to have working mutex assertiions without having to include all of the mutex debugging code. The SMP_DEBUG kernel option has been renamed to MUTEX_DEBUG and now just controls extra mutex debugging code. - Abolish the ugly mtx_f hack. Instead, we dynamically allocate seperate mtx_debug structures on the fly in mtx_init, except for mutexes that are initiated very early in the boot process. These mutexes are declared using a special MUTEX_DECLARE() macro, and use a new flag MTX_COLD when calling mtx_init. This is still somewhat hackish, but it is less evil than the mtx_f filler struct, and the mtx struct is now the same size with and without mutex debugging code. - Add some micro-micro-operation macros for doing the actual atomic operations on the mutex mtx_lock field to make it easier for other archs to override/optimize mutex ops if needed. These new tiny ops also clean up the code in some places by replacing long atomic operation function calls that spanned 2-3 lines with a short 1-line macro call. - Don't call mi_switch() from mtx_enter_hard() when we block while trying to obtain a sleep mutex. Calling mi_switch() would bogusly release Giant before switching to the next process. Instead, inline most of the code from mi_switch() in the mtx_enter_hard() function. Note that when we finally kill Giant we can back this out and go back to calling mi_switch().
|
67351 |
20-Oct-2000 |
jhb |
- Expand the set of atomic operations to optionally include memory barriers in most of the atomic operations. Now for these operations, you can use the normal atomic operation, you can use the operation with a read barrier, or you can use the operation with a write barrier. The function names follow the same semantics used in the ia64 instruction set. An atomic operation with a read barrier has the extra suffix 'acq', due to it having "acquire" semantics. An atomic operation with a write barrier has the extra suffix 'rel'. These suffixes are inserted between the name of the operation to perform and the typename. For example, the atomic_add_int() function now has 3 variants: - atomic_add_int() - this is the same as the previous function - atomic_add_acq_int() - this function combines the add operation with a read memory barrier - atomic_add_rel_int() - this function combines the add operation with a write memory barrier - Add 'ptr' to the list of types that we can perform atomic operations on. This allows one to do atomic operations on uintptr_t's. This is useful in the mutex code, for example, because the actual mutex lock is a pointer. - Add two new operations for doing loads and stores with memory barriers. The new load operations use a read barrier before the load, and the new store operations use a write barrier after the load. For example, atomic_load_acq_int() will atomically load an integer as well as enforcing a read barrier.
|
67350 |
20-Oct-2000 |
jhb |
Axe the barrier_{read,write,rw}() helper functions as this method of doing memory barriers doesn't really scale well for the ia64. Also, memory barriers are more a property of the CPU than bus space.
Requested by: dfr
|
67346 |
20-Oct-2000 |
kato |
Convert the type of bus_space_handle_t of pc98 from structure into pointer to structure.
Reviewed by: nyan
|
67310 |
19-Oct-2000 |
msmith |
Add PCI BIOS function codes for IRQ routing fetch and route.
|
67285 |
18-Oct-2000 |
jhb |
Add in a simple API for memory barriers to machine/bus.h: - barrier_read() enforces a memory read barrier - barrier_write() enforces a memory write barrier - barrier_rw() enforces a memory read/write barrier
|
67281 |
18-Oct-2000 |
hm |
Add a debug flag bit for a new driver.
|
67247 |
17-Oct-2000 |
ps |
Implement write combining for crashdumps. This is useful when write caching is disabled on both SCSI and IDE disks where large memory dumps could take up to an hour to complete.
Taking an i386 scsi based system with 512MB of ram and timing (in seconds) how long it took to complete a dump, the following results were obtained:
Before: After: WCE TIME WCE TIME ------------------ ------------------ 1 141.820972 1 15.600111 0 797.265072 0 65.480465
Obtained from: Yahoo! Reviewed by: peter
|
67223 |
16-Oct-2000 |
imp |
Add types and prototypes.
Submitted by: msmith
|
67214 |
16-Oct-2000 |
brian |
Move __uint16_swap_uint32, __uint8_swap_uint32 and __uint8_swap_uint16 inside __GNUC__.
Reviewed by: bde
|
67170 |
15-Oct-2000 |
brian |
Remove namespace polution (x -> __x) introduced in the last revision.
Pointed out by: bde
|
67158 |
15-Oct-2000 |
phk |
Move DELAY() from <machine/clock.h> to <sys/systm.h>
|
67129 |
15-Oct-2000 |
brian |
Redefine __word_swap_long, __byte_swap_long and __byte_swap_word as inline functions, renaming them to __uint16_swap_uint32, __uint8_swap_uint32 and __uint8_swap_uint16.
Doing it properly suggested by: msmith Reviewed by: msmith
|
67030 |
12-Oct-2000 |
bde |
Removed unused include of <machine/lock.h>. The locking interface stopped being (ab)used here in rev.1.97.
|
67014 |
12-Oct-2000 |
bde |
Moved the declaration of astpending to the correct place.
This shouldn't affect the alpha or ia64, since they don't have a variable named astpending. The alpha still has 2 declarations of this nonexistent variable.
|
67011 |
12-Oct-2000 |
bde |
Moved the definitions of AST_PENDING and AST_RESCHED to the correct place.
|
66931 |
10-Oct-2000 |
hm |
Set i4b version number to 0.96.00. It is (nearly) identical to i4b-00.96.00-beta-101000.tar.gz
|
66873 |
09-Oct-2000 |
hm |
update to i4b version 0.95.04
|
66860 |
09-Oct-2000 |
phk |
Initiate deorbit burn sequence for <machine/mouse.h>.
Replace all in-tree uses with <sys/mouse.h> which repo-copied a few moments ago from src/sys/i386/include/mouse.h by peter. This is also the appropriate fix for exo-tree sources.
Put warnings in <machine/mouse.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/mouse.h> files will be removed.
|
66834 |
08-Oct-2000 |
phk |
Initiate deorbit burn sequence for <machine/console.h>.
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>. This is also the appropriate fix for exo-tree sources.
Put warnings in <machine/console.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/console.h> files will be removed.
|
66802 |
08-Oct-2000 |
bmilekic |
Cleanup comment in machine/param.h regarding mbuf-related sizes, and get rid of MCLOFSET, which does not appear to be used anywhere anymore, and if it is, it probably shouldn't be.
|
66739 |
06-Oct-2000 |
bde |
Work around a bug by adding struct tags. gcc-2.95 apparently gets the check in the [basic.link] section of the C++ standard wrong. gcc-2.7.2.3 apparently doesn't do the check, so the bug doesn't affect RELENG_3.
PR: 16170, 21427 Submitted by: Max Khon <fjoe@lark.websci.ru> (i386 version) Discussed with: jdp
|
66716 |
06-Oct-2000 |
jhb |
- Change fast interrupts on x86 to push a full interrupt frame and to return through doreti to handle ast's. This is necessary for the clock interrupts to work properly. - Change the clock interrupts on the x86 to be fast instead of threaded. This is needed because both hardclock() and statclock() need to run in the context of the current process, not in a separate thread context. - Kill the prevproc hack as it is no longer needed. - We really need Giant when we call psignal(), but we don't want to block during the clock interrupt. Instead, use two p_flag's in the proc struct to mark the current process as having a pending SIGVTALRM or a SIGPROF and let them be delivered during ast() when hardclock() has finished running. - Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways. It was broken on the x86 if it was turned on since cpl is gone. It's only use was to bogusly run softclock() directly during hardclock() rather than scheduling an SWI. - Remove the COM_LOCK simplelock and replace it with a clock_lock spin mutex. Since the spin mutex already handles disabling/restoring interrupts appropriately, this also lets us axe all the *_intr() fu. - Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use temporary fast interrupts for the APIC trial. - Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending signals in hardclock() that are to be delivered in ast().
Submitted by: jakeb (making statclock safe in a fast interrupt) Submitted by: cp (concept of delaying signals until ast())
|
66715 |
06-Oct-2000 |
jhb |
currentldt is now a "special" global-data variable, and as such, there is no actual currentldt integer variable directly. Thus, don't claim that there is.
|
66714 |
06-Oct-2000 |
jhb |
Interrupt frames don't include the saved cpl anymore since cpl is dead.
|
66698 |
05-Oct-2000 |
jhb |
- Heavyweight interrupt threads on the alpha for device I/O interrupts. - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures.
Submitted by: dfr
|
66696 |
05-Oct-2000 |
jhb |
Replace loadandclear() with atomic_readandclear_int().
|
66695 |
05-Oct-2000 |
jhb |
Add atomic_readandclear_int and atomic_readandclear_long.
|
66692 |
05-Oct-2000 |
jhb |
Make the gd_currentldt member in struct globaldata unconditional so that this header doesn't depend on USER_LDT. This fixes the USER_LDT breakage with SMP kernels.
|
66614 |
04-Oct-2000 |
jasone |
Reduce userland namespace polution.
|
66537 |
02-Oct-2000 |
iwasaki |
Fix StallOp implementaion. I've noticed that StallOp corresponds to OsdSleepUsec(), SleepOp corresponds to OsdSleep() by reading ACPICA source code. - Add OsdSleepUsec() which uses DELAY() simply. - Change unit of acpi_sleep() argument; microseconds to milliseconds.
|
66529 |
02-Oct-2000 |
msmith |
Move the i386 PCI attachment code out of i386/isa back into i386/pci.
Split out the configuration space access primitives, as these are needed elsewhere as well.
|
66522 |
02-Oct-2000 |
peter |
Put on my nuclear-grade asbestos suit and cvs rm the old, broken, sound drivers (again). These drivers have not compiled for 5-6 months. Now that the new sound code supports MIDI, the major reason we had for reviving it is gone. It is a far better investment polishing the new midi code than trying to keep this on life support. Come 5.0-REL, if there are major shortcomings in the pcm sound driver then maybe we can rethink this, but until then we should focus on pcm.
Remember, these have not been compilable since ~April-May this year.
|
66502 |
01-Oct-2000 |
iwasaki |
Remove ACPI_NO_OSDFUNC_INLINE option from kernel configuration. Now that it's enabled in acpireg.h only if DIAGNOSTIC option is specified. ACPICA OSD functions will be compiled in machine/acpi_machdep.c again tentatively (if DIAGNOSTIC option is specified). # Should we have acpica_osd.c ?
|
66501 |
01-Oct-2000 |
iwasaki |
One more update against header file name changing.
|
66491 |
30-Sep-2000 |
iwasaki |
- Add acpi_disable_events() and set it with EVENTHANDLER_REGISTER in order to avoid power on again problem after acpi_soft_off() calling. - Implement SleepOp/StallOp in AML interpreter. Also provide ACPICA compatibility. - Minor changes on __inline function declaration in acpica_osd.h (obtained from NetBSD porting).
|
66489 |
30-Sep-2000 |
msmith |
More updates to the ACPI code:
- 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
|
66441 |
29-Sep-2000 |
peter |
First shot at identifying the Pentum 4 acording to our reading of the the cpu_id extensions in the Intel docs. There is more info available. See the following URL for more details. http://developer.intel.com/design/processor/future/manuals/CPUID_Supplement.htm
Requested by: Intel
|
66416 |
28-Sep-2000 |
peter |
Get out the roto-rooter and clean up the abuse of nexus ivars by the i386/isa/pcibus.c. This gets -current running again on multiple host->pci machines after the most recent nexus commits. I had discussed this with Mike Smith, but ended up doing it slightly differently to what we discussed as it turned out cleaner this way. Mike was suggesting creating a new resource (SYS_RES_PCIBUS) or something and using *_[gs]et_resource(), but IMHO that wasn't ideal as SYS_RES_* is meant to be a global platform property, not a quirk of a given implementation. This does use the ivar methods but does so properly. It also now prints the physical pci bus that a host->pci bridge (pcib) corresponds to.
|
66328 |
24-Sep-2000 |
jhb |
Fix the assmebly mutex macros to handle saving/restoring interrupt state properly. Fix the recursive mutex macros to actually compile. At the moment we only use MTX_EXIT anyways.
|
66296 |
23-Sep-2000 |
ps |
Move MAXCPU from machine/smp.h to machine/param.h to fix breakage with !SMP kernels. Also, replace NCPUS with MAXCPU since they are redundant.
|
66280 |
23-Sep-2000 |
jasone |
#include <sys/proc.h> in order to get curproc. This seems to be the lesser of two evils; the greater evil is requiring sys/proc.h to be included before including machine/mutex.h.
|
66277 |
22-Sep-2000 |
ps |
Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC, NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP.
Reviewed by: peter
|
66211 |
22-Sep-2000 |
jhb |
Teach MTX_EXIT_RECURSE that the recursion count is a 32-bit integer, not a 16-bit one.
|
66174 |
21-Sep-2000 |
bsd |
Add a couple of debug register helper functions to assist in setting and clearing watchpoints.
Reviewed by: jwd@FreeBSD.org, -hackers@
|
65932 |
16-Sep-2000 |
phk |
Make LINT compile.
|
65856 |
14-Sep-2000 |
jhb |
Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, just use struct mtx, struct witness, and struct witness_blessed.
Requested by: bde
|
65822 |
13-Sep-2000 |
jhb |
- Remove the inthand2_t type and use the equivalent driver_intr_t type from newbus for referencing device interrupt handlers. - Move the 'struct intrec' type which describes interrupt sources into sys/interrupt.h instead of making it just be a x86 structure. - Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd' and 'struct intrec' - Move the code to translate new-bus interrupt flags into an interrupt thread priority out of the x86 nexus code and into a MI ithread_priority() function in sys/kern/kern_intr.c. - Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and sys/pci/pci_compat.c.
|
65782 |
12-Sep-2000 |
jhb |
Clean up process accounting some more. Unfortunately, it is still not quite right on i386 as the CPU who runs statclock() doesn't have a valid clockframe to calculate statistics with.
|
65713 |
11-Sep-2000 |
jhb |
When doing statistics for statclock on other CPU's, use the other CPUs' idleproc pointers instead of our own for comparisons.
Submitted by: tegge
|
65651 |
09-Sep-2000 |
jasone |
Style cleanups. No functional changes.
|
65650 |
09-Sep-2000 |
jasone |
Add file and line arguments to WITNESS_ENTER() and WITNESS_EXIT, since __FILE__ and __LINE__ don't get expanded usefully in inline functions.
Add const to all witness*() arguments that are filenames.
|
65624 |
08-Sep-2000 |
jasone |
Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cpp macros that expand to pass filename and line number information. This is necessary since we're using inline functions instead of macros now.
Add const to the filename pointers passed througout the mtx and witness code.
|
65620 |
08-Sep-2000 |
jhb |
Remove an unneeded extern declaration of cp_time.
|
65597 |
08-Sep-2000 |
jake |
Really fix USER_LDT. (Don't use currentldt as an L-value.)
|
65575 |
07-Sep-2000 |
jhb |
Test for both SMP and I386_CPU being set before generating an error.
|
65557 |
07-Sep-2000 |
jasone |
Major update to the way synchronization is done in the kernel. Highlights include:
* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.)
* Per-CPU idle processes.
* Interrupts are run in their own separate kernel threads and can be preempted (i386 only).
Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
|
65514 |
06-Sep-2000 |
phk |
Introduce atomic_cmpset_int() and atomic_cmpset_long() from SMPng a few hours earlier than the rest.
The next DEVFS commit needs these functions.
Alpha versions by: dfr i386 versions by: jakeb
Approved by: SMPng
|
65372 |
02-Sep-2000 |
iwasaki |
Add ACPI_BUS_SPACE stuff definitions in acpi_machdep.h. Change to include this file rather than acpica_osd.h to use only ACPI_BUS_SPACE stuff.
|
65276 |
31-Aug-2000 |
iwasaki |
Modified PCI config space access code via pcib_if rather than using pci_cfg{read|write}. - Obtain device_t pcib instance by calling device_find_child(). - Call PCIB_{READ|WRITE}_CONFIG() to access to pcib interfaces.
Reviewed by: dfr, takawata
|
65216 |
29-Aug-2000 |
iwasaki |
A lot of changes on acpi driver code. - The "Osd*" stuff went away from acpi driver code, use the bus_space functions directly instead. - Fix minor english bugs. acpi_registers_input -> acpi_register_input acpi_registers_output -> acpi_register_output - Remove all magic numbers for the sleeping states. We now have #defines for these. - NULL is treated the same as the return from aml_get_rootname in aml_find_from_namespace().
Suggested by: msmith
Thanks mike!
|
65065 |
25-Aug-2000 |
takawata |
Another file needed for ACPI,I forgot to commit.
Noticed by:iwasaki
|
64834 |
18-Aug-2000 |
msmith |
Increase the default NAPIC from 1 to 2 as a bandaid until we allocate these dynamically (ie. typically you shouldn't have to set NAPIC at all)
|
64728 |
16-Aug-2000 |
tegge |
Prepare for a cleanup of pmap module API pollution introduced by the suggested fix in PR 12378.
Keep track of all existing pmaps independent of existing processes.
This allows for a process to temporarily connect to a different address space without the risk of missing an update of the original address space if the kernel grows.
pmap_pinit2() is no longer needed on the i386 platform but is left as a stub until the alpha pmap code is updated.
PR: 12378
|
64615 |
13-Aug-2000 |
ume |
Add output of per battery information to apm(1). New ioctl APMIO_GETPWSTATUS is introduced.
Reviewed by: -mobile and -current folks (no objection)
|
64529 |
11-Aug-2000 |
peter |
Clean up some low level bootstrap code:
- stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks.
With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely).
There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that.
The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
|
64494 |
10-Aug-2000 |
tegge |
Don't skip IOAPIC id conflict detection when only one pci bus is present. PR: 20312 Reviewed by: Steve Roome <steve@sse0691.bri.hp.com>
|
64290 |
06-Aug-2000 |
tegge |
Be more verbose when changing APIC ID on an IO APIC.
Don't allow cpu entries in the MP table to contain APIC IDs out of range.
Don't write outside array boundaries if an IO APIC entry in the MP table contains an APIC ID out of range.
Assign APIC IDs for all IO APICs according to section 3.6.6 in the Intel MP spec:
- If the current APIC ID on an IO APIC doesn't conflict with other IO APICs or CPUs, that APIC ID should be used. The copy of the MP table must be updated if the corresponding APIC ID in the MP table is different.
- If the current APIC ID was in conflict with other units, the corresponding APIC ID specified in the MP table is checked for conflict.
- If a conflict is still found then fall back to using a new unique ID. The copy of the MP table must be updated.
- IDs out of range is considered to be in conflict.
During these operations, the IO_TO_ID array cannot be used, since any conflict would have caused information loss. The array is then corrected, since all APIC ID conflicts should have been resolved.
PR: 20312, 18919
|
64251 |
04-Aug-2000 |
iwasaki |
Cleanup debug messages and Add some enhancements from linux on display control by apm -d. - Remove APM_DEBUG to avoid re-build kernel with such a unspported optioin. - Introduce new denug flag `debug.apm_debug' which can be controlled by sysctl interface and loader by setting like "debug.apm_debug=1", you will get debug messages from APM driver. - Add some enhancements from linux on display control by apm -d. I'm expecting that we can see some improvements on some laptops where apm -d doesn't work correctly so far.
Reviewed by: -mobile and -current folks (no objection) Suggested by: Susumu WAKABAYASHI <susumu@wakabaya.net>
|
61692 |
14-Jun-2000 |
bde |
Fixed syntax errors and style bugs in previous commit. The syntax errors were normally harmless because they were in unreachable code and gcc apparently doesn't check the syntax inside asm statements that it optimizes away.
|
61136 |
31-May-2000 |
msmith |
Further fixes for multiple-IO-APIC systems from Tor Egge:
Further experimentation showed that some Dell 2450 machines with the prevention kludge installed still got T_RESERVED traps. CPU interrupt vector 0x7A was observed to be triggered. This might have been the bitwise OR of two different vectors sent from each of the IOAPICs at the same time.
IOAPIC #0: 0x68 --> irq 8: RTC timer interrupt IOAPIC #1: 0x32 --> irq 18: scsi host adapter or network interface ---- 0x7a --> T_RESERVED
Both IOAPICs had ID 0.
Appendix B.3 in the MP spec indicates that the operating system is responsible for assigning unique IDs to the IOAPICs.
The enclosed patch programs the IOAPIC IDs according to the IOAPIC entries in the MP table.
Submitted by: tegge
|
61131 |
31-May-2000 |
msmith |
Bump the default NBUS value to 8, in lieu of actually sizing it dynamically. Too many systems have more than 4 busses now.
|
61130 |
31-May-2000 |
bde |
Pack the SWI bits to save some time and space.
|
61126 |
31-May-2000 |
bde |
Add SWI_TQ_MASK to all interrupt masks except SWI_CLOCK_MASK. Use a new macro SWI_LOW_MASK to give the mask for low priority SWIs instead of hard-coding this mask as SWI_CLOCK_MASK.
Reviewed by: dfr
|
61112 |
31-May-2000 |
nyan |
Sync with sys/i386/include/bus_at386.h revision 1.9.
|
61033 |
28-May-2000 |
dfr |
Add taskqueue system for easy-to-use SWIs among other things.
Reviewed by: arch
|
60938 |
26-May-2000 |
jake |
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen.
Requested by: msmith and others
|
60833 |
23-May-2000 |
jake |
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk Reviewed by: phk Approved by: mdodd
|
60755 |
21-May-2000 |
peter |
Implement an optimization of the VM<->pmap API. Pass vm_page_t's directly to various pmap_*() functions instead of looking up the physical address and passing that. In many cases, the first thing the pmap code was doing was going to a lot of trouble to get back the original vm_page_t, or it's shadow pv_table entry.
Inspired by: John Dyson's 1998 patches.
Also: Eliminate pv_table as a seperate thing and build it into a machine dependent part of vm_page_t. This eliminates having a seperate set of structions that shadow each other in a 1:1 fashion that we often went to a lot of trouble to translate from one to the other. (see above) This happens to save 4 bytes of physical memory for each page in the system. (8 bytes on the Alpha).
Eliminate the use of the phys_avail[] array to determine if a page is managed (ie: it has pv_entries etc). Store this information in a flag. Things like device_pager set it because they create vm_page_t's on the fly that do not have pv_entries. This makes it easier to "unmanage" a page of physical memory (this will be taken advantage of in subsequent commits).
Add a function to add a new page to the freelist. This could be used for reclaiming the previously wasted pages left over from preloaded loader(8) files.
Reviewed by: dillon
|
60721 |
19-May-2000 |
obrien |
We use a MI version of this now, which is mostly this file repo copied to dev/ppbus/lptio.h.
|
60672 |
18-May-2000 |
msmith |
Implement real read/write barriers for the i386. Despite the comment in previous versions of this file, some barrier functionality is required.
|
60300 |
10-May-2000 |
obrien |
When using _asm{} in GCC, one must specify the operand's size if one specifies the instruction's operation size. GCC will default to 32-bit operands reguardless of the prototype (ie, formal parameters' type) of an inline function.
|
60145 |
07-May-2000 |
nyan |
Fixed bus_space_{read,write}_region_* functions.
Pointed out: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
|
60104 |
06-May-2000 |
jlemon |
Make in_cksum() a macro call to in_cksum_skip(), since it provides the same functionality. Sharing code should help cache issues.
Remove in_cksum_partial, since its not being used, and we now have a way to compute partial checksums on mbuf chains.
|
59874 |
01-May-2000 |
peter |
Add $FreeBSD$
|
59604 |
24-Apr-2000 |
obrien |
* Use sys/sys/random.h rather than a i386 specific one. * There was nothing that should be machine dependant about i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
|
59294 |
16-Apr-2000 |
msmith |
Some more i386-only BIOS-friendliness:
- 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.
|
59013 |
04-Apr-2000 |
roger |
Add multiple #include protection
Submitted by: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
|
58853 |
31-Mar-2000 |
hm |
Add support for "green" saver mode.
|
58820 |
30-Mar-2000 |
peter |
Make sysv-style shared memory tuneable params fully runtime adjustable via sysctl. It's done pretty simply but it should be quite adequate. Also move SHMMAXPGS from $machine/include/vmparam.h as the comments that went with it were wrong... we don't allocate KVM space for the pages so that comment is bogus.. The only practical limit is how much physical ram you want to lock up as this stuff isn't paged out or swap backed.
|
58763 |
29-Mar-2000 |
jlemon |
Change the mbuf size from 128 -> 256. Increasing the mbuf header size caused some headers not to fit in MHLEN any more. This matches the current size on the alpha, so it shouldn't cause problems.
Problem observed by: Geoff Rehmet <geoff@is.co.za> Originally suggested by: shin
|
58762 |
29-Mar-2000 |
kato |
Added indirect pio into the bus space stuff for the NEC PC-98. bus.h includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h supports indirect pio and bus_at386.h is identical to old bus.h, there is no functional change in PC-AT's kernels. That is, it cannot cause performance loss.
Submitted by: nyan Reviewed by: imp bde and luoqi provided useful comments for earlier version.
|
58755 |
28-Mar-2000 |
dillon |
The SMP cleanup commit broke UP compiles. Make UP compiles work again.
|
58730 |
28-Mar-2000 |
hm |
pcvt cleanup. remove obsolete stuff resulting from the pcvt kernel part cleanup.
|
58717 |
28-Mar-2000 |
dillon |
Commit major SMP cleanups and move the BGL (big giant lock) in the syscall path inward. A system call may select whether it needs the MP lock or not (the default being that it does need it).
A great deal of conditional SMP code for various deadended experiments has been removed. 'cil' and 'cml' have been removed entirely, and the locking around the cpl has been removed. The conditional separately-locked fast-interrupt code has been removed, meaning that interrupts must hold the CPL now (but they pretty much had to anyway). Another reason for doing this is that the original separate-lock for interrupts just doesn't apply to the interrupt thread mechanism being contemplated.
Modifications to the cpl may now ONLY occur while holding the MP lock. For example, if an otherwise MP safe syscall needs to mess with the cpl, it must hold the MP lock for the duration and must (as usual) save/restore the cpl in a nested fashion.
This is precursor work for the real meat coming later: avoiding having to hold the MP lock for common syscalls and I/O's and interrupt threads. It is expected that the spl mechanisms and new interrupt threading mechanisms will be able to run in tandem, allowing a slow piecemeal transition to occur.
This patch should result in a moderate performance improvement due to the considerable amount of code that has been removed from the critical path, especially the simplification of the spl*() calls. The real performance gains will come later.
Approved by: jkh Reviewed by: current, bde (exception.s) Some work taken from: luoqi's patch
|
58698 |
27-Mar-2000 |
jlemon |
Add support for offloading IP/TCP/UDP checksums to NIC hardware which supports them.
|
58538 |
24-Mar-2000 |
jhb |
Update sysinstall to use struct uc_device instead of struct isa_device for generating /boot/kernel.conf. Since this structure is shared, move its definition out to a header file, just as struct isa_device was defined in a header file. This fixes the sysinstall breakage in -current.
|
58342 |
20-Mar-2000 |
cracauer |
Exchange numerical values for FPE_INTDIV and FPE_INTOVF, so that they are compatible with the older ones implemented in FreeBSD 3.x.
PR: 15488
|
58230 |
18-Mar-2000 |
yokota |
- Add Support for the following PS/2 mice: - Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "IntelliMouse Explorer". - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "NetMouse/NetScroll Optical". - MouseSystems SmartScroll Mouse (OEM from Genius?): 3 buttons on top, 1 side button and a wheel. The mouse is recognized as Genius "NetScroll". - IBM ScrollPoint: 2 buttons on top and a stick between the buttons. The stick can perform "horizontal scroll" in W*ndows environment. The horizontal movement of the stick is detected. It is currently mapped to the Z axis movement in the same way as the first wheel. The mouse is recognized as "MouseMan+", as it is considered to be a variation of MouseMan. - A4 Tech 4D and 4D+ mice. These mice have two wheels! The movement of the second wheel is reported as the Z axis movement in the same way as the first wheel. These mice are recognized as "4D Mouse" and "4D+ Mouse". - Tweak IntelliMouse support code a bit so that less-than-compatible wheel mice can work properly with the psm driver. - Add driver configuration flags which correspond to the kernel options PSM_HOOKRESUME and PSM_RESETAFTERSUSPEND, so that we don't need to recompile the kernel when we need these functions. - Properly keep track of the irq resource. - Add a watchdog timer in case interrupts are lost (experimental). - Add `detach' function (experimental).
|
57890 |
10-Mar-2000 |
cracauer |
Change the default FPU control word so that exceptions for new processes are now masked until set by fpsetmask(3).
Submitted by: bde Approved by: jkh, bde
|
57701 |
02-Mar-2000 |
dufault |
Patches that eliminate extra context switches in FIFO case. Fixes p1003_1b regression test in the simple case of no RR and FIFO processes competing.
Reviewed by: jkh, bde
|
57376 |
21-Feb-2000 |
bsd |
Fix an __asm operand constraint which broke the -O3 and -O0 builds.
Submitted by: Seigo Tanimura <tanimura@freebsd.org> Approved by: jkh
|
57362 |
20-Feb-2000 |
bsd |
Don't forget to reset the hardware debug registers when a process that was using them exits.
Don't allow a user process to cause the kernel to take a TRCTRAP on a user space address.
Reviewed by: jlemon, sef Approved by: jkh
|
57168 |
12-Feb-2000 |
obrien |
Document the support in the kernel for hardware debug registers on the ix86 platform which allows for hardware watchpoints, etc...
Submitted by: Brian Dean <brdean@unx.sas.com>
|
56965 |
02-Feb-2000 |
wpaul |
Add support for WEP (encryption) for silver and gold WaveLAN/IEEE turbo cards. Also update wicontrol to enable/disable encryption, set WEP keys and set the TX key index. Silver cards only have 40-bit keys. This is something of a quick hack, but it works well enough for me to commit this from the LinuxWorld exhibit floor.
The WEP support only shows up if you have a card that supports it.
Would have been approved by: jkh, if he hadn't wandered off somewhere Approved in his place by: msmith, who's standing right here
|
56581 |
25-Jan-2000 |
bde |
Fixed the profiling version ALTENTRY(). Again. The previous version didn't set up the frame pointer before calling mcount, and then jumped to the wrong place in ENTRY() to defeat the point of the jump.
|
56532 |
24-Jan-2000 |
roger |
Update to driver 2.07
Add new Channel Set for France. Submitted by Daniel Dagneaux <dagneaux@lure.u-psud.fr>
|
56511 |
24-Jan-2000 |
peter |
Remove old specialix pre-newbus specialix driver. It lives on in sys/dev/si now, including with a theoretically working eisa attachment.
|
56309 |
20-Jan-2000 |
jasone |
Move ENTRY and ALTENTRY definitions to asm.h where they belong.
Unbreak profiling. Again.
Submitted by: bde
|
55962 |
14-Jan-2000 |
sheldonh |
Protect the i386 machine-dependant type definitions of __int64_t and __uint64_t from lint(1) with /* LONGLONG */ comments.
|
55891 |
13-Jan-2000 |
mdodd |
Allow SMP systems with an MCA bus to work properly.
Reviewed by: peter
|
55672 |
09-Jan-2000 |
bde |
Fixed style bugs related to the access functions for the bsfl and bsrl i386 instructions.
|
55540 |
07-Jan-2000 |
luoqi |
Allow SMP && NCPU == 1 to work. From now on, there's no restriction on the value of NCPU relative to the number of cpus physically present, the actual number of cpus utilized will be the smaller of the two.
|
55420 |
04-Jan-2000 |
tegge |
ISA device drivers use the ISA source interrupt number in locations where the low level interrupt handler number should be used. Change setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X}) for any ISA interrupt X mentioned in the MP table.
Remove an assumption in the driver for the system clock (clock.c) that interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y is handled by low level interrupt handler Y (Xintr${Y}) but don't assume that low level interrupt handler 0 (Xintr0) is used.
Don't allocate two low level interrupt handlers for the system clock. Reviewed by: NOKUBI Hirotaka <hnokubi@yyy.or.jp>
|
55205 |
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 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.
|
54610 |
14-Dec-1999 |
hm |
update to isdn4bsd beta release 0.90
|
54425 |
11-Dec-1999 |
peter |
Reclaim UPAGES_HOLE (8k) that was chopped out of process address space. The UPAGES have not been there since Jan '96, but the hole was preserved for BSD/OS binary compatability. This has been fixed other ways (%ebx now has a pointer to PS_STRINGS), and the stack is nowhere near where it used to be so this hack isn't required anymore.
|
54188 |
06-Dec-1999 |
luoqi |
User ldt sharing.
|
54160 |
05-Dec-1999 |
peter |
Switch over to using the generic joy driver
|
54121 |
04-Dec-1999 |
marcel |
oszsigcode -> szosigcode
Pointed out by: bde
|
54120 |
04-Dec-1999 |
marcel |
Fix type of sf_addr.
Pointed out by: bde
|
53745 |
27-Nov-1999 |
bde |
Moved scheduling-related code to kern_synch.c so that it is easier to fix and extend. The new function containing the code is named schedclock() as in NetBSD, but it has slightly different semantics (it already handles incrementation of p->p_cpticks, and it should handle any calling frequency).
Agreed with in principle by: dufault
|
53702 |
25-Nov-1999 |
wpaul |
Update the WaveLAN/IEEE driver:
- Convert to new bus attachment scheme. Thanks to Blaz Zupan for doing the initial work here. One thing I changed was to have the attach and detach routines work like the PCI drivers, which means that in theory you should be able to load and unload the driver like the PCI NIC drivers, however the pccard support for this hasn't settled down yet so it doesn't quite work. Once the pccard work is done, I'll have to revisit this.
- Add device wi0 to PCCARD. If we're lucky, people should be able to install via their WaveLAN cards now.
- Add support for signal strength caching. The wicontrol utility has also been updated to allow zeroing and displaying the signal strength cache.
- Add a /sys/modules/wi directory and fix a Makefile to builf if_wi.ko. Currently this module is only built for the i386 platform, though once the pccard stuff is done it should be able to work on the alpha too. (Theoretically you should be able to plug one of the WaveLAN/IEEE ISA cards into an alpha with an ISA slot, but we'll see how that turns out.
- Update LINT to use only device wi0. There is no true ISA version of the WaveLAN/IEEE so we'll never use an ISA attachment.
- Update files.i386 so that if_wi is dependent on card.
|
53435 |
19-Nov-1999 |
dillon |
Optimize two cases in the MP locking code. First, it is not necessary to use a locked cmpexg when unlocking a lock that we already hold, since nobody else can touch the lock while we hold it. Second, it is not necessary to use a locked cmpexg when locking a lock that we already hold, for the same reason. These changes will allow MP locks to be used recursively without impacting performance.
Modify two procedures that are called only by assembly and are already NOPROF entries to pass a critical argument in %edx instead of on the stack, removing a significant amount of code from the critical path as a consequence.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
|
53425 |
19-Nov-1999 |
dillon |
Optimize two cases in the MP locking code. First, it is not necessary to use a locked cmpexg when unlocking a lock that we already hold, since nobody else can touch the lock while we hold it. Second, it is not necessary to use a locked cmpexg when locking a lock that we already hold, for the same reason. These changes will allow MP locks to be used recursively without impacting performance.
Modify two procedures that are called only by assembly and are already NOPROF entries to pass a critical argument in %edx instead of on the stack, removing a significant amount of code from the critical path as a consequence.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
|
53189 |
15-Nov-1999 |
luoqi |
Segment registers can be read(write) to(from) memory locations as well as general registers.
|
53139 |
14-Nov-1999 |
obrien |
Fix clobbers so that GENERIC may compile with GCC 2.95.2.
Historically, the documentation of extended asm was lacking, namely you should NOT specify the same register as an input, and a clobber. If the register is clobbered, it should be specified as an output as well, e.g., by linking input and output through the "number" notation. (Beware of lvalues, some local variables needed...)
URL:http://egcs.cygnus.com/faq.html
In versions up to egcs-1.1.1, the compiler did not even warn about it, but it was liable to output bad code. Newer egcs are pickier and simply refuse to swallow such code.
Note, since *addr changes, it needs to be an output operand. We might be excessive in saying that all memory has changed.
Obtained from: OpenBSD w/extra thanks to Marc Espie <Marc.Espie@liafa.jussieu.fr>
|
53108 |
12-Nov-1999 |
marcel |
Reserve space for FPU state in struct sigcontext. Fix some style bugs and comments while there.
Submitted by: bde
|
53106 |
12-Nov-1999 |
marcel |
Change the type of sf_addr in struct {o}sigframe from char* to register_t.
Fix some style bugs and bitrotted comments.
Submitted by: bde
|
52669 |
30-Oct-1999 |
iwasaki |
i8254_restore is called from apm_default_resume() to reload the countdown register. this should not be necessary but there are broken laptops that do not restore the countdown register on resume. when it happnes, it messes up the hardclock interval and system clock, which leads to the infamous "calcru: negative time" problem.
Submitted by: kjc, iwasaki Reviewed by: Steve O'Hara-Smith <steveo@eircom.net> and committers. Obtained from: PAO3
|
52271 |
15-Oct-1999 |
tegge |
Eliminate remaining part of incorrect PCI bus numbering sanity check on systems with more than one PCI bus.
|
52243 |
14-Oct-1999 |
dfr |
* Implement bus_set/get/delete_resource for pci. * Change the hack used on the alpha for mapping devices into DENSE or BWX memory spaces to a simpler one. Its still a hack and should be a seperate api to explicitly map the resource. * Add $FreeBSD$ as necessary.
|
52140 |
11-Oct-1999 |
luoqi |
Add a per-signal flag to mark handlers registered with osigaction, so we can provide the correct context to each signal handler.
Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde).
Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads.
Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag.
Reviewed by: marcel, jdp, bde
|
52121 |
11-Oct-1999 |
peter |
Zap unneeded #includes
Submitted by: phk
|
51984 |
07-Oct-1999 |
marcel |
Simplification of the signal trampoline and other cleanups.
o Remove unused defines from genassym.c that were needed by the trampoline. o Add load_gs_param function to support.s that catches a fault when %gs is loaded with an invalid descriptor. The function returns EFAULT in that case. o Remove struct trapframe from mcontext_t and replace it with the list of registers. o Modify sendsig and sigreturn accordingly.
This commit contains a patch by bde.
Reviewed by: luoqi, jdp
|
51942 |
04-Oct-1999 |
marcel |
Re-introduction of sigcontext.
struct sigcontext and ucontext_t/mcontext_t are defined in such a way that both (ie struct sigcontext and ucontext_t) can be passed on to sigreturn. The signal handler is still given a ucontext_t for maximum flexibility.
For backward compatibility sigreturn restores the state for the alternate signal stack from sigcontext.sc_onstack and not from ucontext_t.uc_stack. A good way to determine which value the application has set and thus which value to use, is still open for discussion.
NOTE: This change should only affect those binaries that use sigcontext and/or ucontext_t. In the source tree itself this is only doscmd. Recompilation is required for those applications.
This commit also fixes a lot of style bugs without hopefully adding new ones.
NOTE: struct sigaltstack.ss_size now has type size_t again. For some reason I changed that into unsigned int.
Parts submitted by: bde sigaltstack bug found by: bde
|
51938 |
04-Oct-1999 |
peter |
Use the rev 1.1.2.1 code from RELENG_3 for atomic operations rather than the non-atomic C macros.
|
51937 |
04-Oct-1999 |
peter |
Typo: s/__GNUC_MINOR_/__GNUC_MINOR__/ (__GNUC_MINOR__ on egcs in -current is "91" and is going to be "95" soon)
|
51931 |
04-Oct-1999 |
marcel |
Fix style bug: order includes
Submitted by: bde
|
51917 |
03-Oct-1999 |
eivind |
Allow compilation with older versions of GCC, in order to make it possible to bootstrap and work with -current from older versions of FreeBSD.
|
51907 |
03-Oct-1999 |
marcel |
Fix style bugs caused by using the wrong file to copy from. That one gets fixed later on.
Reinstate the mysterious 4th argument to signal handlers and add some comments on that.
|
51792 |
29-Sep-1999 |
marcel |
sigset_t change (part 3 of 5) -----------------------------
By introducing a new sigframe so that the signal handler operates on the new siginfo_t and on ucontext_t instead of sigcontext, we now need two version of sendsig and sigreturn.
A flag in struct proc determines whether the process expects an old sigframe or a new sigframe. The signal trampoline handles which sigreturn to call. It does this by testing for a magic cookie in the frame.
The alpha uses osigreturn to implement longjmp. This means that osigreturn is not only used for compatibility with existing binaries. To handle the new sigset_t, setjmp saves it in sc_reserved (see NOTE).
the struct sigframe has been moved from frame.h to sigframe.h to handle the complex header dependencies that was caused by the new sigframe.
NOTE: For the i386, the size of jmp_buf has been increased to hold the new sigset_t. On the alpha this has been prevented by using sc_reserved in sigcontext.
|
51661 |
25-Sep-1999 |
mjacob |
Fix from Tor so that if we enter the debugger in the tristate going to SMP (other CPUs stopped but SMP mode not really started).
Obtained from:Tor.Egge@fast.no
|
51532 |
22-Sep-1999 |
dillon |
Back out a portion of the last commit. DFLTPHYS and MAXPHYS cannot be set by a kernel conf option due to the struct buf structural dependancy (sizing of b_pages[]) creating a conflict with modules (which are not compiled with kernel config options overrides).
We'll be able to sysctl these two later on when the buffer subsystem is revamped.
|
51528 |
22-Sep-1999 |
dillon |
Change default block size for user VBLK device access from 2K to PAGE_SIZE (4K on an i386, 8K on an alpha).
Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
|
51183 |
11-Sep-1999 |
peter |
Make pmap_mapdev() deal with non-page-aligned requests. Add a corresponding pmap_unmapdev() to release the KVM back to kernel_map.
|
51127 |
10-Sep-1999 |
peter |
Add the CR4 values for P3 SIMD enabling support. FXSR tells the cpu that the OS does FXSAVE/FXRESTOR instructions (fast FPU save/restore) during context switching and also enables SIMD since this enables saving the extra CPU context that isn't saved with normal FPU regs. The other enables the SIMD instructions to use exception 16 (FPU) error reporting. Note, this doesn't turn on SIMD, just defines the bits.
|
51114 |
10-Sep-1999 |
msmith |
Invoke smp_rendezvous_action() using the a.out compatible asnames.h technique (bleagh).
|
50972 |
05-Sep-1999 |
peter |
Set up FPU state on the AP.
Tested by: phk
|
50915 |
04-Sep-1999 |
peter |
Don't install stubs, make a compat symlink at buildworld time. All internal references to <machine/soundcard.h> are (hopefully :-) gone.
|
50907 |
04-Sep-1999 |
dfr |
Make <machine/soundcard.h> a stub which includes <sys/soundcard.h>
|
50816 |
02-Sep-1999 |
luoqi |
Some reorganization of sysarch() interface: 1. Move definitions of struct i386_*_args to the header file sysarch.h, since they are part of the sysarch API. struct i386_get_ldt_args and i386_set_ldt_args were identical, therefore make them into one struct i386_ldt_args. Libc should use these definitions as well. 2. Return a more sensible EOPNOTSUPP for unknown operations.
Reviewed by: marcel
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50463 |
27-Aug-1999 |
jlemon |
Reference the correct gdt[] entry on SMP. Remove the `generation' flag, and always reload the selectors for every bios call.
|
50315 |
24-Aug-1999 |
phk |
Remove unneeded prototypes.
|
50251 |
23-Aug-1999 |
alc |
Modify the macros IMASK_UNLOCK, CPL_UNLOCK, and REL_FAST_INTR_LOCK to perform the s_unlock inline.
|
50147 |
22-Aug-1999 |
alc |
Make "s_unlock" an inline function. (Inlining this function takes less space than calling it. A callable version still exists for use by some assembly code.)
|
50054 |
19-Aug-1999 |
peter |
Undo my previous commit and do it differently. Break the ffs() etc macros into two parts - one to do the bsfl and the other to convert the result (base 0) to ffs()-like (base 1) in inline C. This enables the optimizer to be a lot smarter in certain cases, like where it knows that the argument is non-zero and we want ffs(known non zero arg) - 1. This appears to produce identical code to the old inline when the argument is unknown.
|
50038 |
19-Aug-1999 |
peter |
Try using the builtin ffs() for egcs, it (by random inspection) generates slightly better code and avoids the incl then subl when using ffs(foo) - 1.
|
50037 |
19-Aug-1999 |
peter |
Update for MI switch code, and trim a heap of unused (I believe) entries.
|
49999 |
18-Aug-1999 |
alc |
Create callable (non-inline) versions of the atomic_OP_TYPE functions that are linked into the kernel. The KLD compilation options are changed to call these functions, rather than in-lining the atomic operations.
This approach makes atomic operations from KLDs significantly faster on UP systems (though somewhat slower on SMP systems).
PR: i386/13111 Submitted by: peter.jeremy@alcatel.com.au
|
49996 |
18-Aug-1999 |
msmith |
Remove the SMBIOS detection and definitions; this should be handled in a loadable module (under development).
|
49964 |
17-Aug-1999 |
yokota |
Add definitions for Interlink VersaPad.
|
49953 |
17-Aug-1999 |
msmith |
Search for and interrogate the PnP BIOS if found. This code just prints the PnP device IDs in verbose mode; it does not (yet) save any resource data or contribute to the PnP process nor resource management.
|
49952 |
17-Aug-1999 |
msmith |
Mindbogglingly, many BIOS vendors expect to be able to load %ds with 0x40 and then access data stored in real-mode segment 0x40, even when called in protected mode. Microsoft unfortunately coddle these individuals, and so must we if we want to run their code.
This change works around GPFs in some APM and PnP BIOS implementations.
Obtained from: Linux
|
49558 |
09-Aug-1999 |
phk |
Merge the cons.c and cons.h to the best of my ability. alpha may or may not compile, I can't test it.
|
49460 |
06-Aug-1999 |
hm |
updating isdn4bsd to beta version 0.83
|
49292 |
30-Jul-1999 |
msmith |
Reenable the APMIO_BIOS ioctl and translate arguments into the new format (which is more like the old than I thought).
Requested-by: imp
|
49248 |
30-Jul-1999 |
msmith |
Remove all vestiges of APMIO_BIOS
Submitted by: N. Dudorov <nnd@mail.nsk.ru>
|
49197 |
29-Jul-1999 |
msmith |
Major update to the kernel's BIOS-calling ability.
- 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
|
49157 |
28-Jul-1999 |
dfr |
Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These are equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual() address of the resource is initialised to point into either dense-mapped or bwx-mapped space respectively, allowing direct memory pointers to be used to device memory.
Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
|
49098 |
26-Jul-1999 |
cracauer |
Various formatting fixes on my FPE trapcode commit.
Submitted by: BDE
|
49081 |
25-Jul-1999 |
cracauer |
On FPU exceptions, pass a useful error code (one of the FPE_... macros) to the signal handler, for old-style BSD signal handlers as the second (int) argument, for SA_SIGINFO signal handlers as siginfo_t->si_code. This is source-compatible with Solaris, except that we have no <siginfo.h> (which isn't even mentioned in POSIX 1003.1b).
An rather complete example program is at http://www3.cons.org/cracauer/freebsd-signal.c This will be added to the regression tests in src/.
This commit also adds code to disable the (hardware) FPU from userconfig, so that you can use a software FP emulator on a machine that has hardware floating point. See LINT.
|
49068 |
24-Jul-1999 |
dg |
Increased max kmem to 200MB. This should fix some out-of-kmem panics on large systems.
|
49043 |
23-Jul-1999 |
alc |
atomic.h: Change "void *" to "volatile TYPE *", improving type safety and eliminating some warnings (e.g., mp_machdep.c rev 1.106).
cpufunc.h: Eliminate setbits. As defined, it's not precisely correct; and it's redundant. (Use atomic_set_int instead.)
ipl_funcs.c: Use atomic_set_int instead of setbits.
systm.h: Include atomic.h.
Reviewed by: bde
|
48924 |
20-Jul-1999 |
msmith |
Implement an all-CPU shootdown-style rendezvous facility. This allows the caller to specify a function to be guarded between an entry and exit barrier, as well as pre- and post-barrier functions.
The primary use for this function is synchronised update of per-cpu private data. The implementation is almost (but not quite) MI; with a better mechanism for masking per-CPU interrupts it could probably be hoisted.
Reviewed by: peter (partially)
|
48797 |
13-Jul-1999 |
alc |
Commit the correct patch, i.e., the one that actually corresponds to the rev 1.2 log entry.
|
48796 |
13-Jul-1999 |
alc |
Changed the implementation of the primitives to guarantee atomicity with respect to interrupts on UP systems. (The upgrade from gcc 2.7.x to egcs 1.1.2 produced at least one non-atomic code sequence in swap_pager_getpages.)
In addition, the primitives are now SMP-safe, but only on SMPs. (For portability between SMPs and UPs, modules are compiled with the SMP-safe versions.)
Submitted by: dillon and myself Reviewed by: bde
|
48778 |
12-Jul-1999 |
yokota |
Improve Logitech MouseMan+ protocol support.
|
48777 |
12-Jul-1999 |
kris |
Correct a couple of spelling errors in comments.
|
48735 |
10-Jul-1999 |
iwasaki |
Add apmd support code.
|
48729 |
10-Jul-1999 |
bde |
Go back to the old (icu.s rev.1.7 1993) way of keeping the AST-pending bit separate from ipending, since this is simpler and/or necessary for SMP and may even be better for UP.
Reviewed by: alc, luoqi, tegge
|
48691 |
09-Jul-1999 |
jlemon |
Implement support for hardware debug registers on the i386.
Submitted by: Brian Dean <brdean@unx.sas.com>
|
48621 |
06-Jul-1999 |
cracauer |
Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more than a review, this was a nice puzzle.
This is supposed to be binary and source compatible with older applications that access the old FreeBSD-style three arguments to a signal handler.
Except those applications that access hidden signal handler arguments bejond the documented third one. If you have applications that do, please let me know so that we take the opportunity to provide the functionality they need in a documented manner.
Also except application that use 'struct sigframe' directly. You need to recompile gdb and doscmd. `make world` is recommended.
Example program that demonstrates how SA_SIGINFO and old-style FreeBSD handlers (with their three args) may be used in the same process is at http://www3.cons.org/tmp/fbsd-siginfo.c
Programs that use the old FreeBSD-style three arguments are easy to change to SA_SIGINFO (although they don't need to, since the old style will still work):
Old args to signal handler: void handler_sn(int sig, int code, struct sigcontext *scp)
New args: void handler_si(int sig, siginfo_t *si, void *third) where: old:code == new:second->si_code old:scp == &(new:si->si_scp) /* Passed by value! */
The latter is also pointed to by new:third, but accessing via si->si_scp is preferred because it is type-save.
FreeBSD implementation notes: - This is just the framework to make the interface POSIX compatible. For now, no additional functionality is provided. This is supposed to happen now, starting with floating point values. - We don't use 'sigcontext_t.si_value' for now (POSIX meant it for realtime-related values). - Documentation will be updated when new functionality is added and the exact arguments passed are determined. The comments in sys/signal.h are meant to be useful.
Reviewed by: BDE
|
48527 |
03-Jul-1999 |
imp |
Improve compatibility with other systems by changing the default behavior slightly.
If machine/bus.h is included, but neither bus_memio.h nor bus_pio.h are included, then behave as if both were included.
This won't change existing drivers, all of which include one or more of bus_{p,mem}io.h, but will allow drivers from other systems to come over with fewer changes. I freely admit that this might not be optimal for some drivers, but those drivers can be optimized for FreeBSD after the initial bringup happens.
Without the change, there is a bug that preclude drivers from compiling with strange warning/errors.
I've been running this here for a while now w/o ill effects.
Reviewed by: gibbs Not objected to by: bde, arch@ list.
|
48145 |
23-Jun-1999 |
msmith |
Changes in the way that the APs are started appears to have removed the problem with having more CPUs than NCPU.
PR: kern/4255 Submitted by: peter
|
48144 |
23-Jun-1999 |
luoqi |
Do not setup 4M pdir until all APs are up.
|
48119 |
22-Jun-1999 |
msmith |
Remove an unnecessary panic when sparse PCI bus numbering is encountered. This is found eg. on some Compaq Proliant systems.
Submitted by: peter
|
48104 |
22-Jun-1999 |
yokota |
The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize some of complicated functions.
- Many static variables are moved to the softc structure.
- Added a new key function, PREV. When this key is pressed, the vty immediately before the current vty will become foreground. Analogue to PREV, which is usually assigned to the PrntScrn key. PR: kern/10113 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
- Modified the kernel console input function sccngetc() so that it handles function keys properly.
- Reorganized the screen update routine.
- VT switching code is reorganized. It now should be slightly more robust than before.
- Added the DEVICE_RESUME function so that syscons no longer hooks the APM resume event directly.
- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING, SC_NO_HISTORY and SC_NO_SYSMOUSE. Various parts of syscons can be omitted so that the kernel size is reduced.
SC_PIXEL_MODE Made the VESA 800x600 mode an option, rather than a standard part of syscons.
SC_DISABLE_DDBKEY Disables the `debug' key combination.
SC_ALT_MOUSE_IMAGE Inverse the character cell at the mouse cursor position in the text console, rather than drawing an arrow on the screen. Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)
SC_DFLT_FONT makeoptions "SC_DFLT_FONT=_font_name_" Include the named font as the default font of syscons. 16-line, 14-line and 8-line font data will be compiled in. This option replaces the existing STD8X16FONT option, which loads 16-line font data only.
- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.
- The video driver provides a set of ioctl commands to manipulate the frame buffer.
- New kernel configuration option: VGA_WIDTH90 Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These modes are mot always supported by the video card. PR: i386/7510 Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.
- The header file machine/console.h is reorganized; its contents is now split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h (another new file). machine/console.h is still maintained for compatibility reasons.
- Kernel console selection/installation routines are fixed and slightly rebumped so that it should now be possible to switch between the interanl kernel console (sc or vt) and a remote kernel console (sio) again, as it was in 2.x, 3.0 and 3.1.
- Screen savers and splash screen decoders Because of the header file reorganization described above, screen savers and splash screen decoders are slightly modified. After this update, /sys/modules/syscons/saver.h is no longer necessary and is removed.
|
48005 |
18-Jun-1999 |
bde |
Changed the global `idt' from an array to a pointer so that npx.c automatically hacks on the active copy of the IDT if f00f_hack() has changed it. This also allows simplifications in setidt(). This fixes breakage of FP exception handling by rev.1.55 of sys/kernel.h. FP exceptions were sent to npx.c's probe handlers because npx.c "restored" the old handlers to the wrong copy of the IDT. The SYSINIT for f00f_hack() was purposely run quite late to avoid problems like this, but it is bogusly associated with the SYSINIT for proc0 so it was moved with the latter.
Problem reported and fix tested by: Martin Cracauer <cracauer@cons.org>
|
47678 |
01-Jun-1999 |
jlemon |
Unifdef VM86.
Reviewed by: silence on on -current
|
47592 |
29-May-1999 |
phk |
Stop the TSC from being used as timecounter on K5/step0 machines.
|
47389 |
22-May-1999 |
bde |
Fixed style bugs in previous commit.
|
47347 |
20-May-1999 |
ache |
Set CHAR_{MIN,MAX} according to -funsigned-char flag given or not
PR: 11627 Submitted by: Petr Lampa <lampa@fee.vutbr.cz>
|
47338 |
20-May-1999 |
hm |
upgrade isdn4bsd from version 0.71 to the just released version 0.81
|
47297 |
18-May-1999 |
roger |
Bt848 driver release 1.65 Updated with australian channel set
Submitted by: Ivan Brawley <brawley@internode.com.au>
|
47081 |
12-May-1999 |
luoqi |
Unbreak VESA on SMP.
|
47024 |
11-May-1999 |
luoqi |
Yet another place I missed when increasing trapframe size, which causes problem to SIGFPE handling.
Reviewed by: Bruce Evans <bde@zeta.org.au>
|
46846 |
09-May-1999 |
peter |
loadandclear() uses an atomic instruction (even on SMP, where it's an implicitly LOCK'ed instruction), so there shouldn't be any harm in making it volatile pointer compatable for one of the users of it. It seems to generate the same code regardless.
|
46823 |
09-May-1999 |
peter |
s/main/mi_startup/ for the kernel entry point so that egcs doesn't get upset about it (and generate things like __main() calls that are reserved for main()). Renaming was phk's suggestion, but I'd already thought about it too. (phk liked my suggested name tada() but I decided against it :-)
Reviewed by: phk
|
46703 |
08-May-1999 |
peter |
Make sure the mem_range_AP_init() prototype is seen where it's needed, and #ifdef SMP around it for fun.
|
46548 |
06-May-1999 |
bde |
Fixed profiling of elf kernels. Made high resolution profiling compile for elf kernels (it is broken for all kernels due to lack of egcs support).
Renaming of many assembler labels is avoided by declaring by declaring the labels that need to be visible to gprof as having type "function" and depending on the elf version of gprof being zealous about discarding the others. A few type declarations are still missing, mainly for SMP.
PR: 9413 Submitted by: Assar Westerlund <assar@sics.se> (initial parts)
|
46495 |
05-May-1999 |
wpaul |
Add device driver support for the Lucent WaveLAN/IEEE 802.11 PCMCIA adapter (and some workalikes). Also add man pages and a wicontrol utility to manipulate some of the card parameters.
This driver was written using information gleaned from the Lucent HCF Light library, though it does not use any of the HCF Light code itself, mainly because it's contaminated by the GPL (but also because it's pretty gross). The HCF Light lacks certain featurs from the full (but proprietary) HCF library, including 802.11 frame encapsulation support, however it has just enough register information about the Hermes chip to allow someone with enough spare time and energy to implement a proper driver. (I would have prefered getting my hands on the Hermes manual, but that's proprietary too. For those who are wondering, the Linux driver uses the proprietary HCF library, but it's provided in object code form only.)
Note that I do not have access to a WavePOINT access point, so I have only been able to test ad-hoc mode. The wicontrol utility can turn on BSS mode, but I don't know for certain that the NIC will associate with an access point correctly. Testers are encouraged to send their results to me so that I can find out if I screwed up or not.
|
46215 |
30-Apr-1999 |
msmith |
Add a hook that can be called to initialise a slave processor's memory range attributes after they have been extracted from the master.
Hook up the i686 MP code to do this for each AP.
Be more careful about printing the default memory type for the i686.
Suggestions from: luoqi
|
46129 |
28-Apr-1999 |
luoqi |
Enable vmspace sharing on SMP. Major changes are, - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup.
Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
|
45959 |
23-Apr-1999 |
dt |
Moved cpu_set_fork_handler's prototype from <machine/cpu.h> to <sys/proc.h>.
Suggested by: bde
|
45897 |
21-Apr-1999 |
peter |
Stage 1 of a cleanup of the i386 interrupt registration mechanism. Interrupts under the new scheme are managed by the i386 nexus with the awareness of the resource manager. There is further room for optimizing the interfaces still. All the users of register_intr()/intr_create() should be gone, with the exception of pcic and i386/isa/clock.c.
|
45720 |
16-Apr-1999 |
peter |
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman.
Approved by: core
|
45643 |
13-Apr-1999 |
tegge |
Backout early start of APs since it caused some machines to hang.
|
45566 |
11-Apr-1999 |
tegge |
Add prototype for wait_ap().
|
45562 |
10-Apr-1999 |
tegge |
Let BSP wait until all APs are initialized.
|
45462 |
08-Apr-1999 |
kato |
o sys/i386/include/soundcard.h Reduce synth_info.name lenght for binary compatibility.
o sys/i386/isa/sound/mpu401.c Reduce mpu device number info to avoid overflow of mpu_synth_info.name.
Submitted by: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
|
45436 |
07-Apr-1999 |
peter |
Disable the mtrr copy calls, it doesn't work with the i686_mem.c stuff. This should make it compile/link again.
|
45406 |
07-Apr-1999 |
msmith |
Add defines for the P6 model-specific registers.
|
45270 |
03-Apr-1999 |
jdp |
Restore support for executing BSD/OS binaries on the i386 by passing the address of the ps_strings structure to the process via %ebx. For other kinds of binaries, %ebx is still zeroed as before.
Submitted by: Thomas Stephens <tas@stephens.org> Reviewed by: jdp
|
45252 |
02-Apr-1999 |
alc |
Put in place the infrastructure for improved UP and SMP TLB management.
In particular, replace the unused field pmap::pm_flag by pmap::pm_active, which is a bit mask representing which processors have the pmap activated. (Thus, it is a simple Boolean on UPs.)
Also, eliminate an unnecessary memory reference from cpu_switch() in swtch.s.
Assisted by: John S. Dyson <dyson@iquest.net> Tested by: Luoqi Chen <luoqi@watermarkgroup.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>
|
45240 |
02-Apr-1999 |
kato |
o sys/i386/include/soundcard.h Add Sound Card ID for the nss(NEC PC-9801-86 Sound System) driver. Old name of this driver was pcm driver in FreeBSD 2.2.x. Fix lack of the length of the name member of the synth_info structure. (attach_mpu401 in sys/i386/isa/sound/mpu401.c requires 33 chars.)
o sys/i386/isa/sound/dev_table.h Add the DMAbuf flags definition DMA_DISABLE. Add the nss driver entry.
o sys/i386/isa/sound/dmabuf.c Add the DMA_DISABLE flag check in DMAbuf_outputintr and DMAbuf_inputintr to disable DMA control in FIFO only use (nss driver required).
o sys/i386/isa/sound/local.h Add the nss driver entry.
o sys/i386/isa/sound/mpu401.c Replace inb function in probe_mpu401 to mpu401_status macro. Wrap macro argument for above replace. Add I/O port maping macro for NEC PC-98x1 arch. Add delay in NEC PC-98x1 arch.
o sys/i386/isa/sound/pcm86.c Change driver name to avoid name space conflict to new pcm driver. Fix NEC PC-9801-86 driver to work on RELENG_3 branch or latter.
o sys/i386/isa/sound/sound_calls.h Fix the mpuintr definition. Add the nss driver entry. attach_nss, probe_nss, nssintr
o sys/i386/isa/sound/soundcard.c Fix lack of the mpuintr registration. Add the nss driver entry.
o sys/pc98/conf/files.pc98 Add the nss driver entry.
Reviewed by: kato Submitted by: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
|
44845 |
18-Mar-1999 |
jlemon |
Change the vm86_datacall interface so that callers are now responsible for passing in their own data space and associated page table information.
Update the support files so that any pages in the vm86 page table are mapped, rather than just one page.
Restore the E820 memory probe, and have it use the new interface.
|
44670 |
11-Mar-1999 |
dg |
Increased kernel virtual address space to 1GB. NOTE: You MUST have fixed bootblocks in order to boot the kernel after this! Also note that this change breaks BSDI BSD/OS compatibility. Also increased default NKPT to 17 so that FreeBSD can boot on machines with >=2GB of RAM. Booting on machines with exactly 4GB requires other patches, not included.
|
44628 |
10-Mar-1999 |
yokota |
Keyboard driver update in preparation for the USB keyboard driver.
- Refined internal interface in keyboard drivers so that: 1. the side effect of device probe is kept minimal, 2. polling mode function is added, 3. and new ioctl and configuration options are added (see below).
- Added new ioctl: KDSETREPEAT Set keyboard typematic rate. There has existed an ioctl command, KDSETRAD, for the same purpose. However, KDSETRAD is dependent on the AT keyboard. KDSETREPEAT provides more generic interface. KDSETRAD will still be supported in the atkbd driver.
- Added new configuration options: ATKBD_DFLT_KEYMAP Specify a keymap to be used as the default, built-in keymap. (There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP, SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap. These options are now gone for good. The new option is more general.)
KBD_DISABLE_KEYMAP_LOADING Don't allow the user to change the keymap.
|
44551 |
07-Mar-1999 |
hm |
update the i4b include files to i4b release 0.71.00
|
44487 |
05-Mar-1999 |
bde |
The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpu numbers as chars or use bogus casts in an attempt to unmisrepresnt them. In top, don't assume that 0xff is the only negative cpu number when cpu numbers are (mis)represented.
|
44464 |
04-Mar-1999 |
joerg |
Adopt syscons's recent change from key_t to keyent_t (this part of pcvt is plug-compatible to syscons to facilitate an identical VT-switching interface), so PR misc/1247 can be closed.
|
44429 |
02-Mar-1999 |
dg |
Correct casts in vtophys and avtophys to be vm_offset_t.
|
44364 |
01-Mar-1999 |
imp |
Don't define MACHINE, MACHINE_ARCH, _MACHINE or _MACHINE_ARCH if already defined. This allows for cross building to work because we need to lie to make to tell it to use the target names rather than the host names.
This should have no effect on either architecture. I've confirmed that the intel build by make buildworld's for the past 3 months.
|
44289 |
26-Feb-1999 |
tegge |
Don't call assign_apic_irq with a value for irq that is out of range.
|
44262 |
25-Feb-1999 |
bde |
Fixed my recent breakage of the ELF case.
|
44215 |
22-Feb-1999 |
bde |
Added a per-cpu variable `switchticks' for use in scheduling.
|
44186 |
21-Feb-1999 |
n_hibma |
1) Added define for USB as an interface 2) Added define for maximum number of buttons for Mouse Systems
|
44157 |
19-Feb-1999 |
luoqi |
Introduce machine-dependent macro pgtok() to convert page count to number of kilobytes. Its definition for each architecture could be optimized to avoid potential numerical overflows.
|
44146 |
19-Feb-1999 |
luoqi |
Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). This is the preparation step for moving pmap storage out of vmspace proper.
Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
|
44131 |
19-Feb-1999 |
jdp |
On the i386, load the ELF dynamic linker where an mmap(0, ...) would put it, just like on the Alpha. It was wrong to load it at the fixed address 0x08000000. That should only be done if the dynamic linker is an executable (not a shared object) with a specific load address encoded in the object file itself.
This fixes the recent breakage in the Linux emulator.
|
44063 |
15-Feb-1999 |
roger |
Corrected ioctl numbers conflict. Thanks to Vsevolod Lobko <seva@alex-ua.com> for spotting this. P:
|
43889 |
11-Feb-1999 |
roger |
Added new ioctls for Hauppage Infra-Red Remote Control support, Obtaining the supported channel sets and Controlling the GPIO port.
Submitted by: Roger Hardiman and Vsevolod Lobko <seva@alex-ua.com>
|
43750 |
07-Feb-1999 |
jdp |
Change the load address of the ELF dynamic linker from "2L*MAXDSIZ" to an architecture-specific value defined in <machine/elf.h>. This solves problems on large-memory systems that have a high value for MAXDSIZ.
The load address is controlled by a new macro ELF_RTLD_ADDR(vmspace). On the i386 it is hard-wired to 0x08000000, which is the standard SVR4 location for the dynamic linker.
On the Alpha, the dynamic linker is loaded MAXDSIZ bytes beyond the start of the program's data segment. This is the same place a userland mmap(0, ...) call would put it, so it ends up just below all the shared libraries. The rationale behind the calculation is that it allows room for the data segment to grow to its maximum possible size.
These changes have been tested on the i386 for several months without problems. They have been tested on the Alpha as well, though not for nearly as long. I would like to merge the changes into 3.1 within a week if no problems have surfaced as a result of them.
|
43706 |
06-Feb-1999 |
bde |
Added underscores to some names in svr4_locore.s so that it compiles with -aout. Added translation back to elf names in asnames.h as usual. The elf names were inconsistent in the aout case even internally because a macro adds an underscore to just one of them.
Removed commented out code for a previous life of `svr4_esigcode'. Didn't add an underscore to `svr4_esigcode' since it is correct for aout although wrong for elf, like most internal names in assembler files. These names should be in a different namespace so that gprof can ignore them.
Fixed some disorder in asnames.h.
|
43664 |
05-Feb-1999 |
yokota |
- Don't assume the line length in the video memory is always the same as 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.
|
43612 |
04-Feb-1999 |
kato |
Recognize Pentium II Xeon, Celeron and Pentium III cpus. Because CPU names are printed on their packages and shown by BIOS, kernel does not need to show details.
PR: 8751, 9320 and 9463
|
43524 |
02-Feb-1999 |
bde |
Added a hopefully-machine-independent macro for determining if a reschedule is pending.
|
43434 |
30-Jan-1999 |
kato |
Moved pc98_system_parameter from .text to .data to make ELF kernel work.
|
43387 |
29-Jan-1999 |
dillon |
More -Wall / -Wcast-qual cleanup. Also, EXEC_SET can't use C_DECLARE_MODULE due to the linker_file_sysinit() function making modifications to the data.
|
43348 |
28-Jan-1999 |
roger |
Added METEOR_DEV2 and METEOR_DEV3
|
43340 |
28-Jan-1999 |
newton |
Sun Bug ID 1251858 (on http://sunsolve1.sun.com) discusses the way that Sun implemented iBCS2 compatibility on Solaris >= 2.6: The emulator runs in user-mode, patching the LDT so that client programs making syscalls through the old iBCS2 call gate get handled by the emulator process. Unemulated syscalls therefore need their own call-gate that bypasses the emulator. Sun chose LDT entry 4 to implement this, which is what we've been using as LUDATA_SEL, so we need to change LUDATA_SEL if we want to run Solaris executables.
Discussed with: Mike Smith
|
43314 |
28-Jan-1999 |
dillon |
Fix warnings in preparation for adding -Wall -Wcast-qual to the kernel compile
|
42880 |
20-Jan-1999 |
jkh |
Make more messages conditional on bootverbose
|
42543 |
12-Jan-1999 |
eivind |
Silence warnings.
|
42504 |
11-Jan-1999 |
yokota |
The first stage of console driver reorganization: activate new 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.
|
42442 |
09-Jan-1999 |
nsouch |
Change /dev/smb and /dev/iic interface to allow user programs to interact with devices dynamically. That means,
+ only one /dev/iic or /dev/smb device for each smb/iic bus to access + I2C/SMB device address must be given to any ioctl + new devices may be plugged and accessed after boot, which was impossible previously (device addresses were hardcoded into the kernel)
|
42427 |
09-Jan-1999 |
bde |
Don't put operands in clobber lists, since this is dubious for old versions of gcc and broken for current versions of egcs.
Submitted by: "John S. Dyson" <dyson@iquest.net> but rewritten by me
|
42411 |
08-Jan-1999 |
bde |
Fixed some style bugs. Clarified a comment.
|
42410 |
08-Jan-1999 |
bde |
Unspammed includes in <machine/cpufunc.h> in the !SMP case. Partially unspammed them in the SMP case.
|
42406 |
08-Jan-1999 |
bde |
Moved declarations related to copying and zeroing to the right place.
|
42395 |
08-Jan-1999 |
yokota |
Update #ifdef directive.
# I forgot this bit when I committed VESA KLD update a few days ago ;-<
|
42367 |
07-Jan-1999 |
peter |
OBJFORMAT_DEFAULT = elf now. (this is where /usr/bin/objformat and libc/gen/getobjformat.c get their default from)
|
42235 |
01-Jan-1999 |
des |
Correct typo in macro name.
|
42220 |
01-Jan-1999 |
peter |
Part 3 of the pcvt/voxware revival.
Reviewed by: core
|
42107 |
27-Dec-1998 |
phk |
Initial entry of ISDN4BSD into the FreeBSD tree.
ISDN4BSD is the work of our brand-new comitter: Hellmuth Michaelis, who has done a tremendous amount of work to bring us this far.
There are still some outstanding issues and files to bring into the tree, and for now it will be needed to pick up all the extra docs from the isdn4bsd release.
It is probably also a very good idea to subscribe to the isdn@freebsd.org mailing list before you try this out.
These files correspond to release "beta Version 0.70.00 / December 1998" from Hellmuth.
|
42090 |
27-Dec-1998 |
phk |
follow up to: Pre 3.0 branch cleanup casualty #4: pcvt
|
42086 |
27-Dec-1998 |
sos |
Pre 3.0 branch cleanup sos#2: sound
Superceded by the snd driver...
|
41927 |
19-Dec-1998 |
dt |
Little reorganization: - created internal names for fixed-size integral types, like __int32_t. They will be used to make several headers self-sufficient. - <stdlib.h> don't include <machine/types.h> anymore. - created <sys/inttypes.h>, which can be used as <inttypes.h>. - declaration of uoff_t and ufs_daddr_t moved to <sys/types.h>.
Reviewed by: bde
|
41591 |
07-Dec-1998 |
archie |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static and local variables, goto labels, and functions declared but not defined.
|
41367 |
26-Nov-1998 |
tegge |
Attempt to handle interrupts delivered to all IO APICs by using the first IO APIC with a sufficient number of pins.
|
41362 |
26-Nov-1998 |
eivind |
Staticize.
|
41318 |
24-Nov-1998 |
eivind |
Move the declaration of PPro_vmtrr from the header file to pmap.c, replacing the one in the header file with a definition. This makes it easier to work with tools that grok ANSI C only.
|
41271 |
20-Nov-1998 |
yokota |
- Added support for Genius Kidspad tablet.
# `moused' is getting too over-loaded now. If we want something # more than simple mouse emulation for tablets or remote devices, # we should start writing a separate daemon...
Submitted by: luigi
|
40751 |
30-Oct-1998 |
msmith |
Add the ability to specify where on the at_shutdown queue a handler is installed.
Remove cpu_power_down, and replace it with an entry at the end of the SHUTDOWN_FINAL queue in the only place it's used (APM).
Submitted by: Some ideas from Bruce Walter <walter@fortean.com>
|
40713 |
29-Oct-1998 |
wollman |
A small fragment of new ISA framework: manifest constants for the resources implemented by the i386 root nexus.
|
40513 |
18-Oct-1998 |
peter |
Add an ELF_MACHINE_OK() macro for compatability with the Alpha version.
|
40286 |
13-Oct-1998 |
dg |
Fixed two potentially serious classes of bugs:
1) The vnode pager wasn't properly tracking the file size due to "size" being page rounded in some cases and not in others. This sometimes resulted in corrupted files. First noticed by Terry Lambert. Fixed by changing the "size" pager_alloc parameter to be a 64bit byte value (as opposed to a 32bit page index) and changing the pagers and their callers to deal with this properly. 2) Fixed a bogus type cast in round_page() and trunc_page() that caused some 64bit offsets and sizes to be scrambled. Removing the cast required adding casts at a few dozen callers. There may be problems with other bogus casts in close-by macros. A quick check seemed to indicate that those were okay, however.
|
40179 |
10-Oct-1998 |
kato |
mp_machdep.c: Set a vector to boot code (PC-98). locore.s: Tell the bios to warmboot next time (PC-98).
|
40169 |
10-Oct-1998 |
kato |
PC-98 doesn't have CMOS ram.
|
40067 |
08-Oct-1998 |
kato |
BIOS ROM base address is 0xe8000 on PC-98.
|
40003 |
06-Oct-1998 |
kato |
- Implement enabling write allocate on AMD K5/K6/K6-2 cpus. The code was originaly contributed by Kelly Yancey <kbyanc@freedomnet.com> in PR i386/6269 and revised by Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp> and me. Test was performed by Akio Morita and Toshiomi Moriki <moriki@db.is.kyushu-u.ac.jp>. - Fix stylistic bug in identcpu.c. - Update copyright in initcpu.c - Fix typo in LINT.
PR: 6269 and 6270
|
39927 |
03-Oct-1998 |
jdp |
Two new C symbols were added to apm_setup.s but not put into asnames.h. That broke builds of ELF kernels. *Whap*.
|
39865 |
01-Oct-1998 |
msmith |
Remove the bi_vesa field, as vesa modeswitching is no longer performed by the bootblocks.
|
39864 |
01-Oct-1998 |
msmith |
Pass the BIOS unit number from which the kernel/loader was obtained in the bootinfo struct so that it can be reused later.
|
39858 |
01-Oct-1998 |
yokota |
Yet another round of fixes for the VESA support code.
- Express various sizes in bytes, rather than Kbytes, in the video mode and adapter information structures. - Fill 0 in the linear buffer size field if the linear frame buffer is not available. - Remove SW_VESA_USER ioctl. It is still experimetal and was not meant to be released. - Fix missing cast operator. - Correctly handle pointers returned by the VESA BIOS. The pointers may point to the area either in the BIOS ROM or in the buffer supplied by the caller. - Set the destructive cursor at the right moment.
|
39838 |
30-Sep-1998 |
sos |
Changed tuner code to autodetect tuner i2c address. Addresses were incorrectly hardcoded.
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
|
39755 |
29-Sep-1998 |
bde |
Don't pretend to support ix86's with 16-bit ints by using longs just to ensure 32-bit variables. Doing so broke ix86's with 64-bit longs.
|
39648 |
25-Sep-1998 |
peter |
Goodbye BOUNCE_BUFFERS, for a hack it has served us well.
The last consumer of this code (the old SCSI system) has left us and the CAM code does it's own bouncing. The isa dma system has been doing it's own bouncing for a while too.
Reviewed by: core
|
39643 |
25-Sep-1998 |
yokota |
Cosmetic change: adjust copyright notice.
|
39591 |
23-Sep-1998 |
yokota |
Fix and update for VESA BIOS support in syscons.
- Handle pixel (raster text) mode properly. - Clear screen and paint border right. - Paint text attribute (colors). - Fix off-by-one errors. - Add some sanity checks. - Fix some function prototypes. - Add some comment lines. - Define generic text mode numbers so that the user can just give "80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol' to change the current video mode. `vidoio.c' and `vesa.c' will map these numbers to real video mode numbers appropriate and available with the given video hardware. I believe this will be useful to make syscons more portable across archtectures.
|
39488 |
19-Sep-1998 |
jdp |
Fix breakage of ELF kernel builds caused by the addition of an assembly language reference to a C symbol without the addition of the corresponding entry in asnames.h.
|
39287 |
15-Sep-1998 |
sos |
Add VESA support to syscons.
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
|
39197 |
14-Sep-1998 |
jdp |
Add new functions fill_fpregs() and set_fpregs(), like fill_regs() and set_regs() but for the floating point register state. The code is stolen from procfs_machdep.c, and moved out of there into machdep.c.
These functions are needed for generating ELF core dumps.
|
39189 |
14-Sep-1998 |
jdp |
Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give the relevant characteristics of the native machine, for building and checking Elf_Ehdr structures.
Add structures to represent ELF "note" headers. Add defines for the note types used in ELF core files.
|
39180 |
14-Sep-1998 |
msmith |
Add extra bootinfo fields for the three-stage bootloader; the end of the loaded kernel aggregate, a pointer to the kernel environment data and a pointer to the preloaded module metadata.
|
39040 |
10-Sep-1998 |
sos |
Correct SECAM B-Delay and add XUSSR channel set.
Submitted by: Vsevolod Lobko <seva@alex-ua.com>
|
38960 |
09-Sep-1998 |
jdp |
Add a new library function getobjformat(). It checks all the standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an indication of the user's preferred object file format. This consolidates some code that was starting to be duplicated in more and more places.
Use the new function in ldconfig.
Note: I don't think that gcc should use getobjformat(), even though it could. The compiler should limit itself to functions that are widespread, to ease porting and cross-compilation.
|
38928 |
07-Sep-1998 |
jdp |
Make profiling work for ELF. gprof now autodetects the format of the executable file, so it will work for both a.out and ELF format files. I have split the object format specific code into separate source files. It's cleaner than it was before, but it's still pretty crufty.
Don't cheat on your make world for this update. A lot of things have to be rebuilt for it to work, including the compiler and all of the profiled libraries.
|
38888 |
06-Sep-1998 |
tegge |
Maintain a mapping from irq number to (ioapic number, int pin) tuple, and use this when masking/unmasking interrupts.
Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics.
Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0.
Don't let an AP enter _cpu_switch before all local apics are initialized.
|
38780 |
03-Sep-1998 |
nsouch |
Reviewed by: Doug Rabson Submitted by: nsouch I2C and SMB ioctls
|
38707 |
31-Aug-1998 |
sos |
Renamed BT848[SG]CAPAREA to BT848_[SG]CAPAREA. Added PR kern/7177 for SECAM Video Highway Xtreme with single crystal PLL configuration submitted by Vsevolod Lobko <seva@alex-ua.com>. In kernel configuration file add options OVERRIDE_CARD=2 options OVERRIDE_TUNER=11 options BKTR_USE_PLL
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
|
38706 |
31-Aug-1998 |
sos |
Added Capture Area ioctl - BT848[SG]CAPAREA. Normally the full 640x480 (768x576 PAL) image is grabbed. This ioctl allows a smaller area from anywhere within the video image to be grabbed, eg a 400x300 image from (50,10). See restrictions in BT848SCAPAREA.
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
|
38673 |
31-Aug-1998 |
kato |
- hw.machine_arch returns cpu architecture type. - moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha. - Added definitions of _MACHINE and _MACHINE_ARCH. - Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in IBM-PC kernel.
Discussed with: John Birrell <jb@FreeBSD.ORG>
|
38517 |
24-Aug-1998 |
dfr |
Change various syscalls to use size_t arguments instead of u_int.
Add some overflow checks to read/write (from bde).
Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable.
Reviewed by: Bruce Evans <bde@zeta.org.au>
|
38505 |
24-Aug-1998 |
bde |
Fixed printf format errors. Only one left in LINT on i386's.
|
38422 |
18-Aug-1998 |
msmith |
Presently there is only one `currentldt' variable for all cpus in a SMP system. Unexpected things could happen if each cpu has a different ldt setting and one cpu tries to use value of currentldt set by another cpu.
The fix is to move currentldt to the per-cpu area. It includes patches I filed in PR i386/6219 which are also user ldt related.
PR: i386/7591, i386/6219 Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
|
38392 |
17-Aug-1998 |
dfr |
Add macros for accessing device memory.
|
38358 |
16-Aug-1998 |
jdp |
Make ELF kernels build again.
|
38357 |
16-Aug-1998 |
jdp |
Revamp the ELF include files to better support architecture-independent applications. Here's how it works.
The kernel should include <machine/elf.h> to get the definitions for the native architecture. It can reference the various ELF structures with generic names like Elf_Sym, Elf_Shdr, etc. A define __ELF_WORD_SIZE is also available with the value 32 or 64 as appropriate for the native architecture.
Generic applications should include <elf.h>, which is just a wrapper for <machine/elf.h>.
Applications such as object file dumpers that need to deal with foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>. Both can be included from the same source file if desired. The structure names must be referenced using wordsize-specific names like Elf32_Sym, Elf64_Shdr, etc.
I haven't change the alpha stuff, but I haven't broken it either.
|
38349 |
16-Aug-1998 |
bde |
pmap.c: Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to (uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's to (u_long) just to do arithmetic on them.
mp_machdep.c: Cast pointers to (uintptr_t) instead of to (u_long). Don't forget to cast pointers to (void *) first or to recover from integral possible integral promotions, although this is too much work for machine-dependent code.
vm code generally avoids warnings for pointer vs long size mismatches by using vm_offset_t to represent pointers; pmap.c often uses plain `unsigned int' instead of vm_offset_t and didn't use u_long elsewhere, but this style was messed up by code apparently imported from mp_machdep.c.
|
38250 |
11-Aug-1998 |
bde |
Removed a bogus ifdef that broke using SWI_* in LKMs.
Fixed a comment.
|
38244 |
11-Aug-1998 |
bde |
Implemented dynamic registration of software interrupt handlers. Not used yet.
Use dummy SWI handlers to avoid some checks for null pointers.
|
38052 |
03-Aug-1998 |
yokota |
1. Reorganized screen saver related code so that both the LKM screen saver and splash screen can all work properly with syscons. Note that the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it requires additional code from msmith.
- Reorganized the splash screen code to match the latest development in this area. - Delay screen switch in `switch_scr()' until the screen saver is stopped, if one is running, - Start the screen saver immediately, if any, when the `saver' key is pressed. (There will be another commit for `kbdcontrol' to support this keyword in the keymap file.) - Do not always stop the screen saver when mouse-related ioctls are called. Stop it only if the mouse is moved or buttons are clicked; don't stop it if any other mouse ioctls are called.
2. Added provision to write userland screen savers. (Contact me if you are interested in writing one.)
- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to support userland screen savers.
3. Some code clean-ups.
|
37917 |
28-Jul-1998 |
jlemon |
u_int --> unsigned int, remove (now unneeded) <sys/types.h>
|
37903 |
28-Jul-1998 |
jlemon |
Add wrappers for i386_*_ioperm, i386_vm86 so userland code does not have to call sysarch() directly. Added man pages for above, as well as sysarch()
|
37642 |
14-Jul-1998 |
msmith |
Add missing register name defines.
|
37629 |
14-Jul-1998 |
bde |
Changed to the C9x draft spelling of the (unsigned) integral type suitable for holding object pointers (ptrint_t -> uintptr_t). Added corresponding signed type (intptr_t). Changed/added corresponding non-C9x types for function pointers to match. Don't use nonstandard types to implement these types, and don't comment on them in <machine/types.h>.
|
37553 |
11-Jul-1998 |
bde |
Don't pretend to support ix86's with 16-bit ints by using longs just to ensure 32-bit variables. Doing so mainly bogotified some printf formats.
Fixed disorder in md_var.h.
|
37552 |
11-Jul-1998 |
bde |
Don't pretend to support ix86's with 16-bit ints by using longs just to ensure 32-bit variables. Doing so broke and/or pessimized i386's with 64-bit longs (unnecessary use of 64-bit variables caused remarkably few problems in C code, but the inline asm here tended to fail because there are no 64-bit registers). Since the interfaces here are very machine-dependent and shouldn't be used outside of the kernel, use a standard types of "known" width instead of fixed-width types.
Changed all quad_t's to u_int64_t's. quad_t isn't standard, and using signed types for 64-bit registers was bogus (but made no difference).
|
37550 |
11-Jul-1998 |
bde |
Don't pretend to support ix86's with 16-bit ints by using longs just to ensure 32-bit variables. Doing so broke i386's with 64-bit longs. Use fixed-size integral types instead of plain ints, shorts, chars and pointers since the bootinfo struct layout is a binary interface. The boot blocks could reasonably be implemented using 16-bit code.
|
37542 |
10-Jul-1998 |
bde |
Oops, fptrint_t still needs to be declared in <machine/profile.h> in the !KERNEL case. The kludge to get it declared in libc/gmon/mcount.c wasn't sufficient because fptrint_t is used in <sys/gmon.h>.
|
37540 |
10-Jul-1998 |
bde |
Added a kernel-only typedef (ptrint_t) giving an integral type that is least unsuitable for holding an object pointer. This should have been used to fix warnings about casts between pointers and ints on alphas.
Moved corresponding existing general typedef (fptrint_t) for function pointers from the i386 <machine/profile.h> to a kernel-only typedef in <machine/types.h>. Kludged libc/gmon/mcount.c so that it can still see this typedef.
|
37414 |
06-Jul-1998 |
imp |
Add the ability to suspend as well as hibernate to the system. This is the kernel part of my commits, the userlevel stuff will be done in a separate commit. Add the ability to suspend as well as hibernate to syscons. Create a new virtual key like hibernate for suspend. Update apm_bios.h to define more apm bios goodies.
|
37091 |
21-Jun-1998 |
mckay |
Remove bogus comment that teleported in from sys/i386/i386/mp_machdep.c.
|
37086 |
21-Jun-1998 |
bde |
Converted add_interrupt_randomness() to take a `void *' arg. Rewrote mmioctl() to fix hundreds of style bugs and a few error handling bugs (don't check for superuser privilege for inappropriate ioctls, don't check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't return EPERM for null changes).
|
37050 |
18-Jun-1998 |
bde |
Changed the type of an isa/general interrupt handler to take a `void *' arg. Fixed or hid most of the resulting type mismatches. Handlers can now be updated locally (except for reworking their global declarations in isa_device.h).
|
37034 |
17-Jun-1998 |
bde |
Don't declare isa device structs or isa interrupt handlers in <sys/conf>, and don't depend on them being declared there. This will cause lots of warnings for a few minutes until config is updated. Interrupt handlers should never have been configured by config, and the machine generated declarations get in the way of changing the arg type from int to void *.
|
36996 |
15-Jun-1998 |
bde |
Oops, uoff_t can't be used here yet.
|
36991 |
14-Jun-1998 |
ahasty |
Reviewed by: Amancio Submitted by: Randall Hopper <rhh@ct.picker.com> The patch supports using the X10 Mouse Remote in both stand-alone and pass-through configurations, so you can plug your mouse and remote into the same serial port, use the mouse for X, and use the remote for other apps like Fxtv. For instance, we can now control fxtv via the remote control just like a TV : change channels, mute, increase volume, zoom video, freeze frame 8)
The mouse events are channeled through the syscons/sysmouse I/F like normal, and the remote buttons are "syphoned off" to a UNIX-domain stream socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a remote-aware app to grab and use.
For further info on the X10 Mouse Remote see: http://www.x10.com/products/x10_mk19a.htm
|
36977 |
14-Jun-1998 |
bde |
Removed LOCORE ifdef. This header isn't used for locore stuff.
Use uoff_t instead of `unsigned long long' for unsigned offsets.
Fixed some style bugs.
|
36976 |
14-Jun-1998 |
bde |
Define 64-bit types in terms of __int64_t and __uint64_t.
Define an unsigned version of off_t (uoff_t) if KERNEL is defined. This is useful for micro-optimizing expressions involving off_t's where you know that the values are non-negative but the compiler doesn't know it.
Fixed a gratuitous ANSIism.
|
36975 |
14-Jun-1998 |
bde |
Added typedefs for __int64_t and __uint64_t. These will be used to avoid explicit use of `[unsigned] long long' and `[u]quad_t'.
Fixed disorder of and lack of comments for the types added in the previous two commits. Improved some comments. The comments should be elswhere (not duplicated in every MD file).
|
36956 |
13-Jun-1998 |
steve |
Add a macro tweak.
PR: 6932 Submitted by: Nick Sayer <nsayer@quack.kfu.com>
|
36909 |
12-Jun-1998 |
dg |
Increased MAXTSIZ to 128MB...there are binaries that get quite large. Increased DFLDSIZ to 128MB, as it is a better default. Reviewed by: jkh
|
36767 |
08-Jun-1998 |
bde |
Fixed pedantic semantics errors (bitfields not of type int, signed int or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
|
36441 |
28-May-1998 |
phk |
Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.
Use an inline function rather than a macro for timecounter delta.
Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead.
Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch()
This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems.
WARNING: Programs which muck about with struct proc in userland will have to be fixed.
Reviewed, but found imperfect by: bde
|
36290 |
22-May-1998 |
des |
Add CPU_PII to the list.
|
36168 |
19-May-1998 |
tegge |
Disallow reading the current kernel stack. Only the user structure and the current registers should be accessible. Reviewed by: David Greenman <dg@root.com>
|
36138 |
17-May-1998 |
tegge |
Change simple lock handling to not depend upon having a local apic available. The per-cpu variable ss_tpr has been replaced by ss_eflags. This reduced the number of interrupts sent to the wrong CPU, due to the cpu having the global lock being inside a critical region.
Remove some unneeded manipulation of tpr register in mplock.s.
Adjust code in mplock.s to be aware of variables on the stack being destroyed by MPgetlock if GRAB_LOPRIO is defined.
|
36135 |
17-May-1998 |
tegge |
Add forwarding of roundrobin to other cpus. This gives a more regular update of cpu usage as shown by top when one process is cpu bound (no system calls) while the system is otherwise idle (except for top).
Don't attempt to switch to the BSP in boot(). If the system was idle when an interrupt caused a panic, this won't work. Instead, switch to the BSP in cpu_reset.
Remove some spurious forward_statclock/forward_hardclock warnings.
|
36125 |
17-May-1998 |
tegge |
For SMP, use prv_PPAGE1/prv_PMAP1 instead of PADDR1/PMAP1. get_ptbase and pmap_pte_quick no longer generates IPIs. This should reduce the number of IPIs during heavy paging.
|
36119 |
17-May-1998 |
phk |
s/nanoruntime/nanouptime/g s/microruntime/microuptime/g
Reviewed by: bde
|
36090 |
16-May-1998 |
ahasty |
1.31 Randall Hopper <rhh@ct.picker.com> submitted ioctl to clear the video buffer prior to starting video capture Amancio : clean up yuv12 so that it does not affect rgb capture. Basically, fxtv after capturing in yuv12 mode , switching to rgb would cause the video capture to be too bright. 1.32 disable inverse gamma function for rgb and yuv capture. fixed meteor brightness ioctl it now converts the brightness value from unsigned to signed. 1.33 added sysctl: hw.bt848.tuner, hw.bt848.reverse_mute, hw.bt848.card card takes a value from 0 to bt848_max_card tuner takes a value from 0 to bt848_max_tuner reverse_mute : 0 no effect, 1 reverse tuner mute function some tuners are wired reversed :(
|
35976 |
12-May-1998 |
dyson |
Fix alot of silly LINT that I left in the code.
|
35933 |
11-May-1998 |
dyson |
Support better performance with P6 architectures and in SMP mode. Unnecessary TLB flushes removed. More efficient page zeroing on P6 (modify page only if non-zero.)
|
35932 |
11-May-1998 |
dyson |
Attempt to set write combining mode for graphics devices.
|
35767 |
06-May-1998 |
gibbs |
Implement bus_dmamem_* functions and correct a few nits reported by Peter Wemm.
|
35477 |
27-Apr-1998 |
des |
Cast return values to the appropriate fp_*_t. Note that the man page incorrectly refers to them as e.g. fp_except rather than fp_except_t.
PR: misc/6310 Submitted by: Niall Smart
|
35385 |
22-Apr-1998 |
peter |
Add a couple of missing symbols referred to in asm code.
|
35300 |
19-Apr-1998 |
bde |
Support compiling with `gcc-pedantic' (don't use hard newlines in (asm) string constants or trailing commas in enum declarations).
|
35087 |
06-Apr-1998 |
peter |
Fix VM86 compiles. a #include "opt_vm86.h" was missing, and the my_tr variable was needed in the non-SMP case.
Submitted by: Jonathan Lemon <jlemon@americantv.com>
|
35077 |
06-Apr-1998 |
peter |
Use real types for the SMP pages being allocated rather than arrays of ints. Remove some no longer needed casts. Initialize the per-cpu global data area using the structs rather than knowing too much about layout, alignment, etc.
|
35069 |
06-Apr-1998 |
peter |
A pair of C structures used for laying out the SMP per-cpu data space.
|
35068 |
06-Apr-1998 |
peter |
some missing symbols
|
35062 |
06-Apr-1998 |
phk |
Remove stuff related to microtime.s, which is gone.
|
35060 |
06-Apr-1998 |
phk |
Make read_random() take a (void *) argument instead of (char *)
|
35058 |
06-Apr-1998 |
phk |
Make a kernel version of the timer* functions called timerval* to be more consistent.
OK'ed by: bde
|
35029 |
04-Apr-1998 |
phk |
Time changes mark 2:
* Figure out UTC relative to boottime. Four new functions provide time relative to boottime.
* move "runtime" into struct proc. This helps fix the calcru() problem in SMP.
* kill mono_time.
* add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!)
* nanosleep, select & poll takes long sleeps one day at a time
Reviewed by: bde Tested by: ache and others
|
34990 |
01-Apr-1998 |
tegge |
Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is an ISA/EISA interrupt according to the mp table.
- Attempt to handle multiple IO APIC pins connected to the same PCI or ISA/EISA interrupt source. Print a warning if this happens, since performance is suboptimal. This workaround is only used for PCI devices.
With these two workarounds, the -SMP kernel is capable of running on my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
|
34989 |
01-Apr-1998 |
tegge |
Declare some variables modified by interrupt handlers as volatile.
|
34840 |
23-Mar-1998 |
jlemon |
Add the ability to make real-mode BIOS calls from the kernel. Currently, everything is contained inside #ifdef VM86, so this option must be present in the config file to use this functionality.
Thanks to Tor Egge, these changes should work on SMP machines. However, it may not be throughly SMP-safe.
Currently, the only BIOS calls made are memory-sizing routines at bootup, these replace reading the RTC values.
|
34832 |
23-Mar-1998 |
peter |
Several changes: - Implement proper EISA probing. - Better support for the new transputer based host cards. - use standard termios settings, one can use the intial/lock devices. - use a simple bcopy since some cards/systems apparently don't support 32 bit accesses. - hard reset and halt host card CPU prior to download in case of a soft restart. - recognize new remote module types (ASIC vs. CD1400 based) - a number of cosmetic changes (my fault, not Nick's)
Submitted by: Nick Sayer <nsayer@quack.kfu.com>
|
34736 |
21-Mar-1998 |
peter |
merge from 2.2
|
34206 |
07-Mar-1998 |
dyson |
This mega-commit is meant to fix numerous interrelated problems. There has been some bitrot and incorrect assumptions in the vfs_bio code. These problems have manifest themselves worse on NFS type filesystems, but can still affect local filesystems under certain circumstances. Most of the problems have involved mmap consistancy, and as a side-effect broke the vfs.ioopt code. This code might have been committed seperately, but almost everything is interrelated.
1) Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that are fully valid. 2) Rather than deactivating erroneously read initial (header) pages in kern_exec, we now free them. 3) Fix the rundown of non-VMIO buffers that are in an inconsistent (missing vp) state. 4) Fix the disassociation of pages from buffers in brelse. The previous code had rotted and was faulty in a couple of important circumstances. 5) Remove a gratuitious buffer wakeup in vfs_vmio_release. 6) Remove a crufty and currently unused cluster mechanism for VBLK files in vfs_bio_awrite. When the code is functional, I'll add back a cleaner version. 7) The page busy count wakeups assocated with the buffer cache usage were incorrectly cleaned up in a previous commit by me. Revert to the original, correct version, but with a cleaner implementation. 8) The cluster read code now tries to keep data associated with buffers more aggressively (without breaking the heuristics) when it is presumed that the read data (buffers) will be soon needed. 9) Change to filesystem lockmgr locks so that they use LK_NOPAUSE. The delay loop waiting is not useful for filesystem locks, due to the length of the time intervals. 10) Correct and clean-up spec_getpages. 11) Implement a fully functional nfs_getpages, nfs_putpages. 12) Fix nfs_write so that modifications are coherent with the NFS data on the server disk (at least as well as NFS seems to allow.) 13) Properly support MS_INVALIDATE on NFS. 14) Properly pass down MS_INVALIDATE to lower levels of the VM code from vm_map_clean. 15) Better support the notion of pages being busy but valid, so that fewer in-transit waits occur. (use p->busy more for pageouts instead of PG_BUSY.) Since the page is fully valid, it is still usable for reads. 16) It is possible (in error) for cached pages to be busy. Make the page allocation code handle that case correctly. (It should probably be a printf or panic, but I want the system to handle coding errors robustly. I'll probably add a printf.) 17) Correct the design and usage of vm_page_sleep. It didn't handle consistancy problems very well, so make the design a little less lofty. After vm_page_sleep, if it ever blocked, it is still important to relookup the page (if the object generation count changed), and verify it's status (always.) 18) In vm_pageout.c, vm_pageout_clean had rotted, so clean that up. 19) Push the page busy for writes and VM_PROT_READ into vm_pageout_flush. 20) Fix vm_pager_put_pages and it's descendents to support an int flag instead of a boolean, so that we can pass down the invalidate bit.
|
34203 |
07-Mar-1998 |
tegge |
Reenable redirection of clock interrupt to a higher priority vector. setidt() now knows about f00f_hack(), and the APs now use the same interrupt descriptor table as the BSP.
|
34197 |
07-Mar-1998 |
tegge |
The APs now reload the interrupt descriptor table pointer after f00f_hack has run.
Use the global r_idt descriptor in f00f_hack when in SMP mode, so the APs find the relocated interrupt descriptor table.
Submitted by: Partially from David A Adkins <adkin003@tc.umn.edu>
|
34058 |
05-Mar-1998 |
tegge |
Remove special handling for resuming clock interrupt when using APIC_IO. The `generic' vector stubs do the right thing.
|
34034 |
04-Mar-1998 |
tegge |
Disable redirection of clock interrupt to a higher priority vector. This does not work on most dual Pentium machines, due to setidt() being neutralized by f00f_hack().
|
34031 |
04-Mar-1998 |
kato |
Defined CCR6 and CCR7 (configuration registers of M2 CPU.)
|
34027 |
04-Mar-1998 |
peter |
Fix recent breakage when compiling under elf. _Xforward_irq -> Xforward_irq _apic_isrbit_location -> apic_isrbit_location _cpu_num_to_apic_id -> cpu_num_to_apic_id _invltlb_ok -> invltlb_ok
|
34021 |
03-Mar-1998 |
tegge |
When entering the apic version of slow interrupt handler, level interrupts are masked, and EOI is sent iff the corresponding ISR bit is set in the local apic. If the CPU cannot obtain the interrupt service lock (currently the global kernel lock) the interrupt is forwarded to the CPU holding that lock.
Clock interrupts now have higher priority than other slow interrupts.
|
34020 |
03-Mar-1998 |
tegge |
Forward the signal if the process runs on a different CPU. This reduces the signal handling latency for cpu-bound processes that performs very few system calls.
The IPI for forcing an additional software trap is no longer dependent upon BETTER_CLOCK being defined.
|
34019 |
03-Mar-1998 |
tegge |
Reduce timeout before assuming that forwarding of hardclock or softclock failed. Don't complain on forwarding failure, unless BETTER_CLOCK_DIAGNOSTIC is defined.
|
34017 |
03-Mar-1998 |
tegge |
forward_statclock and forward_hardclock are located in mp_machdep.c.
|
33936 |
01-Mar-1998 |
dyson |
1) Use a more consistent page wait methodology. 2) Do not unnecessarily force page blocking when paging pages out. 3) Further improve swap pager performance and correctness, including fixing the paging in progress deadlock (except in severe I/O error conditions.) 4) Enable vfs_ioopt=1 as a default. 5) Fix and enable the page prezeroing in SMP mode.
All in all, SMP systems especially should show a significant improvement in "snappyness."
|
33850 |
26-Feb-1998 |
ahasty |
Radio support for bt848 cards from Flemming Jacobsen <fj@trw.nl>
Amancio
|
33817 |
25-Feb-1998 |
dyson |
Fix page prezeroing for SMP, and fix some potential paging-in-progress hangs. The paging-in-progress diagnosis was a result of Tor Egge's excellent detective work. Submitted by: Partially from Tor Egge.
|
33809 |
25-Feb-1998 |
bde |
Removed vestiges of previous microtime() implementation.
|
33757 |
23-Feb-1998 |
dyson |
Try to dynamically size the VM_KMEM_SIZE (but is still able to be overridden in a way identically as before.) I had problems with the system properly handling the number of vnodes when there is alot of system memory, and the default VM_KMEM_SIZE. Two new options "VM_KMEM_SIZE_SCALE" and "VM_KMEM_SIZE_MAX" have been added to support better auto-sizing for systems with greater than 128MB.
Add some accouting for vm_zone memory allocations, and provide properly for vm_zone allocations out of the kmem_map. Also move the vm_zone allocation stats to the VM OID tree from the KERN OID tree.
|
33690 |
20-Feb-1998 |
phk |
Replace TOD clock code with more systematic approach.
Highlights: * Simple model for underlying hardware. * Hardware basis for timekeeping can be changed on the fly. * Only one hardware clock responsible for TOD keeping. * Provides a real nanotime() function. * Time granularity: .232E-18 seconds. * Frequency granularity: .238E-12 s/s * Frequency adjustment is continuous in time. * Less overhead for frequency adjustment. * Improves xntpd performance.
Reviewed by: bde, bde, bde
|
33568 |
18-Feb-1998 |
msmith |
Remove the 'qcam' driver. Development has ceased, and the driver is nonfunctional. Submitted by: pst (conversation some time ago)
|
33530 |
18-Feb-1998 |
scrappy |
soundcard.h wasn't upgraded when i386/isa/snd was
|
33473 |
17-Feb-1998 |
scrappy |
Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th version as soon as I've tested it...
Installed/tested on my home machine...any problems, please report directly to me.
|
33453 |
17-Feb-1998 |
kato |
Enable NEC 86 sound card when PC98 is defined.
Submitted by: Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
|
33395 |
15-Feb-1998 |
peter |
Update to support SI/XIO PCI host cards (Z280 based) and the enhanced SXISA and SXPCI host cards (Transputer based).
PR: 4836, 5021, 5654 Submitted by: Nick Sayer <nick@specialix.com>
|
33279 |
12-Feb-1998 |
phk |
Add display of type KD_PIXEL.
|
33181 |
09-Feb-1998 |
eivind |
Staticize.
|
33109 |
05-Feb-1998 |
dyson |
1) Start using a cleaner and more consistant page allocator instead of the various ad-hoc schemes. 2) When bringing in UPAGES, the pmap code needs to do another vm_page_lookup. 3) When appropriate, set the PG_A or PG_M bits a-priori to both avoid some processor errata, and to minimize redundant processor updating of page tables. 4) Modify pmap_protect so that it can only remove permissions (as it originally supported.) The additional capability is not needed. 5) Streamline read-only to read-write page mappings. 6) For pmap_copy_page, don't enable write mapping for source page. 7) Correct and clean-up pmap_incore. 8) Cluster initial kern_exec pagin. 9) Removal of some minor lint from kern_malloc. 10) Correct some ioopt code. 11) Remove some dead code from the MI swapout routine. 12) Correct vm_object_deallocate (to remove backing_object ref.) 13) Fix dead object handling, that had problems under heavy memory load. 14) Add minor vm_page_lookup improvements. 15) Some pages are not in objects, and make sure that the vm_page.c can properly support such pages. 16) Add some more page deficit handling. 17) Some minor code readability improvements.
|
33051 |
03-Feb-1998 |
bde |
Ifdefed some SMP and VM86 code. Note that although VM86 is not a global option, the ifdef on it in a header works because only the name of the VM86 extension is hidden.
|
33049 |
03-Feb-1998 |
bde |
Forward declare a union so that this file is self-sufficient.
Cleaned up ifdefs.
|
33048 |
03-Feb-1998 |
bde |
Fixed a gratuitous ANSIism.
|
33047 |
03-Feb-1998 |
bde |
Ifdefed use of a GNU feature.
|
33046 |
03-Feb-1998 |
bde |
Moved misplaced idempotency ifdef. Multiple inclusion was fatal since there was a typedef outside the ifdef.
Fixed syntax error after the #endif for this ifdef.
Didn't fix the usual style bugs for this ifdef...
|
33044 |
03-Feb-1998 |
bde |
Changed `inline' to `__inline' so that this file can be compiled by `gcc -ansi'.
Changed NULL to 0 so that this file is more self-sufficient (now only <sys/types.h> is a prerequisite).
|
33043 |
03-Feb-1998 |
bde |
Don't declare prototypes for driver functions unless KERNEL is defined.
|
33042 |
03-Feb-1998 |
bde |
Fixed conflicts between <machine/console.h> and <machine/pcvt_ioctl.h>, so that it is possible for kdump and truss to include them both. Use #defines from pcvt_ioctl.h in conflicting cases, since pcvt_ioctl.h gives a hint about the bogus third arg to _IO(). Ifdef the common typedefs. Export `struct key_t' from pcvt_ioctl.h so pcvt_ioctl.h is bug for bug compatible with console.h (now both are broken in C++ mode).
|
33025 |
02-Feb-1998 |
ahasty |
Bugs/Enhancements:
1. Takeshi Ohashi <ohashi@atohasi.mickey.ai.kyutech.ac.jp> submitted code to support bktr_read . /usr/src/share/examples/rgb24.c now works 8)
2. Flemming Jacobsen <fj@schizo.dk.tfs.com> submitted code to support radio available with in some bt848 based cards;additionally, wrote code to correctly recognized his bt848 card. 3. Roger Hardiman <roger@cs.strath.ac.uk> submitted various fixes to smooth out the microcode and made all modes consistent.
4. Added supported for yuv12 so we know can capture raw streams and feed it to mpeg_encoder . The upshot is that we can now mpeg encode more and save nearly 100 percent of the disk requirements previously for programs such as fxtv first save the raw video image to disk then converted to a format suitable for mpeg_encode.
|
33008 |
01-Feb-1998 |
bde |
Fixed disordering of busdma* and swi_vm.
|
33007 |
01-Feb-1998 |
bde |
Fixed a recently broken comment.
|
33004 |
01-Feb-1998 |
bde |
Use <machine/*.h> instead of <i386/include/*.h>.
|
32797 |
26-Jan-1998 |
peter |
re-sort back into order
|
32796 |
26-Jan-1998 |
peter |
Add missing definition for swi_vm
|
32781 |
25-Jan-1998 |
kato |
Undo previous commit. The cpuid symbol has been already used by SMP stuff.
Pointed-out by: Manfred Antar <root@mantar.slip.netcom.com>
|
32772 |
25-Jan-1998 |
kato |
Added cpuid instruction.
|
32724 |
24-Jan-1998 |
dyson |
Add better support for larger I/O clusters, including larger physical I/O. The support is not mature yet, and some of the underlying implementation needs help. However, support does exist for IDE devices now.
|
32677 |
21-Jan-1998 |
gibbs |
Add prototypes for swi_vm, setsoftvm, schedsoftvm, and splsoftvm that were missed when I originally committed the bus dma code.
|
32641 |
20-Jan-1998 |
jb |
Suggested by: bde Move sigjmp_buf and jmp_buf structure definitions to machine/setjmp.h so that i386 can continue to use int as the basic register type and alpha can use long. Bruce was concerned about possible differing alignment. I've left the definition of _JBLEN in machine/setjmp.h even though Bruce's example used the number directly. I don't know if any other code relies on _JBLEN, so I left it to avoid potential breakage.
|
32517 |
15-Jan-1998 |
gibbs |
Implementation of Bus Space for FreeBSD-x86.
Obtained From: NetBSD
|
32411 |
10-Jan-1998 |
jb |
Add a machine dependent header for the i386 jmp_buf size instead of piling machine dependent definitions into src/include/setjmp.h.
|
32348 |
08-Jan-1998 |
jmg |
update the AWE32 wave table driver to Iwai's 0.4.2c version. This also includes the patches to make it work under -current from Randall Hopper.
Remove the old AWE driver.
|
32327 |
08-Jan-1998 |
alex |
Define integer types added by POSIX.1g. We already had int8_t, int16_t, and int32_t -- this adds their unsigned counterparts uint8_t, uint16_t, and uint32_t. Bruce has noted that C9x also defines these types (in a different file), so this may have to be revisited with some ifdefs at a later date.
Reviewed by: bde
|
32315 |
07-Jan-1998 |
yokota |
Added accent (dead) key support to syscons and kbdcontrol.
With a keymap with accent key definitions loaded to syscons, you press an accent key followed by a regular letter key to produce an accented letter. Press an accent key followed by the space bar to get the accent letter itself.
Code is based on the ideas and work by jmrueda@diatel.upm.es and totii@est.is.
PR: i386/4016
console.h - Defined structures and constants for accent (dead) keys.
syscons.c, kbdtables.h - When an accent key is pressed, set the corresponding index to `accents'. If the next key is the space key, produce the accent char itself. Otherwise search the accent key map entry, indexed by `accents', for a matching pair of a regular char and an accented char. - Added ioctl functions to set and get the accent key map (PIO_DEADKEYMAP and GIO_DEADKEYMAP).
|
32151 |
01-Jan-1998 |
bde |
Moved the SMP declarations of INTREN() and INTRDIS() to the correct header, i.e., the same header as corresponding non-SMP #defines.
|
32065 |
28-Dec-1997 |
steve |
Add back a #include <sys/types.h> so that this header is self-sufficient again. This is a quick fix that should really be remedied by removing all of the gratuitous changes made in revision 1.20.
PR: 5351
|
32054 |
28-Dec-1997 |
phk |
More cleanup relating to our use of the TSC. Look in the cpu_feature (CPUID output) to see if we have it.
|
32052 |
28-Dec-1997 |
phk |
wash, sort and put in order various nits from the i586_ctr -> tsc commit.
Pointed out by: bde
|
32005 |
26-Dec-1997 |
phk |
Rename "i586_ctr" to "tsc" (both upper and lower case instances). Fix a couple of printfs too.
Warning: This changes the names of a couple of kernel options!
|
31831 |
18-Dec-1997 |
peter |
Add missing references to Xcpuast, get_isrlock and checkstate_probed_cpus
|
31723 |
15-Dec-1997 |
tegge |
Add support for low resolution SMP kernel profiling.
- A nonprofiling version of s_lock (called s_lock_np) is used by mcount.
- When profiling is active, more registers are clobbered in seemingly simple assembly routines. This means that some callers needed to save/restore extra registers.
- The stack pointer must have space for a 'fake' return address in idle, to avoid stack underflow.
|
31720 |
15-Dec-1997 |
tegge |
Don't forward hardclock or statclock to stopped cpus. Disable forwarding when a panic has occured.
|
31709 |
14-Dec-1997 |
dyson |
After one of my analysis passes to evaluate methods for SMP TLB mgmt, I noticed some major enhancements available for UP situations. The number of UP TLB flushes is decreased much more than significantly with these changes. Since a TLB flush appears to cost minimally approx 80 cycles, this is a "nice" enhancement, equiv to eliminating between 40 and 160 instructions per TLB flush.
Changes include making sure that kernel threads all use the same PTD, and eliminate unneeded PTD switches at context switch time.
|
31689 |
12-Dec-1997 |
tegge |
Add needed #include.
Problem found by: Bruce Evans <bde@zeta.org.au>
|
31639 |
08-Dec-1997 |
fsmp |
The improvements to clock statistics by Tor Egge Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)
Reviewed by: smp@csn.net Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
|
31603 |
07-Dec-1997 |
yokota |
- Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll, Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice and enable their extra features so that their additional buttons and wheel/roller are recognized. The name of the detected model will be printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and `sysmouse' drivers so that the userland program (such as the X server) can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the mouse drivers and the moused daemon. The Z axis movement may be mapped to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format, MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement and up to 10 buttons.
/sys/i386/include/mouse.h - Added some fields to `mousestatus_t' to store Z axis movement and flag bits. - Added the field `model' to `mousehw_t' to store mouse model code. Defined model codes. - Extended `mousemode_t'. - Added new protocols and some constants for them. - Added new ioctl functions and structures. - Removed obsolete ioctl definitions.
/sys/i386/include/console.h - Added `dz' field to the structure `mouse_data' to pass Z axis movement to `syscons/sysmouse'. - Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits defined in `mouse.h' instead.
/sys/i386/isa/psm.c - Added a set of functions to detect various mice which have additional features (wheel and buttons) unavailable in the standard PS/2 mouse. - Refined existing ioctl functions and added new ones. Most important of all is MOUSE_SETLEVEL which manipulates the output level of the driver. While the output level remains zero, the output from the `psm' driver is in the standard PS/2 mouse format (three bytes long). When the level is set to one, the `psm' driver will send data in the extended format. At the level two the driver uses the format which is native to the connected mouse is used. (Meaning that the output from the device is passed to the caller as is, unmodified.) The `psm' driver will pass such extended data format as is to the caller if the output level is two, but emulates the standard format if the output level is zero. - Added kernel configuration flags to set initial resolution (PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL). - Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION. Acceleration ratio is now specified by the kernel configuration flags stated above. Sync check logic is refined and now standard. The sync check can be turned off by the new kernel configuration flags PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use. - Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c - Created mseioctl() to deal with ioctl functions MOUSE_XXXX. Most importantly, the MOUSE_SETLEVEL ioctl will change the output format from the 5 byte format to the new, extended format so that the caller can take advantage of Z axis movement and additional buttons. - Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c - Changed scioctl() to reflect the new `console.h' and some of the new ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL ioctl will change the `sysmouse' output format from the MouseSystems 5 byte format to the new, extended format so that the caller can take advantage of Z axis movement and additional buttons. - Added support for double/triple click actions of the left button and single click action of the right button in the virtual console. The left button double click will select a word under the mouse pointer. The triple click will select a line and the single click of the right button will extend the selected region to the current position of the mouse pointer. This will make the cut/paste support more compatible with xterm.
/sys/i386/isa/kbdio.h - Added PSM_INTELLI_ID.
|
31321 |
20-Nov-1997 |
bde |
Moved some extern declarations to header files (unused ones to /dev/null).
|
31319 |
20-Nov-1997 |
bde |
Avoid passing some more `retval's.
|
31186 |
16-Nov-1997 |
ahasty |
Reviewed by: Amancio Hasty Submitted by: Amancio Hasty <hasty@star-gate.com> Added yuv12 support for mpeg encoding and Randall Hopper's fixed for Temporal Decimation
|
31126 |
12-Nov-1997 |
jdp |
Expand the APMIO_GETINFO ioctl to return the estimated remaining battery time. For backward compatibility with old binaries, I assigned a new ioctl number for this call, and retained the old one as APMIO_GETINFO_OLD. I also added eight words of padding and a version field, so that future enhancements won't require jumping through this hoop again.
|
31030 |
07-Nov-1997 |
tegge |
Use UPAGES when setting up private pages for SMP (which includes idle stack).
|
30979 |
06-Nov-1997 |
markm |
Add the IOCTL for Luigi's BT848 -> I2C bus driver.
|
30866 |
31-Oct-1997 |
markm |
Upgrade the sound sources to Amancio Hasty's latest-and-greatest. This is based on Voxware 3.5, and corresponds to Amancio's `guspnp21'.
Bug reports to Amancio, please!
|
30813 |
28-Oct-1997 |
bde |
Removed unused #includes.
|
30805 |
28-Oct-1997 |
bde |
Don't include <machine/cputypes.h> or declare cputype/class interfaces in <machine/cpu.h>. Moved the declarations to <machine/cputypes.h>. Fixed style bugs in the moved code. Fixed everything that depended on the nested include. Don't include <machine/cpu.h> (in the changed files) unless something in it is used directly.
|
30789 |
27-Oct-1997 |
bde |
Moved declaration of etext from <machine/md_var.h> to <machine/cpu.h> and fixed everything that dependended on it being declared in the old place. It is used in "machine-independent" code in subr_prof.c.
Moved declaration of btext from subr_prof.c to <machine/cpu.h>. It is machine-dependent.
|
30755 |
27-Oct-1997 |
jkh |
Bump MAXDSIZ to 512MB so that soft limits have a chance to actually regulate this. Reviewed by: dyson
|
30572 |
19-Oct-1997 |
yokota |
Rename MOUSE_GETINFO to MOUSE_GETHWINFO. The name collided with the one in console.h. Pointed out by bde.
|
30343 |
12-Oct-1997 |
peter |
Try and fix some style problems
|
30274 |
10-Oct-1997 |
peter |
Don't #include unneeded includes here. pcb_ext.h picks up lots of other stuff with it.
|
30265 |
10-Oct-1997 |
peter |
Convert the VM86 option from a global option to an option only depended on by the files that use it. Changing the VM86 option now only causes a recompile of a dozen files or so rather than the entire kernel.
|
30193 |
07-Oct-1997 |
markm |
Latest round of patches from the author.
This driver includes the following patches submitted by:
1.0 Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp> Japanese Cable support
2.0 Keith Sklower <sklower@CS.Berkeley.EDU> Minor update to the BSDI section so it compiles cleanly on BSDI
3.0 Joao Carlos Mendes Luis <jonny@coppe.ufrj.br> ioctl interface to select video format , NTSC, PAL, etc...
|
30136 |
06-Oct-1997 |
dyson |
It is possible that MB's with really broken bios's not set up more of the mtrr registers. This just fills in more of the registers.
|
30112 |
05-Oct-1997 |
dyson |
Make sure that the memory type registers are the same for each CPU in a P6 SMP system. Some MB bios'es don't set the registers up correctly for the AP's. Additionally, set the memory between 0xa0000 and 0xbffff as write combining.
|
30043 |
01-Oct-1997 |
sos |
Add a new keyboard mode K_CODE. Returns a single byte for each key much like the scancode mode. However the keys that (for no good reason) returns extension codes etc, are translated into singlebyte codes. Needed by libvgl. This makes life ALOT easier, also the XFree86 folks could use this.
|
29956 |
29-Sep-1997 |
peter |
oops, I seem to have forgotten to commit this. redirect _cam_imask to cam_imask when compiling under elf.
|
29676 |
21-Sep-1997 |
gibbs |
ipl.h: Add CAM software/hardware interrupt support.
si.h: Update for changes in the callout interface.
|
29663 |
21-Sep-1997 |
peter |
Implement the parts needed for VM86 under SMP.
|
29655 |
21-Sep-1997 |
dyson |
Add support for more than 1 page of idle process stack on SMP systems.
|
29368 |
14-Sep-1997 |
peter |
Update select -> poll in drivers.
|
29330 |
13-Sep-1997 |
joerg |
Revert the logic behind my last change, and use a function called `is_physical_memory()' now for the decision whether to dump some region of memory or not.
Suggested by: davidg
|
29328 |
13-Sep-1997 |
peter |
Patch up some more undefined symbols when compiling under ELF.
|
29280 |
10-Sep-1997 |
joerg |
Do not ever try to coredump adapter memory regions.
PR: 4486 Submitted by: tegge@idi.ntnu.no (Tor Egge)
Implement a function is_adapter_memory() in order to determine what should nto be dumped at all. Currently, only populated with the ``ISA memory hole''. Adapter regions of other busses should be added.
|
29233 |
09-Sep-1997 |
markm |
Amancio's latest in the Brooktree driver. This fixes the european frequency set, separates this further from the Meteor driver and fixes bugs.
|
29215 |
08-Sep-1997 |
peter |
Add missing redirection for _inside_intr -> inside_intr
|
29214 |
07-Sep-1997 |
fsmp |
DISABLE LEVEL_3 lock pushdown, somethings seems to have broken!
|
29213 |
07-Sep-1997 |
fsmp |
General cleanup of the lock pushdown code. They are grouped and enabled from machine/smptests.h:
#define PUSHDOWN_LEVEL_1 #define PUSHDOWN_LEVEL_2 #define PUSHDOWN_LEVEL_3 #define PUSHDOWN_LEVEL_4_NOT
|
29127 |
05-Sep-1997 |
peter |
Add redirection for new _clock_lock symbol
|
29098 |
04-Sep-1997 |
kato |
Always defines macros for PC-98 display.
|
29000 |
01-Sep-1997 |
fsmp |
General cleanup of the sub-system locking macros. Eliminated the RECURSIVE_MPINTRLOCK. clock.c and microtime use clock_lock. sio.c and cy.c use com_lock.
Suggestions by: Bruce Evans <bde@zeta.org.au>
|
28999 |
01-Sep-1997 |
fsmp |
Cleanup.
|
28984 |
01-Sep-1997 |
bde |
Move closer to supporting VM86 under SMP.
LINT now compiles but doesn't link. Other link-time breakage for LINT is now visible (SMP is incompatible with SIMPLELOCK_DEBUG). Submitted by: jlemon
|
28973 |
31-Aug-1997 |
bde |
Put I*86_CPU options in opt_global.h and don't #include "opt_cpu.h" centrally.
|
28951 |
31-Aug-1997 |
fsmp |
Debug version of simple_lock. This will store the CPU id of the holding CPU along with the lock. When a CPU fails to get the lock it compares its own id to the holder id. If they are the same it panic()s, as simple locks are binary, and this would cause a deadlock.
Controlled by smptests.h: SL_DEBUG, ON by default.
Some minor cleanup.
|
28942 |
30-Aug-1997 |
peter |
Define some machine characteristics using symbol naming on conventions in place in the other BSD's.
|
28932 |
30-Aug-1997 |
peter |
Update to include recently added names that are shared between the C and asm parts of the kernel. This is to re-enable ELF compile support.
|
28921 |
30-Aug-1997 |
fsmp |
Another round of lock pushdown. Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel. UP kernel expects that this is enough to guarantee exclusive access to regions of code bracketed by these 2 functions. Add a simplelock to bracket clock accesses in clock.c: clock_lock.
Help from: Bruce Evans <bde@zeta.org.au>
|
28918 |
30-Aug-1997 |
kato |
Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.
Submitted by: Bruce Evans <bde@zeta.org.au>
|
28906 |
29-Aug-1997 |
fsmp |
Introduce FAST_HI option, ON by default.
This options allows a CPU that is blocked spinning for the giant lock to process FAST_INTR() ISRs, eg. siointr().
|
28889 |
29-Aug-1997 |
kato |
Fix typo in the comment introduced by me.
|
28885 |
29-Aug-1997 |
kato |
Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc" on IBM-PC box and is "pc-98" on NEC PC-98 box. Userland program can distinguish architecture on which the program runs.
|
28872 |
28-Aug-1997 |
jlemon |
Remove the vm86 support as an LKM, and link it directly into the kernel if 'options "VM86"' is in the config file. The LKM was really for development, and has probably outlived its usefulness.
|
28861 |
28-Aug-1997 |
kato |
Moved include files which are independent of bs driver.
|
28809 |
26-Aug-1997 |
peter |
Correct some things I forgot about until it was too late with smp_active. smp_active = 1 used to indicate that the system had frozen previously started AP's, while smp_active = 0 was "AP's not yet started". I have split this into smp_started (which is set when the AP's come online), and smp_active is left for turning on/off AP scheduling.
|
28808 |
26-Aug-1997 |
peter |
Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been revived (cpu's halt now with nothing to do). - Some preliminary support for running some operations outside the global lock (eg: zeroing "free but not yet zeroed pages") is present but appears to cause problems. Off by default. - the smp_active sysctl now behaves differently. It's merely a 'true/false' option. Setting smp_active to zero causes the AP's to halt in the idle loop and stop scheduling processes. - bootstrap is a lot safer. Instead of sharing a statically compiled in stack a number of times (which has caused lots of problems) and then abandoning it, we use the idle context to boot the AP's directly. This should help >2 cpu support since the bootlock stuff was in doubt. - print physical apic id in traps.. helps identify private pages getting out of sync. (You don't want to know how much hair I tore out with this!)
More cleanup to follow, this is more of a checkpoint than a 'finished' thing.
|
28743 |
25-Aug-1997 |
bde |
Removed a bogus comment.
|
28669 |
24-Aug-1997 |
fsmp |
A clean fix for the spl "deadlock before smp_active" problem.
Added a new variable, 'bsp_apic_ready', which is set as soon as the bootstrap CPU has initialized its local APIC. Conditionalize the GENSPLR functions to call ss_lock ONLY after bsp_apic_ready is TRUE; This should prevent any problems with races between the time the 1st AP becomes ready and the time smp_active is set.
|
28641 |
24-Aug-1997 |
fsmp |
The last of the encapsolation of cpl/spl/ipending things into a critical region protected by the simplelock 'cpl_lock'.
Notes:
- this code is currently controlled on a section by section basis with defines in machine/param.h. All sections are currently enabled.
- this code is not as clean as I would like, but that can wait till later.
- the "giant lock" still surrounds most instances of this "cpl region". I still have to do the code that arbitrates setting cpl between the top and bottom halves of the kernel.
- the possibility of deadlock exists, I am committing the code at this point so as to exercise it and detect any such cases B4 the "giant lock" is removed.
|
28496 |
21-Aug-1997 |
charnier |
Revert my previous commit about using CS_SECURE macro. Requested by: Bruce.
|
28491 |
21-Aug-1997 |
fsmp |
Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h.
|
28489 |
21-Aug-1997 |
fsmp |
Oops, this should have been in last commit.
Adds variable cil: current INTerrupt level. This is part of the new MP-safe spl algorithm.
|
28487 |
21-Aug-1997 |
fsmp |
Made PEND_INTS default. Made NEW_STRATEGY default. Removed misc. old cruft.
Centralized simple locks into mp_machdep.c Centralized simple lock macros into param.h
More cleanup in the direction of making splxx()/cpl MP-safe.
|
28460 |
20-Aug-1997 |
jlemon |
Add forward declaration for struct proc.
|
28442 |
20-Aug-1997 |
fsmp |
Preperation for moving cpl into critical region access. Several new fine-grained locks. New FAST_INTR() methods: - separate simplelock for FAST_INTR, no more giant lock. - FAST_INTR()s no longer checks ipending on way out of ISR. sio made MP-safe (I hope).
|
28441 |
20-Aug-1997 |
fsmp |
Preperation for moving cpl into critical region access. Several new fine-grained locks. Control of new FAST_INTR() methods.
|
28359 |
18-Aug-1997 |
charnier |
Use CS_SECURE macro. Reviewed by: John Dyson
|
28354 |
18-Aug-1997 |
fsmp |
Turn on the lockmanager by default for SMP.
Reviewed by: "John S. Dyson" <toor@dyson.iquest.net>
|
28352 |
18-Aug-1997 |
fsmp |
Removed volatile from arg to simple_lock & friends.
|
28270 |
16-Aug-1997 |
wollman |
Fix all areas of the system (or at least all those in LINT) to avoid storing socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
|
28231 |
15-Aug-1997 |
fsmp |
The promised "better fix" for "Trap 9 When Boot SMP" problem. We now tsleep() in kthread_init() between start_init() and prepare_usermode() while waiting for ALL the idle_loop() processes to come online.
Debugged & tested by: "Thomas D. Dean" <tomdean@ix.netcom.com>
Reviewed by: David Greenman <dg@root.com>
|
28041 |
10-Aug-1997 |
fsmp |
Cheap fix for kern/4255. If the problem is seen this fix suggests a compile-time work-around then panics.
|
28027 |
09-Aug-1997 |
fsmp |
Some fixes towards making "default configs" work again. Still not fixed, no idea why.
Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
|
28009 |
09-Aug-1997 |
dyson |
A couple of missing doscmd header files. Messed up again. Now can compile the kernel!!! Submitted by: Jonathan Lemon <jlemon@americantv.com>
|
27993 |
09-Aug-1997 |
dyson |
VM86 kernel support. Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>, Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>, and probably alot of others. Submitted by: Jnathan Lemon <jlemon@americantv.com>
|
27990 |
08-Aug-1997 |
sos |
Yeah I'm back hacking syscons !!
Add support for MODEX 320x240x256color with "unchained" adressing, giving access to all 256K on all VGA's, those with that much memory that is :)
Also make sysmouse use the right resolution in graphics modes.
|
27950 |
07-Aug-1997 |
dyson |
Fix the DDB breakpoint code when using the 4MB page support.
|
27902 |
05-Aug-1997 |
dyson |
Remove the PMAP_PVLIST conditionals in pmap.*, and another unneeded define.
|
27896 |
04-Aug-1997 |
fsmp |
pushed down "volatility" of simplelock to actual int inside the struct.
Submitted by: bde@zeta.org.a
|
27893 |
04-Aug-1997 |
fsmp |
Eliminate frequent silo overflows by restoring the TEST_LOPRIO code. This code was eliminated when the PEND_INTS algorithm was added. But it was discovered that PEND_INTS only worsen latency for FAST_INTR() routines, which can't be marked pending.
Noticed & debugged by: dave adkins <adkin003@gold.tc.umn.edu>
|
27873 |
04-Aug-1997 |
msmith |
Nuke the nonexistend pad bytes from the end of the DMI header structure.
|
27822 |
01-Aug-1997 |
msmith |
Support for PC BIOS functions.
|
27816 |
01-Aug-1997 |
msmith |
New defines for the Wavelan (wl) driver. Submitted by: Jim Binkley <jrb@cs.pdx.edu>
|
27808 |
31-Jul-1997 |
fsmp |
Fixed imen declaration.
Submitted by: Bruce Evans <bde@zeta.org.au>
|
27789 |
31-Jul-1997 |
phk |
Add support for booting in VESA 0x102 videomode. Corresponding patches to syscons are being reviewed by sos.
|
27780 |
31-Jul-1997 |
fsmp |
Converted the TEST_LOPRIO code to default. Created mplock functions that save/restore NO registers. Minor cleanup.
|
27778 |
31-Jul-1997 |
fsmp |
Converted the TEST_LOPRIO code to default.
|
27728 |
28-Jul-1997 |
fsmp |
Modified the PEND_INTS algorithm to fix the ISA INT loss problem.
Noticed by: dave adkins <adkin003@gold.tc.umn.edu> and others.
|
27705 |
26-Jul-1997 |
fsmp |
Comment out PEND_INTS for now, it breaks ISA INTs.
Reported by: dave adkins <adkin003@gold.tc.umn.edu>
|
27697 |
26-Jul-1997 |
fsmp |
mpapic.c & mp_machdep: - removed TEST_ALTTIMER. - removed APIC_PIN0_TIMER. - removed TIMER_ALL.
mplock.s: - minor update of try_mplock for new algorithm where a CPU uses try_mplock instead of get_mplock in the ISRs.
|
27695 |
26-Jul-1997 |
fsmp |
Removed "options SMP_TIMER_NC". Removed TEST_ALTTIMER. Removed APIC_PIN0_TIMER. Removed TIMER_ALL.
|
27663 |
24-Jul-1997 |
fsmp |
param.h: Macros to convert the Lite2 lock manager primitives to the names used in the kernel proper. This allows us to hide them from the lock manager till they can be turned on. smp.h: declarations for the new simplelock functions.
|
27634 |
23-Jul-1997 |
fsmp |
New simple_lock code in asm: - s_lock_init() - s_lock() - s_lock_try() - s_unlock()
Created lock for IO APIC and apic_imen (SMP version of imen) - imen_lock
Code to use imen_lock for access from apic_ipl.s and apic_vector.s. Moved this code *outside* of mp_lock.
It seems to work!!!
|
27633 |
23-Jul-1997 |
fsmp |
Forced 32bit alignment of struct simple_lock in param.h.
Added declarations of new simple_lock data and functions to smp.h.
|
27619 |
23-Jul-1997 |
fsmp |
Coded simple_lock and friends in asm.
|
27617 |
22-Jul-1997 |
fsmp |
Added a missing semicolon, compile failed when I turned on simple_lock(). Evidently this has never been compiled before, NOT a good sign...
|
27616 |
22-Jul-1997 |
fsmp |
Last commit didn't take, operator error???
|
27591 |
21-Jul-1997 |
fsmp |
Enabled the FPU emilaute bit define: CR0_EM
Reviewed by: Bruce Evans <bde@zeta.org.au>
|
27563 |
20-Jul-1997 |
fsmp |
Developed a new strategy for handling the 8254/8259/APIC issue.
|
27562 |
20-Jul-1997 |
fsmp |
Developed a new strategy for handling the 8254/8259/APIC issue. Enabled (by default) with "#define NEW_STRATEGY".
|
27561 |
20-Jul-1997 |
fsmp |
Minor cleanup. Pass string arg to apic_dump. Moved bootverbose printing of SMP enabled INTs from clock.c to autoconf.c
|
27559 |
20-Jul-1997 |
fsmp |
Pass string arg to apic_dump.
|
27542 |
20-Jul-1997 |
bde |
Removed unused #includes and a stale forward declaration.
|
27540 |
20-Jul-1997 |
bde |
Hide definitions that depend on the APIC_IO option from LKMs so that LKMs break properly if they use these definitions.
Use '#ifdef notyet' instead of '#if 0' to hide temporarily misplaced declarations.
|
27539 |
20-Jul-1997 |
bde |
Fixed pedantic ANSI C errors: - don't put a comma after the last element in enum declarations. - don't declare static objects as extern.
|
27535 |
20-Jul-1997 |
bde |
Removed unused #includes.
|
27523 |
19-Jul-1997 |
fsmp |
Added code to support #define APIC_PIN0_TIMER. This code ALWAYS runs the 8254 timer thru the 8259 ICU. It depricates the usage of "options SMP_TIMER_NC" in the config file.
|
27521 |
19-Jul-1997 |
fsmp |
Added #define APIC_PIN0_TIMER. This define enables the code to ALWAYS run the 8254 timer thru the 8259 ICU. It is ON by default. It depricates the usage of "options SMP_TIMER_NC" in the config file.
|
27519 |
19-Jul-1997 |
fsmp |
Increased NIDT to 256 for case of SMP or APIC_IO.
|
27517 |
18-Jul-1997 |
fsmp |
Split TEST_CPUSTOP code into CPUSTOP_ON_DDBBREAK and mainline code.
|
27489 |
18-Jul-1997 |
fsmp |
printf cleanup.
|
27484 |
17-Jul-1997 |
dyson |
Hopefully fix a few problems that could cause hangs in SMP mode. 1) Make sure that the region mapped by a 4MB page is properly aligned. 2) Don't turn on the PG_G flag in locore for SMP. I plan to do that later in startup anyway. 3) Make sure the 2nd processor has PSE enabled, so that 4MB pages don't hose it.
We don't use PG_G yet on SMP -- there is work to be done to make that work correctly. It isn't that important anyway...
|
27464 |
17-Jul-1997 |
dyson |
Add support for 4MB pages. This includes the .text, .data, .data parts of the kernel, and also most of the dynamic parts of the kernel. Additionally, 4MB pages will be allocated for display buffers as appropriate (only.)
The 4MB support for SMP isn't complete, but doesn't interfere with operation either.
|
27463 |
17-Jul-1997 |
fsmp |
Turned OFF DEBUG_CPUSTOP as the default. This was necessary as kernels without DDB failed to link for lack of db_printf().
|
27410 |
15-Jul-1997 |
fsmp |
Removed a stale "FIXME:".
|
27408 |
15-Jul-1997 |
fsmp |
Cleanup.
|
27405 |
15-Jul-1997 |
fsmp |
New defines to eliminate "magic numbers" in various places.
|
27353 |
13-Jul-1997 |
fsmp |
new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu this code is controlled by smptests.h: TEST_CPUSTOP, OFF by default
new code for handling mixed-mode 8259/APIC programming without 'ExtInt' this code is controlled by smptests.h: TEST_ALTTIMER, ON by default
|
27351 |
13-Jul-1997 |
fsmp |
Many new test defines, including: - TEST_CPUSTOP adds stop_cpus()/restart_cpus(), OFF by default - TEST_ALTTIMER new method for attaching 8259 PIC to APIC this method avoids 'ExtInt' programming, ON by default - TIMER_ALL sends 8259/8254 timer INTs to all CPUs, ON by default - ASMPOSTCODExxx code to display bytes to POST hardware, OFF by default
|
27289 |
08-Jul-1997 |
fsmp |
General cleanup of APIC code. stop_cpus()/restart_cpus() STILL not working!
|
27285 |
08-Jul-1997 |
fsmp |
General cleanup of APIC code. stop_cpus/restart_cpus STILL not working!
|
27255 |
07-Jul-1997 |
fsmp |
stop_cpus(), currently BROKEN! (turned off in smptests.h by default). restart_cpus(), currently BROKEN! (turned off in smptests.h by default).
|
27252 |
06-Jul-1997 |
fsmp |
Additional debugging functions and macros. "spurious INTerrupt" support.
|
27005 |
27-Jun-1997 |
fsmp |
Added POST code output to various points of the startup code.
General cleanup.
New functions to stop/start CPUs via IPIs:
- int stop_cpus( u_int map ); - int restart_cpus( u_int map );
Turned off by default, enabled via smptests.h:TEST_CPUSTOP. Current version has a BUG, perhaps a deadlock?
|
27002 |
27-Jun-1997 |
fsmp |
Preliminaries for stop_cpus()/restart_cpus(). Both are turned off by default.
Added macro for displaying POST codes from kernel.
|
27001 |
27-Jun-1997 |
fsmp |
Program lint1 to handle NMIs.
Till now NMIs would be ignored. Now an NMI is caught by the BSP. APs still ignore NMI, am working on code to allow a CPU to stop other CPUs via an IPI.
|
27000 |
27-Jun-1997 |
fsmp |
Added fields to the LVT1/2 group.
|
26950 |
25-Jun-1997 |
fsmp |
Merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask() - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin() - get_pci_apic_irq() -> pci_apic_pin()
|
26948 |
25-Jun-1997 |
fsmp |
Modified to declare merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask() - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin() - get_pci_apic_irq() -> pci_apic_pin()
|
26945 |
25-Jun-1997 |
tegge |
Allow the kernel configuration file to override the amount of memory available to the kernel (VM_KMEM_SIZE). The default (32 MB) is too low when having 512 MB or more physical memory in a server environment. This is relevant on systems where "panic: kmem_malloc: kmem_map too small" is a problem.
|
26896 |
24-Jun-1997 |
tegge |
Ensure that the boot CPU honours write protection in kernel mode. This fixes one of the problems noted in PR kern/3688.
|
26886 |
24-Jun-1997 |
fsmp |
Fix calculation of initial mplock value. We now use LOGICAL, not PHYSICAL, IDs to calculate the mplock.
|
26882 |
24-Jun-1997 |
fsmp |
Fixed breakage for "default" configurations in mptable_pass1().
|
26812 |
22-Jun-1997 |
peter |
Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()])
There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty.
This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished.
Reviewed by: fsmp, dyson
|
26771 |
21-Jun-1997 |
bde |
Fixed va_arg() to work for small args (as in stdarg.h).
|
26763 |
21-Jun-1997 |
bde |
Don't attempt to generate errors for unpromoted types in va_arg(), since it is impossible to distinguish unpromoted types from small (struct) types. Renamed __va_promote() to __va_size() since it is related to sizes of args on the stack and not to promotion.
PR: 3884 Submitted by: mostly by arnej@math.ntnu.no (Arne Henrik Juul) Obtained from: name of__va_size and some parentheses fixes from NetBSD
|
26657 |
15-Jun-1997 |
wollman |
When APM is configured, turn off the power when halting for good.
|
26494 |
07-Jun-1997 |
bde |
Preserve %fs and %gs across context switches. This has a relatively low cost since it is only done in cpu_switch(), not for every exception. The extra state is kept in the pcb, and handled much like the npx state, with similar deficiencies (the state is not preserved across signal handlers, and error handling loses state).
|
26491 |
07-Jun-1997 |
bde |
Removed #include of <i386/isa/isa_device.h>. inthand2_t is declared in a better place now.
|
26490 |
07-Jun-1997 |
bde |
Updated comments.
|
26379 |
02-Jun-1997 |
dfr |
Change isa_device.h to intr_machdep.h
|
26306 |
31-May-1997 |
peter |
move spl.h to ipl.h, minus the inline spl macros. The inline spl implementation is now in isa/ipl_funcs.c (at least for the time being), leaving the definitions of the SWI_* and cpl/idelayed/ipending.
|
26305 |
31-May-1997 |
peter |
remove #include of <machine/spl.h> - they are externed now
Reviewed by: bde
|
26304 |
31-May-1997 |
peter |
move intrhand2_t from isa_device.h to machine/types.h - it's used far more than in the isa dependent code. create intrmask_t in machine/types.h (replaces "intrmask" typedef from sys/interrupt.h)
Reviewed by: bde
|
26294 |
31-May-1997 |
fsmp |
Modified code in direction of supporting MULTIPLE_IOAPICS.
- removed set_io_apic_mask() & clr_io_apic(_mask) - moved read_io_apic_maskc24() to i386/mpapic.c, disabled it, currently unused.
|
26270 |
29-May-1997 |
fsmp |
Code such as apic_base[APIC_ID] converted to lapic__id
Changes to pmap.c for lapic_t lapic && ioapic_t ioapic pointers, currently equal to apic_base && io_apic_base, will stand alone with the private page mapping.
|
26269 |
29-May-1997 |
fsmp |
apic.h now has structure definitions for both the local APIC and io APIC.
apic.h has defines like: #define lapic__id lapic->id
Once private pages and "known virtual addr" mapping of the APICs is ready all 'lapic__XXX' will be changed to 'lapic.XXX', and the defines will be removed.
Changes to smp.h for lapic_t lapic && ioapic_t ioapic pointers, currently equal to apic_base && io_apic_base, will stand alone with the private page mapping.
|
26266 |
29-May-1997 |
peter |
minor style police (recent divergence from KNF code)
|
26252 |
28-May-1997 |
fsmp |
Add declaration of mp_probe().
This is now called directly from machdep.c.
|
26203 |
27-May-1997 |
fsmp |
Nuke the printing of the unredirect message unless bootverbose.
|
26159 |
26-May-1997 |
se |
Completely replace the PCI bus driver code to make it better reflect reality. There will be a new call interface, but for now the file pci_compat.c (which is to be deleted, after all drivers are converted) provides an emulation of the old PCI bus driver functions. The only change that might be visible to drivers is, that the type pcici_t (which had been meant to be just a handle, whose exact definition should not be relied on), has been converted into a pcicfgregs* .
The Tekram AMD SCSI driver bogusly relied on the definition of pcici_t and has been converted to just call the PCI drivers functions to access configuration space register, instead of inventing its own ...
This code is by no means complete, but assumed to be fully operational, and brings the official code base more in line with my development code.
A new generic device descriptor data type has to be agreed on. The PCI code will then use that data type to provide new functionality:
1) userconfig support 2) "wired" PCI devices 3) conflicts checking against ISA/EISA 4) maps will depend on the command register enable bits 5) PCI to Anything bridges can be defined as devices, and are probed like any "standard" PCI device.
The following features are currently missing, but will be added back, soon:
1) unknown device probe message 2) suppression of "mirrored" devices caused by ancient, broken chip-sets
This code relies on generic shared interrupt support just commited to kern_intr.c (plus the modifications of isa.c and isa_device.h).
|
26155 |
26-May-1997 |
fsmp |
Added a test called 'LATE_START'.
This is now the default, it delays most of the MP startup to the function machdep.c:cpu_startup(). It should be possible to move the 2 functions found there (mp_start() & mp_announce()) even further down the path once we know exactly where that should be...
Help from: Peter Wemm <peter@spinner.dialix.com.au>
|
26130 |
25-May-1997 |
fsmp |
Removed global hwisrs, replacing it with vec (formerly static to icu.s).
|
26108 |
25-May-1997 |
fsmp |
Broke up parse_mp_table() into 2 passes: - The 1st (preparse_mp_table()) counts the number of cpus, busses, etc. and records the LOCAL and IO APIC addresses. - The 2nd pass (parse_mp_table()) does the actual parsing of info and recording into the incore MP table.
This will allow us to defer the 2nd pass untill malloc() & private pages are available (but thats for another day!).
|
26107 |
25-May-1997 |
fsmp |
Minor cleanup. Comment about expanded use of NAPICIDS. Change default NINTR from 64 to 48.
|
26101 |
24-May-1997 |
fsmp |
Now that panic() is properly printing messages for early SMP panics all the 'printf("..."); panic("\n")' sections are returned to 'panic("...")'.
|
26019 |
22-May-1997 |
fsmp |
Convert all: panic( "xxxxx\n" );
to: printf( "xxxxx\n" ); panic( "\n" );
For some as yet undetermined reason the argument to panic() is often NOT printed, and the system sometimes hangs before reaching the panic printout. So we hopefully at least print some useful info before the hang, as oppossed to leaving the user clueless as to what has happened.
|
26015 |
22-May-1997 |
fsmp |
Make the default for NINTR really large (ie 64). We just ran across one with 38+ entries.
|
26003 |
22-May-1997 |
msmith |
Add 'wl' Wavelan driver. Obtained from: Jim Binkley <jrb@cs.pdx.edu>
|
25984 |
21-May-1997 |
jdp |
Fill out the ELF header files to make them more or less complete. Fix a macro name that was misspelled both in brandelf.c and imgact_elf.h.
|
25983 |
21-May-1997 |
jdp |
Add new C global names also referenced from assembly language. These mostly came from the addition of SMP support.
|
25982 |
21-May-1997 |
jdp |
Make setbits() SMP-safe. Eliminate the SETBITS() macro, and replace all uses of it with the equivalent calls to setbits().
This change incidentally eliminates a problem building ELF kernels that was caused by SETBITS.
Reviewed by: fsmp, peter Submitted by: bde
|
25577 |
08-May-1997 |
peter |
Add _BSD_CLOCKID_T_ and _BSD_TIMER_T_ for posix clock/timer support
Obtained from: NetBSD
|
25559 |
07-May-1997 |
fsmp |
fix bug in get_isa_apic_mask() where EISA bus was ignored.
Submitted by: Peter Wemm <peter@spinner.DIALix.COM>
|
25549 |
07-May-1997 |
peter |
Convert md_regs from an int[] to a struct trapframe *. It simplifies some code.
|
25548 |
07-May-1997 |
peter |
remove #include "opt_smp.h" remove declarations for the SMPcurproc[NCPU] etc arrays. There was no need to mention NCPU there, and they've been moved to their normal home.
|
25547 |
07-May-1997 |
peter |
remove #include "opt_smp.h" and <machine/smp.h>. Slightly elaborate on a comment.
|
25546 |
07-May-1997 |
peter |
remove #include "opt_smp.h"
|
25545 |
07-May-1997 |
peter |
remove #include opt_smp.h declare SMPcurpcb[] next to #define and uniprocessor counterpart
|
25517 |
06-May-1997 |
fsmp |
Force user to config SMP kernel with "options APIC_IO".
Reviewed by: Peter Wemm <peter@spinner.DIALix.COM>
|
25499 |
05-May-1997 |
fsmp |
Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system. - NOT yet verified on the affected motherboard.
Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
|
25485 |
05-May-1997 |
peter |
correct the order of the variables use #ifdef where possible instead of #if defined
Submitted by: the KNF police, ie: bde :-)
|
25457 |
04-May-1997 |
peter |
Don't remove i586_ctr_freq from scope, leave it defined as zero. This simplifies some assumptions and stops some code compile problems.
This should fix the compile hiccup in PR#3491, but smp kernel profiling isn't likely to be fixed by this.
|
25421 |
03-May-1997 |
fsmp |
added declaration for get_isa_apic_mask().
Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
|
25419 |
03-May-1997 |
fsmp |
new function to turn an APIC pin# into an INT mask. added missing APIC_IO define.
Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
|
25362 |
01-May-1997 |
fsmp |
cleaned up FAST_IPI code. - one-liners all become inline. - multi-liners become functions. - FAST_IPI defines go away.
re-worked APICIPI_BANDAID code. - now refered to as DETECT_DEADLOCK. - on by default.
|
25361 |
01-May-1997 |
fsmp |
fixed spelling error.
Submitted by: Bruce Albrecht <bruce@zuhause.mn.org>
|
25328 |
01-May-1997 |
fsmp |
1.15 4/18/97 John-Mark Gurney <gurney_j@resnet.uoregon.edu> Added [SR]RGBMASKs ioctl for byte swapping.
1.16 4/20/97 Randall Hopper <rhh@ct.picker.com> Generalized RGBMASK ioctls for general pixel format setting [SG]ACTPIXFMT, and added query API to return driver-supported pix fmts GSUPPIXFMT.
1.17 4/21/97 hasty@rah.star-gate.com Clipping support added.
1.18 4/23/97 Clean up after failed CAP_SINGLEs where bt interrupt isn't delivered, and fixed fixing CAP_SINGLEs that for ODD_ONLY fields.
Submitted by: individuals in above log messages.
|
25320 |
30-Apr-1997 |
fsmp |
changed expect_lock() to try_lock(), the real name used in mplock.s
|
25292 |
29-Apr-1997 |
fsmp |
Enabled 'FIX_MP_TABLE_WORKS' code. This code re-numbers PCI busses in the MP table to match PCI semantics when the MP BIOS fails to do it properly.
Reviewed by: Peter Wemm <peter@spinner.DIALix.COM>
|
25291 |
29-Apr-1997 |
peter |
Use a common numbering of the tty and net software interrupt levels between the SMP and non-SMP case. It simplifies the #ifdef's, since NHWI changes (at least for the moment) when APIC's are involved.
|
25290 |
29-Apr-1997 |
peter |
Remove stale comment, as suggested by Bruce.
|
25217 |
28-Apr-1997 |
fsmp |
removed TEST_CPUHITS code.
|
25216 |
28-Apr-1997 |
fsmp |
removed all the TEST_UPPERPRIO crud.
|
25215 |
28-Apr-1997 |
fsmp |
remove all the SMP_INVLTLB defines, making the code default for APIC_IO.
Reviewed by: informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
|
25204 |
27-Apr-1997 |
fsmp |
informal discussion between Bruce Evans <bde@zeta.org.au>, Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>
removed all the IPI_INTS code. made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
|
25178 |
26-Apr-1997 |
peter |
Try and make these usermode safe, Steve beat me in finding these..
|
25164 |
26-Apr-1997 |
peter |
Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to come over the next few days.
The kernel should run pretty much "as before" without the options to activate SMP mode.
There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment.
This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
|
25159 |
26-Apr-1997 |
kato |
Add new cpu type, CPU_CY486DX, which shows Cyrix 486S/DX series CPUs, and initialization routine for those CPUs.
Tested by: Bob Bishop <rb@gid.co.uk>
|
25111 |
23-Apr-1997 |
bde |
Fixed longstanding profiling bug. The frame pointer wasn't set up for syscalls, so one frame was lost in backtraces from syscalls. This is handled better in the kernel by using a different mcount entry point for profiling before the frame pointer is set up.
Expand RCSID().
Use .p2align instead of the ambiguous .align.
Added idempotency ifdef.
Removed unused macros ALTENTRY(), ALTASENTRY(), ASENTRY(), _MID_ENTRY.
Cleaned up formatting.
Reviewed by: jdp reviewed an old version Obtained from: parts from NetBSD
|
25083 |
22-Apr-1997 |
jdp |
Make the necessary changes so that an ELF kernel can be built. I have successfully built, booted, and run a number of different ELF kernel configurations, including GENERIC. LINT also builds and links cleanly, though I have not tried to boot it.
The impact on developers is virtually nil, except for two things. All linker sets that might possibly be present in the kernel must be listed in "sys/i386/i386/setdefs.h". And all C symbols that are also referenced from assembly language code must be listed in "sys/i386/include/asnames.h". It so happens that failure to do these things will have no impact on the a.out kernel. But it will break the build of the ELF kernel.
The ELF bootloader works, but it is not ready to commit quite yet.
|
25041 |
20-Apr-1997 |
bde |
Fixed linting of and compilation of the gcc byte-swapping macros properly. Simply don't use the gcc macros if we're not gcc, and declare prototypes for the byte-swapping functions in case the macro versions are not used. The previous fix was wrong and broke libpcap, which abuses -Dlint.
Don't pollute the namespace if _POSIX_SOURCE is defined. This is broken - it makes almost everything in <machine/endian.h> inaccessible if _POSIX_SOURCE is defined, yet <machine/endian.h> is not a POSIX header. Other systems don't do it any better.
Removed always-false `BYTE_ORDER == BIG_ENDIAN' ifdef. Obtained from: partly from Lite(2?) and NetBSD
|
24965 |
15-Apr-1997 |
bde |
Only do indirections in ENTRY() if _ARCH_INDIRECT is defined.
|
24696 |
07-Apr-1997 |
peter |
Use UPAGES_HOLE instead of UPAGES in case it's changed some time.
Rename the PT* index KSTK* #defines to UMAX*, since we don't have a kernel stack there any more..
These are used to calculate VM_MAXUSER_ADDRESS and USRSTACK, and really do not want to be changed with UPAGES since BSD/OS 2.x binary compatability depends on it.
|
24695 |
07-Apr-1997 |
peter |
Define UPAGES_HOLE at 2 (same as current UPAGES) in case UPAGES changes later. This is used to calculate the top of user address space.
|
24691 |
07-Apr-1997 |
peter |
The biggie: Get rid of the UPAGES from the top of the per-process address space. (!)
Have each process use the kernel stack and pcb in the kvm space. Since the stacks are at a different address, we cannot copy the stack at fork() and allow the child to return up through the function call tree to return to user mode - create a new execution context and have the new process begin executing from cpu_switch() and go to user mode directly. In theory this should speed up fork a bit.
Context switch the tss_esp0 pointer in the common tss. This is a lot simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer to each process's tss since the esp0 pointer is a 32 bit pointer, and the sd_base setting is split into three different bit sections at non-aligned boundaries and requires a lot of twiddling to reset.
The 8K of memory at the top of the process space is now empty, and unmapped (and unmappable, it's higher than VM_MAXUSER_ADDRESS).
Simplity the pmap code to manage process contexts, we no longer have to double map the UPAGES, this simplifies and should measuably speed up fork().
The following parts came from John Dyson:
Set PG_G on the UPAGES that are now in kernel context, and invalidate them when swapping them out.
Move the upages object (upobj) from the vmspace to the proc structure.
Now that the UPAGES (pcb and kernel stack) are out of user space, make rfork(..RFMEM..) do what was intended by sharing the vmspace entirely via reference counting rather than simply inheriting the mappings.
|
24690 |
07-Apr-1997 |
peter |
No longer use an i386tss as the basis of our pcb - it wasn't particularly convenient and makes life difficult for my next commit. We still need an i386tss to point to for the tss slot in the gdt, so we use a common tss shared between all processes.
Note that this is going to break debugging until this series of commits is finished. core dumps will change again too. :-( we really need a more modern core dump format that doesn't depend on the pcb/upages.
This change makes VM86 mode harder, but the following commits will remove a lot of constraints for the VM86 system, including the possibility of extending the pcb for an IO port map etc.
Obtained from: bde
|
24528 |
02-Apr-1997 |
fsmp |
PAL support: magic numbers moved into format_params structure. Revised AFC interface. Fixed DMA_PROG_ALLOC size misdefinition.
Submitted by: richard@cogsci.ed.ac.uk (Richard Tobin)
|
24372 |
29-Mar-1997 |
phk |
Sanitize APM a bit. Convert various #ifdef to id_flags instead. You may want to add "flags 0x31" to apm0 if you have a lousy implementation. Read LINT.
|
24344 |
28-Mar-1997 |
bde |
Backed out rev.1.5. if %cs is bad, %eip may be bad, but this is no longer fatal.
|
24244 |
25-Mar-1997 |
fsmp |
added support for EEProms writing/reading.
|
24202 |
24-Mar-1997 |
bde |
Don't default to (wrong) SCO definitions for _IOR() etc. if <sys/ioctl.h> doesn't happen to be included before this header.
This header was missed in previous cleanups because it didn't include <sys/ioctl.h> or <sys/ioccom.h>. Clean it now: - #include <sys/types.h> since it is necessary to make the header self- sufficient (there are a couple of u_char's). - uniformized idempotency ifdef. Copied the style in the 4.4Lite ioctl headers.
|
24112 |
22-Mar-1997 |
kato |
Improved CPU identification and initialization routines. This supports All Cyrix CPUs, IBM Blue Lightning CPU and NexGen (now AMD) Nx586 CPU, and initialize special registers of Cyrix CPU and msr of IBM Blue Lightning CPU.
If revision of Cyrix 6x86 CPU < 2.7, CPU cache is enabled in write-through mode. This can be disabled by kernel configuration options.
Reviewed by: Bruce Evans <bde@freebsd.org> and Jordan K. Hubbard <jkh@freebsd.org>
|
24086 |
21-Mar-1997 |
fsmp |
Submitted by: Michael Petry <petry@netwolf.NetMasters.com> Michael submitted code to activate the audio muxes.
fsmp: extended those changes for different boards. auto-detection of board types. auto-detection of tuner types. auto-detection of stereo option
|
24045 |
19-Mar-1997 |
fsmp |
additions for table-driven frequency calculation. addition of colorbar ioctl.
|
23954 |
17-Mar-1997 |
nate |
Don't try to lint the gcc extension byte-swapping macros.
Submitted by: Eivind Eklund <eivind@dimaga.com>
|
23936 |
16-Mar-1997 |
fsmp |
patches for bt848 specific hue/bright/contrast/satu/satv.
|
23599 |
10-Mar-1997 |
markm |
Initial import of the Brooktree PCI-TV drivers. I have not tested these, they may not even compile. I am importing them on behalf of the submitters. Submitted by: amancio, smp
|
23580 |
09-Mar-1997 |
kato |
Added PC-98 specific function to get battery status. Submitted by: URATA Shuichiro <s-urata@nmit.tmg.nec.co.jp>
|
23576 |
09-Mar-1997 |
bde |
Moved userland assembler macros from <machine/asmacros.h> to <machine/asm.h>.
|
23571 |
09-Mar-1997 |
bde |
Cloned src/lib/libc/i386/DEFS.h to create <machine/asm.h> for the i386. The former file was too hard to get at from other parts of the src tree and will go away.
|
23184 |
28-Feb-1997 |
bde |
Fixed the gcc ellipsis change to work with gcc-1.x.
|
22975 |
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
22827 |
17-Feb-1997 |
bde |
Replaced START_ENTRY by _START_ENTRY. -current hasn't got my cleanup of DEFS.h which renamed it.
|
22808 |
16-Feb-1997 |
bde |
Select between the generic math functions and the i387-specific ones at runtime.
etc/make.conf: Nuked HAVE_FPU option.
lib/msun/Makefile: Always build the i387 objects. Copy the i387 source files at build time so that the i387 objects have different names. This is simpler than renaming the files in the cvs repository or repeating half of bsd.lib.mk to add explicit rules.
lib/msun/src/*.c: Renamed all functions that have an i387-specific version by adding `__generic_' to their names.
lib/msun/src/get_hw_float.c: New file for getting machdep.hw_float from the kernel.
sys/i386/include/asmacros.h: Abuse the ENTRY() macro to generate jump vectors and associated code. This works much like PIC PLT dynamic initialization. The PIC case is messy. The old i387 entry points are renamed. Renaming is easier here because the names are given by macro expansions.
|
22639 |
13-Feb-1997 |
bde |
Moved definition of FUNCTION_ALIGNMENT to a machine-dependent place. Changed it from 4 to 16 for i386's. It can be anything for i386's, but compiler options limit it to a power of 2, and assembler and linker deficiencies limit it to a small power of 2 (<= 16). We use 16 in the kernel to get smaller tables (see Makefile.i386 and <machine/asmacros.h>). We still use the default of 4 in user mode.
Use HISTCOUNTER instead of (*kcount) in the definition of KCOUNT() for consistency with other macros.
|
22636 |
13-Feb-1997 |
bde |
Align text to 16-byte boundaries if profiling is enabled. This will allow a fourfold reduction in the size of the profiling buffers. This goes with rev.1.91 of Makefile.i386 which does the same thing for C functions.
|
22580 |
12-Feb-1997 |
swallace |
Bug fix for SNDCTL_DSP_GETOSPACE ioctl. It would report 0 bytes available in buffer when buffer was completely empty. It now correctly reports the total buffer space available.
Reviewed by: jkh, davidg Obtained from: Linux 1.3.20's sound driver code
|
22521 |
10-Feb-1997 |
dyson |
This is the kernel Lite/2 commit. There are some requisite userland changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes.
The system boots and can mount UFS filesystems.
Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed.
Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
|
22415 |
07-Feb-1997 |
phk |
I have no idea what this is all about, but it works and Bruce hasn't complained so it cannot be entirely bad :-)
I include the email that probably explains it for people who already know:
> >Compiling with -O3 inlines functions. However the function that is being > >inlined in makeinfo.c (add_word_args()) is a vararg function and must not be > >inlined. > > > >The code in question is K&R style, and AFIK, there is no way for the compiler > >to determine that the function uses vararg. Either change the code to use > >prototypes, or use stdarg, or add a directive to prevent inlining. > > Not declaring a varargs function as varargs before it is used gives > undefined behaviour. > > However, in practice the bug is probably in FreeBSD's <varargs.h>, which > doesn't use gcc's __builtin_next_arg(). gcc should notice that it is > used and not inline functions that have it. <stdarg.h.> uses it, but I > think there's another gcc builtin that it should be using.
Patch attached. The ellipsis causes gcc to flag this as a varargs function, and the name "__builtin_va_alist" is special cased in gcc to hide the last argument in the arglist.
Reviewed by: bde & phk Submitted by: jlemon@americantv.com (Jonathan Lemon)
|
22203 |
02-Feb-1997 |
kato |
Deleted i386_cpus[]. i386_cpus[] is a static variable in identcpu.c.
Found-by: lint
|
21767 |
16-Jan-1997 |
bde |
Fixed printing of small offsets. E.g., -4(%ebp) is now printed as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as GMON_PROF_HIRES+0x4(%ebp).
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
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.
|
21493 |
10-Jan-1997 |
kato |
Staticize the functions rtc_inb, rtc_outb, rtc_serialcombit, and rtc_serialcom. These functions are only used by PC98.
|
21362 |
06-Jan-1997 |
nate |
- Cleanup up the driver (remove un-needed parameters, white-space, etc..), plus add a better display suspend function. - Changed the Copyright's to reflect the new 'jp.FreeBSD.org' email address.
Submitted by: nate & HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
|
21327 |
05-Jan-1997 |
nate |
Minor white-space and comment cleanups. No functional change.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
|
21039 |
30-Dec-1996 |
dyson |
Let the VM system know that on certain arch's that VM_PROT_READ also implies VM_PROT_EXEC. We support it that way for now, since the break system call by default gives VM_PROT_ALL. Now we have a better chance of coalesing map entries when mixing mmap/break type operations. This was contributing to excessive numbers of map entries on the modula-3 runtime system. The problem is still not "solved", but the situation makes more sense.
Eventually, when we work on architectures where VM_PROT_READ is orthogonal to VM_PROT_EXEC, we will have to visit this issue carefully (esp. regarding security issues.)
|
20186 |
07-Dec-1996 |
dyson |
Make LKM's build again. I have added the allegedly broken ACTUALLY_LKM_NOT_KERNEL until the real fix comes through. Whatever flag that is used to indicate building LKMs will have be be substituted in the future. This allows proper selection of the usage of the efficient, single instruction in the kernel, but alas, doesn't allow for use in userland or LKMs :-(. Them's the breaks!!!
|
20185 |
07-Dec-1996 |
dyson |
Change endian.h so that when a kernel is compiled without I386_CPU, and with one of the following (I486_CPU,I586_CPU,I686_CPU) so it can take advantage of the very quick bswap insn. This keeps LKMs from being built to take advantage of the insn, but also makes sure that the LKMs can be run on all CPUs. (The LKMs don't pick up the CPU options :-( ).
|
20127 |
04-Dec-1996 |
asami |
Synchronize with the RELENG_2_2 branch.
Definite 2.2 candidate.
Submitted by: The FreeBSD(98) Development Team
|
20073 |
01-Dec-1996 |
sos |
Alot of fixes from kazu:
1. All the suggestions earlier made by Bruce: renaming some symbols, stricter error checking, removing redundant code, etc.
2. The `psm' driver preserves the default counter resolution and report rate, whatever they are after reset. (Based on reports and suggestion from Nate and Rob Bolin).
3. The `psm' driver now does not check the so-called sync. bit in the first byte of the data packet by default, so that the tapping feature of ALPUS GlidePoint works (based on reports from Louis Mamakos). I tested the code with ALPUS Desktop GlidePoint (M/N GP101) and found no problem; tapping worked. It appears ALPUS produces several models of GlidePoint. I hope the other models are OK too.
The check code can still be activated by defining the PSM_CHECKSYNC option in the config file. (The bit checking slightly reduces, if not completely eliminates, weird mouse behavior cased by unsynchronized mouse data packets. It also helps us to detect if the mouse interrupt can ever be lost. But, well, if there are devices which cannot be supported this way...)
4. The `psm' driver does not include the protocol emulation code by default. The code can still be compiled in if the PSM_EMULATION option is specified in the config file. Louis Mamakos suggests the emulation code is putting too much in the kernel, and `moused' works well. I will think about this later and decide if the entire emulation code should be removed.
5. And, of course, the fix in `scprobe()' from Bruce to cure the UserConfig problem. My code in `kbdio.c' is slightly different from his patch, but has the same effect. There still is a possibility that `scprobe()' gets confused, if, for whatever reasons, the user holds down a key for very long time during the boot process. But we cannot cope with everything, can we?
Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
|
20026 |
29-Nov-1996 |
dyson |
Relax the constraints on the bswap opcode (it works on non-byte registers.) Also clean up some namespace pollution, and remove gcc-1 support (nothing really works with it anymore anyway.) Submitted by: Bruce Evans <bde@freebsd.org> and me.
|
20010 |
29-Nov-1996 |
dyson |
Support the appropriate use of bswap instruction on non-I386 builds. Per Wayne Scott of Intel, the old sequence took 20cycles!!! on a P6. Another nice side-benefit is that the kernel is about 3K smaller!!! Submitted by: Wayne Scott <wscott@ichips.intel.com>
|
19807 |
16-Nov-1996 |
jkh |
Commit AWE32 changes I forgot in my first round. Whoops!
|
19761 |
15-Nov-1996 |
nate |
KNF'ify.
|
19753 |
14-Nov-1996 |
sos |
Finally a start at sharing the kdb controller routines between syscons and psm, curtesy Kazutaka Yokota with minor changes by me. This contains an update of the psm driver as well. This also fixes the breakage that I introduced to the psm driver by making syscons poll for keyboard events in the atempt to fix the hanging keyboard problem.
It works perfectly for me, and I'd like to hear from all that have had keyboard/ps/2 mouse problems if this is the cure...
Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
|
19621 |
11-Nov-1996 |
dyson |
Support the PG_G flag on Pentium-Pro processors. This pretty much eliminates the unnecessary unmapping of the kernel during context switches and during invtlb...
|
19274 |
31-Oct-1996 |
julian |
Further improved version of hadling a HALT when there is no console.
|
19269 |
30-Oct-1996 |
asami |
More merge and update.
(1) deleted #if 0
pc98/pc98/mse.c
(2) hold per-unit I/O ports in ed_softc
pc98/pc98/if_ed.c pc98/pc98/if_ed98.h
(3) merge more files by segregating changes into headers.
new file (moved from pc98/pc98):
i386/isa/aic_98.h
deleted:
well, it's already in the commit message so I won't repeat the long list here ;)
Submitted by: The FreeBSD(98) Development Team
|
19172 |
25-Oct-1996 |
bde |
Improved biasing of i586 clock by adjusting for hardclock() latency. I decided to do this for every hardclock() call instead of lazily in microtime(). The lazy method is simpler but has more overhead if microtime() is called a lot.
CPU_THISTICKLEN() is now a no-op and should probably go away. Previously it did nothing directly but had the side effect of setting i586_last_tick for CPU_CLOCKUPDATE() and i586_avg_tick for debugging. CPU_CLOCKUPDATE() now uses a better method and i586_avg_tick is too much trouble to maintain.
Reduced nesting of #includes in the usual case.
Increased nesting of #includes when CLOCK_HAIR is defined. This is a kludge to get typedefs for inline functions only when the inline functions are used. Normally only kern_clock.c defines this. kern_clock.c can't include the i386 headers directly.
Removed unused LOCORE support.
|
19071 |
21-Oct-1996 |
nate |
When compiling with '-Wall -pedantic', the byte swapping macros gave the following warning: warning: ANSI C forbids braced-groups within expressions
Adding __extension__ before the statement-expression seems to work right.
Submitted by: bde (a *long* time ago)
|
19000 |
17-Oct-1996 |
bde |
Improved non-statistical (GUPROF) profiling: - use a more accurate and more efficient method of compensating for overheads. The old method counted too much time against leaf functions. - normally use the Pentium timestamp counter if available. On Pentiums, the times are now accurate to within a couple of cpu clock cycles per function call in the (unlikely) event that there are no cache misses in or caused by the profiling code. - optionally use an arbitrary Pentium event counter if available. - optionally regress to using the i8254 counter. - scaled the i8254 counter by a factor of 128. Now the i8254 counters overflow slightly faster than the TSC counters for a 150MHz Pentium :-) (after about 16 seconds). This is to avoid fractional overheads.
files.i386: permon.c temporarily has to be classified as a profiling-routine because a couple of functions in it may be called from profiling code.
options.i386: - I586_CTR_GUPROF is currently unused (oops). - I586_PMC_GUPROF should be something like 0x70000 to enable (but not use unless prof_machdep.c is changed) support for Pentium event counters. 7 is a control mode and the counter number 0 is somewhere in the 0000 bits (see perfmon.h for the encoding).
profile.h: - added declarations. - cleaned up separation of user mode declarations.
prof_machdep.c: Mostly clock-select changes. The default clock can be changed by editing kmem. There should be a sysctl for this.
subr_prof.c: - added copyright. - calibrate overheads for the new method. - documented new method. - fixed races and and machine dependencies in start/stop code.
mcount.c: Use the new overhead compensation method.
gmon.h: - changed GPROF4 counter type from unsigned to int. Oops, this should be machine-dependent and/or int32_t. - reorganized overhead counters.
Submitted by: Pentium event counter changes mostly by wollman
|
18992 |
17-Oct-1996 |
bde |
Added missing extern declaration of timer_freq. Sorted declarations of scalars.
|
18961 |
16-Oct-1996 |
bde |
Added macros CROSSJUMP(), CROSSJUMP_LABEL() and GPROF_RET. These will be used to fix some benign(?) bugs in GUPROF profiling.
Fixed stale comments and long lines.
|
18907 |
13-Oct-1996 |
dyson |
Pmap_resident_count was mistakenly removed from pmap.h, thereby disabling the RSS listing in ps and ^T. This commit re-inserts the macro defn.
|
18897 |
12-Oct-1996 |
dyson |
Performance optimizations. One of which was meant to go in before the previous snap. Specifically, kern_exit and kern_exec now makes a call into the pmap module to do a very fast removal of pages from the address space. Additionally, the pmap module now updates the PG_MAPPED and PG_WRITABLE flags. This is an optional optimization, but helpful on the X86.
|
18896 |
12-Oct-1996 |
bde |
Cleaned up: - fixed a sloppy common-style declaration. - removed an unused macro. - moved once-used macros to the one file where they are used. - removed unused forward struct declarations. - removed __pure. - declared inline functions as inline in their prototype as well as in theire definition (gcc unfortunately allows the prototype to be inconsistent). - staticized.
|
18855 |
10-Oct-1996 |
bde |
Don't include "opt_cpu.h" in <machine/clock.h>, since this breaks lkm's. The change breaks kern_clock.c; fix that temporarily by including "opt_cpu.h" there.
|
18842 |
09-Oct-1996 |
bde |
Put I*86_CPU defines in opt_cpu.h.
|
18770 |
06-Oct-1996 |
bde |
Improved the btodb() and dbtob() macros. I made them give unsigned [long long] results when I last worked on them, but they are normally used together with to daddr_t's and off_t's which are signed, so the unsigned results did little except cause warnings.
|
18769 |
06-Oct-1996 |
bde |
Cleaned up vm types. Cosmetic.
The main change is from unsigned long unsigned int. It just needs to be a 32-bit type and unsigned int is most natural. Using a non-long type has the "advantage" of hiding bugs in the "machine-independent" code where it prints foo_t's using %d or %x. These bugs are currently hidden bug not compiling with -Wformat.
I tried changing vm_ooffset_t from long long to unsigned long long, but that was wrong because vm_ooffset_t needs to be long to match off_t, although file offsets are never negative.
Reviewed by: dyson
|
18587 |
30-Sep-1996 |
sos |
Fix a couble of nasties regarding mouse pointer and different resolutions. Allow middle mouse button to be used for pasting. Also added the beginnings of support for a splash page.
|
18567 |
29-Sep-1996 |
bde |
Added "memory" to clobber list in invlpg(). It needs it if invltlb() needs it.
Fixed style in invlpg().
Sorted recently renamed functions.
Added prototypes in the non-gcc section for recently added/renamed functions.
|
18548 |
28-Sep-1996 |
dyson |
Essentially rename pmap_update to be invltlb. It is a very machine dependent operation, and not really a correct name. invltlb and invlpg are more descriptive, and in the case of invlpg, a real opcode.
Additionally, fix the tlb management code for 386 machines.
|
18528 |
28-Sep-1996 |
dyson |
Move pmap_update_1pg to cpufunc.h. Additionally, use the invlpg opcode instead of the nasty looking .byte directives. There are some other minor micro-level code improvements to pmap.c
|
18513 |
27-Sep-1996 |
peter |
Apparently, BSDI have a new system call gate. I was experimenting with this quite a while ago when somebody reported a BSD/OS 2.1 binary that wouldn't run. I'm pretty sure they tried it and I'm pretty sure they mentioned to me that the patch worked.
|
18512 |
27-Sep-1996 |
peter |
Drat, missed this prototype for random_select().
|
18490 |
24-Sep-1996 |
bde |
Fixed a few hundred warnings (2400 in LINT) for signed vs unsigned comparisons in the inb() and outb() macros. I decided that int args are OK here. Any type that can hold a u_int16_t without overflow is correct, and 32-bit types are optimal.
Introduced a few tens of warnings (100 in LINT) for use of pessimized (short) types for the port arg. Only a few drivers are affected by this. u_short pessimizations aren't detected.
Added `__extension__' before the statement-expression in inb() so that it can be compiled without warnings by gcc -pedantic.
|
18444 |
21-Sep-1996 |
bde |
Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: - don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h> instead. This was already done in 4.4Lite for the most important ioctl headers. Header spam currently increases kernel build times by 10-20%. There are more than 30000 #includes (not counting duplicates) for compiling LINT. - include <sys/types.h> if and only it is necessary to make the header almost self-sufficient (some ioctl headers still need structs from elsewhere). - uniformized idempotency ifdefs. Copied the style in the 4.4Lite ioctl headers.
|
18265 |
12-Sep-1996 |
asami |
Another round of merge/update.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic (2) Move PC98 specific code out of cpufunc.h (to pc98.h) (3) Let the boot subtrees look more alike
Submitted by: The FreeBSD(98) Development Team <freebsd98-hackers@jp.freebsd.org>
|
18207 |
10-Sep-1996 |
bde |
Updated #includes to 4.4Lite style.
|
18163 |
08-Sep-1996 |
dyson |
Improve the scalability of certain pmap operations.
|
18107 |
07-Sep-1996 |
nate |
Unused file.
|
18085 |
06-Sep-1996 |
phk |
Remove these three devconf files entirely.
|
18010 |
03-Sep-1996 |
asami |
Second phase of merge, get rid of more machine-independent-dependencies. Get rid of pc98/pc98/pc98_device.h.
Submitted by: The FreeBSD(98) Development Team
|
17879 |
28-Aug-1996 |
bde |
Cleaned up interrupt masking by declaring the state variable in a machine-dependent macro and passing it to all machine-dependent macros.
Eliminated the state variable for the GUPROF case.
|
17520 |
11-Aug-1996 |
dg |
Defined T_MCHK exception for i686; renumbered T_RESERVED to 29.
|
17394 |
02-Aug-1996 |
bde |
Eliminated i586_ctr_rate. Use i586_ctr_freq instead.
Changed i586_ctr_bias from long long to u_int. Only the low 32 bits are used now that microtime uses a multiplication to do the scaling. Previously the high 32 bits had to match those of rdtsc() to prevent overflow traps and invalid timeval adjustments.
|
17384 |
01-Aug-1996 |
wollman |
Add an fls() inline function which does the opposite operation to ffs(). (That is to say, it searches in the opposite direction.)
|
17371 |
31-Jul-1996 |
bde |
Eliminated pcb_inl. It was always 0 because context switches don't occur in interrupt handlers.
|
17353 |
30-Jul-1996 |
bde |
Fixed the machdep.i8254_freq and machdep.i586_freq sysctls. Writes were handled bogusly.
Centralized the setting of all the frequency variables. Set these variables atomically. Some new ones aren't used yet.
|
17334 |
30-Jul-1996 |
dyson |
Backed out the recent changes/enhancements to the VM code. The problem with the 'shell scripts' was found, but there was a 'strange' problem found with a 486 laptop that we could not find. This commit backs the code back to 25-jul, and will be re-entered after the snapshot in smaller (more easily tested) chunks.
|
17294 |
27-Jul-1996 |
dyson |
This commit is meant to solve a couple of VM system problems or performance issues.
1) The pmap module has had too many inlines, and so the object file is simply bigger than it needs to be. Some common code is also merged into subroutines. 2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls. Unfortunately, a few have needed to be added also. The removal caused the need for more vm_page_lookups. I added lookup hints to minimize the need for the page table lookup operations. 3) Removal of some bogus performance improvements, that mostly made the code more complex (tracking individual page table page updates unnecessarily). Those improvements actually hurt 386 processors perf (not that people who worry about perf use 386 processors anymore :-)). 4) Changed pv queue manipulations/structures to be TAILQ's. 5) The pv queue code has had some performance problems since day one. Some significant scalability issues are resolved by threading the pv entries from the pmap AND the physical address instead of just the physical address. This makes certain pmap operations run much faster. This does not affect most micro-benchmarks, but should help loaded system performance *significantly*. DG helped and came up with most of the solution for this one. 6) Most if not all pmap bit operations follow the pattern: pmap_test_bit(); pmap_clear_bit(); That made for twice the necessary pv list traversal. The pmap interface now supports only pmap_tc_bit type operations: pmap_[test/clear]_modified, pmap_[test/clear]_referenced. Additionally, the modified routine now takes a vm_page_t arg instead of a phys address. This eliminates a PHYS_TO_VM_PAGE operation. 7) Several rewrites of routines that contain redundant code to use common routines, so that there is a greater likelihood of keeping the cache footprint smaller.
|
17256 |
23-Jul-1996 |
asami |
Update to current state of PC98 world.
Submitted by: The FreeBSD(98) development team
|
17203 |
17-Jul-1996 |
joerg |
Introduce two /dev/audio compat alias names for flushing and draining the pcaudio device. Now, XBoing sounds much better...
|
16878 |
01-Jul-1996 |
bde |
Fixed lots of warnings about unportable casts of pointers to volatile variables: don't depend on the compiler generating atomic code to set the variables - use inline asm to specify the atomic instruction(s) explicitly.
|
16875 |
01-Jul-1996 |
bde |
Moved declarations of non-cpu things from <machine/cpufunc.h> to better places.
|
16725 |
25-Jun-1996 |
bde |
trap.c: Fixed profiling of system times. It was pre-4.4Lite and didn't support statclocks. System times were too small by a factor of 8.
Handle deferred profiling ticks the 4.4Lite way: use addupc_task() instead of addupc(). Call addupc_task() directly instead of using the ADDUPC() macro.
Removed vestigial support for PROFTIMER.
switch.s: Removed addupc().
resourcevar.h: Removed ADDUPC() and declarations of addupc().
cpu.h: Updated a comment. i386's never were tahoe's, and the deferred profiling tick became (possibly) multiple ticks in 4.4Lite.
Obtained from: mostly from NetBSD
|
16693 |
25-Jun-1996 |
sos |
Change the way moused talk to syscons, now its only delivering mouseevents via an ioctl (MOUSE_ACTION). Fixed a couple of bugs (destructive cursor, uncut, jitter). Now applications can use the mouse via the MOUSE_MODE ioctl, its possible to have a signal sent on mouseevents, makeing an event loop in the application take over mouseevents.
|
16564 |
21-Jun-1996 |
sos |
Some news for syscons (long overdue):
Real support for a Textmode mousecursor, works by reprogramming the charset. Together with this support for cut&paste in text mode. To use it a userland daemon is needed (moused), which provides the interface to the various mice protokols. Bug fixes here and there, all known PR's closed by this update.
|
16439 |
17-Jun-1996 |
bde |
Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c to match (pc98/random_machdep.c probably requires a similar change). This is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are kludges to work around incorrect layering.
|
16363 |
14-Jun-1996 |
asami |
The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users.
Ok'd by: core Submitted by: FreeBSD(98) development team
|
16216 |
08-Jun-1996 |
bde |
Removed unnecessary forward declarations of incomplete structs.
|
16177 |
07-Jun-1996 |
jkh |
A trailing patch Jim left out of the last commit. Submitted-by: james
|
16100 |
03-Jun-1996 |
sos |
Added missing CR0_NW define for Cyrix 486DLC support. It's still not stable on my hardware, but its better... *sigh*
Obtained from: NetBSD
|
16029 |
31-May-1996 |
peter |
Jump some hoops to have the *.s code being able to be run through both an ansi and traditional cpp.
The nesting rules of macros are different, which required some changes. Use __CONCAT(x,y) instead of /**/. Redo some comments to use /* */ rather than "# comment" because the ansi cpp cares about those, and also cares about quote matching.
|
15884 |
23-May-1996 |
wollman |
Add an incremental checksum update routine. Perhaps some i386 assembly guru out there can find a way to take advantage of little-endianness to make this computation more efficient. (I am certain that it can be done, but haven't managed to make it work myself.)
|
15809 |
18-May-1996 |
dyson |
This set of commits to the VM system does the following, and contain contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>, Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me:
More usage of the TAILQ macros. Additional minor fix to queue.h. Performance enhancements to the pageout daemon. Addition of a wait in the case that the pageout daemon has to run immediately. Slightly modify the pageout algorithm. Significant revamp of the pmap/fork code: 1) PTE's and UPAGES's are NO LONGER in the process's map. 2) PTE's and UPAGES's reside in their own objects. 3) TOTAL elimination of recursive page table pagefaults. 4) The page directory now resides in the PTE object. 5) Implemented pmap_copy, thereby speeding up fork time. 6) Changed the pv entries so that the head is a pointer and not an entire entry. 7) Significant cleanup of pmap_protect, and pmap_remove. 8) Removed significant amounts of machine dependent fork code from vm_glue. Pushed much of that code into the machine dependent pmap module. 9) Support more completely the reuse of already zeroed pages (Page table pages and page directories) as being already zeroed. Performance and code cleanups in vm_map: 1) Improved and simplified allocation of map entries. 2) Improved vm_map_copy code. 3) Corrected some minor problems in the simplify code. Implemented splvm (combo of splbio and splimp.) The VM code now seldom uses splhigh. Improved the speed of and simplified kmem_malloc. Minor mod to vm_fault to avoid using pre-zeroed pages in the case of objects with backing objects along with the already existant condition of having a vnode. (If there is a backing object, there will likely be a COW... With a COW, it isn't necessary to start with a pre-zeroed page.) Minor reorg of source to perhaps improve locality of ref.
|
15802 |
17-May-1996 |
jkh |
A patch for the meteor device driver. It fixes: 1) A spelling error pointed out by Paco Hope. 2) A bug in the range checking routing pointed out by Jim Bray. 3) Enables the setting of frames per second. Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
|
15619 |
04-May-1996 |
peter |
Add $Id$
|
15602 |
04-May-1996 |
pst |
Update to 1.1beta5d
|
15600 |
04-May-1996 |
peter |
This commit was generated by cvs2svn to compensate for changes in r15599, which included commits to RCS files with non-trunk default branches.
|
15583 |
03-May-1996 |
phk |
Another sweep over the pmap/vm macros, this time with more focus on the usage. I'm not satisfied with the naming, but now at least there is less bogus stuff around.
|
15565 |
02-May-1996 |
phk |
Move atdevbase out of locore.s and into machdep.c Macroize locore.s' page table setup even more, now it's almost readable. Rename PG_U to PG_A (so that I can...) Rename PG_u to PG_U. "PG_u" was just too ugly... Remove some unused vars in pmap.c Remove PG_KR and PG_KW Remove SSIZE Remove SINCR Remove BTOPKERNBASE
This concludes my spring cleaning, modulus any bug fixes for messes I have made on the way.
(Funny to be back here in pmap.c, that's where my first significant contribution to 386BSD was... :-)
|
15544 |
02-May-1996 |
phk |
This can go now.
|
15543 |
02-May-1996 |
phk |
removed: CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG
Major macro cleanup.
|
15508 |
01-May-1996 |
bde |
Added calibration the i8254 and the i586 clocks agains the RTC at boot time. The results are currently ignored unless certain temporary options are used.
Added sysctls to support reading and writing the clock frequency variables (not the frequencies themselves). Writing is supposed to atomically adjust all related variables.
machdep.c: Fixed spelling of a function name in a comment so that I can log this message which should have been with the previous commit.
Initialize `cpu_class' earlier so that it can be used in startrtclock() instead of in calibrate_cyclecounter() (which no longer exists).
Removed range checking of `cpu'. It is always initialized to CPU_XXX so it is less likely to be out of bounds than most variables.
clock.h: Removed I586_CYCLECTR(). Use rdtsc() instead.
clock.c: TIMER_FREQ is now a variable timer_freq that defaults to the old value of TIMER_FREQ. #define'ing TIMER_FREQ should still work and may be the best way of setting the frequency.
Calibration involves counting cycles while watching the RTC for one second. This gives values correct to within (a few ppm) + (the innaccuracy of the RTC) on my systems.
|
15501 |
01-May-1996 |
bde |
Don't return unused values in cpu_switch() or savectx().
Don't preserve unused registers in the NPX case in savectx().
|
15484 |
01-May-1996 |
bde |
Oops, this should have been with the ctype changes.
Fixed longstanding namespace convolution involving rune_t vs wchar_t...
This change breaks similar (but more convoluted) convolutions in the stddef.h in gcc distributions. Ports of gcc should avoid using the gcc headers.
|
15472 |
30-Apr-1996 |
phk |
pte.h: Add the VADDR(pdi,pti) macro to construct virtual address from page dir+table index. pmap.h: remove NUPDE, it was wrong and not used. Sanitize KSTKPTEOFF. vmparam.h: Calculate virtual addr from PDI+PTI from pmap.h rather than using magic math. Remove UPDT, not used.
|
15379 |
25-Apr-1996 |
phk |
Fix cpu_fork for real.
Suggested by: bde
|
15360 |
23-Apr-1996 |
nate |
Adds the APM hooks into the generic pccard kernel files. With this code in place device drivers can now register power-down/power-up routines so that we can use common routines to power-up/power-down cards for insert/removals, suspend/resume, etc..
Reviewed by: phk Submitted by: the 'Nomads'
|
15351 |
22-Apr-1996 |
nate |
Updated the laptop 'kludge' file. Hopefully this can go away soon.
Submitted by: The 'Nomads'
|
15345 |
22-Apr-1996 |
nate |
- add apm to the GENERIC kernel (disabled by default), and add some comments regarding apm to LINT - Disabled the statistics clock on machines which have an APM BIOS and have the options "APM_BROKEN_STATCLOCK" enabled (which is default in GENERIC now) - move around some of the code in clock.c dealing with the rtc to make it more obvios the effects of disabling the statistics clock
Reviewed by: bde
|
15304 |
19-Apr-1996 |
phk |
savectx returns through cpu_switch in case of the child, so it must return void just like cpu_switch. Fix prototype and usage from machdep.c
|
15301 |
18-Apr-1996 |
phk |
Fix a bogon. cpu_fork & savectx ecpected cpu_switch to restore %eax, they shouldn't.
|
15291 |
18-Apr-1996 |
wollman |
Add an inline function to compute the common-case IP header checksum.
|
15244 |
13-Apr-1996 |
bde |
Changed _BSD_PID_T_ from long to int. Lite2 changed pid_t from long to int32_t in <sys/types.h> but this change was missed when the Lite2 types were merged.
|
15174 |
10-Apr-1996 |
nate |
hp300 -> i386
|
15122 |
07-Apr-1996 |
bde |
Changed bdb() to breakpoint() and always enable it.
Made the style more consistent, especially for the new Pentium functions.
|
15111 |
07-Apr-1996 |
bde |
Moved declaration of bootverbose to a better place. It isn't machine-dependent.
Moved declaration of cpu_fork() to a better place. Only its implementation is machine-dependent.
|
15045 |
05-Apr-1996 |
ache |
Add wall_cmos_clock sysctl variable, needed to manage adjkerntz even for UTC cmos clocks (needed for Local Timezone FSes)
|
15018 |
03-Apr-1996 |
dyson |
Fixed a problem that the UPAGES of a process were being run down in a suboptimal manner. I had also noticed some panics that appeared to be at least superficially caused by this problem. Also, included are some minor mods to support more general handling of page table page faulting. More details in a future commit.
|
14944 |
31-Mar-1996 |
bde |
Finished removing NOP macros.
|
14943 |
31-Mar-1996 |
bde |
Moved rtcin() to clock.c.
Always delay using one inb(0x84) after each i/o in rtcin() - don't do this conditional on the bogus option DUMMY_NOPS not being defined. If you want an optionally slightly faster rtcin() again, then inline it and use a better named option or sysctl variable. It only needs to be fast in rtcintr().
|
14916 |
29-Mar-1996 |
bde |
Parenthesized macros.
Fixed munged tabs.
|
14889 |
28-Mar-1996 |
wollman |
>Blush<. Use the correct opcode for the WRMSR instruction.
|
14886 |
28-Mar-1996 |
jkh |
A bug fix and a couple of new modes for the meteor driver. Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
|
14825 |
26-Mar-1996 |
wollman |
Add support for Pentium and Pentium Pro performance counters. (This code is as yet untested; to come after man page is written.) This also adds inlines to cpufunc.h for the RDTSC, RDMSR, WRMSR, and RDPMC instructions. The user-mode interface is via a subdevice of mem.c; there is also a kernel-size interface which might be used to aid profiling.
|
14736 |
21-Mar-1996 |
pst |
Add support for /very/ experimental -e (exposure) option. Not documented yet, because it's for grownups and geeks for now.
|
14608 |
13-Mar-1996 |
nate |
Return the status of the APM support (enabled/disabled) with the APM_GETINFO ioctl.
|
14595 |
12-Mar-1996 |
dg |
Killed some historical #define cruft that we've never used in FreeBSD:
UDOT_SZ SYSPTSIZE USRPTSIZE MSGBUFPTECNT DMMIN DMMAX DMTEXT USRIOSIZE VM_PHYS_SIZE
|
14579 |
12-Mar-1996 |
nate |
Bring in some prototypes that shouldn't have been dependant on APM_SLOWSTART, which are generic APM functions.
|
14537 |
11-Mar-1996 |
nate |
Bring in most of Bruce's prot_to_real() changes into the APM BIOS startup code.
Reviewed by: bde
|
14509 |
11-Mar-1996 |
hsu |
From Lite2: add typedef for register_t. Reviewed by: davidg & bde
|
14331 |
02-Mar-1996 |
peter |
Mega-commit for Linux emulator update.. This has been stress tested under netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
|
14320 |
02-Mar-1996 |
jkh |
Hopefully, this will fix the problems that some people have been having with the S-Video input. It also has code in the driver for the meteor RGB support and some other bug fixes. I don't have a meteor RGB but I have been told that it works. Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
|
14243 |
25-Feb-1996 |
dyson |
Fix a problem with tracking the modified bit. Eliminate the ugly inline-asm code, and speed up the page-table-page tracking.
|
14175 |
22-Feb-1996 |
joerg |
. move out the error and status register def's for wt into <machine/wtio.h>, so mt(1) can print them,
. cosmetics: put the return type and the function name onto different lines.
|
14173 |
21-Feb-1996 |
nate |
Updated PC-CARD support to contain most of the code from the latest Japanese BSD-Nomad release.
Reviewed by: phk Submitted by: hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
|
13959 |
07-Feb-1996 |
wollman |
Add a couple of macros I expect to need.
|
13937 |
06-Feb-1996 |
wollman |
Clean up Ethernet drivers: - fill in and use ifp->if_softc - use if_bpf rather than private cookie variables - change bpf interface to take advantage of this - call ether_ifattach() directly from Ethernet drivers - delete kludge in if_attach() that did this indirectly
|
13908 |
04-Feb-1996 |
dg |
Rewrote cpu_fork so that it doesn't use pmap_activate, and removed pmap_activate since it's not used anymore. Changed cpu_fork so that it uses one line of inline assembly rather than calling mvesp() to get the current stack pointer. Removed mvesp() since it is no longer being used.
|
13858 |
02-Feb-1996 |
pst |
Remove the ability for the user mode programs to specify bidirectional vs unidirectional transfer modes. The kernel handles hardware, user mode programs shouldn't get in the way.
This cleans up some really ugly grots that I hated too. :-)
Suggested by: Sujal Patel <smpatel@wam.umd.edu>
|
13856 |
02-Feb-1996 |
pst |
Add support for Connectix QuickCam(tm) * warning: this user interface is still in flux pending negotiations * with other quickcam driver authors. It is _not_ compatible with the * original linux interface due to the fact that it was too restrictive.
|
13815 |
01-Feb-1996 |
jkh |
Sync with latest Meteor and Spigot sources from James. Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
|
13765 |
30-Jan-1996 |
mpp |
Fix a bunch of spelling errors in the comment fields of a bunch of system include files.
|
13758 |
30-Jan-1996 |
wollman |
No longer use the cyclecounter to attempt to correct for late or missed clock interrupts.
Keep a 1-in-16 smoothed average of the length of each tick. If the CPU speed is correctly diagnosed, this should give experienced users enough information to figure out a more suitable value for `tick'.
|
13646 |
27-Jan-1996 |
bde |
Allocate DMA bounce buffers only when requested by drivers. Only the fd and wt drivers need bounce buffers, so this normally saves 32K-1K of kernel memory.
Keep track of which DMA channels are busy. isa_dmadone() must now be called when DMA has finished or been aborted.
Panic for unallocated and too-small (required) bounce buffers.
fd.c: There will be new warnings about isa_dmadone() not being called after DMA has been aborted.
sound/dmabuf.c: isa_dmadone() needs more parameters than are available, so temporarily use a new interface isa_dmadone_nobounce() to avoid having to worry about panics for fake parameters. Untested.
|
13611 |
24-Jan-1996 |
peter |
Add commands for ptrace get/set registers.. (Same numbers as NetBSD)
|
13580 |
23-Jan-1996 |
dg |
Simplified savectx() a little and fixed a bug that caused it to return garbage in the child process rather than "1" like it is supposed to.
Reviewed by: bde
|
13529 |
21-Jan-1996 |
jkh |
Newest version of the Matrox Meteor driver. Tested with various MBONE tools and found to work better with both nv and vic. Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
|
13454 |
16-Jan-1996 |
bde |
Removed declarations of nonexistent functions.
|
13157 |
01-Jan-1996 |
bde |
Fixed user-mode mcount which I broke in the previous revision. Do it the old way for now.
Moved recent additions around a lot to minimise ifdefs.
Added prototypes.
|
13122 |
30-Dec-1995 |
peter |
recording cvs-1.6 file death
|
13107 |
29-Dec-1995 |
bde |
Implemented non-statistical kernel profiling. This is based on looking at a high resolution clock for each of the following events: function call, function return, interrupt entry, interrupt exit, and interesting branches. The differences between the times of these events are added at appropriate places in a ordinary histogram (as if very fast statistical profiling sampled the pc at those places) so that ordinary gprof can be used to analyze the times.
gmon.h: Histogram counters need to be 4 bytes for microsecond resolutions. They will need to be larger for the 586 clock. The comments were vax-centric and wrong even on vaxes. Does anyone disagree?
gprof4.c: The standard gprof should support counters of all integral sizes and the size of the counter should be in the gmon header. This hack will do until then. (Use gprof4 -u to examine the results of non-statistical profiling.)
config/*: Non-statistical profiling is configured with `config -pp'. `config -p' still gives ordinary profiling.
kgmon/*: Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b' still enables ordinary profiling (and distables non-statistical profiling) if non-statistical profiling is configured.
|
13099 |
29-Dec-1995 |
markm |
1) ifdef out some unused functions (for now) 2) improve 586 support 3) add 686 support 4) clean up comments etc Submitted by: bde
|
13086 |
28-Dec-1995 |
dg |
Made bzero a function vector and added a 586/686 optimized version of bzero. Deprecated blkclr (removed it). Removed some old cruft from cpufunc.h.
The optimized bzero was submitted by Torbjorn Granlund <tege@matematik.su.se> The kernel adaption and other changes by me.
|
13057 |
27-Dec-1995 |
markm |
Clean up and make more universal. Next version of random device.
|
13013 |
25-Dec-1995 |
bde |
Fixed staticizing. Some functions aren't static but depend on the undocumented previously unLINTed option `APM_SLOWSTART'.
|
13000 |
24-Dec-1995 |
dg |
Add Pentium Pro CPU detection and special handling. For now, all the optimizations we have for 586s also apply to 686s...this will be fine- tuned in the future as appropriate.
|
12929 |
19-Dec-1995 |
dg |
Implemented a (sorely needed for years) double fault handler to catch stack overflows. It sure would be nice if there was an unmapped page between the PCB and the stack (and that the size of the stack was configurable!). With the way things are now, the PCB will get clobbered before the double fault handler gets control, making somewhat of a mess of things. Despite this, it is still fairly easy to poke around in the overflowed stack to figure out the cause.
|
12905 |
17-Dec-1995 |
bde |
Cleaned up prototypes in pmap headers: removed ones for nonexistent functions; moved misplaced ones; restored most of KNFish formatting from 4.4lite version; removed bogus __BEGIN/END_DECLS.
|
12817 |
14-Dec-1995 |
phk |
Make math_emulators LKMable.
|
12767 |
11-Dec-1995 |
dyson |
Changes to support 1Tb filesizes. Pages are now named by an (object,index) pair instead of (object,offset) pair.
|
12724 |
10-Dec-1995 |
phk |
Staticize and cleanup.
|
12675 |
08-Dec-1995 |
julian |
Pass 3 of the great devsw changes most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter)
If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :)
pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
|
12639 |
05-Dec-1995 |
bde |
Moved some prototypes to a better place.
Removed stale prototypes.
Added prototypes.
Added empty lines.
|
12608 |
03-Dec-1995 |
bde |
__purified pmap_pte(). This seems to make no difference.
|
12592 |
03-Dec-1995 |
bde |
Moved inline functions for insque() and remque() to <sys/queue.h>. Protected them with `#ifdef KERNEL' so that <sys/queue.h> is valid C++. Added the necessary #includes of <sys/queue.h>.
These functions are bogus and should be replaced by the queue macros.
|
12589 |
03-Dec-1995 |
bde |
Removed unused thread support (partly to get rid of its incomplete function declarations).
Removed unused #includes (lots of vm ones).
|
12533 |
29-Nov-1995 |
wollman |
Fix Pentium CPU rate diagnosis: - Don't print out meaningless iCOMP numbers, those are for droids. - Use a shorter wait to determine clock rate to avoid deficiencies in DELAY(). - Use a fixed-point representation with 8 bits of fraction to store the rate and rationalize the variable name. It would be possible to use even more fraction if it turns out to be worthwhile (I rather doubt it).
The question of source code arrangement remains unaddressed.
|
12511 |
29-Nov-1995 |
jkh |
A batch of Jim Lowe's patches: o Add signed/unsigned functionality to the matrox meteor device driver. o Apply a few fixes to the sound driver. o Add a ``SPIGOT_UNSECURE'' compile time definition so, if one defines SPIGOT_UNSECURE in their conf file, then they can use the spigot w/o root. There is a warning that this allows users access to the IO page which is probably not secure. Submitted by: james
|
12496 |
28-Nov-1995 |
peter |
Mainly cosmetic cleanups... It now uses more consistant message reporting on the console, and no longer uses "SLXOS" which I suspect may be a trademark... (I'm not sure, but this is not really a SLXOS driver anyway)
|
12453 |
21-Nov-1995 |
bde |
Completed function declarations and/or added prototypes.
|
12429 |
20-Nov-1995 |
phk |
Mega commit for sysctl. Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
|
12299 |
14-Nov-1995 |
phk |
Removed: #include <i386/isa/isa_device.h> #include <i386/eisa/eisaconf.h> #include <pci/pcireg.h> #include <pci/pcivar.h> #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> they are not needed, and slows down compilation.
|
12174 |
09-Nov-1995 |
peter |
Sync the public source with what I'm currently running.
Most of this is cleaning up, but there are some functional changes, doc/comment improvements, error checking, gcc -Wall cleanups. Input buffer flushing is enabled now, although I'm still not quite certain it's right.
|
12091 |
05-Nov-1995 |
gibbs |
Modifications for the new eisaconf.
|
12080 |
04-Nov-1995 |
bde |
Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the misplaced extern declarations (mostly prototypes of interrupt handlers) that this exposed. The prototypes should be moved back to the driver sources when the functions are staticalized.
Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be included when building LKMs so define a wart in bsd.kmod.mk to help guard against including it.
|
12071 |
04-Nov-1995 |
bde |
Moved prototypes for devswitch functions from conf.c and driver sources to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
|
11939 |
30-Oct-1995 |
bde |
Mask netisrs during softtty isrs. This may fix PR 798. SLIP and PPP line discipline interrupt handlers more or less expect to be called at spltty() == splimp(), although they have internal splimp()s that are bogus if this expectation is satisfied. They are called at splsoftty() from many tty drivers, so they were not protected from being reentered from their own netisrs. They certainly don't expect that but are apparently remarkably robust if it occurs. The problem in PR 798 seems to be caused by pppstart() being reentered and finishing off the output in progress by following the (stale) sc->sc_outm pointer. Then the original pppstart() finds garbage in m2 after MFREE(m, m2). slstart() doesn't have internal state like sc_outm so reentry of it probably only causes out of order and dropped packets.
|
11875 |
28-Oct-1995 |
markm |
Theodore Ts'po's random number gernerator for Linux, ported by me. This code will only be included in your kernel if you have 'options DEVRANDOM', but that will fall away in a couple of days. Obtained from: Theodore Ts'o, Linux
|
11452 |
12-Oct-1995 |
wollman |
Reduce jitter of Pentium microtime() implementation by letting the counter free-run and doing a subtract in microtime() rather than resetting the counter to zero at every clock tick. In combination with the changes to kern_clock.c, this should eliminate all the immediately obvious sources of systematic jitter in timekeeping on Pentium machines.
|
11222 |
05-Oct-1995 |
phk |
remove GCC divsi3 routines which are never used.
|
11189 |
04-Oct-1995 |
jkh |
This upgrades the driver for Cronyx-Sigma multiplexor boards from version 1.2 to version 1.9. Submitted by: Serge Vakulenko, <vak@cronyx.ru>
|
10910 |
19-Sep-1995 |
bde |
Fix benign type mismatches in isa interrupt handlers. Many returned int instead of void.
|
10707 |
13-Sep-1995 |
peter |
Move some kernel-only stuff to a kernel-only file. Submitted by: bde
|
10618 |
08-Sep-1995 |
julian |
Submitted by: Luigi Rizzo Obtained from: Luigi and gunther yeah I forgot this one....
|
10537 |
03-Sep-1995 |
julian |
devfs changes.. changes to allow devices that don't probe (e.g. /dev/mem) to create devfs entries this required giving 'configure' its own SYSINIT entry so we could duck in just before it with a DEVFS init and some device inits.. my devfs now looks like: ./misc ./misc/speaker ./misc/mem ./misc/kmem ./misc/null ./misc/zero ./misc/io ./misc/console ./misc/pcaudio ./misc/pcaudioctl ./disks ./disks/rfloppy ./disks/rfloppy/fd0.1440 ./disks/rfloppy/fd1.1200 ./disks/floppy ./disks/floppy/fd0.1440 ./disks/floppy/fd1.1200 also some sligt cleanups.. DEVFS needs a lot of work but I'm getting back to it..
|
10508 |
01-Sep-1995 |
jkh |
Jim's latest fixes. Submitted by: james
|
10391 |
28-Aug-1995 |
jkh |
Kernel components of Matrox Meteor driver. Submitted by: Mark Tinguely <tinguely@plains.nodak.edu> and Jim Lowe <james>
|
10343 |
26-Aug-1995 |
bde |
Don't declare a nonexistent function.
Fix formatting of recent changes.
|
10342 |
26-Aug-1995 |
bde |
Remove "memory" clobber statement from enable_intr(). Enabling interrupts doesn't invalidate loaded variables.
Fix formatting of recent changes.
|
10160 |
22-Aug-1995 |
peter |
add a new Debug mode.. "DBG_OPTIM" - for observing the L_RINT bypass
|
10092 |
17-Aug-1995 |
dg |
Killed some unused stuff inherited from Bill Jolitz. Note that since this changes the size of the pcb struct, gdb will need to be rebuilt or debugging won't work correctly.
Reviewed by: Bruce Evans
|
10044 |
13-Aug-1995 |
peter |
Next round of cleanups. Some more debugging hooks added, si_softc definition moved to the driver proper, so that <machine/si.h> can be #included by user programs without needing to include stuff from /sys/i386/isa.. Various (now) redundant features removed, eg: the locks on IXANY and HWFLOW as these are now done with the "initial" and "lock" termios devices. Note that it still (for reasons unknown) appears to be masking data to 7-bit with ppp - hence the cleanup to support the debugging via 'sicontrol'
|
10015 |
09-Aug-1995 |
peter |
Bring in my long-overdue version of the Specialix driver.
This was originally ported to BSDI by Andy Rutter <andy@acronym.co.uk>. At the end of the day, this code has very little in common with Andy's version, or the Specialix SYSV version. Essentially it has been gradually and almost completely rewritten, with LOTS of advice and inspiration from Bruce Evans. There are a couple of missing bits still, but they are minor.
The user-mode "sicontrol" program is in sad shape and will come in soon. Transparent printing died a timely death.. Maybe later..
Jeremy Rolls @ Specialix (Development directory) has confirmed this is OK to distribute, and Andy personally sent me his version that I started from.
Although this driver stood up to a nasty stress-test in this form, I am not confident that there are no nasty bugs lurking.
People are welcome to try it, but dont go out and buy one just yet.. :-) And *DONT* use it on a mission-critical machine... This is ALPHA QUALITY!
|
10010 |
09-Aug-1995 |
dyson |
Fixed my usage of "asm" instead of "__asm" and "volatile" instead of "__volatile". Note also that the original mods that were submitted by me were as a result of a discussion between various FreeBSD contributors.
Submitted by: peter@haywire.dialix.com (Peter Wemm)
|
10004 |
08-Aug-1995 |
dyson |
Make the spl oriented inline functions less likely to allow potentially volatile memory to be kept in registers during the "call" (inline expansion.) Do the same for pmap_update.
|
9750 |
28-Jul-1995 |
jkh |
Merge in changes for VOXWARE 3.05 Submitted by: Amancio Hasty and Jim Lowe
|
9714 |
25-Jul-1995 |
bde |
Fix bogus constraint "i" that only worked with -O. The cases where it didn't work are somewhat bogusly optimized away before the constraint is checked. We still expect constants passed to inline functions to remain constant, but if the compiler ever decides that they aren't constant then it will just generate slightly slower code instead of an error.
|
9578 |
19-Jul-1995 |
dg |
Rewrote memory sizing code to generally deal with holes in extended memory. This code change should allow certain Compaq machines with a 128K hole at 16MB to work.
|
9546 |
16-Jul-1995 |
phk |
Make the bootinfo structure visible from sysctl. This can be used in libdisk to guess a better bios-geometry.
|
9507 |
13-Jul-1995 |
dg |
NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct proc or any VM system structure will have to be rebuilt!!!
Much needed overhaul of the VM system. Included in this first round of changes:
1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages, haspage, and sync operations are supported. The haspage interface now provides information about clusterability. All pager routines now take struct vm_object's instead of "pagers".
2) Improved data structures. In the previous paradigm, there is constant confusion caused by pagers being both a data structure ("allocate a pager") and a collection of routines. The idea of a pager structure has escentially been eliminated. Objects now have types, and this type is used to index the appropriate pager. In most cases, items in the pager structure were duplicated in the object data structure and thus were unnecessary. In the few cases that remained, a un_pager structure union was created in the object to contain these items.
3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now be removed. For instance, vm_object_enter(), vm_object_lookup(), vm_object_remove(), and the associated object hash list were some of the things that were removed.
4) simple_lock's removed. Discussion with several people reveals that the SMP locking primitives used in the VM system aren't likely the mechanism that we'll be adopting. Even if it were, the locking that was in the code was very inadequate and would have to be mostly re-done anyway. The locking in a uni-processor kernel was a no-op but went a long way toward making the code difficult to read and debug.
5) Places that attempted to kludge-up the fact that we don't have kernel thread support have been fixed to reflect the reality that we are really dealing with processes, not threads. The VM system didn't have complete thread support, so the comments and mis-named routines were just wrong. We now use tsleep and wakeup directly in the lock routines, for instance.
6) Where appropriate, the pagers have been improved, especially in the pager_alloc routines. Most of the pager_allocs have been rewritten and are now faster and easier to maintain.
7) The pagedaemon pageout clustering algorithm has been rewritten and now tries harder to output an even number of pages before and after the requested page. This is sort of the reverse of the ideal pagein algorithm and should provide better overall performance.
8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup have been removed. Some other unnecessary casts have also been removed.
9) Some almost useless debugging code removed.
10) Terminology of shadow objects vs. backing objects straightened out. The fact that the vm_object data structure escentially had this backwards really confused things. The use of "shadow" and "backing object" throughout the code is now internally consistent and correct in the Mach terminology.
11) Several minor bug fixes, including one in the vm daemon that caused 0 RSS objects to not get purged as intended.
12) A "default pager" has now been created which cleans up the transition of objects to the "swap" type. The previous checks throughout the code for swp->pg_data != NULL were really ugly. This change also provides the rudiments for future backing of "anonymous" memory by something other than the swap pager (via the vnode pager, for example), and it allows the decision about which of these pagers to use to be made dynamically (although will need some additional decision code to do this, of course).
13) (dyson) MAP_COPY has been deprecated and the corresponding "copy object" code has been removed. MAP_COPY was undocumented and non- standard. It was furthermore broken in several ways which caused its behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will continue to work correctly, but via the slightly different semantics of MAP_PRIVATE.
14) (dyson) Sharing maps have been removed. It's marginal usefulness in a threads design can be worked around in other ways. Both #12 and #13 were done to simplify the code and improve readability and maintain- ability. (As were most all of these changes)
TODO:
1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing this will reduce the vnode pager to a mere fraction of its current size.
2) Rewrite vm_fault and the swap/vnode pagers to use the clustering information provided by the new haspage pager interface. This will substantially reduce the overhead by eliminating a large number of VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be improved to provide both a "behind" and "ahead" indication of contiguousness.
3) Implement the extended features of pager_haspage in swap_pager_haspage(). It currently just says 0 pages ahead/behind.
4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps via a much more general mechanism that could also be used for disk striping of regular filesystems.
5) Do something to improve the architecture of vm_object_collapse(). The fact that it makes calls into the swap pager and knows too much about how the swap pager operates really bothers me. It also doesn't allow for collapsing of non-swap pager objects ("unnamed" objects backed by other pagers).
|
9343 |
28-Jun-1995 |
bde |
Fix standards conformance bugs in <signal.h>:
include/signal.h: There was massive namespace pollution from including <sys/types.h>. POSIX functions were declared even when _ANSI_SOURCE is defined.
sys.sys/signal.h: NSIG was declared even if _ANSI_SOURCE or _POSIX_SOURCE is defined. sig_atomic_t wasn't declared if _POSIX_SOURCE is defined. Declare a typedef for signal handling functions and use it to unobfuscate declarations and to avoid half-baked function types that cause unwanted compiler warnings at certain warning levels. Fix confusing comment about SA_RESTART.
sys/i386/include/signal.h: This has to be included to get the declaration of sig_atomic_t even when _ANSI_SOURCE is defined, so be more careful about polluting the ANSI namespace.
Uniformize idempotency ifdefs.
|
9341 |
28-Jun-1995 |
bde |
Define macros _BSD_OFF_T_ and _BSD_PID_T_ suitable for use instead of the typedefs off_t and pid_t when use of the latter would cause namespace pollution. These macros are used like _BSD_VA_LIST_ and aren't #undef'ed when the corresponding typedef is declared. off_t is very machine-dependent and should never have been decided in <sys/types.h> (its declaration is compiler-dependent). pid_t isn't very machine-dependent, but this might change. `long' is a wasteful type for it if longs are longer than ints.
Move the definition of _BSD_VA_LIST_ away from the comment that suggests that it is #undefed when va_list is declared.
|
8876 |
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
8748 |
25-May-1995 |
dg |
Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS" in machdep.c (it should use the global nmbclusters). Moved the calculation of nmbclusters into conf/param.c (same place where nmbclusters has always been assigned), and made the calculation include an extra amount based on "maxusers". NMBCLUSTERS can still be overrided in the kernel config file as always, but this change will make that generally unnecessary. This fixes the "bug" reports from people who have misconfigured kernels seeing the network hang when the mbuf cluster pool runs out.
Reviewed by: John Dyson
|
8521 |
14-May-1995 |
dg |
Added apersand constraint to make sure that the source and destination registers aren't combined.
Reviewed by: Bruce Evans and David Greenman Submitted by: John Dyson
|
8448 |
11-May-1995 |
bde |
Add variable `idelayed' and macros setdelayed() and schedsofttty() to access it. setdelayed() actually ORs the bits in `idelayed' into `ipending' and clears `idelayed'.
Call setdelayed() every (normal) clock tick to convert delayed interrupts into pending ones.
Drivers can set bits in `idelayed' at any time to schedule an interrupt at the next clock tick. This is more efficient than calling timeout(). Currently only software interrupts can be scheduled.
|
8446 |
11-May-1995 |
bde |
Add loadandclear(). It atomically loads a value from memory, clears the value in memory and returns the original value.
|
8426 |
11-May-1995 |
wollman |
Make networking domains drop-ins, through the magic of GNU ld. (Some day, there may even be LKMs.) Also, change the internal name of `unixdomain' to `localdomain' since AF_LOCAL is now the preferred name of this family. Declare netisr correctly and in the right place.
|
8265 |
04-May-1995 |
dg |
Correct the definition for the (unused) cpu_setstack().
|
7666 |
08-Apr-1995 |
joerg |
Update pcvt to 3.20 b24
|
7558 |
01-Apr-1995 |
joerg |
Update pcvt to 3.20b23
Submitted by: Hellmuth Michaelis <hm@altona.hamburg.com>
|
7430 |
28-Mar-1995 |
bde |
Add and move declarations to fix all of the warnings from `gcc -Wimplicit' (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
|
7403 |
26-Mar-1995 |
dg |
Removed declaration of pmap_changebit()...it is no longer exported.
Submitted by: John Dyson
|
7090 |
16-Mar-1995 |
bde |
Add and move declarations to fix all of the warnings from `gcc -Wimplicit' (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
|
6959 |
08-Mar-1995 |
ugen |
Remove redundant IORW definition.. because of this definition never ioctl's for sound devices worked..For me this resulted also in loss of snd1 device...
|
6914 |
05-Mar-1995 |
joerg |
Update to beta3.20/b22
|
6865 |
03-Mar-1995 |
dg |
Preserve reverse link integraty while doing the queue insertion.
|
6644 |
22-Feb-1995 |
jmz |
Put the joystick status in a struct {int x, y, b1, b2;} rather than in a dummy array of 4 integers. Declare the struct in the header file and update the man page.
|
6558 |
19-Feb-1995 |
gpalmer |
Bruces fixes for large filesystems
Submitted by: Bruce Evans <bde@zeta.org.au>
|
6512 |
17-Feb-1995 |
phk |
This is the latest version of the APM stuff from HOSOKAWA, I have looked briefly over it, and see some serious architectural issues in this stuff.
On the other hand, I doubt that we will have any solution to these issues before 2.1, so we might as well leave this in.
Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much in the normal case.
Reviewed by: phk Submitted by: HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
|
6503 |
16-Feb-1995 |
bde |
Fix syntax errors in #ifdefed out code.
|
6380 |
14-Feb-1995 |
sos |
First attempt to run linux binaries. This is only the changes needed to the generic kernel. The actual emulator is a separate LKM. (not finished yet, sorry). Submitted by: sos@freebsd.org & sef@kithrup.com
|
6369 |
14-Feb-1995 |
phk |
Whoops! back out last commit partly.
|
6368 |
14-Feb-1995 |
phk |
YFfix.
|
6367 |
14-Feb-1995 |
phk |
susword -> systm.h
|
6347 |
13-Feb-1995 |
jkh |
The following patches are for the sound drivers. These changes will add a an ioctl call to set the transfer block size (SNDCTL_DSP_SETBLKSIZE) and add the select system call to the drivers. They also fix a problem with the #EXCLUDE macros for the PAS-16 card. Submitted by: Jim Lowe <james@blatz.cs.uwm.edu>
|
6323 |
12-Feb-1995 |
jkh |
Rename the local variable used by various macros outside the user's namespace. Reported-By: "Philippe Charnier" <charnier@lirmm.fr>
|
6219 |
06-Feb-1995 |
jkh |
The very minimum driver required to support a Video Spigot. See the copyright notices in the code for information on where to go to pick up additional useful bits. Submitted by: Jim Lowe <james@blatz.cs.uwm.edu>
|
6195 |
05-Feb-1995 |
jkh |
Add pcvt's header files. Submitted by: hm
|
6178 |
04-Feb-1995 |
se |
Moved "#include <pci/pcivar.h>" from "usr.sbin/lsdev/i386.c" to "/sys/i386/include/devconf.h", where it really belongs.
|
6165 |
03-Feb-1995 |
bde |
Don't define CLK_TCK here.
Uniformize idempotency ifdef.
|
6162 |
03-Feb-1995 |
bde |
Define _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ to support correct definitions of CLK_TCK and CLOCKS_PER_SEC.
|
6120 |
02-Feb-1995 |
jkh |
Since the pci directory has moved, this required updating.
|
5994 |
28-Jan-1995 |
sos |
Third round in syscons update.
Display update method changed, now allways write in memory buffer, then periodically update physical display. Speed improvements (now > 5 times faster than the old syscons). History now circular buffer, with changeable size. History scroll by up/down line, up/down page, home and end. Backtab proberly implemented. Now space for 96 function keys, 63 allocated standard, default now SCO/SYSV compat again as in the old days. New keyboard definition files ~share/syscons/keymaps/* Misc fixes for old "hacks" that broke SCO/SYSV compat. More that I forgot before writing this...
|
5937 |
26-Jan-1995 |
ache |
DOn't use hardcode values for L_FN & L_SCR
|
5934 |
26-Jan-1995 |
ache |
Increase NUM_FKEYS to 65
|
5908 |
25-Jan-1995 |
bde |
Load the kernel symbol table in the boot loader and not at compile time. (Boot with the -D flag if you want symbols.)
Make it easier to extend `struct bootinfo' without losing either forwards or backwards compatibility.
ddb_aout.c: Get the symbol table from wherever the loader put it. Nuke db_symtab[SYMTAB_SPACE].
boot.c: Enable loading of symbols. Align them on a page boundary. Add printfs about the symbol table sizes. Pass the memory sizes to the kernel. Fix initialization of `unit' (it got moved out of the loop). Fix adding the bss size (it got moved inside an ifdef). Initialize serial port when RB_SERIAL is toggled on. Fix comments. Clean up formatting of recently added code.
io.c: Clean up formatting of recently added code.
netboot/main.c, machdep.c, wd.c: Change names of bootinfo fields.
LINT: Nuke SYMTAB_SPACE. Fix comment about DODUMP.
Makefile.i386: Nuke use of dbsym. Exclude gcc symbols from kernel unless compiling with -g. Remove unused macro. Fix comments and formatting.
genassym.c: Generate defines for some new bootinfo fields. Change names of old ones.
locore.s: Copy only the valid part of the `struct bootinfo' passed by the loader. Reserve space for symbol table, if any.
machdep.c: Check the memory sizes passed by the loader, if any. Don't use them yet.
bootinfo.h: Add a size field so that we can resolve some mismatches between the loader bootinfo and the kernel boot info. The version number is not so good for this because of historical botches and because it's harder to maintain. Add memory size and symbol table fields. Change the names of everything.
Hacks to save a few bytes:
asm.S, boot.c, boot2.S: Replace `ouraddr' by `(BOOTSEG << 4)'.
boot.c: Don't statically initialize `loadflags' to 0. Disable the "REDUNDANT" code that skips the BIOS variables. Eliminate `total'. Combine some more printfs.
boot.h, disk.c, io.c, table.c: Move all statically initialzed data to table.c.
io.c: Don't put the A20 gate bits in a variable.
|
5904 |
25-Jan-1995 |
jmz |
ioctls for the joystick driver
|
5853 |
24-Jan-1995 |
ache |
Fix stdarg.h for GNU C using builtin_next_arg
|
5838 |
24-Jan-1995 |
dg |
Moved various pmap 'bit' test/set functions back into real functions; gcc generates better code at the expense of more of it.
Submitted by: John Dyson
|
5809 |
23-Jan-1995 |
dg |
Decrease MCLBYTES from 4k back to 2k. It isn't likely that we'll be doing page flipping anytime soon and 4k just wastes memory. Performance via the looback interface will decrease slightly by this change. Idealy, we need buffers that can have variable sizes, but this requires a rewrite of far too much code at the moment.
|
5747 |
20-Jan-1995 |
sos |
Second round in syscons update:
Support for pseudo graphic mouse cursor (not complete yet) Some cheap speed fixes. More cleanups. Call ourselves scxxxx finally.
|
5603 |
14-Jan-1995 |
bde |
Fix security holes in sigreturn(), ptrace() and procfs. sigreturn() attempted to check for insecure and fatal eflags and segment selectors, but missed many cases and got the IOPL check back to front. The other syscalls didn't check at all.
sys_process.c, machdep.c: Only allow PT_WRITE_U to write to the registers (ordinary and FP).
psl.h, locore.s, machdep.c: Eliminate PSL_MBZ, PSL_MBO and PSL_USERCLR. We are not supposed to assume anything about the reserved bits. Use PSL_USERCHANGE and PSL_KERNEL instead. Rename PSL_USERSET to PSL_USER.
exception.s: Define a private label for use by doreti when returning to user mode fails.
machdep.c: In syscalls, allow changing only the eflags that can be changed on 486's in user mode (no longer attempt to allow benign IOPL changes; allow changing the nasty PSL_NT; don't allow changing the i586 bits).
Don't attempt to check all the cases involving invalid selectors and %eip's. Just check for privilege violations and let the invalid things cause a trap.
procfs_machdep.c: Call the ptrace register functions to do all the work for reading and writing ordinary registers and for single stepping.
trap.c: Ignore traps caused by PSL_NT being set. Previously, users could cause a fatal trap in user mode by setting PSL_NT and executing an iret, and a fatal trap in kernel mode by setting PSL_NT and making a syscall. PSL_NT was cleared too late and not in enough modes to fix the problem.
Make all traps in user mode (except T_NMI) nonfatal.
Recover from traps caused by attempting to load invalid user registers in doreti by restarting the traps so that they appear to occur in user mode. ---
Fix bogons that I noticed while fixing the above:
psl.h: Fix some comments.
Uniformize idempotency ifdef.
exception.s, machdep.c: Remove rsvd[0-14]. rsvd0 hasn't been reserved since the 486 came out. Replace rsvd0 by `align'. rsvd[0-11] used wrong (magic non-unique) trap numbers. Replace rsvd[1-14] by rsvd.
locore.s: Enable alignment check flag on 486's and 586's.
machdep.c: Use a better type for kstack[].
Use TFREGP() to find the registers.
Reformat ptrace functions from SEF to something closer to KNF.
procfs_machdep.c: The wrong pointer to the registers got fixed as a side effect.
Implement reading and writing of FP registers.
/proc/*/*regs now work (only) for processes that are in memory.
Clean up comments.
trap.c, trap.h: Remove unused trap types.
|
5594 |
14-Jan-1995 |
bde |
Enable define of CR0_AM to prepare for implementing alignment checking.
Uniformize idempotency ifdef.
|
5593 |
14-Jan-1995 |
bde |
Declare a real `struct fpreg' to prepare for implementing reading and writing of FP regs for procfs.
Uniformize idempotency ifdef.
|
5592 |
14-Jan-1995 |
bde |
Remove reference to impossible trap type T_KDBTRAP. We don't support watchpoints.
Uniformize idempotency ifdef.
|
5536 |
12-Jan-1995 |
sos |
First round in syscons update. Several new features has been added:
No kernel config options anymore besides keyboard language layout. Virtual consoles are now dynamically allocated, no NCONS anymore. Software cursor blinking/nonblinking. Visual bell for laptops (don't beep at meetings :-). Cursor/bell default type setable via config "flags" instead of as defines. Cursor/bell type setable via ioctl's. New video modes 80x30 80x60 for some laptops, and those with multisync monitors. Scroll-lock history (length currently fixed at 100 lines). Lots of cleanups, some only commented out for now (will goaway soon). Support for new features in vidcontrol/kbdcontrol. Updated manpages.
|
5455 |
09-Jan-1995 |
dg |
These changes embody the support of the fully coherent merged VM buffer cache, much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D.
The majority of the merged VM/cache work is by John Dyson.
The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme.
vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering.
vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff.
vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption.
vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up.
vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme.
pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs.
vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping.
proc.h Fixed the problem that the p_lock flag was not being cleared on a fork.
swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore.
machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme.
machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed.
ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers.
Submitted by: John Dyson and David Greenman
|
5428 |
07-Jan-1995 |
jkh |
Gunther Schadow <gusw@fub46.zedat.fu-berlin.de>'s driver for the Genius GS-4500 hand scanner. Submitted by: gusw@fub46.zedat.fu-berlin.de
|
5378 |
04-Jan-1995 |
dg |
Corrected the list of volatile registers for outsb, outsw, and outsl. This bug caused my ethernet driver to break, among other things no doubt.
|
5350 |
03-Jan-1995 |
bde |
Replace sv_ex_tw by padding (it is no longer used; the tag word in sv_env is valid).
Expand comment about bogus padding for emulators.
Update prototpe for npxinit().
|
5290 |
30-Dec-1994 |
bde |
spl.h: Don't calculate imask for splstatclock() every call.
Remove declaration of nonexistent variable `high_imask'.
Sort declarations of imasks and spl's.
|
5143 |
18-Dec-1994 |
dg |
Add two more page table pages to keep 64MB machines happy.
|
4931 |
03-Dec-1994 |
bde |
Disable CLKF_BASEPRI() again. I forgot to edit an unwanted change out of the diffs for the previous commit.
|
4929 |
03-Dec-1994 |
bde |
i386/exception.s, Keep track of interrupt nesting level. It is normally 0 for syscalls and traps, but is fudged to 1 for their exit processing in case they metamorphose into an interrupt handler.
i386/genassym.c; Remove support for the obsolete pcb_iml and pcb_cmap2.
Add support for pcb_inl.
i386/swtch.s: Fudge the interrupt nesting level across context switches and in the idle loop so that the work for preemptive context switches gets counted as interrupt time, the work for voluntary context switches gets counted mostly as system time (the part when curproc == 0 gets counted as interrupt time), and only truly idle time gets counted as idle time.
Remove obsolete support (commented out and otherwise) for pcb_iml.
Load curpcb just before curproc instead of just after so that curpcb is always valid if curproc is. A few more changes like this may fix tracing through context switches.
Remove obsolete function swtch_to_inactive().
include/cpu.h: Use the new interrupt nesting level variable to implement a non-fake CLF_INTR() so that accounting for the interrupt state works.
You can use top, iostat or (best) an up to date systat to see interrupt overheads. I see the expected huge interrupt overheads for ISA devices (on a 486DX/33, about 55% for an IDE drive transferring 1250K/sec and the same for a WD8013EBT network card transferring 1100K/sec). The huge interrupt overheads for serial devices are unfortunately normally invisible.
include/pcb.h: Remove the obsolete pcb_iml and pcb_cmap2. Replace them by padding to preserve binary compatibility.
Use part of the new padding for pcb_inl.
isa/icu.s: isa/vector.s: Keep track of interrupt nesting level.
|
4911 |
02-Dec-1994 |
wollman |
This commit was generated by cvs2svn to compensate for changes in r4910, which included commits to RCS files with non-trunk default branches.
|
4818 |
26-Nov-1994 |
phk |
Declare "extern int bootverbose", so that device-drivers and others easily can find it.
|
4599 |
18-Nov-1994 |
phk |
Declare the bootinfo structure in the kernel.
|
4598 |
18-Nov-1994 |
phk |
Add space for the bios-geometry in the bootinfo struct.
|
4514 |
15-Nov-1994 |
bde |
Add prototype for Debugger().
|
4501 |
15-Nov-1994 |
bde |
Make gdt_segs[] public again for APM.
Make ldt[] public again and restore currentldt and _default_ldt for USER_LDT.
|
4479 |
14-Nov-1994 |
bde |
Rewrite almost everything.
Alphabetize.
Write all i/o functions in sleep so that we don't use anything from NetBSD.
Restore the correct type of u_int for ports. This saves a whole cycle per i/o on 486's.
Change `inline' back to __inline to avoid compiler warnings with -Wreally-all.
Don't implement bdb() unless BDE_DEBUGGER is defined. Declare bdb_exists outside the function to avoid hundreds of compiler warnings.
Let the compiler pick the register in asms if possible.
Implement ffs() using inline asm(). gcc provides a slightly different one. It was broken in gcc-2.4.5 but works now. Declaring a correct version inline ensures getting a correct version. FreeBSD-1.1.5 has an slow inline version but FreeBSD-2.0 has a library version (which probably never gets used).
Do inb() and outb() without using %edx for constant ports below 0x100.
Remove casts to the same type in queue functions.
Declare prototypes for everything implemented i386/*.s and also for everything that is normally implemented as an inline here (I don't like the current complete dependency on gcc). Ifdef out the prototypes that are declared elsewhere. THere should be a separate header to declare things implemented in i386/*.s, but then it would be harder to override declarations with inlines.
${UII}
|
4473 |
14-Nov-1994 |
bde |
Remove 1.5+K of bloat for unused idt entries.
Partly support BDE_DEBUGGER. Still broken by conflict with APM. Does nothing if BDE_DEBUGGER is not defined.
Clean up prototypes and data declarations. Declare most of the segment functions that are implemented in support.s. Make data private in machdep.c if possible.
Parenthesize expressions in macros properly!
${Uniformize idempotency ifdef}.
|
4472 |
14-Nov-1994 |
bde |
Remove extra idempotency ifdef and uniformize the other one.
Comment about support for 4 different spellings of KERNEL.
|
4471 |
14-Nov-1994 |
bde |
Declare inline functions as __inline and with new-style parameter lists to avoid compiler warnings.
Clean up prototypes: alphabetize; don't use redundant `extern' or meaningless `extern inline'.
Uniformize idempotency ifdef.
|
4319 |
09-Nov-1994 |
bde |
Don't declare DELAY() here. Callers should include <machine/clock.h>.
|
4175 |
05-Nov-1994 |
bde |
Declare all functions exported by the npx driver.
Uniformize idempotency ifdefs.
|
4174 |
05-Nov-1994 |
bde |
Declare the full uglyness of the interfaces to the clock driver (except things declared in machine-independent files).
|
4173 |
05-Nov-1994 |
bde |
Disable the direct call from hardclock() to softclock(). Support for it is incomplete and buggy. There is no problem unless Xintr0() is reentered or should be reentered, but high clock interrupt frequencies for pcaudio cause Xintr0() to be reentered (or clock ticks to be lost when Xintr0() should have been reentered but wasn't), and we lose little by delaying the call to softclock().
Move declarations related to the clock driver to clock.h.
Move declarations related to the npx driver to npx.h.
Clean up the remaining declarations.
|
4131 |
04-Nov-1994 |
jkh |
__386BSD__ -> __FreeBSD__
I know that many of these entries are bogus and need to be revisited, but let's get the tree working again for now and then do a pass through looking at all the __FreeBSD__ entries, shall we?
|
4099 |
02-Nov-1994 |
se |
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> Modifications required for PCI support.
|
4009 |
30-Oct-1994 |
joerg |
Included the command definition for FD_DEBUG. This way, it's possible for a user to activate/deactivate floppy driver debugging, even if (s)he doesn't like the overhead of running DDB. Since some ppl tend to have problems with their drives, this might be valuable for investigations.
|
3816 |
23-Oct-1994 |
wollman |
Finished device configuration database work for all ISA devices (except `ze') and all SCSI devices (except that it's not done quite the way I want). New information added includes:
- A text description of the device - A ``state''---unknown, unconfigured, idle, or busy - A generic parent device (with support in the m.i. code) - An interrupt mask type field (which will hopefully go away) so that . ``doconfig'' can be written
This requires a new version of the `lsdev' program as well (next commit).
|
3722 |
19-Oct-1994 |
bde |
Fix the test for the code segment being the usual one. Unusual code segments can still cause panics. Their pc is converted to 0 and 0 is only checked for in one place before use.
|
3713 |
19-Oct-1994 |
wollman |
Add support for devconf to a large number of device drivers, and do the right thing in dev_goawayall() when kdc_goaway is null.
|
3704 |
19-Oct-1994 |
wollman |
Move some declarations to more appropriate header files.
|
3682 |
18-Oct-1994 |
ache |
Remove CPU_COLORDISP, GIO_COLOR now exists
|
3676 |
17-Oct-1994 |
wollman |
Add new definitions for lsdev.
|
3671 |
17-Oct-1994 |
sos |
Added more SCO compat ioctl's.
|
3638 |
16-Oct-1994 |
wollman |
Machine-dependent parts of device configuration table.
|
3625 |
15-Oct-1994 |
ache |
CPU_COLORDISP sysctl added for console display type
|
3488 |
10-Oct-1994 |
phk |
Cosmetics. Added a prototype.
|
3437 |
08-Oct-1994 |
phk |
Added prototypes.
|
3385 |
06-Oct-1994 |
rgrimes |
1. bootinfo.h defines the structure passed in to the kernel by the new boot code.
|
3365 |
04-Oct-1994 |
ache |
CPU_DISRTCSET added to disable resettodr(), needed in adjkerntz -i, per Bruce suggestion
|
3315 |
02-Oct-1994 |
phk |
Avoid ddb getting a panic if the code-segment isn't the usual one...
|
3307 |
02-Oct-1994 |
phk |
apm_bios.h: removed the equiv-stuff. Not needed now that the kernel module works correctly.
clock.h & reg.h: prototypes.
|
3272 |
01-Oct-1994 |
dg |
Added Cortex-I Frame Grabber by Paul S. LaFollette, Jr.
Submitted by: Paul S. LaFollette, Jr.
|
3264 |
01-Oct-1994 |
dg |
Added $Id$
|
3263 |
01-Oct-1994 |
dg |
Woops, missed these two files; part of HOSOKAWA Tatsumi's APM support.
|
3258 |
01-Oct-1994 |
dg |
Laptop Advanced Power Management support by HOSOKAWA Tatsumi.
Submitted by: HOSOKAWA Tatsumi
|
3256 |
01-Oct-1994 |
swallace |
Use Voxware's new 2.90 soundcard.h. NOTE: 2.9 is backwards compatable with programs compiled with older soundcard.h, but new programs compiled with 2.9 will not work on pre-2.9 sound drivers.
|
3187 |
29-Sep-1994 |
sos |
Changed header sligthly.
|
3144 |
27-Sep-1994 |
dg |
First round of changes to get the sound code working in 2.0.
|
3102 |
25-Sep-1994 |
dg |
Inlined ins/outs functions.
Obtained from: NetBSD
|
3099 |
25-Sep-1994 |
dg |
Undo last change: the ins/outs functions DO NOT return a pointer!
|
3098 |
25-Sep-1994 |
phk |
While in the real world, I had a bad case of being swapped out for a lot of cycles. While waiting there I added a lot of the extra ()'s I have, (I have never used LISP to any extent). So I compiled the kernel with -Wall and shut up a lot of "suggest you add ()'s", removed a bunch of unused var's and added a couple of declarations here and there. Having a lap-top is highly recommended. My kernel still runs, yell at me if you kernel breaks.
|
3095 |
25-Sep-1994 |
joerg |
Copied over the transfer speed definitions from sys/i386/isa/fdreg.h. This is needed for having the fdformat program no longer searching non-public include paths.
|
3058 |
24-Sep-1994 |
dg |
Shuffled macros and definitions around to facilitate architecture independance.
|
3021 |
23-Sep-1994 |
dg |
Increased SHMMAXPGS from 512 to 1024 now that there is plenty of kernel virtual memory.
|
2941 |
20-Sep-1994 |
bde |
Don't provide bogus source operands in some asms. This probably shouldn't matter, but similar bogusness in npx.c causes compiling without -O to fail.
Use __volatile in all asms.
Parenthesize macro args.
Change the names of the macros to avoid namespace pollution.
Remove unnecessary "#ifdef __i386__".
Sort #defines.
Add comments.
|
2918 |
20-Sep-1994 |
bde |
Remove the alias splnone() for spl0(). It was used only once.
|
2914 |
20-Sep-1994 |
ache |
resettodr() now exists, enable it
|
2867 |
18-Sep-1994 |
bde |
Replace `unsigned' by `u_int' so that it is not necessary to include <sys/types.h> before including this header. This header is now idempotent.
Uniformize idempotency #ifdef.
|
2866 |
18-Sep-1994 |
bde |
Clean up #includes. <machine/spl.h> has to be included by almost everything in case an spl inline is used, so this is not the place to include it.
Uniformize idempotency #ifdef.
|
2858 |
18-Sep-1994 |
wollman |
Redo Kernel NTP PLL support, kernel side.
This code is mostly taken from the 1.1 port (which was in turn taken from Dave Mills's kern.tar.Z example). A few significant differences:
1) ntp_gettime() is now a MIB variable rather than a system call. A few fiddles are done in libc to make it behave the same.
2) mono_time does not participate in the PLL adjustments.
3) A new interface has been defined (in <machine/clock.h>) for doing possibly machine-dependent things around the time of the clock update. This is used in Pentium kernels to disable interrupts, set `time', and reset the CPU cycle counter as quickly as possible to avoid jitter in microtime(). Measurements show an apparent resolution of a bit more than 8.14usec, which is reasonable given system-call overhead.
|
2838 |
17-Sep-1994 |
dg |
Updated driver to the 1.1.5 version:
date: 1994/05/22 12:35:38; author: joerg; state: Exp; lines: +6 -6 First round of floppy changes. Try making `fd' more robust.
New features: . ioctl command for setting the drive type (density etc.); restricted to the super-user . ioctl for getting/seting `drive options'; currently only option is FDOPT_NORETRY: inhibit the usual retries; used when verifying a newly formatted track
Fixes: . function prototypes . made all internal functions `static' . cleaned up & corrected .h files . restructured, to make the chaotic function sequence more rational . compiled with -Wall, and cleared all warnings . introduced a mirror for the (write-only) `digital output register', to avoid the current kludge . device probing completed by seeking/recalibrating, and looking for track 0 being found . holding the controller down in reset state while it is idle (and thus saving allot of headaches) . make requests fail that are not a multiple of the (physical) sector size . removed the fixed physical sector size (512 bytes), allowing for any size the controller could handle (128/256/512/1024 bytes) . replaced some silly messages . fixed the TRACE* macro usage, debugging reports should be complete now again (debugging output is HUGE! though) . removed fd_timeout for SEEK command; seeks are always reported by the controller to succeed, since the `success' only refers to the controller's idea of success - there is no hardware line to tell about the seek end (other than the `track 0' line) . catch SENSEI's that report about a `terminated due to READY changed' status - could happen after a controller reset . converted ``hz / <something>'' divide operations to divisors that are powers of two, so gcc can optimize them into shifts . write/format operations are checked against a write-protected medium now *prior* starting the operation . error reports of `invalid command' and `wrong cylinder' will cause shortcuts in the retrier() now . fixed a bug in the retrier() causing bogus block numbers to be reported . fdformat() does care for errors now
Known Bugs: . no attempts have been made (yet) to improve the performance . sometimes, bogus ``seek/recalib failed'' messages are logged; this is still a bug in the driver, but it's not harmful since it's usually caught by the retrier()
Reviewed by: Submitted by: Obtained from:
|
2826 |
16-Sep-1994 |
dg |
Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included from systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some related code.
|
2824 |
16-Sep-1994 |
jkh |
Deal with outw being defined - the declaration clashes.
|
2819 |
16-Sep-1994 |
ache |
CPU_ADJKERNTZ added for resettodtr()
|
2804 |
15-Sep-1994 |
paul |
Include pio.h so that all those drivers that only include cpufunc.h get the faster io macros/inline code rather than call the routines in support.s
This whole area needs some going over.....
|
2801 |
15-Sep-1994 |
paul |
Added MCOUNT_ENTER and MCOUNT_EXIT macros to profile.h
Removed inb function since it's more correctly in pio.h
Copied write_eflags and read_eflags over from npx.c
(Some changes to the macros suggested by Bruce were not made at this time since his suggestions probably apply to all the macros and these inlined/macro definitions need a lot of cleaning up at some point in the future.)
Reviewed by: Bruce
|
2783 |
15-Sep-1994 |
sos |
Added support for many more videomodes, including graphic modes up til 320x200 256col VGA. This is nessesary for the iBCS stuff to work right. (And we get the benefit of more video modes). Uses the videocard BIOS to optain mode tables. Added a "green" saver, switches off the syncs for "green" monitors.
Reviewed by: Submitted by: Obtained from:
|
2689 |
12-Sep-1994 |
dg |
Eliminated a whole pile of ancient (we're taking 4.3BSD) VM system related #define constants. Corrected incorrect VM_MAX_KERNEL_ADDRESS.
Reviewed by: John Dyson
|
2647 |
10-Sep-1994 |
csgr |
Change "asm" to "__asm" - makes it possible to compile code with "-ansi" compiler switch set.
|
2606 |
09-Sep-1994 |
dfr |
Added the psm driver from 1.1.5.
Submitted by: dfr
|
2580 |
08-Sep-1994 |
bde |
Quote the first arg to _IO(). Not quoting it didn't matter because this file is never used.
Uniformize use of idempotence identifier.
|
2579 |
08-Sep-1994 |
bde |
Get all the definitions from DEFS.h and not directly from asmacros.h if KERNEL is not defined. lib/msun/i387/*.S include asmacros.h to get the definitions of ENTRY(), etc. This is bogus since asmacros.h is only supposed to give definitions suitable for the kernel. The current definitions for the kernel almost worked but are missing the ".type" declarations. This caused the linker to print warnings about doubtful relocations for almost anything linked to libm[sun].
Uniformize name and use of idempotence identifier.
|
2578 |
08-Sep-1994 |
bde |
Remove <machine/eflags.h> and all dependencies on it. eflags.h is just the Mach/i386 version of the BSD/vax(?) <machine/psl.h>. The Mach version has slightly better names for many macros but is now out of date and little used. It was originally used even less (for spelling PSL_T as EFL_TF in <machine/db_machdep.h>).
|
2497 |
04-Sep-1994 |
dg |
Improved some comments.
|
2495 |
04-Sep-1994 |
pst |
Detect if we're running on a Cyrix 486DLC and enable automatic cache negation whenever we access memory between 640k and 1M.
Original code from NetBSD 1.0-BETA. The exact origins are unclear but Theo de Raadt, Charles, and Michael V. may have contributed to it.
Submitted by: pst
|
2455 |
02-Sep-1994 |
dg |
Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update(). Made pmap_update an inline assembly function.
|
2440 |
01-Sep-1994 |
dg |
Got rid of some old, unused junk.
|
2246 |
23-Aug-1994 |
dg |
Corrected some comments regarding ptes/pdes.
|
2245 |
23-Aug-1994 |
paul |
Re-enabled inlining of inb. Changed u_int_inb to just inb and deleted define.
The code generated is identical to that generated with the cast so the problem was obviously fixed at some point after gcc 1.4
Reviewed by: Submitted by:
|
2244 |
23-Aug-1994 |
paul |
I've disabled this piece of code since it's what's hosing syscons. Doesn anyone know anything about this or can we just delete it now?
/* * This roundabout method of returning a u_char helps stop gcc-1.40 from * generating unnecessary movzbl's. */ #ifdef disable_for_gcc-2_6_0 #define inb(port) ((u_char) u_int_inb(port)) #endif
static inline u_int u_int_inb(u_int port) { u_char data; /* * We use %%dx and not %1 here because i/o is done at %dx and not at * %edx, while gcc-2.2.2 generates inferior code (movw instead of movl) * if we tell it to load (u_short) port. */ __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port)); return data; }
Reviewed by: Submitted by:
|
2166 |
21-Aug-1994 |
paul |
Made idempotent. Reviewed by: Submitted by:
|
2123 |
19-Aug-1994 |
jkh |
1. Make this idempotent. 2. Hack.
Hack is to define RCSID() to null macro so that new msun stuff will compile. This does NOT belong here, and I DON'T want it to stay, I just need to put this here for now to enable msun and we need to talk about what our RCSID story is supposed to be. We talked about supporting RCSID() one day, and everyone seemed to like the idea reasonably well of making it a macro you could just no-op this way, but we never did anything. Now I see that JTCs code has it and I'm loath to remove it or do anything until we've discussed it some more.
Well, so how about it? What's our story vis-a-vis RCSID() going to be?
Submitted by: jkh
|
2112 |
18-Aug-1994 |
wollman |
Fix up some sloppy coding practices:
- Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above.
NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
|
2086 |
17-Aug-1994 |
sos |
Updated to latest version from 1.1.5.1+ Reviewed by: Submitted by:
|
2074 |
15-Aug-1994 |
wollman |
Enable use of the RTC chip for the statistical clock. While this does not provide the full accuracy of a randomized statistical clock, it does provide greater accuracy than the previous method, while not significantly increasing overhead. It also provides profiling support at 1024 Hz.
You must re-compile config before making a new kernel, or you will end up with unresolved symbols.
Reviewed uy: Bruce evans said it worked for him.
|
2071 |
14-Aug-1994 |
ats |
Submitted by: Bruce Evans Delete the ifdef GPL_EMULATE case here and made the padding work for both types of emulators so that there is no longer a need to compile ps and friends new if you are using the GPL math emulator instead the normal one.
|
2056 |
13-Aug-1994 |
wollman |
Change all #includes to follow the current Berkeley style. Some of these ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference.
This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following:
rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
|
2028 |
11-Aug-1994 |
jkh |
Change outb() as per Bruce's instructions so that it doesn't explicitly try to pass its argument in the ax register. Reviewed by: Submitted by:
|
1998 |
10-Aug-1994 |
wollman |
Add back in CPU detection copde from 1.1.5. As an added bonus, the hw.model MIB variable is now declared correctly.
|
1977 |
09-Aug-1994 |
jkh |
Merge in the necessary bits from 1.1.5.1 to make exec.h and reloc.h happy campers again (e.g. match our own exec format). This should make ld happy. Submitted by: jkh
|
1862 |
05-Aug-1994 |
wollman |
Delete redundant #ifdef __i386__, be consistent about idempotency protection.
Submitted by: Bruce Evans
|
1837 |
04-Aug-1994 |
dg |
Inlined insque and remque.
|
1834 |
04-Aug-1994 |
wollman |
Move ieeefp.h over, and put it in the correct subdirectory this time.
Submitted by: Andrew Moore
|
1817 |
02-Aug-1994 |
dg |
Added $Id$
|
1690 |
06-Jun-1994 |
dg |
trap.c: Vastly improved trap.c from me. This rewritten version has a variety of features, amoung them: higher performance and much higher code quality.
support.s, cpufunc.h: No longer use gs override to enforce range limits - compare directly against VM_MAXUSER_ADDRESS instead. The old way caused problems in preserving the gs selector...and this method is just as fast or faster.
|
1549 |
25-May-1994 |
rgrimes |
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
|
1544 |
25-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1543, which included commits to RCS files with non-trunk default branches.
|
1525 |
20-May-1994 |
sos |
Added prober Id string
|
1432 |
29-Apr-1994 |
gclarkii |
Deleted on ifdef dontdef Added ifdef for GPL_MATH_EMULATE so we get the extra padding that is needed in the save87 struct.
|
1402 |
23-Apr-1994 |
ache |
Sound driver updated to version 2.5
|
1387 |
21-Apr-1994 |
sos |
New file for pcaudio device driver
|
1345 |
07-Apr-1994 |
ache |
Fix arguments of CONS_GETINFO
|
1339 |
06-Apr-1994 |
csgr |
Changes to lpt driver: - ansi prototypes in lpt.c - a bit of tidying in lpt.c - ioctl in lpt.c for switching between polling and using interrupts - added lpt.h - needed for ioctl to allow switching between polling and interrupt-driven modes.
|
1334 |
04-Apr-1994 |
wollman |
First pass at adding locale support. This code only deals with the LC_CTYPE class of locale data, but could be extended to handle other locale classes, as well as message catalogues and other non-locale i18n support.
I have left the old _ctype_ array in place, and moved the ctype.h header to octype.h, so that existing shared binaries will still be able to find and use it as they require.
See /usr/src/share/locale for information on how to create new locale data files (eventually this procedure will be improved). I'd like to have a family of locale files for various countries, languages, and character sets, so please contribute some.
This code was originally written by Paul Borman and contributed to 4.4; I did the integration, and have somewhat tested it. crt0.c probably ought to call setlocale() if it doesn't already, but I'd like for people to create some locale files and try things manually first before I make every program do this.
|
1321 |
02-Apr-1994 |
dg |
New interrupt code from Bruce Evans. In additional to Bruce's attached list of changes, I've made the following additional changes:
1) i386/include/ipl.h renamed to spl.h as the name conflicts with the file of the same name in i386/isa/ipl.h. 2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to *_imask (net_imask, etc). 3) changed vestige of splnet use in if_is to splimp. 4) got rid of "impmask" completely (Bruce had gotten rid of netmask), and are now using net_imask instead. 5) dozens of minor cruft to glue in Bruce's changes.
These require changes I made to config(8) as well, and thus it must be rebuilt.
-DG
from Bruce Evans:
sio: o No diff is supplied. Remove the define of setsofttty(). I hope that is enough.
*.s: o i386/isa/debug.h no longer exists. The event counters became too much trouble to maintain. All function call entry and exception entry counters can be recovered by using profiling kernel (the new profiling supports all entry points; however, it is too slow to leave enabled all the time; it also). Only BDBTRAP() from debug.h is now used. That is moved to exception.s. It might be worth preserving SHOW_BITS() and calling it from _mcount() (if enabled). o T_ASTFLT is now only set just before calling trap(). o All exception handlers set SWI_AST_MASK in cpl as soon as possible after entry and arrange for _doreti to restore it atomically with exiting. It is not possible to set it atomically with entering the kernel, so it must be checked against the user mode bits in the trap frame before committing to using it. There is no place to store the old value of cpl for syscalls or traps, so there are some complications restoring it.
Profiling stuff (mostly in *.s): o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet. o All interesting labels `foo' are renamed `_foo' and all uninteresting labels `_bar' are renamed `bar'. A small change to gprof allows ignoring labels not starting with underscores. o MCOUNT_LABEL() is to provide names for counters for times spent in exception handlers. o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception handlers. Its arg is the pc where the exception occurred. The new mcount() pretends that this was a call from that pc to a suitable MCOUNT_LABEL(). o MEXITCOUNT is to turn off any timer started by MCOUNT().
/usr/src/sys/i386/i386/exception.s: o The non-BDB BPTTRAP() macros were doing a sti even when interrupts were disabled when the trap occurred. The sti (fixed) sti is actually a no-op unless you have my changes to machdep.c that make the debugger trap gates interrupt gates, but fixing that would make the ifdefs messier. ddb seems to be unharmed by both interrupts always disabled and always enabled (I had the branch in the fix back to front for some time :-(). o There is no known pushal bug. o tf_err can be left as garbage for syscalls.
/usr/src/sys/i386/i386/locore.s: o Fix and update BDE_DEBUGGER support. o ENTRY(btext) before initialization was dangerous. o Warm boot shot was longer than intended.
/usr/src/sys/i386/i386/machdep.c: o DON'T APPLY ALL OF THIS DIFF. It's what I'm using, but may require other changes. Use the following: o Remove aston() and setsoftclock(). Maybe use the following: o No netisr.h. o Spelling fix. o Delay to read the Rebooting message. o Fix for vm system unmapping a reduced area of memory after bounds_check_with_label() reduces the size of a physical i/o for a partition boundary. A similar fix is required in kern_physio.c. o Correct use of __CONCAT. It never worked here for non- ANSI cpp's. Is it time to drop support for non-ANSI? o gdt_segs init. 0xffffffffUL is bogus because ssd_limit is not 32 bits. The replacement may have the same value :-), but is more natural. o physmem was one page too low. Confusing variable names. Don't use the following: o Better numbers of buffers. Each 8K page requires up to 16 buffer headers. On my system, this results in 5576 buffers containing [up to] 2854912 bytes of memory. The usual allocation of about 384 buffers only holds 192K of disk if you use it on an fs with a block size of 512. o gdt changes for bdb. o *TGT -> *IDT changes for bdb. o #ifdefed changes for bdb.
/usr/src/sys/i386/i386/microtime.s: o Use the correct asm macros. I think asm.h was copied from Mach just for microtime and isn't used now. It certainly doesn't belong in <sys>. Various macros are also duplicated in sys/i386/boot.h and libc/i386/*.h. o Don't switch to and from the IRR; it is guaranteed to be selected (default after ICU init and explicitly selected in isa.c too, and never changed until the old microtime clobbered it).
/usr/src/sys/i386/i386/support.s: o Non-essential changes (none related to spls or profiling). o Removed slow loads of %gs again. The LDT support may require not relying on %gs, but loading it is not the way to fix it! Some places (copyin ...) forgot to load it. Loading it clobbers the user %gs. trap() still loads it after certain types of faults so that fuword() etc can rely on it without loading it explicitly. Exception handlers don't restore it. If we want to preserve the user %gs, then the fastest method is to not touch it except for context switches. Comparing with VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on a 486, while loading %gs takes 9 cycles and using it takes another. o Fixed a signed branch to unsigned.
/usr/src/sys/i386/i386/swtch.s: o Move spl0() outside of idle loop. o Remove cli/sti from idle loop. sw1 does a cli, and in the unlikely event of an interrupt occurring and whichqs becoming zero, sw1 will just jump back to _idle. o There's no spl0() function in asm any more, so use splz(). o swtch() doesn't need to be superaligned, at least with the new mcounting. o Fixed a signed branch to unsigned. o Removed astoff().
/usr/src/sys/i386/i386/trap.c: o The decentralized extern decls were inconsistent, of course. o Fixed typo MATH_EMULTATE in comments. */ o Removed unused variables. o Old netmask is now impmask; print it instead. Perhaps we should print some of the new masks. o BTW, trap() should not print anything for normal debugger traps.
/usr/src/sys/i386/include/asmacros.h: o DON'T APPLY ALL OF THIS DIFF. Just use some of the null macros as necessary.
/usr/src/sys/i386/include/cpu.h: o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal while the kernel is running. o Don't use var++ to set boolean variables. It fails after a mere 4G times :-) and is slower than storing a constant on [3-4]86s.
/usr/src/sys/i386/include/cpufunc.h: o DON'T APPLY ALL OF THIS DIFF. You need mainly the include of <machine/ipl.h>. Unfortunately, <machine/ipl.h> is needed by almost everything for the inlines.
/usr/src/sys/i386/include/ipl.h: o New file. Defines spl inlines and SWI macros and declares most variables related to hard and soft interrupt masks.
/usr/src/sys/i386/isa/icu.h: o Moved definitions to <machine/ipl.h>
/usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). o More care (not quite enough) is taken to avoid unbounded nesting of interrupts. o The interface to softclock() is changed so that a trap frame is not required. o Fast interrupt handlers are now handled more uniformally. Configuration is still too early (new handlers would require bits in <machine/ipl.h> and functions to vector.s). o splnnn() and splx() are no longer here; they are inline functions (could be macros for other compilers). splz() is the nontrivial part of the old splx().
/usr/src/sys/i386/isa/ipl.h o New file. Supposed to have only bus-dependent stuff. Perhaps the h/w masks should be declared here.
/usr/src/sys/i386/isa/isa.c: o DON'T APPLY ALL OF THIS DIFF. You need only things involving *mask and *MASK and comments about them. netmask is now a pure software mask. It works like the softclock mask.
/usr/src/sys/i386/isa/vector.s: o Reorganize AUTO_EOI* macros. o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust fastintr handlers. o fastintr handlers need to metamorphose into ordinary interrupt handlers if their SWI bit has become set. Previously, sio had unintended latency for handling output completions and input of SLIP framing characters because this was not done.
/usr/src/sys/net/netisr.h: o The machine-dependent stuff is now imported from <machine/ipl.h>.
/usr/src/sys/sys/systm.h o DON'T APPLY ALL OF THIS DIFF. You need mainly the different splx() prototype. The spl*() prototypes are duplicated as inlines in <machine/ipl.h> but they need to be duplicated here in case there are no inlines. I sent systm.h and cpufunc.h to Garrett. We agree that spl0 should be replaced by splnone and not the other way around like I've done.
/usr/src/sys/kern/kern_clock.c o splsoftclock() now lowers cpl so the direct call to softclock() works as intended. o softclock() interface changed to avoid passing the whole frame (some machines may need another change for profile_tick()). o profiling renamed _profiling to avoid ANSI namespace pollution. (I had to improve the mcount() interface and may as well fix it.) The GUPROF variant doesn't actually reference profiling here, but the 'U' in GUPROF should mean to select the microtimer mcount() and not change the interface.
|
1310 |
25-Mar-1994 |
dg |
ifdef KERNEL the pmap_kextract inline function; ps is unhappy otherwise. Pointed out by Frank Terhaar-Yonkers <fty@vislab.epa.gov>.
|
1307 |
24-Mar-1994 |
dg |
From John Dyson: performance improvements to the new bounce buffer code.
|
1288 |
21-Mar-1994 |
dg |
Changed dynamic stack grow code to grow by "SGROWSIZ" amount. Initially allocate SGROWSIZ amount of stack. Also set vm_ssize to the initial stack VM size. Increased DFLSSIZ stack rlimit default to 8MB.
|
1258 |
11-Mar-1994 |
swallace |
Updated include files for sound drivers.
|
1246 |
07-Mar-1994 |
dg |
1) "Pre-faulting" in of pages into process address space Eliminates vm_fault overhead on process startup and mmap referenced data for in-memory pages.
(process startup time using in-memory segments *much* faster)
2) Even more efficient pmap code. Code partially cleaned up. More comments yet to follow.
(generally more efficient pte management)
3) Pageout clustering ( in addition to the FreeBSD V1.1 pagein clustering.)
(much faster paging performance on non-write behind disk subsystems, slightly faster performance on other systems.)
4) Slightly changed vm_pageout code for more efficiency and better statistics. Also, resist swapout a little more.
(less likely to pageout a recently used page)
5) Slight improvement to the page table page trap efficiency.
(generally faster system VM fault performance)
6) Defer creation of unnamed anonymous regions pager until needed.
(speeds up shared memory bss creation)
7) Remove possible deadlock from swap_pager initialization.
8) Enhanced procfs to provide "vminfo" about vm objects and user pmaps.
9) Increased MCLSHIFT/MCLBYTES from 2K to 4K to improve net & socket performance and to prepare for things to come.
John Dyson dyson@implode.root.com David Greenman davidg@root.com
|
1216 |
26-Feb-1994 |
ache |
Bump CLK_TCK to more precise value (128) If you want more precise, use directly getrusage(), because clock() emulated via it.
|
1209 |
24-Feb-1994 |
hsu |
Correct definitions of flags used by sigreturn to validate sigcontext.
|
1089 |
04-Feb-1994 |
chmr |
Make the screen savers runtime switchable. Everybody wants a different default saver, and the size increase in the kernel is minimal ( < 2.5K ).
|
1061 |
01-Feb-1994 |
nate |
From: sos@login.dkuug.dk (S|ren Schmidt) Subject: syscons-1.3 Date: Sat, 29 Jan 94 23:33:50 MET
But here is the (hopefully) final syscons-1.3....
....
I've changed sgetc so it works as the pccons parallel (it now uses a scgetc internally).
[ There were a couple changes that Bruce Evans sent me that were applied to this version along with some changes that S'ren didn't incorporate into the final version. There will be only minor changes if anything from this version to his final release. ]
|
1056 |
31-Jan-1994 |
dg |
Added four pattern memory test routine that is done at startup. ...added filli - "fill integer" support routine.
|
1051 |
31-Jan-1994 |
dg |
WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu <hsu@soda.berkeley.edu>.
|
1048 |
31-Jan-1994 |
dg |
Fix broken bit definitions for pte/pde.
|
1045 |
31-Jan-1994 |
dg |
VM system performance improvements from John Dyson and myself. The following is a summary:
1) increased object cache back up to a more reasonable value. 2) removed old & bogus cruft from machdep.c (clearseg, copyseg, physcopyseg, etc). 3) inlined many functions in pmap.c 4) changed "load_cr3(rcr3())" into tlbflush() and made tlbflush inline assembly. 5) changed the way that modified pages are tracked - now vm_page struct is kept updated directly - no more scanning page tables. 6) removed lots of unnecessary spl's 7) removed old unused functions from pmap.c 8) removed all use of page_size, page_shift, page_mask variables - replaced with PAGE_ constants. 9) moved trunc/round_page, atop, ptoa, out of vm_param.h and into i386/ include/param.h, and optimized them. 10) numerous changes to sys/vm/ swap_pager, vnode_pager, pageout, fault code to improve performance. LRU algorithm modified to be more effective, read ahead/behind values tuned for better performance, etc, etc...
|
1029 |
27-Jan-1994 |
dg |
Removed no longer used "wire" element in pv struct.
|
1019 |
26-Jan-1994 |
ache |
Replace old-style Joerg copyright to berkeley-style, per Joerg request.
|
974 |
14-Jan-1994 |
dg |
"New" VM system from John Dyson & myself. For a run-down of the major changes, see the log of any effected file in the sys/vm directory (swap_pager.c for instance).
|
926 |
03-Jan-1994 |
dg |
Increased maximum and default 'size' limits to more reasonable values.
|
924 |
03-Jan-1994 |
dg |
Convert syscall to trapframe. Based on work done by John Brezak.
|
907 |
21-Dec-1993 |
dg |
Changed pointer type from caddr_t to void * for fillw, insw, outsw, and outsb.
|
891 |
21-Dec-1993 |
ache |
Separate read/write and format GAPs.
|
880 |
19-Dec-1993 |
alm |
adding libc/quad: added _QUAD_HIGH/LOW added (U_)QUAD_MAX/MIN (from NetBSD)
|
879 |
19-Dec-1993 |
wollman |
Make everything compile with -Wtraditional. Make it easier to distribute a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements.
NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
|
877 |
19-Dec-1993 |
ache |
From vak@kiae.su: incorporate Joerg Wunsch floppy formatting code
|
827 |
03-Dec-1993 |
alm |
From: Jeffrey Hsu <hsu@soda.berkeley.edu>
The following patch adds the addr argument to signal handlers.
The kernel with the patch is no more and no less in compliance or in violation of POSIX and ANSI C than the kernel before the patch.
The added functionality this addr argument provides is quite useful. It enables an entire class of algorithms which use mprotect to trace memory references. Beside garbage collectors, I have heard of this technique being applied to debuggers and profilers. The only benchmarking I've performed is using akcl to compile maxima: without the kernel patch, it takes 7 hours to compile maxima, while with stratified garbage collection, it only takes 50 minutes.
Basically, I can't think of a reason not to add the addr argument and there is a compelling need for it.
If you find the patch acceptable, please let me know so I can send my FreeBSD akcl config files to wfs for inclusion in the core akcl release. The old 386BSD config files there won't work on either NetBSD or FreeBSD.
|
805 |
27-Nov-1993 |
ache |
Move soundcard.h & ultrasound.h to proper location <machine/...> to allow application access it.
|
798 |
25-Nov-1993 |
wollman |
Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and add same (sans -Werror) to Makefile for future compilations.
|
785 |
18-Nov-1993 |
rgrimes |
New version of scsi code from Julian
|
778 |
17-Nov-1993 |
wollman |
Fixed comments that start within a comment, so code compiles cleanly with -Wcomment.
|
774 |
16-Nov-1993 |
dg |
new process tracing code from Sean Eric Fagen (sef@kithrup.com). ...also, fixed up the syscall args to make GCC happy.
|
757 |
13-Nov-1993 |
dg |
First steps in rewriting locore.s, and making info useful when the machine panics.
i386/i386/locore.s: 1) got rid of most .set directives that were being used like #define's, and replaced them with appropriate #define's in the appropriate header files (accessed via genassym). 2) added comments to header inclusions and global definitions, and global variables 3) replaced some hardcoded constants with cpp defines (such as PDESIZE and others) 4) aligned all comments to the same column to make them easier to read 5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to /sys/i386/include/asmacros.h 6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code 7) added new global '_KERNend' to store last location+1 of kernel 8) cleaned up zeroing of bss so that only bss is zeroed 9) fix zeroing of page tables so that it really does zero them all - not just if they follow the bss. 10) rewrote page table initialization code so that 1) works correctly and 2) write protects the kernel text by default 11) properly initialize the kernel page directory, upages, p0stack PT, and page tables. The previous scheme was more than a bit screwy. 12) change allocation of virtual area of IO hole so that it is fixed at KERNBASE + 0xa0000. The previous scheme put it right after the kernel page tables and then later expected it to be at KERNBASE +0xa0000 13) change multiple bogus settings of user read/write of various areas of kernel VM - including the IO hole; we should never be accessing the IO hole in user mode through the kernel page tables 14) split kernel support routines such as bcopy, bzero, copyin, copyout, etc. into a seperate file 'support.s' 15) split swtch and related routines into a seperate 'swtch.s' 16) split routines related to traps, syscalls, and interrupts into a seperate file 'exception.s' 17) remove some unused global variables from locore that got inserted by Garrett when he pulled them out of some .h files.
i386/isa/icu.s: 1) clean up global variable declarations 2) move in declaration of astpending and netisr
i386/i386/pmap.c: 1) fix calculation of virtual_avail. It previously was calculated to be right in the middle of the kernel page tables - not a good place to start allocating kernel VM. 2) properly allocate kernel page dir/tables etc out of kernel map - previously only took out 2 pages.
i386/i386/machdep.c: 1) modify boot() to print a warning that the system will reboot in PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user abort with a key on the console. The machine will wait for ever if a key is typed before the reboot. The default is 15 seconds, but can be set to 0 to mean don't wait at all, -1 to mean wait forever, or any positive value to wait for that many seconds. 2) print "Rebooting..." just before doing it.
kern/subr_prf.c: 1) remove PANICWAIT as it is deprecated by the change to machdep.c
i386/i386/trap.c: 1) add table of trap type strings and use it to print a real trap/ panic message rather than just a number. Lot's of work to be done here, but this is the first step. Symbolic traceback is in the TODO.
i386/i386/Makefile.i386: 1) add support in to build support.s, exception.s and swtch.s
...and various changes to various header files to make all of the above happen.
|
737 |
09-Nov-1993 |
ache |
Name of ioctl's include sys/spkr.h changed to machine/speaker.h
|
719 |
07-Nov-1993 |
wollman |
Made all header files idempotent and moved incorrect common data from headers into a related source file. Added cons.h as first step towards moving i386/i386/cons.h to machine/cons.h where it belongs.
|
678 |
28-Oct-1993 |
rgrimes |
Put back the $Id$ string
|
677 |
28-Oct-1993 |
jkh |
This is syscons version 1.1
|
652 |
23-Oct-1993 |
jkh |
Soundcard driver include file (/usr/include/machine/soundcard.h)
|
621 |
16-Oct-1993 |
rgrimes |
Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some minor cleanup. Added $Id$ to files that did not have any version info, etc
|
607 |
15-Oct-1993 |
rgrimes |
param.h:
Mark the fact that PGSHIFT and PDRSHIFT are really the same as PG_SHIFT and PD_SHIFT, these should be collapsed some day soon.
Document that KERNBASE should really be KPTDPTDI << PDRSHIFT, for now leave it as the constant 0xFE000000 until I make a seperate common header file for this stuff (vmaddresses.h?)
Remove NKMEMCLUSTERS define, it was only being used to define VM_KMEM_SIZE, so why have all the indirection. Besides who wants to work in CLBYTE sizes chuncks.
pmap.h:
Fix $Id$ and some other minor format clean ups.
Remove the XXX comment about NKPDE, since it now has the correct value of 7.
Remove unused LASTPTDI and move the APTD into the very end of memory to free up 4MB of kernel virtual address space. Remove unused RSVDPTDI and free up 12MB of kernel virtual address space.
vmparam.h
Fix $Id$.
Increase SHMMAXPGS to 512 (2MB) now that there is room for it to be bigger. The XXX comment stays until the kernel moves down in memory to free up enough space to use the proper default of 4MB.
VM_KMEM_SIZE is now a direct constant stating the size of the kernel malloc region. Increased the value from 3MB to 16MB.
|
589 |
12-Oct-1993 |
rgrimes |
KPTDI_LAST renamed to KPTDI
|
588 |
12-Oct-1993 |
rgrimes |
Eliminate definition of I386_PAGE_SIZE and use NBPG instead
Cleaned up tabs vs spaces after #define to make file consistent. Removed now unused definitions of I386_PAGE_SIZE and I386_PDR_SIZE
Note That these two where unused and had the wrong values anyway! Changed I386_KPDES to NKPDE Changed I386_UPDES to NUPDE
Redid constant assignments of *PTDI's to be sizeable and relative.
|
586 |
12-Oct-1993 |
rgrimes |
Fixed PHYSTOKV, addition operator on pointers is the wrong thing to do here. This is really a crock, but it works.
|
584 |
12-Oct-1993 |
rgrimes |
Add PHYSTOKV used in scsi drivers with a correct definition based on KERNBASE.
Change #define<tab> to #define<space> on lines that had it wrong
|
561 |
09-Oct-1993 |
dg |
Correct spelling of "SHMMAXPGS" so the config override will actually work.
|
557 |
08-Oct-1993 |
rgrimes |
All: Remove patch kit headers, and add $Id$ This is mostly to align some more code with NetBSD.
cpu.h: Remove the old function vs. include configuration stuff that was ifdefed out when we went to inline functions. Remove the define of resettodr that made it a nop, there is already a function that makes it a nop, no need to #define one. Remove the #defines of processor types, they are now defined in cputypes.h, #include that file. Add struct cpu_nameclass for support of cpu types.
frame.h: include sys/signal.h, it will be needed in the future. put the sigframe structure here that was in machdep.c
pcb.h: Add multiple inclusion protection. Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the user mode ldt.
|
553 |
08-Oct-1993 |
rgrimes |
Define the types of cpu's there are, from NetBSD
|
552 |
08-Oct-1993 |
rgrimes |
Fix definitions to be in terms of a minimum number of constants by using the SHIFT value as the basis for the other values, for example instead of: #define NBPG 4096 #define PGSHIFT 12 use: #define PGSHIFT 12 #define NBPG (1 << PGSHIFT)
=================================================================== RCS file: /a/cvs/386BSD/src/sys/i386/include/param.h,v retrieving revision 1.3 diff -c -r1.3 param.h *** 1.3 1993/10/08 12:49:55 --- param.h 1993/10/08 12:53:19 *************** *** 52,76 **** #define ALIGNBYTES (sizeof(int) - 1) #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
- #define NBPG 4096 /* bytes/page */ - #define PGOFSET (NBPG-1) /* byte offset into page */ #define PGSHIFT 12 /* LOG2(NBPG) */ #define NPTEPG (NBPG/(sizeof (struct pte)))
- #define NBPDR (1024*NBPG) /* bytes/page dir */ - #define PDROFSET (NBPDR-1) /* byte offset into page dir */ #define PDRSHIFT 22 /* LOG2(NBPDR) */
#define KERNBASE 0xFE000000 /* start of kernel virtual */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
! #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define BLKDEV_IOSIZE 2048 #define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
- #define CLSIZE 1 #define CLSIZELOG2 0
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ #define SSIZE 1 /* initial stack size/NBPG */ --- 52,79 ---- #define ALIGNBYTES (sizeof(int) - 1) #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
#define PGSHIFT 12 /* LOG2(NBPG) */ + #define NBPG (1 << PGSHIFT) /* bytes/page */ + #define PGOFSET (NBPG-1) /* byte offset into page */ #define NPTEPG (NBPG/(sizeof (struct pte)))
#define PDRSHIFT 22 /* LOG2(NBPDR) */ + #define NBPDR (1 << PDRSHIFT) /* bytes/page dir */ + #define PDROFSET (NBPDR-1) /* byte offset into page dir */
#define KERNBASE 0xFE000000 /* start of kernel virtual */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
! #define KERNSIZE 0x00C00000 /* size of kernel virtual */ ! #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ + #define DEV_BSIZE (1 << DEV_BSHIFT) + #define BLKDEV_IOSIZE 2048 #define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
#define CLSIZELOG2 0 + #define CLSIZE (1 << CLSIZELOG2)
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ #define SSIZE 1 /* initial stack size/NBPG */ *************** *** 92,99 **** #ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to m_buf clusters */ #endif /* MCLSHIFT */ ! #define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ ! #define MCLOFSET (MCLBYTES - 1) /* offset within a m_buf cluster */
#ifndef NMBCLUSTERS #ifdef GATEWAY --- 95,102 ---- #ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to m_buf clusters */ #endif /* MCLSHIFT */ ! #define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */ ! #define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
#ifndef NMBCLUSTERS #ifdef GATEWAY
|
551 |
08-Oct-1993 |
rgrimes |
Removed patch kit header. Cleaned up tabbing and removed extra blank lines to match NetBSD. Added $Id$. Added MID_MACHINE from NetBSD. Removed definition of DELAY() for non-kernel soures. Fixed some small english errors that had been corrected in NetBSD. File is now identical to NetBSD's, but will be changing soon for some of my clean up work.
|
550 |
08-Oct-1993 |
rgrimes |
Architecture specific syscalls (i386) from NetBSD
|
541 |
04-Oct-1993 |
jkh |
Latest changes for XFree86 2.0
|
531 |
01-Oct-1993 |
rgrimes |
New resting home for console.h, it is machine specific.
|
511 |
27-Sep-1993 |
rgrimes |
define SHMMAXPGS where it is suppose to be, you can over ride this with a kernel config options "SHMAXPGS=xxx", default is currently 64 pages due to limit kernel map space.
|
415 |
08-Sep-1993 |
rgrimes |
>From Theo Derradt This is a machine specific include, it belongs in the machine specific directory.
|
373 |
01-Sep-1993 |
rgrimes |
Increased stack size to 8MB just to be on the real safe side.
|
348 |
28-Aug-1993 |
rgrimes |
Changed MAXSSIZ from MAXDSIZ to 2MB
|
338 |
27-Aug-1993 |
alm |
prefixed inline functions' parameter names with _ and declared the return type explicitly.
|
326 |
25-Aug-1993 |
alm |
adding fpgetround(3) IEEE floating point environment support
|
203 |
28-Jul-1993 |
nate |
fts(3) integration patches
|
200 |
27-Jul-1993 |
dg |
* Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading, profiling, and various protection checks that cause security holes and system crashes. * Changed min/max/bcmp/ffs/strlen to be static inline functions - included from cpufunc.h in via systm.h. This change improves performance in many parts of the kernel - up to 5% in the networking layer alone. Note that this requires systm.h to be included in any file that uses these functions otherwise it won't be able to find them during the load. * Fixed incorrect call to splx() in if_is.c * Fixed bogus variable assignment to splx() in if_ed.c
|
90 |
03-Jul-1993 |
root |
Increased default data size (DFLDSIZ) to 16MB. Need to rebuild libutil, kernel, ps and w for this to work!
|
80 |
30-Jun-1993 |
nate |
Added (protection) around negative constants, in case a program wants to use the negative of that constant.
#define NEG_NUM -3 #define SAFE_NEG_NUM (-3)
i = -NEG_NUM; /* Error --3 */ j = -SAFE_NEG_NUM /* Okay -(-3) */
|
79 |
29-Jun-1993 |
nate |
Setting up for updated (usable) FPE atof/vfprintf/vfscanf fixes
|
5 |
12-Jun-1993 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r4, which included commits to RCS files with non-trunk default branches.
|