summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include
Commit message (Collapse)AuthorAgeFilesLines
* Moved most of the "MI" definitions and declarations from <machine/profile.h>bde2004-05-191-12/+0
| | | | | | 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.
* <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN isstefanf2004-05-181-1/+1
| | | | | | | | 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)
* Add an MI implementation of the ACPI global lock routines and retire thenjl2004-05-051-42/+5
| | | | | | | | 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
* Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilationdas2004-04-251-0/+2
| | | | | | | environments. PR: 63935 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* MFamd64alc2004-04-181-8/+9
| | | | | Simplify the sf_buf implementation. In short, make it a veneer over the direct virtual-to-physical mapping.
* Remove advertising clause from University of California Regent'simp2004-04-0711-49/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Remove avail_end. As of yesterday, it is unused.alc2004-04-061-1/+0
|
* Remove avail_start on those platforms that no longer use it. (Only amd64alc2004-04-051-1/+0
| | | | does anything with it beyond simple initialization.)
* In breakpoint(), use a different immediate to make sure we canmarcel2004-03-211-2/+3
| | | | | | | | distinguish between debugger inserted breakpoints and fixed breakpoints. While here, make sure the break instruction never ends up in the last slot of a bundle by forcing it to be an M-unit instruction. This makes it easier for use to skip over it.
* Introduce the cpumask_t type. The purpose of the type is to create amarcel2004-03-201-0/+1
| | | | | | | | | | | | | | | | | | | 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
* Replace uint64_t with unsigned long in struct dbreg.marcel2004-03-201-2/+2
|
* Remove unused declarations. (Some time ago, these variables became fieldsalc2004-03-071-2/+0
| | | | of vm/vm.h's struct kva_md_info.)
* Fix syntax errors and wrong function prototypes in several MD headerle2004-03-051-2/+2
| | | | | | | | files when using non-GNUC compilers. PR: kern/58515 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Approved by: grog (mentor), obrien
* Do not pre-map the I/O port space. On the Intel Tiger 4 this conflictsmarcel2004-02-221-1/+0
| | | | | | | | | with a memory mapped I/O range that's immediately before it and is not 256MB aligned. As a result, when an address is accessed in the memory mapped range and a direct mapping is added for it, it overlaps with the pre-mapped I/O port space and causes a machine check. Based on a patch from: arun@
* Whitespace nit.des2004-01-131-1/+1
|
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-091-0/+1
| | | | | | | | | | 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
* GC the unused <machine/kse.h> file.peter2003-12-241-38/+0
|
* Fix last second typo.peter2003-12-101-1/+1
|
* Use gcc's superior ffs() builtin.peter2003-12-101-0/+9
|
* Use ffs(x) == popcnt(x ^ (x - 1)) to implement 64 bit ffsl(). gcc'speter2003-12-101-8/+15
| | | | ffs() builtin uses this already but truncates the upper 32 bits.
* Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktrobrien2003-12-082-475/+0
| | | | | | 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.
* Simplify the contexts created by the kernel and remove the relatedmarcel2003-12-071-30/+19
| | | | | | | | | flags. We now create asynchronous contexts or syscall contexts only. Syscall contexts differ from the minimal ABI dictated contexts by having the scratch registers saved and restored because that's where we keep the syscall arguments and syscall return values. Since this change affects KSE, have it use kse_switchin(2) for the "new" syscall context.
* Ooops. These are still used by the bktr driver. David O'Brien hasimp2003-12-071-0/+187
| | | | | | plans for dealing, but I'll let him deal. Pointy hat to: imp@
* Remote meteor driver. It hasn't compiled in over 3 years. If someoneimp2003-12-071-187/+0
| | | | | makes it compile again, and can test it, we can restore the driver to the tree.
* Fixed a pedantic syntax error (a stray semicolon at the end ofbde2003-11-171-1/+1
| | | | PCPU_MD_FIELDS).
* - Modify alpha's sf_buf implementation to use the direct virtual-to-alc2003-11-161-0/+57
| | | | | | | | | 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.
* Add the pc_acpi_id PCPU member. The new acpi_cpu driver uses this tonjl2003-11-151-1/+2
| | | | dereference the softc.
* Remove ia64_highfp_load() now that it's unused.marcel2003-11-121-1/+0
|
* Use get_mcontext() to construct the signal context in sendsig() andmarcel2003-11-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use set_mcontext() to restore the context in sigreturn(). Since we put the syscall number and the syscall arguments in the trapframe (we don't save the scratch registers for syscalls, which allows us to reuse the space to our advantage), create a MD specific flag so that we save the scratch registers even for syscalls. We would not be able to restart a syscall otherwise. The signal trampoline does not need to flush the regiters anymore, because get_mcontext() already handles that. In fact, if we set up the context correctly, we do not need to have a trampoline at all. This change however only minimally changes the trampoline code. In follow-up commits this can be further optimized. Note that normally we preserve cfm and iip in the trapframe created by the EPC syscall path when we restore a context in set_mcontext() because those fields are not normally set for a synchronuous context. The kernel puts the return address and frame info of the syscall stub in there. By preserving these fields we hide this detail from userland which allows us to use setcontext(2) for user created contexts. However, sigreturn() is commonly called from the trampoline, which means that if we preserve cfm and iip in all cases, we would return to the trampoline after the sigreturn(), which means we hit the safety net: we call exit(2). So, we do not preserve cfm and iip when we have a synchronous context that also has scratch registers (the uncommon context created by sendsig() only), under the assumption that if such a context is created in userland, something special is going on and the use of cfm and iip is then just another quirk. All this is invisible in the common case.
* Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() inscottl2003-11-071-0/+4
| | | | the busdma headers.
* Add a bogus definition of __va_list for use by lint. Make it visiblemarcel2003-11-031-1/+5
| | | | only when lint is defined to protect builds with non-GNU compilers.
* Remove headers copied from i386 and either useless or wrong on ia64.marcel2003-11-023-311/+0
| | | | | | | | | | | | | An example of useless is bios.h. An example of wrong is msdos.h (due to the use of long for 32-bit fields). display.h cannot be removed because it's used by syscons. That header however has no platform dependency and shouldn't really be here. Removal if these headers may cause build failures in the ports tree. It's the ports that need fixing in that case. Tested with: buildworld, LINT
* The previous commit removed both clause 3 and clause 4 from the UCBmarcel2003-10-271-3/+4
| | | | | | | | | | | | | | | license. Only clause 3 has been revoked. Restore the fourth clause as clause 3. Pointed out by: das@ Remove my name as a copyright holder since I don't use a BSD license compatible or comparable to the UCB license. I choose not to add a complete second license for my work for aesthetic reasons, nor to replace the UCB license on grounds of rewriting more than 90% of the source files. The rewrite can also be seen as an enhancement and since the files were practically empty, it's rather trivial to have changed 90% of the files.
* Add support for userland to access I/O port space. This is primarilymarcel2003-10-271-12/+13
| | | | | | | | | | | | | | | added for XFree86. There are 2 reasons for doing this with sysarch(): 1. The memory mapped I/O space is not at a fixed physical address. An application has to use some interface to get the base address. It gets worse if the machine has multiple memory mapped I/O spaces. 2. Access to the memory mapped I/O space needs to happen through a translation that is flagged as uncachable. There's no interface that allows a process to do uncached memory I/O, other than though /dev/mem (possibly). So, until we either disallow direct access to I/O or bus space from userland or have a better way of doing this, sysarch() has the least negative impact on existing interfaces.
* Remove unused header. See also ia64/disasm/disasm.h.marcel2003-10-241-1178/+0
|
* Cleanup. Remove the md_flags for threads. It's not used. The flagsmarcel2003-10-231-35/+21
| | | | | | | | we had were bogus. While here, reassign the copyright to the Project. There's nothing in this files that originates from NetBSD, especially now that the FreeBSD/alpha bits have been removed, but even then the amount of inherited code that we actually used was nil.
* Add prototypes for spillfd() and unaligned_fixup().marcel2003-10-231-0/+2
|
* Remove md_bspstore from the MD fields of struct thread. Now thatmarcel2003-10-211-1/+0
| | | | | the backing store is at a fixed address, there's no need for a per-thread variable.
* Put the RSE backing store at a fixed address. This change is triggeredmarcel2003-10-201-0/+2
| | | | | | | | | | | | | by libguile that needs to know the base of the RSE backing store. We currently do not export the fixed address to userland by means of a sysctl so user code needs to hardcode it for now. This will be revisited later. The RSE backing store is now at the bottom of region 4. The memory stack is at the top of region 4. This means that the whole region is usable for the stacks, giving a 61-bit stack space. Port: lang/guile (depended of x11/gnome2)
* Move pmap_resident_count() from the MD pmap.h to the MI pmap.h.bms2003-10-061-1/+0
| | | | | | | | Add a definition of pmap_wired_count(). Add a definition of vmspace_wired_count(). Reviewed by: truckman Discussed with: peter
* Drop any and all support for varargs. There's no history to worrymarcel2003-09-281-14/+1
| | | | | | | about because we're still tier 2 and our current compiler, as well as future compilers will not support varargs. This is mostly a no-op in practice, because <sys/varargs.h> should already cause compile failures.
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-251-12/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* Implement the bus_space_map() function to allocate resources and initializenyan2003-09-231-5/+12
| | | | a bus_handle, but currently it does only initializing a bus_handle.
* Change TRAPF_USERMODE and CLOCKF_USERMODE to not test for CPL == 3,marcel2003-09-191-2/+2
| | | | | | | | | | but for CPL != 0. For some reason yet unknown it is possible for the CPL to be 2. This would previously be counted as kernel mode, which resulted in nasty panics. By changing the test it is now treated as user mode, which is more correct. We still need to figure out how it is possible that the privilege level can be 2 (or 1 for that matter), because it's not used by us. We only use 3 (user mode) and 0 (kernel mode).
* Rewrite the SAPIC initialization to always program the RTEs with whatmarcel2003-09-101-5/+5
| | | | | | | | we think is the correct trigger mode and polarity. This allows us to implement BUS_CONFIG_INTR() as an update of the RTE in question. Consequently, we can trust the RTE when we enable an interrupt and avoids that we need to know about the trigger mode and polarity at that time.
* Introduce IA64_ID_PAGE_{MASK|SHIFT|SIZE} and LOG2_ID_PAGE_SIZE. Themarcel2003-09-091-0/+11
| | | | | | | | | | latter is a kernel option for IA64_ID_PAGE_SHIFT, which in turn determines IA64_ID_PAGE_MASK and IA64_ID_PAGE_SIZE. The constants are used instead of the literal hardcoding (in its various forms) of the size of the direct mappings created in region 6 and 7. The default and probably only workable size is still 256M, but for kicks we use 128M for LINT.
* Fix a place where I forgot to change the code that checks whethermarcel2003-09-051-1/+1
| | | | | | | | | | | | | | | | | we return to kernel or userland. This triggered a panic in a KSE application when TDF_USTATCLOCK was set in the case userland was interrupted, but we never called ast() on our way out. As such, we called ast() at some other time. Unfortunately, TDF_USTATCLOCK handling assumes running in the interrupt thread. This was not the case anymore. To avoid making the same mistake later, interrupt() now returns to its caller whether we interrupted userland or not. This avoids that we have to duplicate the check in assembly, where it's bound to fall off the scope. Now we simply check the return value and call ast() if appropriate. Run into this: davidxu
* Remove PAGE_SIZE_4K, PAGE_SIZE_8K and PAGE_SIZE_16K and replace themmarcel2003-08-231-16/+4
| | | | | with LOG2_PAGE_SIZE. A single option is better to LINT than multiple mutual exclusive ones.
* Undo the mistake made in revision 1.77 of trap.c and which was themarcel2003-08-201-11/+6
| | | | | | | | | | | | | | | | | | ultimate trigger for the follow-up fixes in revisions 1.78, 1.80, 1.81 and 1.82 of trap.c. I was simply too pre-occupied with the gateway page and how it blurs kernel space with user space and vice versa that I couldn't see that it was all a load of bollocks. It's not the IP address that matters, it's the privilege level that counts. We never run in user space with lifted permissions and we sure can not run in kernel space without it. Sure, the gateway page is the exception, but not if you look at the privilege level. It's user space if you run with user permissions and kernel space otherwise. So, we're back to looking at the privilege level like it should be. There's no other way. Pointy hat: marcel
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MImarcel2003-08-162-29/+23
| | | | | | | | | | | | | | | | | | | 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)
OpenPOWER on IntegriCloud