busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one
busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one exception: if_jme.- Remove filter functionality internally and parent tag tracking. Without filter functions, we do not need to keep track of tag ancestry. All inheritance of the parent tag's parameters occurs when creating the new child tag.- rename run_filter() to addr_needs_bounce().- FreeBSD keeps the filtfunc and filtarg arguments but requires them to be NULL.- Drop filterfunc usage from if_jme. In case of "JMC260 chip full mask revision 2", which has a hardware bug when it comes to DMA transfers crossing the 4 GB bounday, the parent buffer tag already limits DMA memory to 32bit address space. As such it should be safe to drop the filterfunc. The filterfunc was checking if the lower 32bits of the physical address used for DMA are all 0. In case of a 32bit address space, the only address where all lower 32-bits are all zero is 0 itself and I am here assuming that the physical address 0 is not used for DMA transfers!Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)
show more ...
kernel: Rename BUILDING_WITH_KERNEL to KERNBUILDDIR.Fits better with e.g. KERNCONFDIR.Add a small paragraph in kmod.mk which was taken from FreeBSD.
kernel - Rejigger random number generator to be per-cpu 1/2* Refactor all the kernel random number generation code to operate on a per-cpu basis. The csprng, ibaa, and l15 structures are now p
kernel - Rejigger random number generator to be per-cpu 1/2* Refactor all the kernel random number generation code to operate on a per-cpu basis. The csprng, ibaa, and l15 structures are now per-cpu.* RDRAND now runs a periodic timer callback on all available cpus rather than just on cpu 0, allowing rdrand data to mix on each cpu's rng independently.* The nrandom helper thread now chains state with an iteration between cpus, injecting a random data buffer generated from the previous cpu into the mix of the current.
kernel - Optimize bcopy, bzero, memset* Use __builtin_memset() for bzero() and __builtin_memmove() for bcopy(). - Must use _bcopy in a few places where GCC complains about structural punni
kernel - Optimize bcopy, bzero, memset* Use __builtin_memset() for bzero() and __builtin_memmove() for bcopy(). - Must use _bcopy in a few places where GCC complains about structural punning. Even casting doesn't help. - GCC's __builtin_memset() and __builtin_memmove() has a side effect where it assumes that the pointer arguments cannot be NULL. In fact, they can be NULL when the byte count is 0. This assumption by GCC causes later unrelated conditionals on the pointers against NULL to be improperly optimized-out. We had to fix one place where this blew the system up.* Implement memset() in assembly (remove from libkern).* Implement memmove() in assembly (remove from libkern).
kernel: Use nitems() from <sys/param.h> instead of custom defineSince <sys/param.h> is already included in these files.
build - Rewire secure, remove conflicts from libmd, libcrypt* Remove /usr/src/secure, folding all of its subsystems into /usr/src. There's no point having a /usr/src/secure any more, the syste
build - Rewire secure, remove conflicts from libmd, libcrypt* Remove /usr/src/secure, folding all of its subsystems into /usr/src. There's no point having a /usr/src/secure any more, the system won't run without the secure stuff, the idea that some foreign actor could segregate it in order to legally download code without crypto is absurd on the modern internet, and the U.S. government stopped caring decades ago.* Remove conflicts from libmd and libcrypt. Essentially this removes the SHA*_*() and MD5_*() APIs from libmd because these APIs already exist in lib[re]ssl. The older SHA*() and MD5*() APIs are partially retained for legacy base code, but will be removed in a later stage (moved to direct-linking the needed support source). Conflicting routines in libcrypt have been renamed and internalized to be libcrypt-only.* Major rewiring of the Makefile's to support the changes.
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD becauseit tended to get forgotten and the code would compile anyway with thewrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflagsfor an objcache_get() or objcache_reclaimlist call (which use M_WAITOKand M_NOWAIT), it was just one big converting back and forth with somesanitization in between.This commit allows M_* again for the mbuf functions and keeps thesanitizing as it was before: when M_WAITOK is among the passed flags,objcache functions will be called with M_WAITOK and when it is absent,they will be called with M_NOWAIT. All other flags are scrubbed by theMB_OCFLAG() macro which does the same as the former MBTOM().Approved-by: dillon
kern_nrandom, rnd drivers: update for new CSPRNG * Identify each source of entropy with an identifier, so that for example the Fortuna CSPRNG can manage the pool index for each source. * Ad
kern_nrandom, rnd drivers: update for new CSPRNG * Identify each source of entropy with an identifier, so that for example the Fortuna CSPRNG can manage the pool index for each source. * Add a new sysctl, kern.rand_mode, which can be used to select which generator is used for /dev/random; valid values are: - csprng (to use only the Fortuna-based CSPRNG) - ibaa (to use only IBAA) - mixed (to XOR both csprng and ibaa in the output stream It defaults to "mixed".
kernel - Use add_buffer_randomness()* Use add_buffer_randomness() instead of add_true_randomness(). It will do a better job on the char array and also does a quick IBAA mix when it is through
kernel - Use add_buffer_randomness()* Use add_buffer_randomness() instead of add_true_randomness(). It will do a better job on the char array and also does a quick IBAA mix when it is through adding the buffer.
kernel: Use DEVMETHOD_END in the drivers.
kernel: Remove opt_bus.h references where they are not needed.It only defines BUS_DEBUG (if set) and BUS_DEBUG is only used insubr_bus.c, so it doesn't need to be included anywhere else.
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).
kernel: Bring in safe(4), for SafeNet crypto accelerators.Yet untested.Taken-from: FreeBSD