summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2022-09-01include: sbi: Reduce includes in sbi_pmu.hAnup Patel1-3/+2
The sbi_pmu.h should only include minimal required headers whereas sbi_pmu.c should include all required headers. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-09-01lib: sbi_pmu: Add custom PMU device operationsAnup Patel1-0/+57
We extend SBI PMU implementation to allow custom PMU device operations which a platform can use for platform specific quirks. The custom PMU device operations added by this patch include: 1) Operations to allow a platform implement custom firmware events. These custom firmware events can be SBI vendor extension related events or platform specific per-HART events are not possible to count through HPM CSRs. 2) Operations to allow a platform implement custom way for enabling (or disabling) an overflow interrupt (e.g. T-Head C9xx). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-09-01lib: sbi_pmu: Simplify FW counters to reduce memory usageAnup Patel1-3/+0
Currently, we have 32 elements (i.e. SBI_PMU_FW_EVENT_MAX) array of "struct sbi_pmu_fw_event" for each of 128 possible HARTs (i.e. SBI_HARTMASK_MAX_BITS). To reduce memory usage of OpenSBI, we update FW counter implementation as follows: 1) Remove SBI_PMU_FW_EVENT_MAX 2) Remove "struct sbi_pmu_fw_event" 3) Create per-HART bitmap of XLEN bits to track FW counters which are started on each HART 4) Create per-HART uint64_t array to track values of FW counters on each HART. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-09-01lib: sbi_pmu: Replace sbi_pmu_ctr_read() with sbi_pmu_ctr_fw_read()Anup Patel1-1/+1
The "read a firmware counter" SBI call should only work for firmware counters so let us replace sbi_pmu_ctr_read() with sbi_pmu_ctr_fw_read() which works only on firmware counters. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-09-01include: Remove sideleg and sedelegRahul Pathak1-2/+0
sideleg and sedeleg csrs are not part of riscv isa spec anymore, these csrs were part of N extension which is removed from the riscv isa specification. These commits removed all traces of these csrs from riscv spec (https://github.com/riscv/riscv-isa-manual) - commit f8d27f805b65 ("Remove or downgrade more references to N extension (#674)") commit b6cade07034d ("Remove N extension chapter for now") Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-08-23lib: utils: serial: Add Cadence UART driverJun Liang Tan2-2/+18
Add Cadence UART driver Signed-off-by: Jun Liang Tan <junliang.tan@linux.starfivetech.com> Signed-off-by: Wei Liang Lim <weiliang.lim@linux.starfivetech.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-08-22lib: sbi: Use the official extension name for AIA M-mode CSRsAnup Patel1-2/+2
The arch review of AIA spec is completed and we now have official extension names for AIA: Smaia (M-mode AIA CSRs) and Ssaia (S-mode AIA CSRs). Refer, section 1.6 of the latest AIA v0.3.1 stable specification at https://github.com/riscv/riscv-aia/releases/download/0.3.1-draft.32/riscv-interrupts-032.pdf) Based on above, we update generic library to use "Smaia" extension name for AIA M-mode CSRs. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-08-22lib: sbi_trap: Save mstatus[h].GVA in trap->gvaVivian Wang1-1/+5
The machine mode GVA field is available if the hypervisor extension is implemented, and indicates if mtval is a guest virtual address. Add a gva field to sbi_trap_info for this, and in __sbi_expected_trap_hext, save mstatus[h].GVA to it, so that gva indicates if tval is a guest virtual address. If the hypervisor extension is not implemented, always set gva to 0. Signed-off-by: Vivian Wang <dramforever@live.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-08-22include: Add mstatus[h].GVA encodingsVivian Wang1-0/+4
The machine mode GVA field is in mstatus for RV64 and mstatush for RV32, and is available if the hypervisor extension is available. If an exception occurs, we may need to redirect the trap to HS-mode, in which case, hstatus.GVA should be set to same as the machine mode GVA bit. Add MSTATUS_GVA for RV64, MSTATUSH_GVA for RV32, and their SHIFT encodings. The SHIFT index is helpful in assembly code, since field extraction can be implemented in only one register. In pseudocode: - For RV32: gva = (mstatus >> MSTATUS_GVA_SHIFT) & 1; - For RV64: gva = (mstatush >> MSTATUSH_GVA_SHIFT) & 1; Signed-off-by: Vivian Wang <dramforever@live.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-08-08lib: utils/fdt: Use kconfig for enabling/disablingAnup Patel2-0/+19
We update FDT support makefile to use kconfig for enabling/disabling. To avoid compilation errors, we also enable FDT for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-08-08lib: utils/irqchip: Use kconfig for enabling/disabling driversAnup Patel2-0/+20
We update irqchip drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate irqchip drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-08-08lib: utils/ipi: Use kconfig for enabling/disabling driversAnup Patel1-0/+9
We update ipi drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate ipi drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-08-08lib: utils/timer: Use kconfig for enabling/disabling driversAnup Patel1-0/+9
We update timer drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate timer drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-08-08lib: utils/reset: Use kconfig for enabling/disabling driversAnup Patel1-0/+12
We update reset drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate reset drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-08-08lib: utils/serial: Use kconfig for enabling/disabling driversAnup Patel1-0/+8
We update serial drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate serial drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
2022-07-30lib: sbi: Add the bound check for events during config matchAtish Patra1-0/+6
Currently, there is no sanity check for firmware event code. We don't see any issue as Linux kernel driver does a bound check on firmware events already. However, OpenSBI can't assume sane supervisor mode software always. Thus, an invalid event idx can cause a buffer overflow error. For hardware events, the match will fail for invalid event code anyways. However, a search is unecessary if event code is invalid. Add a event ID validation function to solve the issue. Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-07-11lib: sbi: add check for ipi device for hsm startBen Dooks1-1/+1
If the ecall SBI_EXT_HSM_HART_START is called it might try to wake the secondary hart using sbi_ipi_raw_send() to send an IPI to the hart. This can fail if there is no IPI device but no error is returned from sbi_ipi_raw_send() so the ecall returns as if the action completed and the caller continues without noticing (in the case of Linux it just hangs waiting for the secondary hart to become active) Fix this by changing sbi_ipi_raw_send() to return and error, and if an error is returned, then return it via SBI_EXT_HSM_HART_START call. Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-07-08lib: sbi_timer: Added a conditional wait function which can timeoutAdnan Rahman Chowdhury1-0/+18
Motivation: Suppose a peripheral needs to be configured to transmit data. There is an SFR bit which indicates that the peripheral is ready to transmit. The firmware should check the bit and will only transmit data when the peripheral is ready. When the firmware starts polling the SFR, the peripheral could be busy transmitting/receiving other data so the firmware must wait till that completes. Assuming that there is no other way, the firmware shouldn't wait indefinitely. The function sbi_timer_waitms_until() will constantly check whether a certain condition is satisfied, or timeout occurs. It can be used for the cases when a timeout is required. Signed-off-by: Adnan Rahman Chowdhury <adnan.chowdhury@sifive.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-06-25include: Bump-up version to 1.1Anup Patel1-1/+1
This patch updates OpenSBI version to 1.1 as part of release preparation. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
2022-06-24include: sbi: Change spec version to 1.0Anup Patel1-2/+2
Now that SBI v1.0 specification is ratified, we change spec verion implemented by OpenSBI to v1.0. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-06-21lib: utils: Remove CSRs that set/clear an IMSIC interrupt file bitsAnup Patel1-21/+3
Based on architecture review committee feedback, the [m|s|vs]seteienum, [m|s|vs]clreienum, [m|s|vs]seteipnum, and [m|s|vs]clreipnum CSRs are removed in the latest AIA draft v0.3.0 specification. (Refer, https://github.com/riscv/riscv-aia/releases/tag/0.3.0-draft.31) These CSRs were mostly for software convenience and software can always use [m|s|vs]iselect and [m|s|vs]ireg CSRs to update the IMSIC interrupt file bits. We update the IMSIC programming as-per above to match the latest AIA draft specification. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-06-21include: sbi: Add mtinst/htinst psuedoinstructionsdramforever1-0/+20
Add psuedoinstruction encodings written to mtinst/htinst for faults caused by implicit memory access for VS-stage address translation Signed-off-by: dramforever <dramforever@live.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-06-13lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegationSamuel Holland1-0/+2
The delegation bit is lost along with the rest of the PLIC state when the CPU power domain in the Allwinner D1 is powered down, so the PLIC needs to be re-delegated to S-mode during the hart resume path. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: utils/irqchip: Add FDT wrappers for PLIC save/restore functionsSamuel Holland1-0/+20
These functions save/restore the state of the PLIC associated with the current hart. The context save/restore functions only manipulate a single context, since most likely the M-mode context is unused and does not need to be saved. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-06-13lib: irqchip/plic: Add priority save/restore helpersSamuel Holland1-0/+5
These can be used by platform code to save the PLIC priority state, if it would otherwise be lost during non-retentive suspend. The platform is responsible for allocating all necessary storage. As a space optimization, store the saved priority values as 8-bit integers, since that is large enough to hold any priority value on the relevant platforms. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: irqchip/plic: Add context save/restore helpersSamuel Holland1-0/+6
These can be used by platform code to save the PLIC context state, if it would otherwise be lost during non-retentive suspend. The platform is responsible for allocating all necessary storage. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: irqchip/plic: Factor out a context init functionSamuel Holland1-5/+3
This simplifies both the callers and the callees by removing duplicated code and consolidating the error handling. It also fixes two bugs in the process: 1) ie_words was one too large when plic->num_src was a multiple of 32. 2) plic_set_ie takes a 32-bit mask, not a Boolean value, so the FPGA platforms previously only enabled one out of every 32 interrupts. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: irqchip/plic: Constify plic_data pointersSamuel Holland1-4/+5
None of the functions modify the passed-in plic_data, so mark it const. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: sbi_hsm: Assume a consistent resume addressSamuel Holland1-2/+2
The suspend code needs to know the resume address for two reasons: 1) Programming some hardware register or management firmware. Here we assume the hardware/firmware maintains its state between suspends, so it only needs to be programmed once at startup. 2) When a non-retentive suspend request ends up being retentive, due to lack of hardware support, pending interrupt, or for some other reason. However, the behavior here is not platform-dependent, and this can be handled in the generic hart suspend function. Since neither situation requires the platform-level suspend function to know the resume address, stop passing it to that function. Instead, handle the non-retentive to retentive situation generically. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-13lib: sbi_hsm: Call a device hook during hart resumeSamuel Holland1-0/+8
Non-retentive suspend states may require platform-specific actions during resume. For example, firmware may need to save and restore the values of custom CSRs. Add a hook to support this. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-06-01lib: sbi_illegal_insn: Add emulation for fence.tsoSamuel Holland1-0/+3
While OpenC906 appears to properly decode `fence.tso` as a fence instruction[1], the version of the C906 taped out in the Allwinner D1 does not, and raises illegal instruction. Handle this errata by emulating `fence.tso` as `fence rw, rw`. [1]: https://github.com/T-head-Semi/openc906/blob/30827e7f/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L2097 Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-05-30lib: utils/fdt: Require match data to be constSamuel Holland1-1/+1
Match data stores hardware attributes which do not change at runtime, so it does not need to be mutable. Make it const. Reviewed-by: Guo Ren <guoren@kernel.org> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-05-14lib: utils/fdt: rename fdt_parse_max_hart_idJan Remes1-1/+1
The function returns the highest hart-id of the harts actually used in the system (enabled). Change the name to reflect this fact. Signed-off-by: Jan Remes <jan.remes@codasip.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-05-14lib: utils/fdt: introduce fdt_node_is_enabled()Jan Remes1-0/+2
If an FDT node contains a "status" property and this property is not "ok" or "okay", this node should be ignored. Introduce a function that checks this. Signed-off-by: Jan Remes <jan.remes@codasip.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-05-13lib: utils/gpio: Generate FDT gpio driver list at compile-timeAnup Patel1-0/+2
Instead of having FDT gpio driver list hard-coded in the C source, we generate it using carray.sh at compile-time. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi_platform: Add callback to populate HART extensionsAnup Patel1-0/+18
We add platform specific extensions_init() callback which allows platforms to populate HART extensions for each HART. For example, the generic platform can populate HART extensions from HART ISA string described in DeviceTree. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Add sbi_hart_update_extension() functionAnup Patel1-0/+3
We add sbi_hart_update_extension() function which allow platforms to enable/disable hart extensions. Signed-off-by: Anup Patel <anup@brainfault.org> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Convert hart features into hart extensionsAnup Patel1-17/+18
Since past few years, we have been using "hart features" in OpenSBI to represent all optionalities and multi-letter extensions defined by the RISC-V specifications. The RISC-V profiles specification has taken a different approach and started assigning extension names for all optionalities which did not have any extension name previously. (Refer, https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc) Inspired from the RISC-V profiles specification, we convert OpenSBI hart features into hart extensions. Going forward, we align the extension naming with RISC-V profiles specification. Currently, only "time CSR" and "AIA CSR" have not been assigned extension name but for everything else we have a name. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Remove MENVCFG hart featureAnup Patel1-4/+2
If a hart implements privileged spec v1.12 (or higher) then we can safely assume that menvcfg CSR is present and we don't need MENVCFG as a hart feature. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Remove MCOUNTINHIBT hart featureAnup Patel1-8/+6
If a hart implements privileged spec v1.11 (or higher) then we can safely assume that mcountinhibit CSR is present and we don't need MCOUNTINHIBT as a hart feature. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart featuresAnup Patel1-11/+7
If a hart implements privileged spec v1.10 (or higher) then we can safely assume that [m|s]counteren CSR are present and we don't need MCOUNTEREN and SCOUNTEREN as hart features. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07lib: sbi: Detect and print privileged spec versionAnup Patel1-0/+15
It is possible to guess privileged spec versions based on the CSRs that where introduced in different privileged spec versions. In future, if we are not able guess privileged spec version then we can have platform provide it. We add privileged spec version as per-hart feature and try to guess it based on presence of mcounteren, mcountinhibit, and menvcfg CSRs. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2022-05-07include: sbi: Define SBI_PMU_HW_EVENT_MAX to 256Jun Liang Tan1-1/+1
Increase maximum number of PMU hardware events that can be mapped by OpenSBI to 256 Signed-off-by: Jun Liang Tan <junliang.tan@linux.starfivetech.com> Signed-off-by: Wei Liang Lim <weiliang.lim@linux.starfivetech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-28lib: sbi: Implement Sstc extensionAtish Patra2-1/+7
Recently, Sstc extension was ratified. It defines stimecmp which allows the supervisor mode to directly update the timecmp value without the need of the SBI call. The hardware also can inject the S-mode timer interrupt direclty to the supervisor without going through the M-mode. To maintain backward compatibility with the older software, SBI call now uses stimecmp directly if the hardware supports. Implement the Sstc extension. Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-17include: correct the definition of MSTATUS_VSVincent Chen1-1/+1
Accordind to the RISC-V privileged specification, the VS filed is mstatus[10:9] instead of mstatus[24:23]. Modify the MSTATUS_VS to the correct value. Reported-by: I-Cheng Cheng <i-cheng.cheng@sifive.com> Signed-off-by: Vincent Chen <vincent.chen@sifive.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-17lib: utils/serial: support 'reg-offset' propertyZong Li2-1/+2
reg-offset property is used for offset to apply to the mapbase from the start of the registers in 8250 UART. In Linux kernel, it has been handled in 8250 UART driver. dt-bindings: <linux>/Documentation/devicetree/bindings/serial/8250.yaml Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-11lib: sbi: Detect Smstateen CSRs at boot-timeMayuresh Chitale1-1/+3
Extend HART feature detection to discover Smstateen CSRs at boot-time and configure mstateen envcfg bit depending on availability of menvcfg CSR. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-11lib: sbi: Add Smstateen extension definesMayuresh Chitale1-0/+44
Smstateen extension provides a mechanism to plug potential covert channels which are opened by extensions that add to processor state that may not get context-switched. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2022-04-05lib: sbi: Detect menvcfg CSR at boot timeAtish Patra1-1/+3
We add the menvcfg CSR as a HART feature and detect it at boot time using traping mechanism. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com>
2022-04-05include: Add defines for [m|h|s]envcfg CSRsAnup Patel1-0/+27
The latest RISC-V privileged specification introduces xenvcfg CSRs to enable/disable certain features/extensions for lower privilege modes. This patch adds defines for these new [m|h|s]envcfg CSRs. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Xiang W <wxjstz@126.com>