summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Allow bus barrier operations on fake tags. The purpose of a fakemarcel2003-08-241-4/+4
| | | | | | | | | | bus tag is to allow bus space accesses prior to having newbus fully initialized, such as would be the case for console drivers. Since barriers are a fundamental part of bus space accesses, not allowing them on fake tags would defeat the purpose of these tags. We use the barrier function normally associated with nexus. This is the barrier used when subordinates haven't defined a barrier themselves.
* reenable the caches when a PCI peek faults. Takes my kernel compilejmg2003-08-242-0/+6
| | | | | | from 3770 real down to 1250 real. Submitted by: jake
* Add a driver for creator upa frame buffers found in many sparc64 machines.jake2003-08-242-0/+458
| | | | | | | | | | These are fixed resolution and operate only in pixel mode so they present a challenge to syscons (square peg, round hole, etc, etc). The driver provides a video driver interface for syscons and a separate character device for X to mmap. Wherever possible the creator's accelarated graphics functions are used so text mode is very fast. Based roughly on the openbsd driver.
* "md" files for syscons.jake2003-08-242-0/+161
|
* s#<mk48txx/mk48txxreg.h>#<dev/mk48txx/mk48txxreg.h>#marcel2003-08-234-4/+4
|
* s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/devimp2003-08-2311-15/+15
|
* Prefer new location of pci include files (which have only been in theimp2003-08-224-9/+9
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Lock the pmap's tsb object when performing vm_page_grab() on it.alc2003-08-201-0/+2
|
* Enable OFW_NEWPCI until jmg's 2003/06/21 18:26:08 PDT bus commit is fixedobrien2003-08-191-1/+1
| | | | | | that caused a 3-4 times slow down in performance. (the primary Sparc64 developers are all using OFW_NEWPCI already, so it is the best code path for users)
* Fixup the ELF branding information to point to the new home of rtld.gordon2003-08-171-1/+1
|
* In vm_thread_swap{in|out}(), remove the alpha specific conditionalmarcel2003-08-161-0/+10
| | | | | | compilation and replace it with a call to cpu_thread_swap{in|out}(). This allows us to add similar code on ia64 without cluttering the code even more.
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MImarcel2003-08-162-3/+3
| | | | | | | | | | | | | | | | | | | 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)
* Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon'simp2003-08-122-4/+48
| | | | | | copyrighted files. Approved by: Matt Dillon
* Fix sparc64 LINT build. <blush>jake2003-08-111-2/+4
|
* Use get_mcontext in sendsig and set_mcontext in sigreturn instead ofjake2003-08-091-9/+5
| | | | frobbing things directly.
OpenPOWER on IntegriCloud