HPC1 does not mark transmitted descriptors like HPC3. We must
query the HPC1 chip to determine what it expects the next
descriptor to be, reclaim used ones, and restart if necessary. Each
revision's corresponding logic now lives in its own
sq_txring_hpc{1,3} function.
HPC1's transmit interrupt conditions also differ from HPC3, so
remove the INTR bits from descriptors when tagging new packets on
to the end of the chain in order to avoid unwanted interrupts.
Also, be extra careful when restarting the transmit ring. Since
transmit interrupts seem to be relatively slow on HPC1, sq_start
may be called while the DMA engine is quiescent, and before a
transmit interrupt is asserted. We cannot behave like HPC3, which
begins transmission from the first packet pulled from IFQ if the
DMA engine is quiescent as this would skip enqueued packets. It
appears that sq_start is never called before HPC3 asserts an
interrupt, which restarts the transmit queue at the appropriate
place. However, this often happens with HPC1 and we cannot assume
that if DMA is inactive in sq_start, then all previously queued
packets have fled the coop.
XXX Is there a similar race possible with HPC3?
HPC3 logic should remain functionally unchanged, and HPC1 should
finally work properly.
true on the transmit side, which appears to be significantly slower at
interrupting than HPC3.
XXX I used to be able to occasionally wedge the chip with
SQ_NTXDESC == 32, but have not yet been able to reproduce that
behaviour this evening with a larger value.
multiple seeq interfaces may exist. While here, add a few trace
actions, move the related macros into sqvar.h, and enhance the
sq_trace_dump output a bit.
is always aligned. This makes md_root_loadaddr always 4 byte aligned.
Without this, may get an un-aligned access trap before we even print
anything on the console which was a pain in the neck to debug since so
early in the bootstrap the CPU usually just halts on exceptions.
- Store machine dependent CTRL_LED address in ctrl_led
- Fix LED debug functions to use stored MD values
Actually I only used these debug routines at the very early porting stage
before I got working kernel printf. Heh.
XXX: news1200 has not been tested for many years.
- we should fix genassym.sh to generate proper unsigned values rather than
remove use of such values in each source
- 0xe0dc0000 is port to control LED so INTIOBASE1700_OFF is not proper name
- these LED debug code didn't work on news1200 and it should be fixed anyway
around a cngetc() that will never return while "halted", which is rude,
and which also requires domain 0 to not just restart us, but kill us
first. Suggestion from Michael Kukat (though this change is not the
same as the one he suggested).
Will cngetc() actually return something when running in domain 0 with a
VGA console? I don't think it will; if it actually does, we should make
this behaviour depend on whether we're in domain 0 or some other domain.
This way we save a mess of #ifdefs. XXX: This code is disgusting. Drivers
should not communicate with the rest of the kernel by means of global variables.
does different things depending what's in %ebx.
We weren't setting %ebx here *at all*; so we did not get SCHEDOP_yield,
which was what was wanted; so unpredictable things happened, notably
immediate return to the NetBSD idle loop, in other words spinning on CPU.
Definitely not cool!
Michael Kukat caught this one and suggested this fix on port-xen.
Originally written by rafal@ back in April 2003. Field-tested by many
people since.
(I am not committing the pmap hack at this time; although pmap changes are
necessary to fully address the r5k panic/coma problems, the implementation
needs further thought)
clockframe -> intrframe, but that is included too late, because this
file includes systm.h and it is in the path of including systm.h. Fix
it by not including <systm.h>; it was only needed for the panic() calls
which I have disabled, since they look more like debugging calls to me.
Also add forward struct declaration for trapframe.
because the x86/intr.h needs them and does not include xenfunc.h. Including
xenfunc.h in cpufunc.h is a clear lose because xenfunc.h needs a boatload
of include functions in order to compile.
1. Reset SCSI bus & MESH on reboot to keep OF happy.
2. Tweak interrupt handler to clear interrupt register again if we get a
CMDDONE interrupt with DMA active and a 0 fifocnt. It's not clear why
this is necessary, but is well documented in some other open source
drivers. This enables synchronous mode to work.
3. Dump a little more information if we do get a timeout.
the hardware. Inspired by Michael Lorenz with some hints from OpenDarwin
sources. Thanks to Michael for beginnings of the patch and for both
discussion and testing. Thanks to Tim Kelly and Riccardo Mottola for
further testing.
the command group ID won't necessarily work for vendor-specific commands.
- Expand the storage in the SC_REQ structure to account for 16-byte commands.
and perhaps PowerMac 9500. These slots sit behind a PCI-PCI bridge, and
devices in those slots inherit the PCI-PCI bridge interrupt. Derived from
a patch submitted in PR port-macppc/26341 by Michael Loreny, who was also
diligent in prodding me to look at it.
property instead of 'interrupt-map' and 'interrupt-map-mask' properties.
Adjust for this by checking for the latter, and if they're not present
(and the parent isn't 'pci-bridge'), then look for 'AAPL,interrupts'.
Problem analyzed and patched by Tim Kelly on port-macppc. I modified the
patch to move the fallback into find_node_intr(), tweaking some previously-
disabled code.
Tested by Tim Kelly.
Also patched from Tim to
- Delay longer for second CPU spinup.
- Only attempt to print CPU speed and cache configuration on certain
CPU types.
allocate a stack frame for blast_dcache() when profiling so it shows up.
in dcache_flush_page(), use a stride of 32 instead of 16 to match the
cache line size. correct various comments.
reviewed by christos@, cube@ and martin@.
While here, remove a printf() in mpu_attach() (ic/mpu.c) to remove
an empty line in some frontends (mpu_isa.c, etc).
(ie. just before we skip the per-page cache invalidations while tearing down
each context) instead of just before we recycle all the contexts in ctx_alloc().
the latter is not good enough since a (physically tagged) L1 cache line is
valid for all contexts, not just the one that was used to instantiate it.
fixes PRs 24126, 25669 and 27730.
So we better determine the bus number of this parent node.
Now, MPACPI on my Opteron board finally correctly determines its
PCI/AGP busses even without the help of the AMD64 Address Map
support implemented in my local tree.
config will include any of the generic pci code and all the current code
needs is pcibusprint for now. XXX this really needs more careful looking over
but does allow ofppc to build clean again.
Assume defaults for file images that match what a vnd would have used.
Native use will still use the standard NetBSD label to get this data.
Fixes PR#25996