arm32/arm32/machdep.c into arm/arm/sig_machdep.c, merging and ANSIfying in
the process.
The code is based on the arm32 version, so I don't think anything should break
there.
Also, most device functions related to IRQ handling no longer take a device
pointer. We make so many assumptions about the machine's layout in irq.c that
this just seemed silly.
The architecture here follows that of the vax port -- each device has its
evcnt in its softc, but defers actually incrementing it to the IRQ
dispatcher. This way, devices can attach sub-counts (e.g. Rx and Tx counts
for Ethernet interfaces), but don't all have to have code to increment the
counters.
Drivers deliberately call evcnt_attach_dynamic() before establishing their
interrupt handler so that the establish routine can attach a parent event if
that's appropriate. At present, it isn't.
The architecture here follows that of the vax port -- each device has its
evcnt in its softc, but defers actually incrementing it to the IRQ
dispatcher. This way, devices can attach sub-counts (e.g. Rx and Tx counts
for Ethernet interfaces), but don't all have to have code to increment the
counters.
Drivers deliberately call evcnt_attach_dynamic() before establishing their
interrupt handler so that the establish routine can attach a parent event if
that's appropriate. At present, it isn't.
NULL "name" argument to irq_establish indicates that the device will maintain
an evcnt structure for this interrupt. In this case, irq_establish will still
maintain its own count (for DDB machine irqstat), but won't attach it to the
global list.
Change use of ev_group and ev_name to follow guidelines in evcnt(9).
Switch arckbd(4) over to the new arrangements.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards. This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.
This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver. I've tested it (briefly) with 'ei' on arm26
as well. In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()
Patch written by enami.
shape as the old arm32 one, but there are a few #defines to keep arm26 code
happy. Anything that depends on the precise shape of the trapframe,
and especially on being able to treat it as an array of registers, has been
updated.
Yes, this causes binary incompatibility. Yes, it's Evil, Bad and Wrong.
Nonetheless, I think it's probably the least unpleasant way to get close to
binary compatibility with NetBSD/arm32, and a very much doubt there are any
arm26 binaries out there that depend on the old shape of struct sigcontext.
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c
Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
- Make data_abort_address() return the whole affected range, rather than
just one end.
- Don't rely on pmap_confess(). Instead, for LDM/STM, behave as if two faults
had occurred, one at each end of the range.
- Separate out fault handling into do_fault(), and call it from
data_abort_handler() (twice) and prefetch_abort_handler().
1: Cleanup of syscall() -- treat the arguments as an array of register_t
throughout. This saves a few casts, and generally makes seeing what's
going on easier.
2: Be a little more careful in the handling of data aborts on kernel
addresses: don't use the kernel's map unless the access was actually from
a kernel mode. This is how the arm32 data abort handler behaves.
- Use UVMHIST for debugging messages, rather than printf
- Rely on the caller of pmap_enter to tell us how to manipulate referenced/
modified bits in the kernel pmap.
[ Suggested by chs -- may need work on the rest of the kernel. ]
- Split third-stage initialisation out of pmap_create() into pmap_init2().
- Bug fix: when relocating pv_table, fix up all references to it as well.
- Bug fix: in pv_release(), if pulling up a pv_entry to the head of the
list, correct the reference from its pmap.
just get pmap_fault to shove them back in. Crude, but effective. Fix inspired
by Chuck Silvers.
This breaks pmap_confess, but it probably deserves to die.
XXX if you have libc after citrus locale import, please recompile libc,
and your applications that use mbstate_t (rather rare). really sorry
for the mess.
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx
This addresses kern/10981 by Matthew Orgass.
By default, they aren't used, since most cards seem to put the non-OS-dependent
stuff in the main chunk directory. i-cubed cards are a notable exception.
Issue Service_PreReset to get the hardware to a sane state.
Use *ShutDown to log off fileservers.
Use the correct arguments to Cache_Control.
Using Service_PreReset seems to have rendered the Podule_ReadID trick
unnecessary, so g/c it.
start of the kernel text segment in at address 0 to get zero-page properly
mapped. This should save us one page, but that may need a bit of extra
shuffling before we can easily tell UVM about it.
packets. Interrupt enabling is left to the RISC OS driver, medium selection
is untested and it's hard-wired to the MAC address of my card. Not really
for production use.
the command line, so we don't need to tokenize it first.
This makes it less than clear what file type BBBB should have, so let's not
make an issue of it.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
the UPC driver needs to know whether the system's got an IOEB in it.
The way this is implemented is a mess -- I need to get my mind round
autoconfiguration again.
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate
as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro
for hpcmips, use new bootverbose instead of it's own hpcmips_verbose
Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
* All of pmap_init is now deferred to the first call of pmap_create. This
allows us to allocate stuff dynamically using malloc.
* pv_table (which is needed before malloc is available) is temporarily
allocated using pmap_steal_memory in pmap_bootstrap, and then
re-allocated using malloc in pmap_create, with the old allocation being
given back to UVM. This should save some memory on small machines, but
the malloc overhead probably soaks it up.
and a front-end driver for the Ether3. Only semantic change is to remove
ea_claimirq() and ea_releaseirq() on the grounds that the seem too spurious
to warrant a callback to the front-end.
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.
Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
as used on later arm26 system (A5000, A4, A3010, A3020, A4000).
What we have got:
...
upc0 at iobus0 base 0x010000: config state bb 87 1c 00 00
fdc at upc0 offset 0x3f4 not configured
wdc0 at upc0 offset 0x1f0
lpt0 at upc0 offset 0x278
com0 at upc0 offset 0x3f8: ns8250 or ns16450, no fifo
...
What we haven't got:
- FDC support (found, but not configured).
- Clearing lpt interrupts on arm26 systems (needs help from IOEB).
- A upc(4) manual page.
- More than minimal testing (my A3020s don't have root devices).
- A proper probe routine (arm26 can't use one anyway).
driver and make it MI):
Set the ByteSwap bit on big-endian hosts, so we can use 16-bit transfers to get
at packets whatever.
Treat Tx/Rx headers as arrays of four bytes rather than as 32-bit words.
Transmit and receive buffer sizes aren't an intrinsic property of the card,
so they belong in if_ea.c rather than if_eareg.h.
Correct some comments in if_ea.c
that the ROM page registers on the podules are likely to end up pointing at
the page with the ECID in it, so NetBSD can recognise the podules.
This is necessary for my i-cubed EtherLan cards, at least.
- Get the Ethernet address from the card's description string, rather than
relying on RISC OS to set it.
- Don't mention this is a SEEQ8005 -- that's all an "ea" can be.
- Use format_bytes to display the amount of buffer RAM.
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)
portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>
also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".
Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1(). In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.
This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.
- Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.
- Add a second proc argument for inferior() since callers all had
curproc handy.
Also, miscellaneous cleanups in ktrace:
- ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.
- move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.
- simplify interface to ktrwrite()
state into global and per-CPU scheduler state:
- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.
- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).
- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.
- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.
Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).
Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.
Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].
Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
pointer indicating how to print the symbol. This allows db_printsym()
to called in places where db_printf() is not an appropriate output
function.
While straightforward, apologies in advance if I've introduced any minor
syntax errors; I was unable to test compilation this on all the affected
platforms.
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.