summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2007-04-21quick macro to figure out how many 64bit words a buffer will use.David Gwynne
2007-04-21create struct tht_pkt to keep track of mbufs that are on the hardware andDavid Gwynne
their dmamaps. so far it looks like the same thing can be used to look after both the transmitted and recved packets. this also adds code to allocate a list of them and set up their dmamaps, some free list handling, and code to free them when you dont want them anymore.
2007-04-21represent the uid field in all the descriptors as a u_int64_t instead ofDavid Gwynne
two u_int32_ts
2007-04-21rename tht_rxf to tht_rx_free. tweak comments describing the hw structuresDavid Gwynne
a bit so theyre less offensive to my eyes. massage tht_rx_free a bit.
2007-04-21Remove unused header files.Marc Balmer
2007-04-20Increase the delay while uploading a firmware buffer in malo_load_firmware().Claudio Jeker
We're doing DMA transfers without interrupts or some other indication and 100 microseconds is not enough on my X40 and so the firmware gets corrupted. Increasing it to 500 microseconds this should give us enough safety margin. OK mglocker@
2007-04-20Do not use time_t for on-disk data structures, use int32_t insteadTodd C. Miller
since time_t will have to be crank to 64 bits at some point in the future. OK pedro@
2007-04-20Remove leftover trapwrite() prototype from... 80386 support.Miod Vallat
2007-04-20Segment tables are integral multiples of the page size in LP64 mode, soMiod Vallat
do not manage a freelist ourselves, but release them in pmap_destroy().
2007-04-20add a lock around ioctl handling to prevent the posssibility that someoneDavid Gwynne
will try to bring the interface up in the middle of it being brought down. im sleeping in tht_down while waiting for the tx fifos to drain, so its possible something else can enter the ioctl handler while that's happening.
2007-04-20this implements up and down routines for the interface. currently whenDavid Gwynne
brought up they allocate all four fifos and set the interface flags. when theyre brought down they clear the flags, wait for the tx fifos to drain, and then free all the fifos. interrupts are not yet dealt with.
2007-04-20implement reads from a fifo.David Gwynne
2007-04-20add fifo descriptors for the rxf and rxd fifos.David Gwynne
2007-04-20tht uses ifmedia and firmloadDavid Gwynne
2007-04-20we'd like to show if the nic has link regardless of whether the interfaceDavid Gwynne
is up or not.
2007-04-20implement checking of the link status according to the firmware, and teachDavid Gwynne
ifmedia about it. im not sure what the point of the ifmedia goo is if the only link type we support is "autoselect". using it to show the link state seems to be easier than implementing that ioctl ourselves.
2007-04-20bits in the link status registerDavid Gwynne
2007-04-19Save volume and chunk metadata as well.Marco Peereboom
2007-04-19Cleanup phy selection code, simplifying the code considerably. Attach onlyMark Kettenis
one phy on Sun ERI; gets rid of the duplicate phy on the blade1k. tested by many, ok drahn@
2007-04-19When doing pmap_collect, skip wired mappings when removing.Artur Grabowski
From NetBSD, miod@ ok
2007-04-19Also show fpu context switches in show uvmexp in ddb.Artur Grabowski
From mickey. art@ ok
2007-04-19Do the late freeing of ptps in pae pmap as well.Artur Grabowski
From mickey.
2007-04-19descend into thtDavid Gwynne
2007-04-19Replace the nfskevq_lock lockmgr lock with rwlock.Thordur I. Bjornsson
Replace nfs_kqinit() wich just calls lockinit with RWLOCK_INITALIZER. Assorted cleanup. ok tedu@ "reads good" art@
2007-04-19this is two (and a half) changes, but im too lazy to split them up.David Gwynne
the first is the addition of handlers for the fifos. you can now check if there the fifo is ready to be used, pre sync it for use, do many incremental updates to it, then post sync it to tell the hardware that you've done something. the ready, pre, and post funcs are done for both the reader and writer fifos, but only updates to the writer fifos is implemented so far. the second change is the firmware loading. i needed the above changes to do this, and i needed firmware loading to test them, so this change gets both. so we have a mountroot hook (that was the half change) that allocates the tx task fifo, reads the firmware from disk, and then pushes the firmware onto the fifo. once that is done it spins till the firmware is ready, then cleans up everything it allocated for loading the firmware. this diff wont time out if anything goes wrong during fw_load. if anyone wants to look at a nice way of doing it, please do.
2007-04-19make it compile again if LMDEBUG is defined;Robert Nagy
ok kettenis@
2007-04-19Cleanup spaces.Claudio Jeker
2007-04-19Fix freeing of namecache entries in cache_purgevfs(), okay miod@ art@Pedro Martelletto
2007-04-19After we bumped the maximal number of vnodes by quite a bit we becameArtur Grabowski
painfully aware of what the comment: "This makes the algorithm O(n^2), but do you think I care?" actually means. I started to care. Fix up the cache_purgevfs algorithm to not be O(n^2) since it's not preemptible anyway and while I'm here, make this code actually return the cache entries to the pool instead of hogging them and implement a marginally faster free list. This way we return memory to the system when some parameters change. miod@ ok
2007-04-19sili(4) works fine here.David Gwynne
2007-04-19format and knf the array so it looks more like c and less like a csv.David Gwynne
2007-04-19the tht firmware isnt technically a firmware, its a series of commandsDavid Gwynne
interleaved with data, which is copied directly into the task fifo of a tht controller. the commands and data are all 32bit words, and they all have to be little endian. this byteswaps the host ordered values in microcode.h into little endian values for the controller to eat. you can now build the firmware correctly on big endian archs.
2007-04-19add bits to turn microcode.h into an actual blob. needs endian fixes yet.David Gwynne
2007-04-19tehuti are allowing us to distribute their firmware under a 4 clause bsdDavid Gwynne
license. thanks to Alexander Indenbaum and Nick Bhavsar at Tehuti for sorting this out.
2007-04-19Add initial metadata write function and hook it up.Marco Peereboom
2007-04-19Silly tedu, partitions are measured in blocks not in bytes.Marco Peereboom
2007-04-18Use atomic operations to change the pending software interrupt mask.Miod Vallat
2007-04-18Pass arguments to DPRINTF in the right order.Mark Kettenis
2007-04-18tidy - number unused cdev_/bdev_ slotsTodd T. Fries
ok miod@ kettenis@
2007-04-18Remove the ``new i/o'' code. It has never worked well, noone has stepped upMiod Vallat
to fix it, and it goes in the way of good changes pedro is brewing. No functional change, tested todd@ millert@
2007-04-18Reserve a few pg_flags for pmaps that might want to use them.Artur Grabowski
i386 will use them soon and miod wants to work on other pmaps in parallell. miod@ ok
2007-04-18When vslocking memory for the sysctl make sure that we aren't tryingArtur Grabowski
to wire more memory than we are allowed to. miod@ ok
2007-04-18Contrary to the comment in cia_dma_get_tag(), there are machines with ciaMartin Reindl
that have over 1.0G. Allow direct dma requests to fall back to SGMAPs. From NetBSD via brad; discussed with Miod, tested by myself
2007-04-18if possible, fill in hw.serialno;Martin Reindl
tsunami chipset alphas set this, maybe older ones as well
2007-04-18start implementing support for the fifos on these chips.David Gwynne
there are four types of fifos: a tx task fifo (packets get sent via this), a tx free fifo (for us to know when packets have been sent), a rx descriptor fifo (to give empty packets for the nic to fill), and an rx free fifo (when packets are recieved). each port can have four sets of these fifos, so you can effectively have completely independant io paths. however, due to the nature of our kernel there is no advantage in implementing the use of more than one set of these. so this diff creates wrappers around fifos, the allocation of the dma regions for them, and a description of which registers are used to manage them.
2007-04-18move the tht attach args up a bit, for greater feng shuiDavid Gwynne
2007-04-18add a wrapper around single segment dmaable memory allocations. this hasDavid Gwynne
now been copied from ami into mpi, arc, vic, ahci, sili, and mfi. ive probably forgotten some others too.
2007-04-18Typo in comment. From Brad.Marco Pfatschbacher
2007-04-18Break out of the mtag check loop when a hit was found else we end up in aClaudio Jeker
double free. Found and tested by Stefan Schmieta. OK markus@ mbalmer@
2007-04-18callers of sw_reset will print an error message if anythign goes wrong, soDavid Gwynne
sw_reset itself doesnt have to