summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Duplicate the changes to i386 to keep creds over the user boundary.julian2002-02-191-6/+8
|
* Add C++ support.mike2002-02-191-0/+5
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-56/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Resurrect one of the easiest changes from my big include files roll-upwollman2002-02-151-0/+1
| | | | | | 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().
* Remove WITNESS from GENERIC by default: as we grow more locks, this getsrwatson2002-02-131-1/+1
| | | | | | | | | slower, and may be impeding adoption of -CURRENT by developers. We recommend turning on WITNESS by default on crash boxes, and when doing locking development. It will probably get turned on by default for a week or two following any major locking commits, also. Approved by: all and sundry (jhb, phk, ...)
* Pre-KSE/M3 commit.julian2002-02-075-18/+12
| | | | | | | | | | 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,
* GC the PC_SWITCH* symbols which are not used in assembly anymore.phk2002-02-071-1/+0
|
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-011-15/+6
| | | | | | | | | | | | | | | | | | 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.
* Add a definition of ddb_regs. ddb_regs is declared as extern inmarcel2002-01-181-5/+2
| | | | | | | db_machdep.h to fix the link failure (multiple definitions) caused by disabling the emission of common symbols. As a result, there were no definitions at all. While here, remove useless declarations.
* Remove the definition of bootverbose. This fixes the link failuremarcel2002-01-181-1/+1
| | | | caused by disabling the emission of common symbols.
* Declare ddb_regs as extern to avoid creating a tentative definition.marcel2002-01-181-1/+1
| | | | | This fixes the link failure caused by disabling the emission of common symbols.
* Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask).peter2002-01-052-3/+3
|
* Change the preemption code for software interrupt thread schedules andjhb2002-01-052-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutex releases to not require flags for the cases when preemption is not allowed: The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent switching to a higher priority thread on mutex releease and swi schedule, respectively when that switch is not safe. Now that the critical section API maintains a per-thread nesting count, the kernel can easily check whether or not it should switch without relying on flags from the programmer. This fixes a few bugs in that all current callers of swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from fast interrupt handlers and the swi_sched of softclock needed this flag. Note that to ensure that swi_sched()'s in clock and fast interrupt handlers do not switch, these handlers have to be explicitly wrapped in critical_enter/exit pairs. Presently, just wrapping the handlers is sufficient, but in the future with the fully preemptive kernel, the interrupt must be EOI'd before critical_exit() is called. (critical_exit() can switch due to a deferred preemption in a fully preemptive kernel.) I've tested the changes to the interrupt code on i386 and alpha. I have not tested ia64, but the interrupt code is almost identical to the alpha code, so I expect it will work fine. PowerPC and ARM do not yet have interrupt code in the tree so they shouldn't be broken. Sparc64 is broken, but that's been ok'd by jake and tmm who will be fixing the interrupt code for sparc64 shortly. Reviewed by: peter Tested on: i386, alpha
* Revert previous definition of cpu_throw(). Non-MP configurationsmarcel2001-12-302-2/+9
| | | | were broken as well.
* Better implement SMP support:marcel2001-12-303-101/+180
| | | | | | | | | | | | | | o Do not use a special struct to keep track of CPUs we found; instead, use struct pcpu. This handles all the magic WRT thread creation (yay!). o Respect MAXCPU. o Use the vhpt_base and vhpt_size values to initialize the AP. o Style fixes. Note that this commit temporarily breaks SMP configurations. Previously APs didn't do anything, but they now enter the scheduler. They hold sched_lock for more than 5 secs though and cause a panic. That's what I call progress :-)
* o Reimplement map_pal_code to work with a global variablemarcel2001-12-301-51/+37
| | | | | | | | | | | | ia64_pal_base instead of scanning the EFI tables. This way AP startup code can more easily use the function. o Initialize ia64_pal_base in ia64_init(). When the PAL code doesn't need explicit mapping or no PAL code has been found, ia64_pal_base will be 0. o Remove some unused global variables. o Also in ia64_init(), allocate only 1 page for struct pcpu and remove some Alpha leftovers. o Initialize pc_pcb in cpu_pcpu_init().
* Make vhpt_base and vhpt_size globals so that they can be used bymarcel2001-12-301-1/+2
| | | | the AP startup code.
* Cleanup the IPIs.marcel2001-12-301-8/+7
|
* Remove unused MD fields (pc_pending_ipis, pc_next_asn andmarcel2001-12-301-3/+3
| | | | | pc_current_asngen) and add SMP specific fields (pc_pcb, pc_lid and pc_awake).
* o Remove temporary implementation of cpu_throw in vm_machdep.cmarcel2001-12-302-10/+24
| | | | | | and instead make it an alternate entry-point of cpu_switch() in swtch.s o Add SMP support to cpu_switch().
* Draft implementation of IPI handling.marcel2001-12-301-1/+19
|
* Add PC_IDLETHREAD. We need it in cpu_switch.marcel2001-12-301-0/+1
|
* Add missing predicate in interruption_Data_TLB. Without thismarcel2001-12-302-46/+46
| | | | | | predicate we never used the VHPT entry we found. While here, normalize the compares.
* Fix CRITICAL_FORK so that it compiles.dfr2001-12-231-1/+1
|
* Use the new resource_list_print_type() function.tmm2001-12-211-1/+1
| | | | | Pass the bus device to isa_init() (this is needed for the sparc64 version).
* Replace a bunch of:peter2001-12-201-30/+10
| | | | | | | | for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = TAILQ_NEXT(pv, pv_list)) { with: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
* Modify the critical section API as follows:jhb2001-12-187-24/+15
| | | | | | | | | | | | | | | | | | | - 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
* Enable UFS_DIRHASH in the GENERIC kernel.iedowse2001-12-141-0/+1
| | | | | | Suggested by: silby Reviewed by: dillon MFC after: 5 days
* Overhaul the per-CPU support a bit:jhb2001-12-1114-207/+55
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+4
| | | | also don't use ANSI string concatenation.
* style(9)obrien2001-12-091-10/+9
|
* Allow maxusers to be specified as 0 in the kernel config, which willdillon2001-12-092-2/+3
| | | | | | | cause the system to auto-size to between 32 and 512 depending on the amount of memory. MFC after: 1 week
* Add multiple inclusion protection.jhb2001-12-061-0/+5
|
* PROCFS requires PSEUDOFS.des2001-12-041-1/+2
|
* o Stop abusing MD headers with non-MD types.mike2001-12-011-2/+0
| | | | | | | | | | | | | | | 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
* * Don't use critical_enter/critical_exit when accessing the VHPT - itsdfr2001-11-301-17/+21
| | | | | | | | | | pointless and would be inadequate for SMP systems. We will rely on the VM system's locks to serialise this for now. * Change pmap_remove() so that if the range being removed is larger than the number of pages mapped by the pmap, we iterate over the currently mapped pages instead of over the virtual address range. This should make a difference when removing large virtual address ranges from an address space.
* Minor tweaks to the TLB handling code - avoid movl instructions and adddfr2001-11-272-26/+26
| | | | | itc.x instructions to attempt to avoid the little flurry of TLB exceptions for handling access, dirty etc.
* s/code/ucode/ (last minute typo)peter2001-11-191-2/+2
|
* Initial cut at calling the EFI-provided FPSWA (Floating Point Softwarepeter2001-11-193-7/+163
| | | | | Assist) driver to handle the "messy" floating point cases which cause traps to the kernel for handling.
* Use some (now) spare space for passing through a pointer to the FPSWApeter2001-11-191-1/+2
| | | | Interface provided by EFI (Floating Point SoftWare Assist).
* Remove bootinfo.bi_kernel. It isn't used by the kernel. struct bootinfopeter2001-11-191-1/+1
| | | | | should go away on ia64, we should be loader metadata based since that is the only way we can boot (loader, skiload).
* Oops, I accidently merged a whitespace error from the original commit.peter2001-11-161-1/+1
| | | | (whitespace at end of line in rev 1.264 pmap.c). Fix them all.
* Merge rev 1.264 from i386/pmap.c (tegge via alfred):peter2001-11-161-1/+4
| | | | | | | Protect against an infinite loop when prefaulting pages. This can happen when the vm system maps past the end of an object or tries to map a zero length object, the pmap layer misses the fact that offsets wrap into negative numbers and we get stuck.
* Merge rev 1.202 from i386/pmap.c (back in 1998 by John Dyson):peter2001-11-161-0/+3
| | | | | | | Make flushing dirty pages work correctly on filesystems that unexpectedly do not complete writes even with sync I/O requests. This should help the behavior of mmaped files when using softupdates (and perhaps in other circumstances also.)
* Merge rev 1.293 of i386/pmap.c - skip PG_UNMANAGED in pmap_collect()peter2001-11-161-1/+1
|
* Converge with i386/pmap.c - dont refer to curproc, use curthread.peter2001-11-161-2/+2
|
* As part of a general cleanup and reconvergence of related pmap code,peter2001-11-161-22/+1
| | | | | start tidying up some loose ends. The DEBUG_VA stuff has long since passed its use-by date. It wasn't used on ia64 but got cut/pasted there.
* Implement eficlock_set() to set hardware clock.peter2001-11-121-1/+13
|
* o os_boot_rendez is responsible for clearing the IRR bit bymarcel2001-11-124-37/+69
| | | | | | | | | | | | | | | | reading cr.ivr, as well as writing to cr.eoi. o use global variables to pass information to os_boot_rendez so that it doesn't have to jump through hoops to find it out. This avoids traps on the AP without it even being initialized. This fixes SMP configurations. o Move the probing of the MADT to the end of cpu_startup, instead of at the start of cpu_mp_probe. We need to probe the MADT for non-SMP configurations as well. This fixes uniprocessor configurations. o Serialize AP wake-up by waiting for the AP. We need to do this since we use global variables to for the AP to use. As a side-effect, we can use printf() more easily to see what's going on.
* Invoke trap() for the alt. ITLB and alt. DTLB interrrupts whenmarcel2001-11-122-2/+16
| | | | | the region is not 6 or 7. This changes the behaviour from inserting a bogus region 6 mapping to a kernel panic.
OpenPOWER on IntegriCloud