aboutsummaryrefslogtreecommitdiff
path: root/sys/riscv
Commit message (Collapse)AuthorAgeFilesLines
* cpu_switch(): unconditionally wait on the blocked mutex transientKonstantin Belousov3 days1-2/+1
| | | | | | | | | | It is nop for 4BSD. Reviewed by: olce Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54831
* kern/sched_shim.c: Provide a scheduler selection machineryKonstantin Belousov3 days1-0/+2
| | | | | | | | Reviewed by: olce Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54831
* arm, riscv: add a preprocessor symbol indicating missed support of ifuncKonstantin Belousov3 days1-0/+2
| | | | | | | | | in kernel. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54831
* riscv: Add macro for hfence.gvma instructionDoongar Singh6 days2-1/+8
| | | | | | | | Add an inline function hfence_gvma() for hfence.gvma instruction. Signed-off-by: Doongar Singh <doonbsd@gmail.com> Reviewed by: mhorne, markj Differential Revision: https://reviews.freebsd.org/D54857
* riscv: smarter DMAP construction (again)Mitchell Horne6 days1-15/+83
| | | | | | | | | | | | | | | | | | | | | | | Extend pmap_bootstrap_dmap() to build the DMAP with 4K-page granularity. Recently we have been approximating it with 2MB mappings. The motivation again is the problematic FU540 hardware, which seems to require more accurate mappings still to avoid triggering its PMP errata. Although this hardware alone is of little consequence, constructing the DMAP accurately/correctly may help avoid future surprises. The implementation contains some repetitive code. This could be expressed differently, but my guiding principle for these early routines is that being simple and explicit about what we are doing makes them easier to comprehend. See also 762a3224cde6 ("riscv: smarter DMAP construction). Tested by: Klaus Küchemann <maciphone2@googlemail.com> MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54716
* riscv: add (a dummy) acpica_machdep.hBjoern A. Zeeb2026-01-141-0/+19
| | | | | | | | | | | | | | | We have reports that iwlwifi(4) works on RISC-V. While we can turn off full ACPI-specific files easily, intermittent code still relies on the header files to be present. In order to not need to completely #ifdef everything out we want to include acpi.h from LinuxKPI and as a result need this file. With this the iwlwifi(4) code compiles just fine and will do the right thing (given the functional ACPI parts are disabled/ unavailable). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: mhorne, emaste Differential Revision: https://reviews.freebsd.org/D54691
* Revert "ophgo: import new .dts"Warner Losh2026-01-103-11/+0
| | | | | | | | | | | | | | | | | | | This reverts commit b55d106df9785d141f9e3e1c916e921df9d877ac. Per request of original author, manu, and mmel, revert this change. While this is a genuinely cool device, there's some issues that need to be sorted out before moving forward: o Imported dt-bindings that weren't used and could interfere in the future. o no platform code for sophgo, though it likely needs it o Potential interference from the dts/dtsi files imported for future linux device-tree imports. These are the dts files from the vendor sdk, and history has down often upstream introduces enough change that keeping them here in the mean time lays the groundwork for merge conflicts in the future. That makes this import premature. Revert until it's more mature.
* ophgo: import new .dtsMartin Filla2026-01-103-0/+11
| | | | | | Signed-off-by: Martin Filla <freebsd@sysctl.cz> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1844
* vmm: Move common accessors and vm_eventinfo into sys/dev/vmmMark Johnston2026-01-082-69/+1
| | | | | | | | | | | | | | | | | | Now that struct vm and struct vcpu are defined in headers, provide inline accessors. We could just remove the accessors outright, but they don't hurt and it would result in unneeded churn. As a part of this, consolidate definitions related to struct vm_eventinfo as well. I'm not sure if struct vm_eventinfo is really needed anymore, now that vmmops_run implementations can directly access vm and vcpu fields, but this can be resolved later. No functional change intended. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53586
* vmm: Deduplicate VM and vCPU state management codeMark Johnston2026-01-085-339/+11
| | | | | | | | | | | | | Now that the machine-independent fields of struct vm and struct vcpu are available in a header, we can move lots of duplicated code into sys/dev/vmm/vmm_vm.c. This change does exactly that. No functional change intended. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53585
* vmm: Consolidate vm and vcpu definitionsMark Johnston2026-01-086-87/+32
| | | | | | | | | | | | | | | | | | | | | | | | | There is quite a lot of duplication of code between amd64, arm64 and riscv with respect to VM and vCPU state management. This is a bit tricky to resolve since struct vm and struct vcpu are private to vmm.c and both structures contain a mix of machine-dependent and machine-independent fields. To allow deduplication without also introducing a lot of churn, follow the approach of struct pcpu and 1) lift the definitions of those structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which lay out the machine-dependent fields. One disadvantage of this approach is that the two structures are no longer private to vmm.c, but I think this is acceptable. No functional change intended. A follow-up change will move a good deal of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53584
* Add sys/_align.h replacing machine/_align.hBrooks Davis2025-12-102-42/+1
| | | | | | | | | | | | | | | | Define _ALIGNBYTES using sizeof(void *) (no functional change on any existing architecture) which will allow it to work with CHERI were we must align things up to capability alignment. In _ALIGN, replace integer manipulation which does not preserve pointer provenance with a type and provenance preserving builtin. This requires modest changes in code which assumes _ALIGN returns an integer, but those are relatively rare. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53947
* bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHODJohn Baldwin2025-12-091-2/+2
| | | | | | | | | The wrapper functions such as bus_alloc_resource_any() still support passing the rid by value or pointer, but the underlying implementation now passes by value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53402
* riscv/pmap: Handle superpages in pmap_extract_and_hold()Mark Johnston2025-12-031-6/+16
| | | | | | | | | | Without this change, vm_fault_quick_hold_pages() falls back to the slow fault handler when it encounters a superpage mapping. Reviewed by: alc, kib Reported and tested by: br MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54022
* sys/stdint.h: add C23 _WIDTH macrosRobert Clausecker2025-11-301-0/+23
| | | | | | | | | | | | | | The platform-dependent macros are added to the various _stdint.h headers, those that are always the same are added directly to _stdint.h. We may want to move the definitions for WCHAR_* and WINT_* out of the platform header files as those are always the same. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53830
* sys/limits.h: add C23 _WIDTH macrosRobert Clausecker2025-11-301-0/+3
| | | | | | | | | | | | For compliance with IOS/IEC 9899:2024 ("C23"). These macros define the width in bits of the basic integer types. Another new macro, BITINT_MAXWIDTH, is not yet included as I do not understand what it should be set to. Perhaps it is compiler-specific. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53825
* riscv: include Xilinx PCIe controller driver.Ruslan Bukin2025-11-271-0/+1
| | | | | | This is used on Codasip Prime. Sponsonred by: CHERI Research Centre
* fib_algo: add FIB_ALGO to GENERIC kernel config on riscvMarko Zec2025-11-251-0/+1
| | | | | | | | FIB_ALGO modular FIB lookups have been enabled by default on amd64 and arm64 since 2021, so enable it on riscv as well. Reviewed by: melifaro MFC after: 1 month
* random: allow disabling of entropy harvesting from keyboard & miceDavid E. O'Brien2025-11-111-0/+4
| | | | | | Reviewed by: jmg Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D53390
* random: TPM_HARVEST should have been named RANDOM_ENABLE_TPMDavid E. O'Brien2025-11-101-0/+4
| | | | | | | | | | | * Enable RANDOM_ENABLE_TPM by default * The commit of TPM_HARVEST failed to add it to NOTES so that the LINT kernel would build the code. Fixes: 4ee7d3b0118c82e651712bb65da53d08e78cd7b1 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53460
* vmm: Move vm_maxcpu handling into MI codeMark Johnston2025-11-041-22/+0
| | | | | | | | | | No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53477
* vmm: Consolidate VM name length checkingMark Johnston2025-11-043-7/+3
| | | | | | | | | | | | | | | | | | | vm_create() is only called from one place. Rather than having similar checks everywhere, move them to vmmdev_create(). We can safely assume that the name is nul-terminated, the vmmctl ioctl handler and the legacy sysctl handler ensure this. So, don't bother with strnlen(). Finally, make sure that the name buffers are the same size on all platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including the nul terminator. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53422
* vmm: Move the module load handler to vmm_dev.cMark Johnston2025-11-041-60/+5
| | | | | | | | | | | | | | | | | Move the vmm_initialized check out of vm_create() and into the legacy sysctl handler. If vmm_initialized is false, /dev/vmmctl will not be available and so cannot be used to create VMs. Introduce new MD vmm_modinit() and vmm_modcleanup() routines which handle MD (de)initialization. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53421
* riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()Mark Johnston2025-10-313-15/+0
| | | | | | | | | | | | | | | | | aplic_max_cpu_count() just returns the VM's max vCPU count, and vm_alloc_vcpu() already checks that. Just remove this check so that it's easier to merge vm_alloc_vcpu() into MI code. If the APLIC really does require us to lower the limit, we should instead adjust vm->maxcpu in vm_create(). No functional change intended. Reviewed by: br MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53496
* riscv: Treat pointer register as an input in fpe_storeJohn Baldwin2025-10-301-33/+33
| | | | | | | | | | | | | | The contents of the memory is an output, but the pointer to that memory is an input. This was correct in the original version of D45697, but when adding appropriate clobbers, the pointer operand was incorrectly switched to an output rather than left an input for fpe_store. Reviewed by: jrtc27 Obtained from: CheriBSD Fixes: 44d4ee7f3dad ("riscv: add FPE code.") MFC after: 1 day Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53441
* kexec: Add dummy headers for arm, i386, powerpc, and riscvJustin Hibbits2025-10-271-0/+39
| | | | | | | | kexec hasn't been ported to these architectures, yet, so appease the build with dummy headers. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51625
* vmm: Move local variables into ioctl handlersMark Johnston2025-10-211-12/+25
| | | | | | | | | | | Make the ioctl handlers easy to read by moving local variables into per-ioctl blocks. No functional change intended. Reviewed by: corvink, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53145
* vmm: Improve register get/set handling a bitMark Johnston2025-10-211-3/+2
| | | | | | | | | | | | | | | | | On non-amd64 platforms, check for negative register indices. This isn't required today since we match against individual register indices, but we might as well check it. On amd64, add a comment explaining why we permit negative register indices. Use mallocarray() for allocating register arrays in the ioctl layer. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53143
* riscv: build allwinner DTBsMitchell Horne2025-10-201-0/+3
| | | | | | | | | | These are known to work if loaded manually by loader(8) (for the Nezha board at least). If nothing else, it is useful to provide a DTB closely tied to the kernel version. MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53118
* riscv: build starfive JH7110 DTBsMitchell Horne2025-10-201-0/+3
| | | | | | | | | | These are known to work if loaded manually by loader(8) (for VF2 at least). If nothing else, it is useful to provide a DTB closely tied to the kernel version. MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53117
* imgact: Mark brandinfo and note structures as constZhenlei Huang2025-10-181-2/+2
| | | | | | | | | No functional change intended. Reviewed by: kib MFC after: 10 days MFC with: 80336636b6b9f7a3bdad007c400e85eae017d2a2 Differential Revision: https://reviews.freebsd.org/D53173
* vmm: Fix a deadlock between vm_smp_rendezvous() and vcpu_lock_all()Mark Johnston2025-10-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vm_smp_rendezvous() invokes a callback on all vCPUs, blocking the initiator until all vCPUs have responded. vcpu_lock_all() blocks each vCPU by waiting for it to go idle and setting the vCPU state to frozen. These two operations can deadlock on each other, particularly when booting a Windows guest, when vcpu_lock_all() blocks waiting for a rendezvous initiator, and the initiator is blocked waiting for the vCPU thread which called vcpu_lock_all() to invoke the rendezvous callback. Implement vcpu_lock_all() in a way that avoids deadlocks with vm_smp_rendezvous(). In particular, when traversing vCPUs, invoke the rendezvous callback on the vCPU's behalf to help the initiator finish. We can only safely do so when the vCPU is IDLE or we have already locked it, otherwise we may be racing with the target vCPU thread. Thus: - Use an exclusive lock to serialize vcpu_lock_all() callers, which lets us lock vCPUs out of order without fear of deadlock with parallel vcpu_lock_all() callers. - If a rendezvous is pending, lock all idle vCPUs and invoke the callback on their behalf. If the vcpu_lock_all() caller is itself a vCPU thread, this will handle that thread. - Block waiting for all non-idle vCPUs to idle, or until one of them initiates a rendezvous, in which case we go back and invoke callbacks on behalf of already-locked vCPUs. Note that on !amd64 no changes are needed since there is no rendezvous mechanism, so there is a separate vcpu_set_state_all() for them based on the previous vcpu_lock_all(). These will be merged together once vcpu state handling is consolidated into sys/dev/vmm. Reviewed by: corvink (previous version) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D52968
* vmm: Remove some unused macrosMark Johnston2025-10-101-1/+0
| | | | | | | | | | No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53013
* vmm: Move the guest vmspace into the generic vm_mem structureMark Johnston2025-10-102-22/+10
| | | | | | | | | | | | | This further consolidates handling of guest memory into MI code in sys/dev/vmm. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53012
* vmm: Make vmmops declarations more consistentMark Johnston2025-10-102-23/+23
| | | | | | | | | | | | | | | | | | | - On amd64, make vmmops_* functions globally visible, as some will be called from machine-independent code in the future. - On arm64 and riscv, move declarations to vmm.h, since they're supposed to be generic across different VMM backends (only amd64 has more than one backend). - Make the declaration macros consistent with each other. - On amd64, make the function typedef names consistent with the corresponding ifunc names. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53011
* vmm: Unify implementations of vcpu_cleanup()Mark Johnston2025-10-101-2/+1
| | | | | | | | | | | | Different vmm implementations were freeing the per-vCPU structure in different places. Make the implementations consistent. No functional change intended. Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53010
* u2f(4): Invert U2F_MAKE_UHID_ALIAS kernel build optionVladimir Kondratyev2025-09-251-1/+0
| | | | | | | This makes non-GENERIC kernel configs easier to maintain. Requested by: glebius MFC after: 2 days
* arm, powerpc, riscv: implement atomic_set/clear_16Konstantin Belousov2025-09-201-0/+3
| | | | | | | Reviewed by: jrtc27, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52626
* riscv: Provide prototypes for fpgetmask/fpsetmaskAlex Richardson2025-09-151-0/+5
| | | | | | | | | | These functions are stubs that do nothing but are called by some software and not providing them results in implicit function declaration errors. This was missed in D25740. Reviewed by: #riscv, mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52035
* vmm: Suspend the VM before destroying itMark Johnston2025-09-102-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we don't do anything to kick vcpu threads out of a sleep state when destroying a VM. For instance, suppose a guest executes hlt on amd64 or wfi on arm64 with interrupts disabled. Then, bhyvectl --destroy will hang until the vcpu thread somehow comes out of vm_handle_hlt()/vm_handle_wfi() since destroy_dev() is waiting for vCPU threads to drain. Note that on amd64, if hw.vmm.halt_detection is set to 1 (the default), the guest will automatically exit in this case since it's treated as a shutdown. But, the above should not hang if halt_detection is set to 0. Here, vm_suspend() wakes up vcpu threads, and a subsequent attempt to run the vCPU will result in an error which gets propagated to userspace, allowing destroy_dev() to proceed. Add a new suspend code for this purpose. Modify bhyve to exit with status 4 ("exited due to an error") when it's received, since that's what'll happen generally when the VM is destroyed asynchronously. Reported by: def MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D51761
* jh7110_pcie.c: add empty PIC methods to conform conventionsJari Sihvola2025-08-201-0/+12
| | | | | | | | | | | This commit updates the driver code to conform with an undocumented convention which says that certain functions need always be implemented together regardless of their content (or lack of). It's been said that unimplemented KOBJ methods become stubs which return ENXIO so this commit does not imply a functional change. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D52042
* u2f(4): a HID driver for FIDO/U2F security keysVladimir Kondratyev2025-08-171-0/+1
| | | | | | | | | | | | | | | | | While FIDO/U2F keys were already supported by the generic uhid(4) and hidraw(4) drivers, this driver adds some additional features an does steps to tighten the security of FIDO/U2F access. - It automatically loads through devd. - Automatically enables HQ_NO_READAHEAD for FIDO/U2F devices. - Implements only miminum set of features. - Do not requires external devfs configuration to set character device permissions. - Names character device as u2f/# to make possible capsicum or any other pledge()-style sandboxing. PR: 265528 Differential Revision: https://reviews.freebsd.org/D51612
* gpio: remove gpiobus_attach_busAhmad Khalifa2025-08-132-2/+4
| | | | | | | | | | | | Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578
* busdma: another fix for small bounce transfersMitchell Horne2025-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More fallout from a77e1f0f81df. When the tag has an alignment requirement but a small (remaining) transfer size, the transfer will be rounded up to exceed its bounds, resulting in memory corruption. The issue is observed on powerpc as noted in the pull request: https://github.com/freebsd/freebsd-src/pull/1415 I also observe the issue locally on riscv hardware, with an 8-byte transfer having 64-byte alignment. There is some uncertainty about the purpose/need for the alignment roundup; both its original intention and present effect. Notably, it is no longer present at all in arm/arm64 implementations. Possibly, this roundup can be removed altogether, but this requires more careful analysis of the edge-cases and history of the property. For now, simply clamp sgsize to be no larger than the remaining buflen, as this is certain to be correct within the current scheme and fixes the affected transfers. Discussed with: jhb, markj MFC after: 3 weeks Fixes: a77e1f0f81df ("busdma: better handling of small segment bouncing") Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1415 Signed-off-by: Chattrapat Sangmanee <aomsin27@hotmail.co.th> Co-authored-by: Chattrapat Sangmanee <aomsin27@hotmail.co.th> Differential Revision: https://reviews.freebsd.org/D47807
* jh7110_pcie: Add StarFive JH7110 PCIe controller driverJari Sihvola2025-08-072-0/+1026
| | | | | | | | | | | | | | | | | | | | | | JH7110 has two PCIE controller devices. First one is used by board's integrated USB which has no driver. Switching PHY to USB mode is not currently implemented. This functionality could be added in a form of a separate PCIE PHY driver if needed. PHY is on by default and there's no need to switch it on. Pre/post_ithread and post_filter methods are not used for interrupt masking since they are meant for level-triggered interrupts whereas JH7110's MSI interrupts are edge triggered (and INTx interrupts do not use this irqsrc scheme at all). Pre_ithread method is nevertheless used for MSI bottom acking. The driver has been tested with Kingston SNV2S NVME SSD The functionality of INTx and MSI interrupts (as opposed to default MSIx) has been tested by forcing NVME to use them. Reviewed by: mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47919
* jh7110_gpio: Add StarFive JH7110 GPIO controller driverJari Sihvola2025-08-072-0/+368
| | | | | | | | | Basic functionality implemented; fdt_pinctrl interface to be added in the future. Reviewed by: mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43034
* riscv: Add cvitek SoC files to the buildBojan Novković2025-08-013-0/+19
| | | | | Reviewed by: br, jrtc27 Differential Revision: https://reviews.freebsd.org/D48533
* riscv: Add driver for the cvitek reboot controllerBojan Novković2025-08-011-0/+158
| | | | | | | | This patch adds support for the cvitek reboot controller. This controller is present on the Milk-V riscv SoCs. Reviewed by: br, mhorne, jrtc27 Differential review: https://reviews.freebsd.org/D48532
* riscv: Add driver for cvitek reset controllerBojan Novković2025-08-011-0/+132
| | | | | | | | | This patch adds support for the cvitek reset controller. This controller is present on the Milk-V riscv SoCs. The controller is currently only used by the if_dwc driver. Differential Revision: https://reviews.freebsd.org/D48531 Reviewed by: jrtc27, br
* vmm: Add support for guest NUMA emulationBojan Novković2025-07-271-0/+5
| | | | | | | | | | | | | This change adds the necessary kernelspace bits required for supporting NUMA domains in bhyve VMs. The layout of system memory segments and how they're created has been reworked. Each guest NUMA domain will now have its own memory segment. Furthermore, this change allows users to tweak the domain's backing vm_object domainset(9) policy. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44565