summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Device megapatch 4/6:phk2004-02-212-1/+4
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* - Fix for sparc64 to use new __panic() functionkensmith2004-01-271-2/+4
| | | | | | Adapted from patch by: David Cornejo <dcornejo@firetide.com> Reviewed by: freebsd-sparc64 (harti) Approved by: rwatson (mentor)
* - Recruit some new ULE users by making it the default scheduler in GENERIC.jeff2004-01-241-1/+1
| | | | | ULE will be in a probationary period to determine whether it will be left as the default in 5.3 which would likely mean the rest of the 5.x series.
* Add PFIL_HOOKS to the GENERIC kernel configuration, primarily sonectar2004-01-241-0/+1
| | | | | | that one can load the IPFilter module (which requires PFIL_HOOKS). Requested by: Many, for over a year
* 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
* Some integrated Davicom cards in sparc64 boxes have an all zerosmux2004-01-082-0/+18
| | | | | | | | | | MAC address in the EEPROM, and we need to get it from OpenFirmware. This isn't very pretty but time is lacking to do this in a better way this near 5.2-RELEASE. This is a RELENG_5_2 candidate. Original version by: Marius Strobl <marius@alchemy.franken.de> Tested by: Pete Bentley <pete@sorted.org> Reviewed by: jake
* Make sigaltstack as per-threaded, because per-process sigaltstack statedavidxu2004-01-031-5/+5
| | | | | | | | | | | | | is useless for threaded programs, multiple threads can not share same stack. The alternative signal stack is private for thread, no lock is needed, the orignal P_ALTSTACK is now moved into td_pflags and renamed to TDP_ALTSTACK. For single thread or Linux clone() based threaded program, there is no semantic changed, because those programs only have one kernel thread in every process. Reviewed by: deischen, dfr
* Track three new sendfile-related statistics:silby2003-12-281-0/+1
| | | | | | - The number of times sendfile had to do disk I/O - The number of times sfbuf allocation failed - The number of times sfbuf allocation had to wait
* Move the declaration of sfbufspeak and sfbufsused to mbuf.h,silby2003-12-281-2/+1
| | | | | | | and use imax instead of max, as sfbufspeak and sfbufsused are signed. Submitted by: bde
* Track current and peak sfbuf usage, export the values via sysctl.silby2003-12-271-0/+4
|
* Don't confuse NULL with 0.obrien2003-12-263-4/+4
|
* Don't confuse NULL with 0.obrien2003-12-262-5/+5
|
* Don't confuse NULL with 0.obrien2003-12-261-3/+3
|
* GC the unused <machine/kse.h> file.peter2003-12-241-38/+0
|
* Add an additional field to the elf brandinfo structure to supportpeter2003-12-231-2/+17
| | | | | quicker exec-time replacement of the elf interpreter on an emulation environment where an entire /compat/* tree isn't really warranted.
* Fix all users of mp_maxid to use the same semantics, namely:jhb2003-12-031-2/+2
| | | | | | | | 1) mp_maxid is a valid FreeBSD CPU ID in the range 0 .. MAXCPU - 1. 2) For all active CPUs in the system, PCPU_GET(cpuid) <= mp_maxid. Approved by: re (scottl) Tested on: i386, amd64, alpha
* - Split cpu_mp_probe() into two parts. cpu_mp_setmaxid() is still calledjhb2003-11-211-3/+9
| | | | | | | | | | | | | | | | | | | | very early (SI_SUB_TUNABLES - 1) and is responsible for setting mp_maxid. cpu_mp_probe() is now called at SI_SUB_CPU and determines if SMP is actually present and sets mp_ncpus and all_cpus. Splitting these up allows an architecture to probe CPUs later than SI_SUB_TUNABLES by just setting mp_maxid to MAXCPU in cpu_mp_setmaxid(). This could allow the CPU probing code to live in a module, for example, since modules sysinit's in modules cannot be invoked prior to SI_SUB_KLD. This is needed to re-enable the ACPI module on i386. - For the alpha SMP probing code, use LOCATE_PCS() instead of duplicating its contents in a few places. Also, add a smp_cpu_enabled() function to avoid duplicating some code. There is room for further code reduction later since much of this code is also present in cpu_mp_start(). - All archs besides i386 still set mp_maxid to the same values they set it to before this change. i386 now sets mp_maxid to MAXCPU. Tested on: alpha, amd64, i386, ia64, sparc64 Approved by: re (scottl)
* - Remove unnecessary synchronization from sf_buf_init(). (There is onlyalc2003-11-161-2/+0
| | | | one active CPU when sf_buf_init() is performed.)
* - Modify alpha's sf_buf implementation to use the direct virtual-to-alc2003-11-162-1/+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.
* Fix more spammage with local changes. Didn't look at the diffs beforejake2003-11-141-10/+10
| | | | | | committing. Pointy hat to: jake
* Rev 1.61 accidentily added makeoptions NO_MODULES=yes. Funny that I add thisjake2003-11-141-11/+10
| | | | | | to all my kernel configs. Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* Respect RB_KDB flag.simokawa2003-11-131-0/+5
|
* Remove reference to sio (superseded by uart).jake2003-11-111-1/+0
|
* Add entries for creator, splash, uart and puc, commented out until they'rejake2003-11-111-1/+5
| | | | made the default. These are needed to run X.
* Remove references to atkbd, atkbdc, psm and vga.jake2003-11-111-7/+1
|
* Assume that unit 0 is the graphics console initialized by syscons, insteadjake2003-11-111-1/+1
| | | | | of testing if the device's firmware node is stdout. This allows syscons to be used when the firmware's input and output is the serial console.
* Fix a bug in the data access error recorvery. Before re-enabling the datajake2003-11-116-4/+60
| | | | | | | | | | | | cache after a data access error we must discard all cache lines. When disabled existing cache lines are not invalidated by stores to memory, so we risk reading stale data that was cached before the data access error if we don't flush them. This is especially fatal when the memory involved is the active part of the kernel or user stack. For good measure we also flush the instruction cache. This fixes random crashes when the X server probes the PCI bus through /dev/pci.
* Rearrange slightly so that DELAY(9) works during cninit.jake2003-11-111-12/+12
|
* Change the clear_ret argument of get_mcontext() to be a flags argument.marcel2003-11-091-2/+2
| | | | | | | | | | Since all callers either passed 0 or 1 for clear_ret, define bit 0 in the flags for use as clear_ret. Reserve bits 1, 2 and 3 for use by MI code for possible (but unlikely) future use. The remaining bits are for use by MD code. This change is triggered by a need on ia64 to have another knob for get_mcontext().
* Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is apeter2003-10-191-0/+6
| | | | MI declared function so it should be everywhere.
* Add an 'include' directive to pull in <sys/ptrace.h>.robert2003-10-101-0/+1
|
* Implement preliminary support for the PT_SYSCALL command to ptrace(2).robert2003-10-091-0/+5
|
* 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
* Migrate pmap_prefault() into the machine-independent virtual memory layer.alc2003-10-031-6/+13
| | | | | | | A small helper function pmap_is_prefaultable() is added. This function encapsulate the few lines of pmap_prefault() that actually vary from machine to machine. Note: pmap_is_prefaultable() and pmap_mincore() have much in common. Going forward, it's worth considering their merger.
* Make PAGE_SIZE and related quantities signed on sparc64. (They are signedalc2003-10-031-4/+4
| | | | | | quantities on every other architecture.) This change is required in order to move pmap_prefault() out of the pmap and into the machine-independent layer.
* Allow the compiler to micro-optimize byte swapping functions bymux2003-09-301-15/+24
| | | | | | | | evaluating them at compile time rather than at run time. As for x86 and amd64, this requires GCC and it's enabled only if __OPTIMIZE__ is defined (ie, if at least -O is used). Reviewed by: jake
* Add vm object locking to pmap_release().alc2003-09-281-2/+4
|
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-252-13/+2
| | | | | | | | | | | | | | | | | | | | | 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-0/+19
| | | | a bus_handle, but currently it does only initializing a bus_handle.
* Remove an invalid KASSERT. Apparently pmap_remove_all gets called onjake2003-09-201-3/+0
| | | | unmanaged pages.
* Handle ISA devices in OF_decode_addr(), with the same code that istmm2003-09-121-1/+1
| | | | used in the EBus case.
* Add a new parameter to pmap_extract_and_hold() that is needed to eliminatealc2003-09-121-2/+3
| | | | | | Giant from vmapbuf(). Idea from: tegge
* Introduce a new pmap function, pmap_extract_and_hold(). This functionalc2003-09-081-0/+22
| | | | | | | | | atomically extracts and holds the physical page that is associated with the given pmap and virtual address. Such a function is needed to make the memory mapping optimizations used by, for example, pipes and raw disk I/O MP-safe. Reviewed by: tegge
* Take the support for the 8139C+/8169/8169S/8110S chips out of thewpaul2003-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rl(4) driver and put it in a new re(4) driver. The re(4) driver shares the if_rlreg.h file with rl(4) but is a separate module. (Ultimately I may change this. For now, it's convenient.) rl(4) has been modified so that it will never attach to an 8139C+ chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to match the 8169/8169S/8110S gigE chips. if_re.c contains the same basic code that was originally bolted onto if_rl.c, with the following updates: - Added support for jumbo frames. Currently, there seems to be a limit of approximately 6200 bytes for jumbo frames on transmit. (This was determined via experimentation.) The 8169S/8110S chips apparently are limited to 7.5K frames on transmit. This may require some more work, though the framework to handle jumbo frames on RX is in place: the re_rxeof() routine will gather up frames than span multiple 2K clusters into a single mbuf list. - Fixed bug in re_txeof(): if we reap some of the TX buffers, but there are still some pending, re-arm the timer before exiting re_txeof() so that another timeout interrupt will be generated, just in case re_start() doesn't do it for us. - Handle the 'link state changed' interrupt - Fix a detach bug. If re(4) is loaded as a module, and you do tcpdump -i re0, then you do 'kldunload if_re,' the system will panic after a few seconds. This happens because ether_ifdetach() ends up calling the BPF detach code, which notices the interface is in promiscuous mode and tries to switch promisc mode off while detaching the BPF listner. This ultimately results in a call to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init() to handle the IFF_PROMISC flag change. Unfortunately, calling re_init() here turns the chip back on and restarts the 1-second timeout loop that drives re_tick(). By the time the timeout fires, if_re.ko has been unloaded, which results in a call to invalid code and blows up the system. To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(), which stops the ioctl routine from trying to reset the chip. - Modified comments in re_rxeof() relating to the difference in RX descriptor status bit layout between the 8139C+ and the gigE chips. The layout is different because the frame length field was expanded from 12 bits to 13, and they got rid of one of the status bits to make room. - Add diagnostic code (re_diag()) to test for the case where a user has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some NICs have the REQ64# and ACK64# lines connected even though the board is 32-bit only (in this case, they should be pulled high). This fools the chip into doing 64-bit DMA transfers even though there is no 64-bit data path. To detect this, re_diag() puts the chip into digital loopback mode and sets the receiver to promiscuous mode, then initiates a single 64-byte packet transmission. The frame is echoed back to the host, and if the frame contents are intact, we know DMA is working correctly, otherwise we complain loudly on the console and abort the device attach. (At the moment, I don't know of any way to work around the problem other than physically modifying the board, so until/unless I can think of a software workaround, this will have do to.) - Created re(4) man page - Modified rlphy.c to allow re(4) to attach as well as rl(4). Note that this code works for the sample 8169/Marvell 88E1000 NIC that I have, but probably won't work for the 8169S/8110S chips. RealTek has sent me some sample NICs, but they haven't arrived yet. I will probably need to add an rlgphy driver to handle the on-board PHY in the 8169S/8110S (it needs special DSP initialization).
* - Clear the CE AFSR bits which indicate the error condition when handlingtmm2003-09-042-8/+25
| | | | | | | | a correctable DMA error. Failing to do so can cause the error interrupt to be triggered over and over again. - Clean up the comments for UEAFSR_* constants, fix a typo (UEAFSR_BLK is (1 << 23), not (1 << 22)), and add two more. Also, add similar constants for the CE AFSR bits.
* Add function OF_decode_addr(). This function obtains the physicalmarcel2003-09-022-1/+112
| | | | | | | | | | | | | | | address of the device identified by its phandle_t by traversing OFW's device tree. The space and address returned by this function can subsequently be passed to sparc64_fake_bustag() to construct a valid tag and handle for use by the newbus I/O functions. Use of this function is expected to be limited to pre-newbus access to devices, such as consoles and keyboards. Partially obtained from: tmm Reviewed by: jake, jmg, tmm SBus testing made possible by: jake Tested with: LINT
* Preparatory commit to allow prototypes in ofw_machdep.h to containmarcel2003-09-023-0/+3
| | | | | | | both newbus types and OFW types. This involves either including <machine/bus.h> or <dev/ofw/openfirm.h>. Reviewed by: jake, jmg, tmm
* Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_kan2003-09-011-3/+3
| | | | symbol.
* Implement cpu_set_upcall_kse. May need tweaking.jake2003-08-311-0/+12
|
* Migrate the sf_buf allocator that is used by sendfile(2) and zero-copyalc2003-08-291-0/+104
| | | | | | | | | | | sockets into machine-dependent files. The rationale for this migration is illustrated by the modified amd64 allocator. It uses the amd64's direct map to avoid emphemeral mappings in the kernel's address space. On an SMP, the emphemeral mappings result in an IPI for TLB shootdown for each transmitted page. Yuck. Maintainers of other 64-bit platforms with direct maps should be able to use the amd64 allocator as a reference implementation.
OpenPOWER on IntegriCloud