summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
AgeCommit message (Collapse)Author
2012-02-25Fix a bad case of htole64() being used instead of htole32() when setting upMiod Vallat
pci configuration space accesses to allow proper recovery from failure, causing the measure not to have any effect and the system to freeze hard. Fixes use of pcidump -x on B1000, and probably more systems.
2011-09-19%b format strings take the value before the bitname string, not the otherMiod Vallat
way around.
2011-08-16Compile in serial console settings support if any com(4) device is includedMark Kettenis
in the kernel, not only when com @ gsc is there. ok miod@
2011-05-01Fix counting of interrupts for devices that attach to elroy(4). SharedMark Kettenis
interrupts would be counted double, once for the interrupting device and once for the device at the head of the chain. The handlers would run properly though. Avoid this by giving each device its own interrupt counter instead of using the counter provided by the generic interrupt handling code for the head of the chain.
2011-04-23Stop calling shared interrupt handlers as soon as one of them return 1Mark Kettenis
(positive interrupt was for me), like we do on other architectures. This is done here, at the elroy(4) driver level, since this is where shared PCI interrupts are handled. We could do something similar for dino(4) but this optimization is probably not very relevant there. ok deraadt@
2011-04-07Do not use NULL in integer comparisons. No functional change.Miod Vallat
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
2011-01-23Spinning up secondary CPUs on an MP kernel results in PDC output on theJoel Sing
system LCD. Move LCD initialisation to a mountroot hook in order to avoid PDC output after initialisation. Committing on behalf of kettenis@
2011-01-09Check in resettodr() if inittodr() has been called, otherwise we end upJasper Lievisse Adriaanse
resetting the clock when we don't need to. Found out with booting hppa64 kernels, and the problem also exists on hppa when booting with '-a' and hitting 'exit' when asked for the root filesystem. help & ok jsing@ also ok kettenis@ (who suggested naming the variable like amd64/i386 to prevent creating yet another variant of this code)
2011-01-05- remove unused headers wrapped in #if defined(DDB)Jasper Lievisse Adriaanse
ok jsing@ kettenis@
2011-01-02Make need_resched() call cpu_unidle() such that we wake up a process running onMark Kettenis
another CPU. ok miod@
2011-01-01Move setting cpu_hzticks to the clock initialization function, likeJasper Lievisse Adriaanse
other ports (e.g. hppa64) do. ok jsing@ kettenis@
2011-01-01Only store bus/dev/func numbers when the corresponding pointer argumentMark Kettenis
isn't NULL.
2011-01-01Only store bus/dev/func numbers when the corresponding pointer argumentMark Kettenis
isn't NULL.
2010-12-30Implement cpu_unidle() for MP kernels.Joel Sing
ok kettenis@
2010-12-26Kill pmap_phys_address(), and force every driver's mmap() routine to returnMiod Vallat
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
2010-12-04Introduce a new pci routine, pci_conf_size(), which returns the size of aMiod Vallat
given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
2010-09-22remove unused offset argument to rbus functionsJonathan Gray
ok krw@ kettenis@
2010-09-20Get rid of evcount's support for arranging counters in a treeMatthew Dempsky
hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-08-01ANSIfyMark Kettenis
2010-07-02Move common code for waking up writers on a tty into a function.Nicholas Marriott
ok deraadt matthew millert
2010-06-28Allow tty drivers to request larger buffers at attach time using aTheo de Raadt
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new situation. The larger buffers are required by the very high speed KDDI devices in Japan (CF com, or USB ucom) so those are the only two drivers which currently ask for a larger buffer size. ok yasuoka miod
2010-06-26Allow processes to be scheduled onto secondary CPUs.Joel Sing
ok kettenis@
2010-06-03Rename ci_spinup_stack to ci_stack and use it as the stack for both CPUJoel Sing
spin up and FPU emulation. Since all CPUs need a stack for FPU emulation, move the allocation code to cpuattach(). ok kettenis@
2010-05-24Add missing prototypesTheo de Raadt
ok jsing kettenis
2010-05-21Add support for IPIs on hppa.Joel Sing
ok kettenis@
2010-05-19Spin up secondary CPUs on hppa multiprocessor kernels. At this stage weJoel Sing
enable clock interrupts, however do not allow processes to be scheduled onto the secondary CPUs - hopefully we can change this shortly... ok kettenis@
2010-05-06Ansify functions and use "clock" rather than the CPU name for clockJoel Sing
interrupts. ok kettenis@
2010-04-29Currently pdc_scanbus() scans in reverse, which results in physical CPU0Joel Sing
attaching as cpu1 and physical CPU1 attaching as cpu0. Split the device scan into two parts - the first pass scans forward and attaches memory and CPUs, whilst the second pass scans in reverse attaching the remaining devices, thus preserving current semantics. Found the hard way whilst trying to spin up the secondary CPU on my j6750. ok miod@ kettenis@
2010-04-29Store hardware timer information per CPU.Joel Sing
ok kettenis@
2010-04-27Don't use cast expressions as lvalues; gcc4 complains about them. And gcc3Mark Kettenis
generates smaller code without them. ok miod@
2010-04-20cleanup more confusion regarding user.h before proc.h, or missing proc.hTheo de Raadt
ok tedu
2010-04-12Some of the line disciplines want to check for suser. Better to pass themTed Unangst
a process instead of using curproc. ok deraadt
2010-04-01Avoid null pointer dereference. Pointed out by Nick Hudson; variant on hisMark Kettenis
diff from NetBSD.
2010-04-01Allow for multiple CPUs by moving to an array of cpu_info.Joel Sing
ok kettenis@
2010-03-28Allow a multiprocessor kernel to compile.Joel Sing
ok kettenis@
2010-01-01Map the device registers before using them. We were lucky that some otherMark Kettenis
device already mapped the block that contains our registers, but if we change the probe order, or disable devices we might not end up so lucky. ok jsing@, miod@
2009-12-29Move hppa to a "cpu0 at mainbus0" configuration, rather than knocking CPUsJoel Sing
out in the cpu match function. Whilst here also hardwire the clock to IRQ 31, thus preventing one from building a kernel without hardclock. ok kettenis@ miod@
2009-11-09Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tNicholas Marriott
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
2009-10-31Use suser when possible. Suggested by miod@.Federico G. Schwindt
miod@ deraadt@ ok.
2009-10-31Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()Theo de Raadt
calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
2009-08-22Constify the what/name parameter of pci_intr_establish().Michael Knudsen
Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
2009-07-26Make sure all platforms understand the flags argument of bus_space_map() andMiod Vallat
bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well.
2009-04-14Convert the waitok field of uvm_pglistalloc to "flags", more will be added soon.Owain Ainsworth
For the possibility of sleeping, the first two flags are UVM_PLA_WAITOK and UVM_PLA_NOWAIT. It is an error not to show intention, so assert that one of the two is provided. Switch over every caller in the tree to using the appropriate flag. ok art@, ariane@
2009-04-10When deciding whether a sti@pci board is the console, compare all valid BARMiod Vallat
addresses against PAGE0 information, instead than only the BAR mapping sti region #0; on Visualize FXe, PAGE0 will point to another BAR and we would not recognize the display as the console device. Tested on Visualize FX4 (on C240), Visualize EG (on B1000) and Visualize FXe (on B2000).
2009-03-30bzero pci attach argsMark Kettenis
2009-03-08Fix dmesg output for child devices not configured (e.g. lpt on RAMDISK).Miod Vallat
2009-02-08Make sure than cpu_hardclock() never sets a ``next interrupt value'' which hasMiod Vallat
already been hit by the running timer; this happens very often on oosiop-based machines, due to these machines being among the slowest hppa, and oosiop being interrupt greedy. Unfortunately, when this happened, one had to wait for the timer to wrap, which would take up to 128 seconds on the 33MHz machines. Also, invoke hardclock() as many times as necessary if it turns out that we had to delay the interrupt 1/hz seconds to avoid the aforementioned wrap problem. With help from kettenis@; ok kettenis@
2009-02-06Split sti structures into rom-related information and screen-relatedMiod Vallat
information. This is preliminary work to help eventually supporting the dual-head ELK model. Also split the initialization code in several routines, this makes the code easier to read, and makes it easier to release resources upon failure. Finally, don't forget to clear the text planes on non-console displays when initializing.
2009-02-04On systems with viper memory controllers, always print its revision,Miod Vallat
and allow asp interrupts to pass through even if not revision 0. ok kettenis@