Page MenuHomeFreeBSD

RISC-V includes
ClosedPublic

Authored by br on Dec 14 2015, 6:27 PM.
Tags
None
Referenced Files
F103249428: D4554.id11383.diff
Fri, Nov 22, 3:19 PM
F103249411: D4554.id11383.diff
Fri, Nov 22, 3:19 PM
Unknown Object (File)
Thu, Nov 21, 7:20 PM
Unknown Object (File)
Thu, Nov 21, 10:10 AM
Unknown Object (File)
Thu, Nov 21, 10:09 AM
Unknown Object (File)
Thu, Nov 21, 6:31 AM
Unknown Object (File)
Thu, Nov 21, 4:22 AM
Unknown Object (File)
Thu, Nov 21, 1:16 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
98

__WCHAR_MIN should be __INT_MIN

sys/riscv/include/pcpu.h
42

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
40

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
37–45

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

sys/riscv/include/signal.h
40

I note arm64 has the same issue.

sys/riscv/include/ucontext.h
53

Should these be __int128_t?

54–55

I assume these are correct.

This revision was automatically updated to reflect the committed changes.