aboutsummaryrefslogtreecommitdiff
path: root/sys/pc98
Commit message (Collapse)AuthorAgeFilesLines
...
* Copy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs.Tijl Coosemans2012-02-281-1/+1
| | | | Notes: svn path=/head/; revision=232275
* Copy amd64 endian.h to x86 and merge with i386 endian.h. ReplaceTijl Coosemans2012-02-281-1/+1
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=232266
* Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. ReplaceTijl Coosemans2012-02-281-1/+1
| | | | | | | amd64/i386/pc98 _stdint.h with stubs. Notes: svn path=/head/; revision=232264
* Copy amd64 _limits.h to x86 and merge with i386 _limits.h. ReplaceTijl Coosemans2012-02-281-1/+1
| | | | | | | amd64/i386/pc98 _limits.h with stubs. Notes: svn path=/head/; revision=232262
* Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existingTijl Coosemans2012-02-281-1/+1
| | | | | | | amd64/i386/pc98 _types.h with stubs. Notes: svn path=/head/; revision=232261
* Remove full debugger options and enable KDB_TRACE option instead to decreaseYoshihiro Takahashi2012-02-091-14/+2
| | | | | | | kernel size and increase performance. Notes: svn path=/head/; revision=231276
* - Disable the olpt driver. Because it conflicts with the ppc/lpt driver.Yoshihiro Takahashi2012-02-091-2/+1
| | | | | | | | | - Remove obsolete comment. MFC after: 3 days Notes: svn path=/head/; revision=231273
* Add support for the extended FPU states on amd64, both for nativeKonstantin Belousov2012-01-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=230426
* Flip these options on so the modules build correctly for now.Adrian Chadd2012-01-061-2/+2
| | | | Notes: svn path=/head/; revision=229691
* Add "options CAPABILITY_MODE" and "options CAPABILITIES" to GENERIC kernelRobert Watson2011-12-291-0/+2
| | | | | | | | | | | | | configurations for various architectures in FreeBSD 10.x. This allows basic Capsicum functionality to be used in the default FreeBSD configuration on non-embedded architectures; process descriptors are not yet enabled by default. MFC after: 3 months Sponsored by: Google, Inc Notes: svn path=/head/; revision=228973
* kern cons: introduce infrastructure for console grabbing by kernelAndriy Gapon2011-12-171-0/+12
| | | | | | | | | | | | | | | At the moment grab and ungrab methods of all console drivers are no-ops. Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended). Inspired by: bde MFC after: 2 months Notes: svn path=/head/; revision=228631
* Replace `inline static' by `static inline'.Ed Schouten2011-12-132-3/+3
| | | | | | | | | If I interpret the C standard correctly, the storage specifier should be placed before the inline keyword. While at it, replace __inline by inline in the files affected. Notes: svn path=/head/; revision=228471
* Move the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.hMarius Strobl2011-11-272-6/+3
| | | | | | | | where the prototype for pc98_ata_disk_firmware_geom_adjust() also lives in order to avoid an #ifdef'ed include in cam(4). Notes: svn path=/head/; revision=228027
* Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default onAttilio Rao2011-11-081-0/+3
| | | | | | | | | | | | | | | | | all the architectures. The option allows to mount non-MPSAFE filesystem. Without it, the kernel will refuse to mount a non-MPSAFE filesytem. This patch is part of the effort of killing non-MPSAFE filesystems from the tree. No MFC is expected for this patch. Tested by: gianni Reviewed by: kib Notes: svn path=/head/; revision=227333
* Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 andMarius Strobl2011-11-011-1/+1
| | | | | | | | | | | | | | | | replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel configuration files. Besides duplicating functionality, amd(4), which previously also supported the AMD Am53C974, unlike esp(4) is no longer maintained and has accumulated enough bit rot over time to always cause a panic during boot as long as at least one target is attached to it (see PR 124667). PR: 124667 Obtained from: NetBSD (based on) MFC after: 3 days Notes: svn path=/head/; revision=227006
* Adjust the debugger options slightly. This should help me do the rightKen Smith2011-10-271-1/+4
| | | | | | | | | | | thing when changing the debugging options as part of head becoming a new stable branch. It may also help people who for one reason or another want to run head but don't want it slowed down by the debugging support. Reviewed by: kib Notes: svn path=/head/; revision=226835
* MFi386: revision 225936Yoshihiro Takahashi2011-10-041-7/+34
| | | | | | | | | | | | | Add some improvements in the idle table callbacks: - Replace instances of manual assembly instruction "hlt" call with halt() function calling. - In cpu_idle_mwait() avoid races in check to sched_runnable() using the same pattern used in cpu_idle_hlt() with the 'hlt' instruction. - Add comments explaining the logic behind the pattern used in cpu_idle_hlt() and other idle callbacks. Notes: svn path=/head/; revision=225977
* In order to maximize the re-usability of kernel code in user space thisKip Macy2011-09-161-1/+1
| | | | | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz) Notes: svn path=/head/; revision=225617
* Fix a zyd(4) comment typo that was copy+pasted into most kernel config files.Christian Brueffer2011-09-111-1/+1
| | | | | | | | | | PR: 160276 Submitted by: MATSUMIYA Ryo <matsumiya@mma.club.uec.ac.jp> Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=225482
* Follow up to r225203 refining break-to-debugger run-time configurationRobert Watson2011-08-271-1/+0
| | | | | | | | | | | | | | | improvements: (1) Implement new model in previously missed at91 UART driver (2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h to opt_kdb.h (spotted by np) (3) Garbage collect now-unused opt_comconsole.h MFC after: 3 weeks Approved by: re (bz) Notes: svn path=/head/; revision=225214
* Attempt to make break-to-debugger and alternative break-to-debugger moreRobert Watson2011-08-261-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accessible: (1) Always compile in support for breaking into the debugger if options KDB is present in the kernel. (2) Disable both by default, but allow them to be enabled via tunables and sysctls debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. (3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue to behave as before -- only now instead of compiling in break-to-debugger support, they change the default values of the above sysctls to enable those features by default. Current kernel configurations should, therefore, continue to behave as expected. (4) Migrate alternative break-to-debugger state machine logic out of individual device drivers into centralised KDB code. This has a number of upsides, but also one downside: it's now tricky to release sio spin locks when entering the debugger, so we don't. However, similar logic does not exist in other device drivers, including uart. (5) dcons requires some special handling; unlike other console types, it allows overriding KDB's own debugger selection, so we need a new interface to KDB to allow that to work. GENERIC kernels in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz) Notes: svn path=/head/; revision=225203
* In HEAD when doing no further checkes there is no reason use theBjoern A. Zeeb2011-08-201-3/+2
| | | | | | | | | | | | | temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable. Reported by: jhb, bde MFC after: 3 days X-MFC with: r224516 Approved by: re (kib) Notes: svn path=/head/; revision=225048
* Change all the sample kernel configurations to useRick Macklem2011-08-071-1/+1
| | | | | | | | | | | | | NFSCL, NFSD instead of NFSCLIENT, NFSSERVER since NFSCL and NFSD are now the defaults. The client change is needed for diskless configurations, so that the root mount works for fstype nfs. Reported by seanbru at yahoo-inc.com for i386/XEN. Approved by: re (hrs) Notes: svn path=/head/; revision=224699
* Introduce a tunable to disable the time consuming parts of bootupBjoern A. Zeeb2011-07-301-1/+12
| | | | | | | | | | | | | | | | memtesting, which can easily save seconds to minutes of boot time. The tunable name is kept general to allow reusing the code in alternate frameworks. Requested by: many Discussed on: arch (a while a go) Obtained from: Sandvine Incorporated Reviewed by: sbruno Approved by: re (kib) MFC after: 2 weeks Notes: svn path=/head/; revision=224516
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Ed Schouten2011-07-171-0/+1
| | | | | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway. Notes: svn path=/head/; revision=224126
* Enable the new PCI-PCI bridge driver on pc98 by default. I missed thisJohn Baldwin2011-07-161-0/+2
| | | | | | | in 221394 when I had meant to enable it on all i386 systems by default. Notes: svn path=/head/; revision=224098
* - Reduce diffs against i386.Yoshihiro Takahashi2011-06-131-6/+7
| | | | | | | - Add snd_uaudio. Notes: svn path=/head/; revision=223046
* remove code for dynamic offlining/onlining of CPUs on x86Andriy Gapon2011-06-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=222853
* Move VT switching hack for suspend/resume from bus drivers to syscons.cJung-uk Kim2011-05-091-54/+0
| | | | | | | | | using event handlers. A different version was Submitted by: Taku YAMAMOTO (taku at tackymt dot homeip dot net) Notes: svn path=/head/; revision=221708
* This patch changes head so that the default NFS client is now the newRick Macklem2011-04-271-2/+2
| | | | | | | | | | | | | | | | | NFS client (which I guess is no longer experimental). The fstype "newnfs" is now "nfs" and the regular/old NFS client is now fstype "oldnfs". Although mounts via fstype "nfs" will usually work without userland changes, an updated mount_nfs(8) binary is needed for kernels built with "options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and mount(8) binaries are needed to do mounts for fstype "oldnfs". The GENERIC kernel configs have been changed to use options NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER. For kernels being used on diskless NFS root systems, "options NFSCL" must be in the kernel config. Discussed on freebsd-fs@. Notes: svn path=/head/; revision=221124
* - Add shim to simplify migration to the CAM-based ATA. For each new adaXAlexander Motin2011-04-261-0/+1
| | | | | | | | | | | | device in /dev/ create symbolic link with adY name, trying to mimic old ATA numbering. Imitation is not complete, but should be enough in most cases to mount file systems without touching /etc/fstab. - To know what behavior to mimic, restore ATA_STATIC_ID option in cases where it was present before. - Add some more details to UPDATING. Notes: svn path=/head/; revision=221071
* Switch the GENERIC kernels for all architectures to the new CAM-based ATAAlexander Motin2011-04-241-10/+9
| | | | | | | | | | | | | | | | stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX. Notes: svn path=/head/; revision=220982
* Reinstate cpu_est_clockrate() support for P-state invariant TSC if APERF andJung-uk Kim2011-04-121-19/+2
| | | | | | | | | MPERF MSRs are available. It was disabled in r216443. Remove the earlier hack to subtract 0.5% from the calibrated frequency as DELAY(9) is little bit more reliable now. Notes: svn path=/head/; revision=220583
* Use atomic load & store for TSC frequency. It may be overkill for amd64 butJung-uk Kim2011-04-071-4/+5
| | | | | | | | | | | | safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now). Notes: svn path=/head/; revision=220433
* Implement atomic_load_acq_64(9) and atomic_store_rel_64(9) for i386. TheseJung-uk Kim2011-04-061-0/+17
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=220404
* Break out the ath PCI logic into a separate device/module.Adrian Chadd2011-03-311-1/+2
| | | | | | | | | | | | Introduce the AHB glue for Atheros embedded systems. Right now it's hard-coded for the AR9130 chip whose support isn't yet in this HAL; it'll be added in a subsequent commit. Kernel configuration files now need both 'ath' and 'ath_pci' devices; both modules need to be loaded for the ath device to work. Notes: svn path=/head/; revision=220185
* Deprecate tsc_present as the last of its real consumers finally disappeared.Jung-uk Kim2011-03-151-1/+1
| | | | Notes: svn path=/head/; revision=219673
* Add a tunable "machdep.disable_tsc" to turn off TSC. Specifically, it turnsJung-uk Kim2011-03-111-8/+15
| | | | | | | | off boot-time CPU frequency calibration, DELAY(9) with TSC, and using TSC as a CPU ticker. Note tsc_present does not change by this tunable. Notes: svn path=/head/; revision=219473
* Deprecate rarely used tsc_is_broken. Instead, we zero out tsc_freq becauseJung-uk Kim2011-03-101-1/+1
| | | | | | | it is almost always used with tsc_freq any way. Notes: svn path=/head/; revision=219461
* Add a small change to the comment in the GENRIC config files that include udbpJulian Elischer2011-03-091-1/+1
| | | | | | | | Submitted by: Chris Forgron, cforgeron at acsi dot ca MFC after: 1 week Notes: svn path=/head/; revision=219435
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* MFi386: revision 218744Yoshihiro Takahashi2011-02-191-1/+7
| | | | | | | | To avoid excessive code duplication create wrapper for fill regs from stack frame. Notes: svn path=/head/; revision=218843
* Based on discussions on the svn-src mailing list, rework r218195:Matthew D Fleming2011-02-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - entirely eliminate some calls to uio_yeild() as being unnecessary, such as in a sysctl handler. - move should_yield() and maybe_yield() to kern_synch.c and move the prototypes from sys/uio.h to sys/proc.h - add a slightly more generic kern_yield() that can replace the functionality of uio_yield(). - replace source uses of uio_yield() with the functional equivalent, or in some cases do not change the thread priority when switching. - fix a logic inversion bug in vlrureclaim(), pointed out by bde@. - instead of using the per-cpu last switched ticks, use a per thread variable for should_yield(). With PREEMPTION, the only reasonable use of this is to determine if a lock has been held a long time and relinquish it. Without PREEMPTION, this is essentially the same as the per-cpu variable. Notes: svn path=/head/; revision=218424
* MFi386: revision 218329Yoshihiro Takahashi2011-02-071-0/+6
| | | | | | | Fix linking of the kernel without device npx. Notes: svn path=/head/; revision=218391
* MFi386: revision 218327Yoshihiro Takahashi2011-02-071-1/+17
| | | | | | | | | | Clear the padding when returning context to the usermode, for MI ucontext_t and x86 MD parts. Kernel allocates the structures on the stack, and not clearing reserved fields and paddings causes leakage. Notes: svn path=/head/; revision=218390
* MFi386: revision 217886Yoshihiro Takahashi2011-02-071-3/+5
| | | | | | | Set td_kstack_pages for thread0. Notes: svn path=/head/; revision=218389
* Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.Sergey Kandaurov2011-01-211-5/+4
| | | | | | | | | | Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe Notes: svn path=/head/; revision=217688
* MFi386: revision 217515Yoshihiro Takahashi2011-01-181-3/+0
| | | | | | | The mem_range_softc is defined in mem.c. Notes: svn path=/head/; revision=217539
* Copy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98Tijl Coosemans2011-01-081-1/+1
| | | | | | | | | headers with stubs. Approved by: kib (mentor) Notes: svn path=/head/; revision=217157
* MFi386 r216012 by kib:Gavin Atkinson2011-01-021-1/+2
| | | | | | | | | | | Calling fill_fpregs() for curthread is legitimate, and ELF coredump does this. Discussed with: kib MFC after: 3 days Notes: svn path=/head/; revision=216892