summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* Fix a warning. Dont convert away from const to just re-add it in thepeter2001-09-101-16/+8
| | | | wrapped function.
* Implement support for MAXMEM option and hw.physmem environment variabledfr2001-09-101-0/+55
| | | | | which can be used to artificially reduce the memory size of a machine for debugging (or other) purposes.
* Rip some well duplicated code out of cpu_wait() and cpu_exit() and movepeter2001-09-101-27/+1
| | | | | | | | | | | | it to the MI area. KSE touched cpu_wait() which had the same change replicated five ways for each platform. Now it can just do it once. The only MD parts seemed to be dealing with fpu state cleanup and things like vm86 cleanup on x86. The rest was identical. XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional stub in place. Reviewed by: jake, tmm, dillon
* Fix some problems with the reference/modified tracking which I introduceddfr2001-09-091-4/+51
| | | | | | with the last change to the way the pmap_emulate_reference() works. This should fix a number of memory corruption problems and also should stop the mtimes of executables changing all the time.
* Missing part of dillon's coredump commit. cpu_coredump() was stillpeter2001-09-081-2/+1
| | | | | passing IO_NODELOCKED to vn_rdwr(), this would cause operations on the unlocked core vnode and softupdates nastiness if an a.out binary cored.
* Round of cleanups and enhancements. These include (in random order):marcel2001-09-087-576/+773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
* o Introduce private types for use in linux syscalls for two reasons:marcel2001-09-081-190/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all unimplemented syscalls, except for the osf1 syscalls. This can only be done if the osfulator implements at least all syscalls used by the linuxulator. Remove dummy functions for syscalls that are now truely unimplemented. o Set the syscall namespace as follows: Mark a syscall as OSF1 if the Linux kernel has prefixed the syscall with 'osf_' and has provided special implementations for it. Otherwise mark the syscall as LINUX by default. Some of the LINUX syscalls remain marked as BSD or POSIX. o Rename syscalls so they match the names used in the Linux kernel. Also, provide more accurate prototypes. This generally improves cross-referencing and reduces head-scratching. o Fix the (g|s)etresuid syscalls. They mapped to (g|s)etresgid. o Sanitize the the shm*, sem* and msg* syscalls. Their prototypes were dictated by the way these syscalls were used in the i386 code. That has been fixed. NOTE: linux_semctl now passes it's 'arg' parameter by value and not by reference. o Fix prototype of linux_utime. It takes a struct timeval, not a struct utimbuf. o Fix the linux_sysfs syscall. It's index is not 255, but 254. o Implement the following syscalls: linux_sysctl o Add the following new syscalls: (g|s)etresgid linux_pivot_root (dummy) linux_mincore (dummy) linux_pciconfig_iobase (dummy) linux_getdents64
* Wrap array accesses in macros, which also happen to be lvalues:marcel2001-09-081-1/+1
| | | | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng. Forgotten by: jlemon
* Call sendsig() with the proc lock held and return with it held.jhb2001-09-062-7/+3
|
* style(9) the structure definitions.obrien2001-09-052-2/+2
|
* Zap #if 0'ed map init code that got moved to the MI area.peter2001-09-041-109/+0
| | | | Convert the powerpc tree to use the common code.
* Nuke #if 0'ed "setredzone()" stub. We never used it, and probablypeter2001-09-041-17/+0
| | | | | never will. I've implemented an optional redzone as part of the KSE upage breakup.
* Synchronize syscalls.master(s) with recent Giant pushdown workdillon2001-09-012-20/+20
|
* Same treatment as i386/isa/pmap.c - clean up some style to sync towardspeter2001-08-311-39/+34
| | | | KSE diff.
* Tidy up cpu_fork() a little. This is mainly for changes I've beenpeter2001-08-311-39/+33
| | | | working on in the KSE area.
* Remove the MPSAFE keyword from the parser for syscalls.master.dillon2001-08-301-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead introduce the [M] prefix to existing keywords. e.g. MSTD is the MP SAFE version of STD. This is prepatory for a massive Giant lock pushdown. The old MPSAFE keyword made syscalls.master too messy. Begin comments MP-Safe procedures with the comment: /* * MPSAFE */ This comments means that the procedure may be called without Giant held (The procedure itself may still need to obtain Giant temporarily to do its thing). sv_prepsyscall() is now MP SAFE and assumed to be MP SAFE sv_transtrap() is now MP SAFE and assumed to be MP SAFE ktrsyscall() and ktrsysret() are now MP SAFE (Giant Pushdown) trapsignal() is now MP SAFE (Giant Pushdown) Places which used to do the if (mtx_owned(&Giant)) mtx_unlock(&Giant) test in syscall[2]() in */*/trap.c now do not. Instead they explicitly unlock Giant if they previously obtained it, and then assert that it is no longer held to catch broken system calls. Rebuild syscall tables.
* o Remove some GCCisms in src/powerpc/include/endian.h.mike2001-08-302-12/+16
| | | | | | | | | | | | | | | | | | | | 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
* Correctly #ifdef COMPAT_43 around osendsig() prototype.peter2001-08-271-0/+2
|
* Enable hardwiring of things like tunables from embedded enironmentspeter2001-08-271-1/+4
| | | | that do not start from loader(8).
* vm_page_zero_idle() is no longer MD.peter2001-08-251-1/+0
|
* Remove a reference to MAP_INHERIT.peter2001-08-251-1/+1
|
* Move most of the kernel submap initialization code, including thedillon2001-08-222-11/+6
| | | | | | | | timeout callwheel and buffer cache, out of the platform specific areas and into the machine independant area. i386 and alpha adjusted here. Other cpus can be fixed piecemeal. Reviewed by: freebsd-smp, jake
* Strip out some #if's for old implementations of global data pointers.peter2001-08-211-4/+0
|
* Protect prototype of ptrace_clear_single_step() with #ifdef _KERNEL/#endif.jhb2001-08-211-0/+2
| | | | Requested by: bde
* Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for thispeter2001-08-211-0/+8
| | | | stuff.
* Turn off SMP on Alpha for the time being. There are some memory orderingjhb2001-08-182-2/+2
| | | | | issues that can result in panics and probably data corruption on SMP systems right now. When they are fixed this can be turned back on.
* Grab Giant around trapsignal() at the bottom of trap().jhb2001-08-181-0/+2
| | | | Reported by: obrien
* Remove redundant declarations of functions that are declared injhb2001-08-181-2/+0
| | | | sys/ptrace.h.
* Fix style nits.obrien2001-08-172-16/+16
|
* Prototype the ptrace_*()obrien2001-08-161-0/+4
|
* Fix a dangling {obrien2001-08-161-1/+1
|
* style(9) and make consistent across platformsobrien2001-08-162-24/+26
|
* OFF_T -> OFF (more standard style)ache2001-08-152-4/+4
|
* Add OFF_T_MAX/OFF_T_MINache2001-08-152-0/+6
|
* Teach bus_dmamem_free() about contigfree(). This is a bit of a hack,wpaul2001-08-151-1/+4
| | | | | | | | | | but it's better than the buggy behavior we have now. If we contigmalloc() buffers in bus_dmamem_alloc(), then we must configfree() them in bus_dmamem_free(). Trying to free() them is wrong, and will cause a panic (at least, it does on the alpha.) I tripped over this when trying to kldunload my busdma-ified if_rl driver.
* Old business: some SMP support.mjacob2001-08-151-8/+16
|
* Old business: be able to disable processor configuration from resource.mjacob2001-08-151-11/+32
|
* Style changes to commonize the various platforms.obrien2001-08-151-8/+8
|
* Fix yet another "unconditionally free()ing memory without even checkingwpaul2001-08-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to see if it was malloc()ed first" bug. In bus_dmamap_create(), one of two things can happen: either we need to allocate a special map due to some manner of bounce buffering requirement, or we can DMA a buffer in place. On the x86 platform, the "in place" case results in bus_dmamap_create() returning a dmamap of NULL. The bus_dmamap_destroy() routine later checks for NULL and won't bother free()ing the map if it detects this condition. But on the alpha, we don't use NULL, we use a statically allocated map called nobounce_dmamap(). Unfortunately, bus_dmamap_destroy() does not handle the condition where we attempt to destroy such a map: it tries to free() the dmamap, which causes a panic. Fix: test that map != &nobounce_dmamap before trying to free() it. With this fix, my busdma-ified if_sis driver works on the alpha. I'm a bit alarmed that I'm the first person ever to trip over this bug, since we have been using busdma on the alpha for a while, and since it sort of screams out "Hi! I'm a bug! Booga-booga!" when you look at it. (Somewhere, somebody will say: "But Bill, why don't you just not bother destroying the maps in this case." Because the API is supposed to be a) symetrical and b) opaque to the caller. I can't know whether it's safe to skip the bus_dmamap_destroy() step or not without sticking my fingers into unsafe places, which is what I wanted to avoid in the first place.)
* In prom_halt(), set the halt restart flags on the current CPU, not thejhb2001-08-131-2/+1
| | | | | | | | boot CPU. This was the reason reboots on SMP systems could result in weird hangs. Unlike the x86, we do not need to switch back to the boot CPU in order to reboot the machine. See Section 3.4.5 of Part III (Console Interface Architecture) from the Alpha Architecture Reference Manual (aka the Brown Book) for more info.
* Remove IPI_HALT to make way for a more correct fix for halts and restartsjhb2001-08-134-23/+0
| | | | on SMP alphas.
* Minor style nits: cleanup and add some function prototypes.jhb2001-08-131-2/+5
|
* - Close races with signals and other AST's being triggered while we are injhb2001-08-102-20/+2
| | | | | | | | | | | | | | | | | | | | | | 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)
* Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since theypeter2001-08-082-62/+0
| | | | | | | | | | | | 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.
* Revert part of previous- I misunderstood the use of 'ncpus'- I thought it'dmjacob2001-08-011-3/+1
| | | | been hack to keep clocks from being reinitialized.
* Don't initialize a clock twice (it's not a function of number ofmjacob2001-08-011-3/+5
| | | | cpus).
* Use a machine dependent type, Elf_Hashelt, for the elements of the elfjake2001-07-311-0/+11
| | | | | | | | 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
* Make PMAP_SHPGPERPROC tunable. One shouldn't need to recompile a kernelpeter2001-07-271-1/+5
| | | | | | | for this, since it is easy to run into with large systems with lots of shared mmap space. Obtained from: yahoo
* Call the early tunable setup functions as soon as kern_envp is available.peter2001-07-261-0/+3
| | | | Some things depend on hz being set not long after this.
* - Do not handle the per-CPU containers in mbuf code as though the cpuidsbmilekic2001-07-261-5/+6
| | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud