summaryrefslogtreecommitdiff
path: root/sys/arch/mips/cavium/dev
AgeCommit message (Collapse)Author
2023-03-21octrnm(4): Raise delay on startup.riastradh
According to CN50XX-HRM-V0.99E and CN78XX-HM-0.99E: The entropy is provided by the jitter of 125 of 128 free-running oscillators XORed into a 128-bit LFSR. The LFSR accumulates entropy over 81 cycles, after which it is fed into a SHA-1 engine. [...] The SHA-1 engine runs once every 81 cycles. [...] The hardware produces new 64-bit random number every 81 cycles. The last sentence means that we only need to wait 81 cycles _between_ consecutive SHA-1 outputs (which isn't relevant anyway because we reconfigure it into raw mode later), but the first two quotes might mean that we need to wait 81+81 cycles for the _first_ output to be produced on boot when running the self-test. Now, in this case, the self-test is run with the LFSR unhooked, by clearing the RNM_CTL_STATUS[ENT_EN] bit, so that SHA-1 is computed from a known input -- this is really just paranoia to make sure that _some_ functions of the device (which is conjured out of thin air at a fixed virtual address, with no firmware bindings to guide us) behave as we expect. And it's not clear if it really does take 81+81 cycles for the first SHA-1 output to appear when the LFSR isn't feeding into it anyway. But experimentally, delay of 81+81 cycles seems to work whereas a delay of only 81 cycles crashes. PR kern/57280 XXX pullup-10 XXX pullup-9
2022-09-29Remove unnecessary include of <sys/malloc.h>.skrll
2022-09-29Trailing whitespaceskrll
2022-09-18Eliminate use of IFF_OACTIVE.thorpej
2022-06-03fix folloing->following typos in more files.andvar
also s/begginning/beginning/.
2022-05-23s/controll/control/ in comments.andvar
2022-05-04s/entires/entries/andvar
2022-04-17fix various typos in comments.andvar
2022-03-19rnd(9): Omit needless locks in various HWRNG drivers.riastradh
Now that the rnd(9) API guarantees serial callbacks, we can simplify everything a bit more. (Some drivers like hifn(4) and sun8icrypto(4) still use locks to coordinate with other parts of the driver to submit requests to and process responses from the device.)
2022-03-19rnd(9): Adjust IPL of locks used by rndsource callbacks.riastradh
These no longer ever run from hard interrupt context or with a spin lock held, so there is no longer any need to have them at IPL_VM to block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
2022-01-26Fix initialization of the register map by using the com_init_regs()martin
helper function. Pointed out by jmcneill.
2021-12-28sys: Use preempt_point and preempt_needed, not open-coded versions.riastradh
2021-12-05s/multple/multiple/ in comment.msaitoh
2021-11-10s/endianess/endianness/msaitoh
2021-09-17some love to double letters (in comments).andvar
2021-08-07Merge thorpej-cfargs2.thorpej
2021-05-27Move the send queue checking to a new function, and also call thissimonb
in the rx interrupt path. Measureable improvement on a NFS "create small files" test.
2021-05-27Schedule the send cleanup function for next tick in cnmac_start(). Insimonb
the send cleanup function, schedule for the next tick instead of waiting for HZ ticks if there are still send requests outstanding. Greatly increases NFS throughput, perhaps other types of network traffic. Use callout_setfunc() after callout_init() instead of callout_reset().
2021-05-14Fix a missed bitmask to __SHIFTOUT conversion in rev 1.12.simonb
Fixes negotiation problems on non-gige switches. Problem discovered and tested by riastradh@.
2021-05-05Sprinkle some static.simonb
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2021-03-24Remove somewhat dubious empty octfpa_desc structure.simonb
2021-01-27Rename of_match_compat_data() to of_compatible_match(). Similarly,thorpej
rename of_search_compatible() to of_compatible_lookup(). Standardize on of_compatible_match() for driver matching, and adapt all call sites.
2021-01-27Use DEVICE_COMPAT_EOL.thorpej
2021-01-25Since we're using designated initialisers for compat data, we shouldthorpej
use a completely empty initializer for the sentinel.
2021-01-18Remove "struct of_compat_data" and replace its usage withthorpej
"struct device_compatible_entry"; they are ABI-compatible. Fix several "loses const qualifier" bugs encountered during this conversion.
2021-01-15Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establishjmcneill
2021-01-04malloc(9) -> kmem(9)thorpej
2020-10-15Initialise xhci_softc sc_iosjmcneill
2020-08-04Add some CvmCtl bits from newer cnMIPS cores.simonb
2020-07-26Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, movesimonb
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core specific regs.
2020-07-20Fix coreX/IP4 summary register offsetsjmcneill
2020-07-17Remove 2 CPU limit in OCTEON interrupt controller driver.jmcneill
2020-07-17Don't use a reserved value for the USB endian CSR selects andsimonb
enable octxhci_uctl_init(). Between these, USB works without needing a "usb start" from u-boot. XXX: Note the port power enable goop is still disabled until we get a GPIO driver.
2020-07-16Add USB3 support.jmcneill
2020-07-16Add driver for Cavium Interrupt Bus.jmcneill
2020-07-16FDT support for Cavium OCTEON MIPS SoCs. WIP.jmcneill
2020-06-27Add new file containing a couple of UART prototypes.simonb
Missing file pointed out by rin@. Thanks!
2020-06-23Add support for a very simple output-only console so early printf() can work.simonb
Minor tweaks, remove some unused code.
2020-06-23Make sure we only attach to CN3xxx/CN5xxx.simonb
Cleanup - mostly removing unused code.
2020-06-23Redo cnmac attachments - cnmacM @ gmxN @ pip0 @ iobussimonb
2020-06-23Redo cnmac attachments - cnmacM @ gmxN @ pip0 @ iobussimonb
Support SGMII mode used on CN70XX. Most functional changes from OpenBSD octeon port. Still more to come from the OpenBSD driver.
2020-06-23Cleanup - mostly removing unused code and defines.simonb
2020-06-23Minor tweaks and cleanup.simonb
2020-06-23Remove unused include files.simonb
2020-06-23Remove USB controller register definitions, these match dwc2 core andsimonb
weren't used anyway.
2020-06-23Remove unused octeon*usb*var*h includes.simonb
2020-06-22Remove more snprintb _BITS bits.simonb
2020-06-22Remove unused snprintb format strings.simonb
2020-06-22Remove unmaintained CNMAC_DEBUG debug code.simonb