ethernet devices and with appletalk link. XXX: It is probably better
not to use ether_*() in netatalk eventually, or rename/generalize the
routines (from Stefan Sichler)
1. If the current screen becomes invalid (ie no focus anymore), always
set the keyboard to translating mode. Otherwise, we could get stuck
because the command keystokes don't come through.
2. Catch errors in attaching to a process (X server) - For this,
implement a callback mechanism similar to the detach case. Add an
argument to report an errno via callback.
might be called without process context, leading to tsleep() panics
(This is a workaround. The timeout() driven wscons glue code
should go instead.)
Fixes tsleep() panics reported by Mark Brinicombe <mark@causality.com>
and Eric Haszlakiewicz <haszlaki@UAccess.NET>.
there are no pages available immediately to use as a PT page, don't
just roll over and die. Only do that if we're the kernel pmap (shouldn't
happen very ofter [ever?!], and I'm not certain we're guaranteed valid
thread context when operating on the kernel pmap). For user pmaps, wait
for the pagedaemon to wake us up when more free pages are available.
out-dated comments, and other unneeded stuff. This helps prepare
for cleaning up the rest of the code, and adding new functionality.
No functional changes to the kernel code in this commit.
Thanks to Scott for pointing this out to me (I got his mail and figured out
this change before seeing the discussion on tech-kern) and to Charles for
the initial explanation.
while a larger message buffer size might be a good idea (even as the
default), the existing definition here was way too large and was, in
fact, accidental!
- break anon related functions out of uvm_amap.c and put them in their own
file (uvm_anon.c). includes break up uvm_anon_init into an amap and an
an anon init function
- ensure that only functions within the amap module access amap structure
fields (add macros to amap api as needed)
- Don't use tcp_respond(), instead create the tcp/ip header from scratch,
and send it ourself.
- Reuse the mbuf that carried the SYN, or allocate one if that is not
available.
- Cache the route we look up to do the Path MTU Discovery check, and
transfer the reference to that route to the inpcb when the connection
completes.
* Macro'ize a small, but often repeated code fragment.
1. the mask is passed by value, not by reference
2. compare the rest of the mask bits not the valid ones
3. return 0, not the current fd's flags.
Now appletviewer works on an inet display. It will not work
with :0 because /tmp/.X11-pipe/X0 is a named pipe, not a
socket like our /tmp/.X11-unix/X0. Maybe I'll kludge svr4_sys_open
to return an fd to a unix socket when someone attempts to call
open on a unix socket.
- no longer conditionalized
- when traced, charge time to real parent, not debugger
- make it clear for future rototillers that p_estcpu should be moved
to the "copy" region of struct proc.
(Nonaka Kimihiro): grave accent and @ were the wrong way
-assign keysyms to the special japanese conversion keys (even if this
doesn't help wscons - but things must have names)
parents for children's p_estcpu. I think this problem has always been there.
It's particularly noticable with X because the server builds up non-trivial
CPU, and hence, non-trivial p_estcpu scheduler penalty. The repeatedly
forked children were always starting from scratch and receiving a scheduler
preference.
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft
Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.
dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
version:
1. The stack_t returned before was SS_DISABLED; now we enable the stack
and return a 16K stack which is 16K under the current stack pointer.
This seems to be what solaris does.
2. Preserve uc_link.
of processes:
- Don't initialize rlim_max to RLIM_INFINITY. The limits for those should
be maxfiles and maxproc respectively. Programs expect getrlimit to
return reasonable values, so that they can allocate structures (for
example jdk does this).
- Don't initialize rlim_cur to NOFILE and MAXUPRC respectively, but to
min(NOFILE, maxfiles) and min(MAXUPRC, maxproc) respectively.
+ dependency on libsa works
+ set and use BINDIR/BINMODE
+ don't pull in sys/lib/lib{sa,kern}/Makefile.inc (``make clean''
doesn't make empty lib/{sa,kern} directories in each
directory/obj dir).
+ remove unnecessary targets, variables and other cruft
+ wrap lines at 80 chars
Re-ordering SRCS line in libsa/Makefile to a more logical sequence
(alphabetical by source dir) results in a libsa.a with archive members
in a different order, and a resultant bootrz that differs from the 1.3.3
bootrz. Untested as yet, so left in but commented out.
Also, _don't_ install the bootblocks (as per intent of previous commit)
or our own small libsa(!).
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.
Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.
Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
SYN,ACK packets during Path MTU Discovery. Fix tcp_respond() to do the
appropriate route lookup and set DF as appropriate.
Also, fixup similar code in tcp_output() to relookup the route if it
is down.
In wdc_probe_caps() add code to guess the ATA revision supported (if
ATA4 if Ultra-DMA, ATA2 if PIO mode > 2). We can't rely on param.atap_ata_major
here, at last one Ultra-DMA drive claims to support only ATA-3.
Use the ATA version in ata_perror(), and to try a flush cache command
in a shutdown hook for IDE drives.
if it contained a "19" before. There are machines (in particular PS/2
descendants) which have a checksum at this place.
Introduce a patchable kernel variable "rtc_update_century" to modify
the behaviour: 1="always update" (for testing and if one wants to set
the clock back) or -1="never touch".
add handling of a "close all" command
-split out code common with wsdisplay_delscreen() into
wsdisplay_closescreen()
-add ttymodem call to signal a HUP to the application if the screen
is closed
-add flag to force a "clear screen" on close (XXX should actually be
controlled from userland)
-remove checks for existence of "reset" entries in the emulations - this
is required now
- Fix an error in mips3_cpu_switch_resume(); ASID was not set correctly.
- Remove global variable 'curpcb' reference in mips1_proc_trampoline().
- Restore 'cpuregs.h'.
* Add the correct version of locore_mips1.S [ See previous revision for
description of changes ]
* Use defopt'ed MIPS3_L2CACHE_ABSENT in mips_machdep.c and pmap.c
to avoid generating extraneous code.
* GC pmap_set_referenced in pmap.c
reads. This avoids a problem where many writes will cause the driver
to allocate way too much memory.
This needs to change to a queueing system later, which will provide a
way to limit the memory consumed by the driver.
Without these changes, raidframe would use 24M or more on my machine when
the buffer cache dumped all its dirty blocks. Now it uses around 200k
or so.
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
Affected files:
include/mips_param.h, include/pcb.h,
mips/locore_mips1.S, mips/locore_mips3.S,
mips/mips_machdep.c, mips/vm_machdep.c
Issue:
So far, NetBSD/mips has not successfully got rid of fixed-address
kernel stack. USPACE (two 4KB pages) of each process has two distinct
KSEG2 addresses, both refer to a single physical storage; one address
for fixed range [ UADDR .. KERNELSTACK ), and another for "normal" KSEG2
address which was allocated by kernel memory manager and unique to each
others of processes.
"Doubly mapped" USPACE complicates context switch. Both address ranges
have to be managed with a special care of "wired" TLB entries which
are never replaced until next context switch to ensure no TLB miss for
USPACE access. It's equally crumbersome that MIPS processor's cache
machinary gets be confused about USPACE contents because there are two
distinct KSEG2 addresses to manipulate one physical storage.
Solution:
Purge KERNELSTACK constant for kernel stack pointer and replace
it with process unique values. Kernel stack bottom is located at
'curproc->p_addr + USPACE'. Context switch is simplified as it unloads
half of TLB hardwiring burden. It just manages the unique KSEG2 address
of each USPACE to be wired. As the side effect, switch_exit() has no
MIPS processor ISA dependent code anymore. It switchs kernel stack to
proc0's USPACE which has KSEG0 address and no need of TLB entry.
* Extensive use of 'genassym.cf'
To hide target port dependent and/or processor register size dependent
constants from assembler routines, 'genassym.cf' now has an extentive
set of definitions for various constants and offset values of
structural objects. This change will contribute possible NetBSD/mips64
portability too.
* Separation and rename of locore_r2000/_r4000.S
Those files are now indepedent standalones from locore.S to ease
maintainance works, and renamed to match MIPS processor ISA version.
* Changes in kernel mode exception handlers
Kernel mode exception handlers hold exception contexts by pushing a
certain set of register values on stack for resuming kernel mode
processing. This context is now represented with 'struct trapframe',
which is smaller than full scale (user mode) exception context 'struct
frame'. Stack consumption of kernel mode exception services is now
similar to 4.4BSD/mips.
* Relocation of exception frame
User mode context 'struct frame' is moved to the very bottom of kernel
stack at 'curproc->p_addr + USPACE - sizeof(struct frame)' This change
saves a bit of instructions on every return to user processes as it
eliminates reference to global variable 'curpcb' each time.
* Refurblished DDB backtrace routine
It's a growing concern to maintain stacktrace() code correctly. It
could be simplified by enforcing special arrangements for some of
obscure locore routines which violate usual coding conventions.
New backtrace code searchs for certain instructions peculiar to any of
function tails. Specifically, "jr ra" for normal function returns, "jr
k0" for MIPS1 exception handlers and "eret" for MIPS3 handlers.
* Support for 64-bit safe user code
Affected Files:
${ARCH}/include/pubassym.cf lib/libc/arch/mips/gen/*setjmp*
include/setjmp.h mips/include/[lots] mips/mips/[lots]
Solution:
We define macros REG_L/REG_S and SZREG for loading and storing
registers and for the size of registers. The exact meaning
of these is controlled by a macro (currently _MIPS64) which
allows one to treat the registers as either 32-bit or 64-bit.
There are data types mips_reg_t and mips_fpreg_t which represent
the true register sizes, and avoid confusing register_t.
We needed a way to dynamically gen the structure sizes of things
like sigcontext for setjmp.h, so we defined a pubassym.cf for
libc routines like setjmp and longjmp.
NetBSD/mips allows ${ARCH}'s to be defined which preserve
all 64-bits of registers across user context switches. There
are still a few niceties to clean up for kernel mode context
switches.
* Support for QED 52xx processors
Affected Files:
mips/locore_mips3.S mips/pmap.c include/locore.h
Issue:
The QED 52xx family of processors are targeted at low cost
embedded systems, (i.e. CPUs ~$30) for systems like routers, printers,
etc. We have added preliminary support for some of the idiosyncrasies
of this processor, e.g. no L2 cache, etc. More work needs to be
done here because with a modest 2-way L1 cache, some of the rampant
flushing has significant performance implications. However,
it doesn't crash, which is a start.
Solution:
A routine for flushing the cache based on virtual addresses was added;
a routine which deals with the two-way set associativity of the
5230 L1 cache was added, accomodations to 5230's instruction hazards
were added.
* TLB Miss code for mips3/mips4 processors cleaned up significantly.
Affected Files:
mips/locore_mips3.S mips/vm_machdep.c include/locore.h mips_machdep.c
Issue:
The TLB Miss handler exceeded the allowed size, which wasn't
a problem because there was no handler for when the processor
was in 64-bit mode. The handler for invalid TLB exceptions
also appears to have much vestigial code, which made it
difficult to understand.
Solution:
Use the XCONTEXT register to store a pointer to the segment
map table, this coupled with removing some dead code allows
the handlers to fit.