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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
97–98 ↗(On Diff #11241)

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
66 ↗(On Diff #11241)

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

sys/riscv/include/exec.h
40 ↗(On Diff #11241)

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

sys/riscv/include/float.h
79 ↗(On Diff #11241)

Needed?

sys/riscv/include/frame.h
49 ↗(On Diff #11241)

Why 32? I thought x0 only ever contained zero.

sys/riscv/include/intr.h
38 ↗(On Diff #11241)

Is this needed?

sys/riscv/include/kdb.h
32–33 ↗(On Diff #11241)

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

sys/riscv/include/ofw_machdep.h
31–34 ↗(On Diff #11241)

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

sys/riscv/include/param.h
85–91 ↗(On Diff #11241)

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

107–109 ↗(On Diff #11241)

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
50 ↗(On Diff #11241)

Do you need all 32 registers?

sys/riscv/include/pcpu.h
39 ↗(On Diff #11241)

I think this should be 129

sys/riscv/include/pmc_mdep.h
34 ↗(On Diff #11241)

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

sys/riscv/include/reg.h
41 ↗(On Diff #11241)

32?

sys/riscv/include/ucontext.h
41 ↗(On Diff #11241)

32?

47 ↗(On Diff #11241)

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

51 ↗(On Diff #11241)

Then add it here with a flag field & padding

sys/riscv/include/pcpu.h
40 ↗(On Diff #11328)

thanks.
how it is calculated ?

sys/riscv/include/pmc_mdep.h
35 ↗(On Diff #11328)

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 ↗(On Diff #11358)

__WCHAR_MIN should be __INT_MIN

sys/riscv/include/pcpu.h
41 ↗(On Diff #11358)

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 ↗(On Diff #11383)

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 ↗(On Diff #11383)

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

sys/riscv/include/signal.h
40 ↗(On Diff #11383)

I note arm64 has the same issue.

sys/riscv/include/ucontext.h
53 ↗(On Diff #11383)

Should these be __int128_t?

54–55 ↗(On Diff #11383)

I assume these are correct.

This revision was automatically updated to reflect the committed changes.