History log of /freebsd-11-stable/sys/riscv/include/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
340270 08-Nov-2018 jhb

MFC 340164,340168,340170: Add custom cpu_lock_delay() for x86.

340164:
Add a KPI for the delay while spinning on a spin lock.

Replace a call to DELAY(1) with a new cpu_lock_delay() KPI. Currently
cpu_lock_delay() is defined to DELAY(1) on all platforms. However,
platforms with a DELAY() implementation that uses spin locks should
implement a custom cpu_lock_delay() doesn't use locks.

340168:
Add a delay_tsc() static function for when DELAY() uses the TSC.

This uses slightly simpler logic than the existing code by using the
full 64-bit counter and thus not having to worry about counter
overflow.

340170:
Add a custom implementation of cpu_lock_delay() for x86.

Avoid using DELAY() since it can try to use spin locks on CPUs without
a P-state invariant TSC. For cpu_lock_delay(), always use the TSC if
it exists (even if it is not P-state invariant) to delay for a
microsecond. If the TSC does not exist, read from I/O port 0x84 to
delay instead.

PR: 228768

338514 06-Sep-2018 jhb

MFC 332906,332907,332976,333679,336053: Expand testing of breakpoints.

332906:
Extend support for ptrace() tests using breakpoints.

- Use a single list of platforms to define HAVE_BREAKPOINT for platforms
that expose a functional breakpoint() inline to userland. Replace
existing lists of platform tests with HAVE_BREAKPOINT instead.
- Add support for advancing PC past a breakpoint inserted via breakpoint()
to support the existing ptrace__PT_CONTINUE_different_thread test on
non-x86 platforms (x86 advances the PC past the breakpoint instruction,
but other platforms do not). This is implemented by defining a new
SKIP_BREAK macro which accepts a pointer to a 'struct reg' as its sole
argument and modifies the contents to advance the PC. The intention is
to use it in between PT_GETREGS and PT_SETREGS.

332907:
Expose breakpoint() to userland from <machine/cpufunc.h> on MIPS.

Enable ptrace() tests using breakpoint on MIPS as well.

332976:
Shorten some recently-added lines that are an extra indent over 80 columns.

333679:
Export a breakpoint() function to userland for riscv.

As a result, enable tests using breakpoint() on riscv.

336053:
Export a breakpoint() function to userland for arm and arm64.

Enable ptrace() tests using breakpoint() on these architectures.

332135 06-Apr-2018 kevans

MFC r329859,r329860: Float protection in stand

r329859: Do not include float interfaces when using libsa.

We don't support float in the boot loaders, so don't include
interfaces for float or double in systems headers. In addition, take
the unusual step of spiking double and float to prevent any more
accidental seepage.

r329860: Floaty McFloatface is funnier...

328386 25-Jan-2018 pkelsey

MFC r316648:

Corrected misspelled versions of rendezvous.

The MFC maintains smp_no_rendevous_barrier() as a symbol alias of
smp_no_rendezvous_barrier().

__FreeBSD_version bumped to indicate presence of the new name
smp_no_rendezvous_barrier().

Reviewed by: gnn, jhb (email), kib
Differential Revision: https://reviews.freebsd.org/D10313

327195 26-Dec-2017 kib

MFC r326971, r327047 (by ian), r327053 (by marius), r327074, r327097:
Add atomic_load(9) and atomic_store(9) operations.

325810 14-Nov-2017 jhb

MFC 323580,323933,323934,324814,324817: Enable AT_HWCAP on arm.

I reused the SV_HWCAP stub to cover the sv_hwcap2 field as well.

323580:
Add AT_HWCAP flags for VFP settings for FreeBSD/arm.

These flags match the meaning and value of flags in Linux, though
Linux has many more flags.

323933:
Correct HWCAP_VFP3* values to match Linux.

323934:
Detect NEON and set HWCAP_NEON if present.

324814:
Add AT_HWCAP2 ELF auxiliary vector.
- allocate value for new AT_HWCAP2 auxiliary vector on all platforms.
- expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly
same way as for AT_HWCAP.

324817:
Fullify implementation of AT_HWCAP and AT_HWCAP2 for ARMv6,7.
This makes elf_aux_info(3) useable for ARM ports.

Tested by: mmel

324687 17-Oct-2017 jhb

MFC 323579,323585: Add AT_HWCAP and AT_EHDRFLAGS on all platforms.

To preserve KBI on stable/11, a new SV_HWCAP flag is added which
indicates if the sv_hwcap field is present and valid to avoid examining
the field in old modules. Only sysentvec's which wish to use sv_hwcap
need to set the flag in stable/11.

323579:
Add AT_HWCAP and AT_EHDRFLAGS on all platforms.

A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A
process ABI can set this field to point to a value holding a mask of
architecture-specific CPU feature flags. If an ABI does not wish to
supply AT_HWCAP to processes the field can be left as NULL.

The support code for AT_EHDRFLAGS was already present on all systems,
just the #define was not present. This is a step towards unifying the
AT_* constants across platforms.

323585:
Add AT_EHDRFLAGS and AT_HWCAP on amd64.

x86 has two separate (but identical) list of AT_* constants and the
earlier commit to add AT_HWCAP only updated the i386 list.

321324 21-Jul-2017 kib

MFC r319871:
Make struct syscall_args visible to userspace compilation environment
from machine/proc.h, consistently on all architectures.

318576 20-May-2017 kib

MFC efivar(8) (by imp):

List of revisions merged:
r307070
r307071
r307072
r307074
r307189
r307224
r307339
r307390
r307391
r309776
r314231
r314232
r314615
r314616
r314617
r314618
r314619
r314620
r314621
r314623
r314890
r314925
r314926
r314927
r314928
r315770
r315771

Discussed with: gjb (re), imp
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/lib/Makefile
/freebsd-11-stable/lib/libefi
/freebsd-11-stable/lib/libefivar
/freebsd-11-stable/lib/libefivar/FreeBSD-update
/freebsd-11-stable/lib/libefivar/Makefile
/freebsd-11-stable/lib/libefivar/ProcessorBind.h
/freebsd-11-stable/lib/libefivar/efi-osdep.h
/freebsd-11-stable/lib/libefivar/efivar-dp-format.c
/freebsd-11-stable/lib/libefivar/efivar-dp-parse.c
/freebsd-11-stable/lib/libefivar/efivar-dp.h
/freebsd-11-stable/lib/libefivar/efivar.c
/freebsd-11-stable/lib/libefivar/efivar.h
/freebsd-11-stable/lib/libefivar/libefivar.c
/freebsd-11-stable/lib/libefivar/libefivar_int.h
/freebsd-11-stable/lib/libefivar/uefi-dplib.h
/freebsd-11-stable/lib/libefivar/uefi-dputil.c
/freebsd-11-stable/lib/libefivar/uefi-guid.c
/freebsd-11-stable/lib/libefivar/uefi-guid.dat
/freebsd-11-stable/share/mk/bsd.libnames.mk
/freebsd-11-stable/share/mk/src.libnames.mk
/freebsd-11-stable/share/mk/src.opts.mk
/freebsd-11-stable/sys/amd64/amd64/efirt.c
/freebsd-11-stable/sys/arm/include/efi.h
/freebsd-11-stable/sys/arm64/include/efi.h
/freebsd-11-stable/sys/boot/efi/include/efichar.h
/freebsd-11-stable/sys/boot/efi/libefi/efichar.c
/freebsd-11-stable/sys/conf/files
/freebsd-11-stable/sys/contrib/edk2
/freebsd-11-stable/sys/dev/efidev
/freebsd-11-stable/sys/dev/efidev/efidev.c
/freebsd-11-stable/sys/i386/include/efi.h
/freebsd-11-stable/sys/mips/include/efi.h
/freebsd-11-stable/sys/modules/efirt/Makefile
/freebsd-11-stable/sys/pc98/include/efi.h
/freebsd-11-stable/sys/powerpc/include/efi.h
efi.h
/freebsd-11-stable/sys/sparc64/include/efi.h
/freebsd-11-stable/sys/sys/efiio.h
/freebsd-11-stable/usr.sbin/Makefile
/freebsd-11-stable/usr.sbin/efidp
/freebsd-11-stable/usr.sbin/efivar
/freebsd-11-stable/usr.sbin/efivar/efivar.8
/freebsd-11-stable/usr.sbin/efivar/efivar.c
315371 16-Mar-2017 mjg

MFC r311169,r311898,r312925,r312973,r312975,r313007,r313040,r313080,
r313254,r313341

amd64: add atomic_fcmpset

==

sparc64: add atomic_fcmpset

==

Implement atomic_fcmpset_* for arm and arm64.

==

Add atomic_fcmpset_*() inlines for powerpc

Summary:
atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value
from the target memory location into the 'old' pointer in the case of failure.

==

i386: add atomic_fcmpset

==

Don't retry a lost reservation in atomic_fcmpset()

The desired behavior of atomic_fcmpset_() is to always exit on error. Instead
of retrying on lost reservation, leave the retry to the caller, and return

==

Add atomic_fcmpset_*() inlines for MIPS

atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the
read value from the target memory location into the 'old' pointer.

==

i386: fixup fcmpset

An incorrect output specifier was used which worked with clang by accident,
but breaks with the in-tree gcc version.

While here plug a whitespace nit.

==

Implement atomic_fcmpset_*() for RISC-V.

==

Use 64bit store instruction in atomic_fcmpset_64.

313574 11-Feb-2017 kib

MFC r313194:
Define the vm_ooffset_t and vm_pindex_t types as machine-independend.

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
301621 08-Jun-2016 br

Remove duplicate define.


300726 26-May-2016 br

Increase the size and alignment of the setjmp buffer.
This is required for future CPU extentions.

Reviewed by: brooks
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


300618 24-May-2016 br

Add initial DTrace support for RISC-V.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


298641 26-Apr-2016 br

Rework the list of all pmaps: embed the list link into pmap.


298636 26-Apr-2016 br

Add the non-standard "IO interrupt" vector used by lowRISC.
For now they provide UART irq only.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


298627 26-Apr-2016 br

Move arm's devmap to some generic place, so it can be used
by other architectures.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D6091
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


298580 25-Apr-2016 br

o Implement shared pagetables and switch from 4 to 3 levels page
memory system.

RISC-V ISA has only single page table base register for both kernel
and user addresses translation. Before this commit we were using an
extra (4th) level of pagetables for switching between kernel and user
pagetables, but then realized FPGA hardware has 3-level page system
hardcoded. It is also become clear that the bitfile synthesized for
4-level system is untested/broken, so we can't use extra level for
switching.

We are now share level 1 of pagetables between kernel and user VA.
This requires to keep track of all the user pmaps created and once we
adding L1 page to kernel pmap we have to add it to all the user pmaps.

o Change the VM layout as we must have topmost bit to be 1 in the
selected page system for kernel addresses and 0 for user addresses.
o Implement pmap_kenter_device().
o Create the l3 tables for the early devmap.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


296614 10-Mar-2016 br

Add support for ddb(4).

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


296094 26-Feb-2016 br

o Use uint64_t for page number as it doesn't fit uint32_t.
o Implement growkernel bits for L1 level of pagetables.

This allows us to boot with 128GB of physical memory.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


295972 24-Feb-2016 br

Add support for symmetric multiprocessing (SMP).

Tested on Spike simulator with 2 and 16 cores (tlb enabled),
so set MAXCPU to 16 at this time.

This uses FDT data to get information about CPUs
(code based on arm64 mp_machdep).

Invalidate entire TLB cache as it is the only way yet.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


295891 22-Feb-2016 br

Remove duplicates.


295761 18-Feb-2016 br

Increase kernel and user VA space.
This allows us to boot with more than 128MB of physical memory.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


295701 17-Feb-2016 br

Add the implementation of atomic_swap_32().


295700 17-Feb-2016 br

Use better form representing 32 x 128-bit floating-point registers.

Suggested by: kib


295564 12-Feb-2016 br

Use __uint64_t type for floating point registers
as compiler don't know about __uint128_t yet.

Discussed with: theraven, kib


295258 04-Feb-2016 br

Access pcpup using gp register.


295253 04-Feb-2016 br

Reuse gp register for pcpu pointer.

gp (global pointer) is used by compiler in userland only,
so re-use it for pcpup in kernel, save it on stack on switching
out to userland and load back on return to kernel.

Discussed with: jhb, andrew, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5178


294282 18-Jan-2016 br

Correct RISC-V exception types.


292407 17-Dec-2015 br

Import RISC-V machine headers. This is a minimal set required to compile
kernel and userland.

Reviewed by: andrew, imp, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4554