1. 01 12月, 2017 1 次提交
    • A
      RISC-V: Flush I$ when making a dirty page executable · 08f051ed
      Andrew Waterman 提交于
      The RISC-V ISA allows for instruction caches that are not coherent WRT
      stores, even on a single hart.  As a result, we need to explicitly flush
      the instruction cache whenever marking a dirty page as executable in
      order to preserve the correct system behavior.
      
      Local instruction caches aren't that scary (our implementations actually
      flush the cache, but RISC-V is defined to allow higher-performance
      implementations to exist), but RISC-V defines no way to perform an
      instruction cache shootdown.  When explicitly asked to do so we can
      shoot down remote instruction caches via an IPI, but this is a bit on
      the slow side.
      
      Instead of requiring an IPI to all harts whenever marking a page as
      executable, we simply flush the currently running harts.  In order to
      maintain correct behavior, we additionally mark every other hart as
      needing a deferred instruction cache which will be taken before anything
      runs on it.
      Signed-off-by: NAndrew Waterman <andrew@sifive.com>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      08f051ed
  2. 27 9月, 2017 3 次提交
    • P
      RISC-V: User-facing API · e2c0cdfb
      Palmer Dabbelt 提交于
      This patch contains code that is in some way visible to the user:
      including via system calls, the VDSO, module loading and signal
      handling.  It also contains some generic code that is ABI visible.
      Signed-off-by: NPalmer Dabbelt <palmer@dabbelt.com>
      e2c0cdfb
    • P
      RISC-V: Atomic and Locking Code · fab957c1
      Palmer Dabbelt 提交于
      This contains all the code that directly interfaces with the RISC-V
      memory model.  While this code corforms to the current RISC-V ISA
      specifications (user 2.2 and priv 1.10), the memory model is somewhat
      underspecified in those documents.  There is a working group that hopes
      to produce a formal memory model by the end of the year, but my
      understanding is that the basic definitions we're relying on here won't
      change significantly.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NPalmer Dabbelt <palmer@dabbelt.com>
      fab957c1
    • P
      RISC-V: Init and Halt Code · 76d2a049
      Palmer Dabbelt 提交于
      This contains the various __init C functions, the initial assembly
      kernel entry point, and the code to reset the system.  When a file was
      init-related this patch contains the entire file.
      Signed-off-by: NPalmer Dabbelt <palmer@dabbelt.com>
      76d2a049