freebsd-dev/sys/riscv/include
Jessica Clarke 7de649170f riscv: Define __PCI_REROUTE_INTERRUPT
Every other architecture defines this and this is required for
interrupts to work when using QEMU's PCI VirtIO devices (which all
report an interrupt line of 0) for two reasons.

Firstly, interrupt line 0 is wrong; they use one of 0x20-0x23 with the
lines being cycled across devices like normal. Moreover, RISC-V uses
INTRNG, whose IRQs are virtual as indices into its irq_map, so even if
we have the right interrupt line we still need to try and route the
interrupt in order to ultimately call into intr_map_irq and get back a
unique index into the map for the given line, otherwise we will use
whatever happens to be in irq_map[line] (which for QEMU where the line
is initialised to 0 results in using the first allocated interrupt,
namely the RTC on IRQ 11 at time of commit).

Note that pci_assign_interrupt will still do the wrong thing for INTRNG
when using a tunable, as it will bypass INTRNG entirely and use the
tunable's value as the index into irq_map, when it should instead
(indirectly) call intr_map_irq to allocate a new entry for the given
IRQ and treat the tunable as stating the physical line in use, which is
what one would expect. This, however, is a problem shared by all INTRNG
architectures, and not exclusive to RISC-V.

Reviewed by:	kib
Approved by:	kib
Differential Revision:	https://reviews.freebsd.org/D26564
2020-09-30 02:21:38 +00:00
..
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h
asm.h Fix global pointer relaxations in the RISC-V kernel 2019-06-09 15:43:38 +00:00
atomic.h riscv: clean up empty lines in .c and .h files 2020-09-01 21:21:03 +00:00
bus_dma_impl.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
bus_dma.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
bus.h Add missing assignment forgotten in r365899 2020-09-20 15:11:52 +00:00
clock.h
counter.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
cpu.h
cpufunc.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
db_machdep.h Read the breakpoint instruction to determine its length in BKPT_SKIP. 2020-02-05 20:06:35 +00:00
dump.h
efi.h
elf.h RISC-V: expose extension bits in AT_HWCAP 2019-06-11 00:55:54 +00:00
encoding.h
endian.h
exec.h
float.h
floatingpoint.h
fpe.h
frame.h
ieeefp.h libc: Provide sub fp(s|g)etmask() implementations for RISC-V 2020-08-03 12:48:51 +00:00
in_cksum.h
intr.h
kdb.h
machdep.h Handle load from loader(8) 2020-06-24 15:20:00 +00:00
md_var.h Move vm_page_dump bitset array definition to MI code 2020-09-21 22:20:37 +00:00
memdev.h Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
metadata.h RISC-V boot1.efi and loader.efi support 2020-07-06 18:19:42 +00:00
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
ofw_machdep.h
param.h riscv: Define __PCI_REROUTE_INTERRUPT 2020-09-30 02:21:38 +00:00
pcb.h Remove unused fields from struct pcb. 2020-01-30 19:15:27 +00:00
pcpu_aux.h Correct padding length for RISC-V PCPU data. 2020-08-12 18:45:36 +00:00
pcpu.h Correct padding length for RISC-V PCPU data. 2020-08-12 18:45:36 +00:00
pmap.h Introduce vm_page_astate. 2019-12-10 18:14:50 +00:00
pmc_mdep.h
proc.h Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h riscv: fix uintfptr_t 2020-08-05 22:09:40 +00:00
psl.h
pte.h riscv pmap: zero reserved pte bits in ppn 2020-07-01 19:15:43 +00:00
ptrace.h
reg.h
reloc.h
resource.h Enable NEW_PCIB on riscv. 2020-01-24 16:50:51 +00:00
riscvreg.h Fix EXCP_MASK to include all relevant bits from scause. 2020-02-05 20:34:22 +00:00
runq.h
sbi.h Add support for HSM SBI extension 2020-05-01 21:55:51 +00:00
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stack.h Use uintptr_t instead of uint64_t for pointers in stack frames. 2020-08-12 20:29:49 +00:00
stdarg.h
sysarch.h
trap.h
ucontext.h
vdso.h
vm.h
vmparam.h Add a vmparam.h constant indicating pmap support for large pages. 2020-09-23 19:34:21 +00:00