- Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.
- Cause all flags passed by boot2 to set the respective loader(8)
boot_* variable. The end effect is that all flags from boot2
are now passed to the kernel.
Approved by: re (scottl)
The uma_zone data structure defines the size of its uz_cpu[] array as 1,
but then sizes the containing data structure at run-time to make room
for per-cpu cache data. Modify libmemstat to separately allocate a
buffer to hold per-cpu cache data, sized based on the run-time mp_maxid
variable when using libkvm to access UMA data. This avoids reading
invalid cache data from beyond the end of the uma_zone data structure
on the stack, which can result in invalid statistics and/or reads from
invalid kernel addresses.
Approved by: re (scottl)
When reporting an error reading from UMA per-cpu cache pointers using KVM,
return a KVM error rather than an out of memory error, so that the caller
reports the KVM error state. This replaces a misleading error message
with a more accurate although equally confusing one.
Approved by: re (scottl)
Read all_cpus variable out of kmem, and validate CPUs against the all_cpus
cpu mask before looking at the cache entries for the CPU. For systems
with sparse CPU id arrays, this skips otherwise uninitialized cache
structures.
Approved by: re (scottl)
Correct a typo in the extraction of zone information from UMA using kmem:
bytes = allocated - freed, not bytes = allocated = freed.
Approved by: re (scottl)
When calling bioq_first() to see if a queue is empty in bioq_disksort(),
don't save the return value as we won't use it.
Noticed by: Coverity Prevent analysis tool
Approved by: re (scottl)
present in kdump.1:1.15:
Add a "-H" argument to kdump, which causes kdump to print an additional
field holding the threadid. This is more useful for libthr than
libpthread, but still quite useful in libpthread as it can be used to
process interlaced records from multiple threads over the course of a
system call.
Detect old ktr_buffer values using the heuristic "if it's negative,
then it must not be a valid threadid". This may leave something to be
desired.
Reviewed by: davidxu
Approved by: re (scottl)
Remove unnecessary and undesirable 'static' from function-local keg
list, which could cause problems for multi-threaded applications
using libmemstat to monitor UMA in more than one thread
simultaneously.
Approved by: re (scottl)
In nfs_dolock(), GC now under-used ioflg, rendered obsolete when we moved
from using a fifo to talk to rpc.lockd to using a special device node.
Approved by: re (scottl)
Reuse ktr_unused field in ktr_header structure as ktr_tid; populate
ktr_tid as part of gathering of ktr header data for new ktrace
records. The continued use of intptr_t is required for file layout
reasons, and cannot be changed to lwpid_t at this point.
Reviewed by: davidxu
Approved by: re (scottl)
Add a -A argument to mergemaster to allow explicitly specifying an
architecture to pass through to the underlying makefiles. This is
quite useful when building on an i386 box to populate an amd64 NFS
root.
Head nod: dougb
Approved by: re (scottl)
Modify the IP fragment reassembly code so that it uses a new UMA zone,
ipq_zone, to allocate fragment headers from, rather than using cast mbuf
storage. This was one of the few remaining uses of mbuf storage for
local data structures that relied on dtom(). Implement the resource
limit on ipq's using UMA zone limits, but preserve current sysctl
semantics using a sysctl proc.
Approved by: re (scottl)
sys/conf/files.sparc64 1.78, sys/modules/Makefile 1.471,
sys/modules/le/Makefile 1.1, sys/sparc64/conf/GENERIC 1.105
Hook up le(4) to the build.
Approved by: re (scottl)
sys/dev/le/am79900reg.h 1.1, sys/dev/le/am79900var.h 1.1,
sys/dev/le/am7990reg.h 1.1, sys/dev/le/am7990var.h 1.1,
sys/dev/le/if_le_ledma.c 1.1, sys/dev/le/if_le_pci.c 1.1,
sys/dev/le/lance.c 1.1, sys/dev/le/lancereg.h 1.1,
sys/dev/le/lancevar.h 1.1
Add le(4), a driver for AMD Am7900 LANCE and Am79C9xx PCnet NICs,
ported from NetBSD.
This version differs from HEAD in that if_le_ledma.c inlines
lsi64854_enet_intr() from rev. 1.8 of sys/sparc64/sbus/lsi64854.c
in le_dma_hwintr() in order to not break the API of the LSI64854
driver in RELENG_6.
Approved by: re (scottl)
- Don't shift the clock frequency in MHz left by 8 before assigning it
to sbus_mdvec.dv_clock as sbus_mdvec.dv_clock is meant to be specified
in MHz. While this was a bug it shouldn't have affected FreeBSD/sparc64
as sbus_mdvec.dv_clock is used to limit the clock rate of chips when
a machine isn't able to support them at maximum speed which isn't the
case for sun4u machines.
- Remove the code that checks whether the clock frequency returned by
sbus_get_clockfreq() is 0 and falls back to 25MHz if it is as that's
already done in sbus(4).
Approved by: re (scottl)
- Sync the list of supported chips with pcn_probe() as of sys/pci/if_pcn.c
rev. 1.77 (also applies to RELENG_6), i.e. remove Am53C974/Am79C970/
Am79C974 PCnet-PCI and Am79C970A PCnet-PCI II.
- Change the entry of the PCnet-Home in the list of supported chips to
match the other ones, i.e. s,PCnet/Home HomePNA,Am79C978 PCnet-Home,.
- s,familly,family
Approved by: re (scottl)
* network.c,v 1.53 (by ceri):
Fixes DHCP handling to use a more robust way to determine whether
DHCP should be used.
* tcpip.c,v 1.134:
Avoid adding unnecessary tailing space when no media option(s) is
specified.
Approved by: re (scottl)
Set IFF_BROADCAST and IFF_MULTICAST on vlan interfaces from the
beginning and simply refuse to attach to a parent without either
flag. Our network stack doesn't like those flags changing and
there is no need in them doing so.
Approved by: re (scottl)
to :: if we have another PCB which is bound to 0.0.0.0. If a PCB has
the INP_IPV6 flag, then we set its cost higher than IPv4 only PCBs.
Approved by: re (scottl)
Avoid creating (and subsequently using) fake opt_*.h files
when the modules are built with the kernel and hence actual
opt_*.h files are available in ${KERNBUILDDIR}. Fix a few
small bugs that would prevent this from working.
At last the build options of the modules become consistent
with those of the kernel unless the MODULES_WITH_WORLD way
still is used.
Approved by: re (kensmith, scottl)
Requested by: ru
Tested on: amd64 i386 sparc64
Tested by: md5
Do address assignment/removal operations after callbacks. Presently,
ifconfig callbacks are used for L2 configuration, media and vlan,
so actions associated with address assignment, like sending out a
gratuitous ARP, should go when L2 is running already.
Return ifvlan.c to the state of rev. 1.7.2.2 -- undo the last
back-out. The above change to ifconfig.c lets us use a callback
for vlan set-up without facing the evil side-effects from IP
assignment to an orphaned vlan interface.
Approved by: re (scottl)