summaryrefslogtreecommitdiffstats
path: root/sys/pc98/i386
Commit message (Collapse)AuthorAgeFilesLines
* MFi386: revision 1.519nyan2002-05-141-1/+1
|
* Rework the kernel environment subsystem. We now convert the staticmux2002-04-171-1/+2
| | | | | | | | | | | | | | | | | environment needed at boot time to a dynamic subsystem when VM is up. The dynamic kernel environment is protected by an sx lock. This adds some new functions to manipulate the kernel environment : freeenv(), setenv(), unsetenv() and testenv(). freeenv() has to be called after every getenv() when you have finished using the string. testenv() only tests if an environment variable is present, and doesn't require a freeenv() call. setenv() and unsetenv() are self explanatory. The kenv(2) syscall exports these new functionalities to userland, mainly for kenv(1). Reviewed by: peter
* MFi386: revision 1.517.kato2002-04-111-5/+9
|
* GC various bits and pieces of USERCONFIG from all over the place.phk2002-04-091-6/+0
|
* GC the "dumplo" variable, which is no longer used.phk2002-04-071-1/+0
| | | | A lot of sys/*/*/machdep.c seems not to be.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-2/+2
| | | | | | | 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
* Moved signal handling and rescheduling from userret() to ast() so thatbde2002-04-041-0/+2
| | | | | | | | | | | they aren't in the usual path of execution for syscalls and traps. The main complication for this is that we have to set flags to control ast() everywhere that changes the signal mask. Avoid locking in userret() in most of the remaining cases. Submitted by: luoqi (first part only, long ago, reorganized by me) Reminded by: dillon
* - Move the MI mutexes sched_lock and Giant from being declared in thejhb2002-04-021-10/+1
| | | | | | | | | | various machdep.c's to being declared in kern_mutex.c. - Add a new function mutex_init() used to perform early initialization needed for mutexes such as setting up thread0's contested lock list and initializing MI mutexes. Change the various MD startup routines to call this function instead of duplicating all the code themselves. Tested on: alpha, i386
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* MFi386: revision 1.508.kato2002-03-311-8/+12
|
* MFi386: revision 1.506.nyan2002-03-301-4/+9
|
* MFi386: revision 1.507.kato2002-03-271-1/+1
|
* Compromise for critical*()/cpu_critical*() recommit. Cleanup the interruptdillon2002-03-271-5/+9
| | | | | | | | | | | | | | | | | | | 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
* MFi386: revision 1.505 (remove __P.)kato2002-03-201-6/+6
|
* MFi386: revision 1.504.kato2002-03-201-10/+4
|
* MFi386: revision 1.503.kato2002-03-201-60/+23
|
* MFi386: revision 1.502nyan2002-03-131-0/+4
|
* MFi386: revision 1.501nyan2002-03-101-1/+1
|
* MFi386: revision 1.498.nyan2002-03-021-2/+2
|
* MFi386: revision 1.497nyan2002-02-201-1/+2
|
* Add bus_space_unmap() and bus_space_free() functions to releasenyan2002-02-181-0/+15
| | | | a bus_space_handle allocated by bus_space_subregion().
* - Split the routine to initialize a bus_space_handle into the separatenyan2002-02-171-0/+114
| | | | | | | 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.
* MFi386: revisions 1.495 and 1.496nyan2002-02-161-1/+3
|
* MFi386: revisions 1.493 and 1.494.nyan2002-02-081-1/+6
|
* Pre-KSE/M3 commit.julian2002-02-071-12/+11
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* Use osigreturn(2) instead of sigreturn(2) plus broken magic for returningbde2002-02-031-9/+0
| | | | | | | | | | | | | | | | | | from old signal handlers. This is simpler and faster, and fixes (new) sigreturn(2) when %eip in the new signal context happens to match the magic value (0x1d516). 0x1d516 is below the default ELF text section, so this probably never broken anything in practice. locore.s: In addition, don't build the signal trampoline for old signal handlers when it is not used. alpha: Not fixed, but seems to be even less broken in practice due to more advanced magic. A false match occurs for register #32 in mc_regs[]. Since there is no hardware register #32, a false match is only possible for direct calls to sigreturn(2) that happen to have the magic number in the spare mc_regs[32] field.
* Improve the change in the previous commit: use a stub for osigreturn()bde2002-02-031-0/+4
| | | | when it is not really used instead of unconditionalizing all of it.
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-011-2/+0
| | | | | | | | | | | | | | | | | | some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
* MFi386: revision 1.489.nyan2002-01-311-13/+8
|
* MFi386: revision 1.487nyan2002-01-181-0/+1
|
* Clear the single-step flag for signal handlers. This fixes bogus tracebde2002-01-101-6/+4
| | | | | | | | | | | | | | | | traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
* MFi386: revision 1.486nyan2001-12-221-3/+2
|
* MFi386: revision 1.485 (the previous commit is not completely)nyan2001-12-121-11/+13
|
* Overhaul the per-CPU support a bit:jhb2001-12-111-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Allow maxusers to be specified as 0 in the kernel config, which willdillon2001-12-091-1/+2
| | | | | | | cause the system to auto-size to between 32 and 512 depending on the amount of memory. MFC after: 1 week
* MFi386: revision 1.483nyan2001-11-171-6/+6
|
* GC userconfig after Peter axed it 15 months ago.phk2001-11-051-3178/+0
|
* MFi386: sys/i386/i386/machdep.c revisions 1.481 and 1.482nyan2001-10-301-2/+5
|
* Rewrite the pc98 bus_space stuff.nyan2001-10-072-0/+1815
| | | | | | | | | | | | | | | | 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
* Merge from sys/i386/i386/machdep.c 1.480 (Julian's KSE changes)imp2001-09-141-78/+74
| | | | Reviewed by: julian, bde, jhb
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | 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
* Merged from sys/i386/i386/machdep.c revision 1.479.kato2001-09-121-5/+4
|
* Zap #if 0'ed map init code that got moved to the MI area.peter2001-09-041-140/+0
| | | | Convert the powerpc tree to use the common code.
* Enable hardwiring of things like tunables from embedded enironmentspeter2001-08-271-1/+3
| | | | that do not start from loader(8).
* Optionize UPAGES for the i386. As part of this I split some of the lowpeter2001-08-251-0/+4
| | | | | | | | | | 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.
* Fix a #endif misplacement in 1.231 due to misapplied patchpeter2001-08-231-1/+1
| | | | Pointy hat to: peter
* Merge i386/machdep.c rev 1.474: dont overextend %cs. (finally, it doesn'tpeter2001-08-231-16/+2
| | | | conflict with unmerged changes)
* Merge i386/machdep.c rev 1.469: whitespace changes to fit 80 columnspeter2001-08-231-32/+60
| | | | Forgotten by: jhb
* Merge i386/machdep.c rev 1.468: make breakpoint/trace interrupt insteadpeter2001-08-231-2/+2
| | | | | | of trap gates Forgotten by: bde
* Merge 386/machdep.c rev 1.467: fix bugs/miscalculationspeter2001-08-231-10/+12
| | | | Forgotten by: iwasaki
OpenPOWER on IntegriCloud