Page MenuHomeFreeBSD

RISC-V includes
ClosedPublic

Authored by br on Dec 14 2015, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 3:26 AM
Unknown Object (File)
Tue, Apr 30, 11:15 PM
Unknown Object (File)
Tue, Apr 30, 10:47 PM
Unknown Object (File)
Tue, Apr 30, 10:38 PM
Unknown Object (File)
Sat, Apr 27, 7:57 PM
Unknown Object (File)
Fri, Apr 26, 5:17 AM
Unknown Object (File)
Fri, Apr 19, 9:58 AM
Unknown Object (File)
Fri, Apr 19, 9:57 AM
Subscribers
None

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br retitled this revision from to RISC-V includes.
br updated this object.
br edited the test plan for this revision. (Show Details)
br added reviewers: andrew, emaste.
sys/riscv/include/_types.h
98–99

These are wrong for an int. arm & arm64 have unsigned wchar_t where i tseems to be signed on riscv.

sys/riscv/include/atomic.h
67

Should these also have "memory" in the clobber list to stop them from being reordered?

sys/riscv/include/exec.h
41

I don't think this is needed, it was for a.out.

sys/riscv/include/float.h
80

Needed?

sys/riscv/include/frame.h
50

Why 32? I thought x0 only ever contained zero.

sys/riscv/include/intr.h
39

Is this needed?

sys/riscv/include/kdb.h
33–34

We don't have these on arm64, they might not be needed.

sys/riscv/include/ofw_machdep.h
32–35

These have been replaces with <vm/vm.h> in the arm64 version.

sys/riscv/include/param.h
86–92

Do oyu need these? They look like arm64 things to support multiple page sizes.

108–110

Is this needed? I'm not sure if it is on arm64, it was copied from sparc64 but the only other place that uses it is i386.

sys/riscv/include/pcb.h
51

Do you need all 32 registers?

sys/riscv/include/pcpu.h
40

I think this should be 129

sys/riscv/include/pmc_mdep.h
35

Do we need this file if we don't support PMC?

sys/riscv/include/reg.h
42

32?

sys/riscv/include/ucontext.h
42

32?

48

I would suggest you pad this to the expected size of these registers

52

Then add it here with a flag field & padding

sys/riscv/include/pcpu.h
41

thanks.
how it is calculated ?

sys/riscv/include/pmc_mdep.h
36

Yes it is used by kern_pmc.c:
sys/conf/files:kern/kern_pmc.c standard

andrew added inline comments.
sys/riscv/include/_types.h
97

__WCHAR_MIN should be __INT_MIN

sys/riscv/include/pcpu.h
41

There is a compile time assert:

CTASSERT((PAGE_SIZE / sizeof(struct pcpu)) * sizeof(struct pcpu) == PAGE_SIZE);

PCPU_MD_FIELDS is placed at the end of struct pcpu

sys/riscv/include/signal.h
41

This contradicts the definition of the SIG_ATOMIC_MIN and SIG_ATOMIC_MAX. Amd64 has a bug there, which is hard to fix due to the ABI.

imp edited edge metadata.

These look fine, modulo my standing comment that we're duplicating *WAY* too much in the
headers. :(

This revision is now accepted and ready to land.Dec 17 2015, 4:00 PM
andrew edited edge metadata.
andrew added inline comments.
sys/riscv/include/minidump.h
38–46

I expect this will change, but only becomes an ABI when we use it.

sys/riscv/include/signal.h
41

I note arm64 has the same issue.

sys/riscv/include/ucontext.h
54

Should these be __int128_t?

55–56

I assume these are correct.

This revision was automatically updated to reflect the committed changes.