surprisingly if the power off sequence doesn't work as expected,
and simplifies the code a little. Fix the doboot() prototype
to quash a warning from gcc.
- Remove unused `register' modifier on declarations
- Reverse the sense of some tests to make the code more clear
- Type casts per KNF
- Move a static variable into the only function that uses it (perhaps
we can eliminate it entirely, someday?)
Change in the way receive buffer areas are handled. Before we gave
the chip 16 buffers, each 1536 bytes (big enough for one packet).
Now we're handing the chip 8 buffers, each 4 Kbytes, and letting
the chip fit as many packets as it can in each one. This should
help keep it from running out of buffer space. Also make some of
the performance-crucial routines inline. It made no measurable
difference except to make me feel better
Changes from Bob Nestor <rnestor@metronet.com> to get closer to support
for his Apple SONIC-based nubus card.
Changes from me to try to get SONIC's MAC address from MacOS settings if
we can't read the PROM space.
driver. Major highlights:
- Protect with splbio(), now that interrupts from the chip might be
enabled by default;
- Wait for current transfer to complete before returning, rather than
wait for previous transfer to complete before starting another;
- Instead of logging a "timeout" message when a target disconnects,
just return, letting the sbc_ready() and sbc_wait_not_req() print
timeout messages if such really did occur.
With interrupt changes to sbc_obio.c, disconnect/reselect now works if
configured into the kernel.
present and initialize a few things. No color support, yet.
- Properly disable interrupts for DAFB.
- Rearrange for better nubus display card interrupt support. Only register
an interrupt if we know how to clear it.
- Complain if we don't know about a given display card and can not install
an interrupt handler.
- Change MYSTERY stuff to cb264--still need to get the DrSW so we can
actually call the routine to clear an interrupt from this card.
tweaks and bug fixes by yours truly.
Here's what Denny had to say:
nubus.h:
- add a drsw entry for my card
[ I also added a couple of constants for more display cards ]
if_sn.c:
- allocate sc->space using malloc (Scott wanted this).
- make csr accesses use NIC_PUT/GET, remove sc->sc_csr.
- add multicast and IFF_PROMISC support. multicast isn't
well tested, but I made sure the unicast case still
works.
- finish the new arp interface, remove sc->sc_enaddr
if_snreg.h:
- remove struct sonic_reg
if_snvar.h:
- add NIC_PUT and NIC_GET macros a la if_ae
- remove sc_txhead, it isn't used.
if_sn_nubus.c:
- clean up support for my SE/30 card.
- Move add_nubus_intr from if_sn.c (to keep if_sn.c MI)
if_sn_obio.c:
- make Q610, C610, Q650, C650, Q800 use EXBUS.
- PB500 had a "return" where "break" was intended. PB500
probably wasn't working.
- move add_nubus_intr from if_sn.c.
- add an "explanation" why Apple's ethernet addr is encoded
in token ring format in the PROM.
- Indent some comments appropriately per KNF.
- Output all diagnostics using the device name rather than a static string.
- Fix a (mostly marmless) bug in snintr(), where loss of heartbeat wasn't
properly ignored and could mask the `receive descriptors exhausted'
diagnostic.
- Use more consistent and portable types in the softc.
- Map registers using an array of bus_size_t offsets, and set up the
mapping in the attach code (thanks to Jason Thorpe for suggesting
this!).
- Disable the ae-specific watchdog, which is no longer necessary in
the general case.
Still remaining: split out functions used to copy data to/from the
card, and retain a way to have a local driver name with the MI code.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
determine whether there was an error (if so, we unmap the slot space
for this device). Use this functionality to tell the attach function
that we couldn't clear the card's buffer.
Also in aesetup(), eliminate the bogus repetition of the error message
we print when the buffer clear actually fails. Noticed by Hauke Fath.
and allow the attach function to override the default watchdog. Also,
do some minor cosmetic surgery (rename bus space tags/handles and some
KNFing I missed the first time around).
devices (obio_norm) or optional address, HSK, and DMA for 5380-based SCSI
controllers (obio_scsi5380). Update all obio-attached drivers
appropriately.
Also, attach fpu to mainbus, rather than obio.
and declare ssir as volatile. This avoids the problem of lost softints
should a hard interrupt cause a softint to be flagged while we are
clearing a different one.
Idea from atari mtpr.h, modified/optimized by me.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
- extdms_done is modified by things outside of our direct control;
it needs to be declared `volatile'
- CountADBs() fails when we call it the second time. We can work
around this by telling extdms_init() how many ADB devices we have,
only calling CountADBs() once.
can then access the page table entries directly using user data space with
the MOVES instruction. This should resolve the problem on the Duo 2x0
series with hard hangs in this function.
Warning: do not call any function that accesses user data space (FC $1)
from get_pte()!
- Figure out what CPU we have, rather than assuming the Booter knows,
and set cputype variable accordingly.
- Carefully rearrange the order of various MMU/ATC operations so as to
eliminate possible side effects. Also, re-order the initial bootstrap
code to make clear what various sections of this code do.
- Adjust to combined initenv()/genenvvars() (the latter has assimilated
the former).
- Add a function code argument to ptest040().
- Use symbolic constants from assym.h where appropriate (and defined).
- Some style cleanup.
- Combine initenv() and getenvvars().
- Hardwire some PowerBook internal video addresses, from Takashi Hamada.
- When printing out the machine model/CPU, use the new cputype variable
instead of the Booter's PROCESSOR environment variable.
- Use new ptest040() function code argument (though for now, the MMU is
disabled on the 040).
- Revert previous change in get_physical() that seems to have broken
some machines; use an ADD instead of an OR when determining the PA.
- Some (very minor) style cleanup of asm code.
input operands. This corrects an uninitialized variable warning, and
may also explain some erratic behavior of the MRG ADB; gcc could throw
away the value of the `ticks' variable (but I haven't traced through
any ROMs, myself).
indirect bus code framework) from Jason Thorpe. This allows us to dump
bus_scan() and bus_print(), and move bus_peek() and bus_mapin() to the
NuBus code (since they'll eventually go away, anyway).
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:
Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.
Leave `mandatory' flags (like -msoft-float which on m68k enforces no
FP in kernel) in CFLAGS.
to initialize conspa was invalid on non-040 machines, since we don't
know which MMU we're using on those, yet. On the other hand, by the time
we get to check_video() on the 040 machines, the MMU has been disabled.
Compromise: get the video PA in setmachdep() on the 040, and in
check_video() on the others. (This is not optimal. *sigh*)
- Add reset attribute sequences for bold, underline, and reverse
- Add insert/delete line sequences
- Recognize but ignore G0/G1 character set sequences
Performance:
- Speed up clear_line() when clearing the entire line
Also, some stylistic changes for checking/setting scroll region bounds
and in putc_getpars().
These changes make the ITE work properly with the 1.2 termcap file.
have an Apple Sound Chip. Make sure that we have configured the device
before allowing accesses to ASC memory. Among other things, this
prevents the 660AV and 840AV from getting a kernel bus error when trying
to beep on the console.
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.
- Fix up usage of MBD_ISPID(). (from Jason Thorpe)
- Be careful not to deref bad pointers in the MMU fault handler. (ditto)
- Ensure trap() never deals with a NULL proc, and if our proc has
no pcb, punt. (Suggested by Gordon Ross)
- Initialize proc0.p_addr just after setting up the kernel stack, to avoid
getting NULL pointers in trap(). Change suggested by Gordon Ross.
- Panic if main() returns.
immediately reasserted before we get a chance to process the interrupt,
we can inadvertantly get stuck with zs_tx_stopped set. Move the delta
detection to the hard zs interrupt handler; the softint handler
will notice that something has happened with CTS and restart the
transmitter if it's asserted.
brings us closer to basic operation.
- Verified/updated ROM vector entries for many systems, and new vector
table entries for LC 520, LC 575/577/578, and Quadra 950
- Implement a new machine class (MACH_CLASSQ2) for the LC 575 series
- Use the ptest040() helper function in get_physical().
Also, in straytrap(), only enter the debugger #ifdef DDB.