-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/…
…linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for the memtest= kernel command-line argument. - Support for building the kernel with FORTIFY_SOURCE. - Support for generic clockevent broadcasts. - Support for the buildtar build target. - Some build system cleanups to pass more LLVM-friendly arguments. - Support for kprobes. - A rearranged kernel memory map, the first part of supporting sv48 systems. - Improvements to kexec, along with support for kdump and crash kernels. - An alternatives-based errata framework, along with support for handling a pair of errata that manifest on some SiFive designs (including the HiFive Unmatched). - Support for XIP. - A device tree for the Microchip PolarFire ICICLE SoC and associated dev board. ... along with a bunch of cleanups. There are already a handful of fixes on the list so there will likely be a part 2. * tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (45 commits) RISC-V: Always define XIP_FIXUP riscv: Remove 32b kernel mapping from page table dump riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y RISC-V: Fix error code returned by riscv_hartid_to_cpuid() RISC-V: Enable Microchip PolarFire ICICLE SoC RISC-V: Initial DTS for Microchip ICICLE board dt-bindings: riscv: microchip: Add YAML documentation for the PolarFire SoC RISC-V: Add Microchip PolarFire SoC kconfig option RISC-V: enable XIP RISC-V: Add crash kernel support RISC-V: Add kdump support RISC-V: Improve init_resources() RISC-V: Add kexec support RISC-V: Add EM_RISCV to kexec UAPI header riscv: vdso: fix and clean-up Makefile riscv/mm: Use BUG_ON instead of if condition followed by BUG. riscv/kprobe: fix kernel panic when invoking sys_read traced by kprobe riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU riscv: module: Create module allocations without exec permissions riscv: bpf: Avoid breaking W^X ...
- Loading branch information
Showing
71 changed files
with
2,635 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/riscv/microchip.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Microchip PolarFire SoC-based boards device tree bindings | ||
|
||
maintainers: | ||
- Cyril Jean <Cyril.Jean@microchip.com> | ||
- Lewis Hanly <lewis.hanly@microchip.com> | ||
|
||
description: | ||
Microchip PolarFire SoC-based boards | ||
|
||
properties: | ||
$nodename: | ||
const: '/' | ||
compatible: | ||
items: | ||
- enum: | ||
- microchip,mpfs-icicle-kit | ||
- const: microchip,mpfs | ||
|
||
additionalProperties: true | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ RISC-V architecture | |
:maxdepth: 1 | ||
|
||
boot-image-header | ||
vm-layout | ||
pmu | ||
patch-acceptance | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 | ||
===================================== | ||
Virtual Memory Layout on RISC-V Linux | ||
===================================== | ||
|
||
:Author: Alexandre Ghiti <alex@ghiti.fr> | ||
:Date: 12 February 2021 | ||
|
||
This document describes the virtual memory layout used by the RISC-V Linux | ||
Kernel. | ||
|
||
RISC-V Linux Kernel 32bit | ||
========================= | ||
|
||
RISC-V Linux Kernel SV32 | ||
------------------------ | ||
|
||
TODO | ||
|
||
RISC-V Linux Kernel 64bit | ||
========================= | ||
|
||
The RISC-V privileged architecture document states that the 64bit addresses | ||
"must have bits 63–48 all equal to bit 47, or else a page-fault exception will | ||
occur.": that splits the virtual address space into 2 halves separated by a very | ||
big hole, the lower half is where the userspace resides, the upper half is where | ||
the RISC-V Linux Kernel resides. | ||
|
||
RISC-V Linux Kernel SV39 | ||
------------------------ | ||
|
||
:: | ||
|
||
======================================================================================================================== | ||
Start addr | Offset | End addr | Size | VM area description | ||
======================================================================================================================== | ||
| | | | | ||
0000000000000000 | 0 | 0000003fffffffff | 256 GB | user-space virtual memory, different per mm | ||
__________________|____________|__________________|_________|___________________________________________________________ | ||
| | | | | ||
0000004000000000 | +256 GB | ffffffbfffffffff | ~16M TB | ... huge, almost 64 bits wide hole of non-canonical | ||
| | | | virtual memory addresses up to the -256 GB | ||
| | | | starting offset of kernel mappings. | ||
__________________|____________|__________________|_________|___________________________________________________________ | ||
| | ||
| Kernel-space virtual memory, shared between all processes: | ||
____________________________________________________________|___________________________________________________________ | ||
| | | | | ||
ffffffc000000000 | -256 GB | ffffffc7ffffffff | 32 GB | kasan | ||
ffffffcefee00000 | -196 GB | ffffffcefeffffff | 2 MB | fixmap | ||
ffffffceff000000 | -196 GB | ffffffceffffffff | 16 MB | PCI io | ||
ffffffcf00000000 | -196 GB | ffffffcfffffffff | 4 GB | vmemmap | ||
ffffffd000000000 | -192 GB | ffffffdfffffffff | 64 GB | vmalloc/ioremap space | ||
ffffffe000000000 | -128 GB | ffffffff7fffffff | 124 GB | direct mapping of all physical memory | ||
__________________|____________|__________________|_________|____________________________________________________________ | ||
| | ||
| | ||
____________________________________________________________|____________________________________________________________ | ||
| | | | | ||
ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules | ||
ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel, BPF | ||
__________________|____________|__________________|_________|____________________________________________________________ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
menu "CPU errata selection" | ||
|
||
config RISCV_ERRATA_ALTERNATIVE | ||
bool "RISC-V alternative scheme" | ||
default y | ||
help | ||
This Kconfig allows the kernel to automatically patch the | ||
errata required by the execution platform at run time. The | ||
code patching is performed once in the boot stages. It means | ||
that the overhead from this mechanism is just taken once. | ||
|
||
config ERRATA_SIFIVE | ||
bool "SiFive errata" | ||
depends on RISCV_ERRATA_ALTERNATIVE | ||
help | ||
All SiFive errata Kconfig depend on this Kconfig. Disabling | ||
this Kconfig will disable all SiFive errata. Please say "Y" | ||
here if your platform uses SiFive CPU cores. | ||
|
||
Otherwise, please say "N" here to avoid unnecessary overhead. | ||
|
||
config ERRATA_SIFIVE_CIP_453 | ||
bool "Apply SiFive errata CIP-453" | ||
depends on ERRATA_SIFIVE | ||
default y | ||
help | ||
This will apply the SiFive CIP-453 errata to add sign extension | ||
to the $badaddr when exception type is instruction page fault | ||
and instruction access fault. | ||
|
||
If you don't know what to do here, say "Y". | ||
|
||
config ERRATA_SIFIVE_CIP_1200 | ||
bool "Apply SiFive errata CIP-1200" | ||
depends on ERRATA_SIFIVE | ||
default y | ||
help | ||
This will apply the SiFive CIP-1200 errata to repalce all | ||
"sfence.vma addr" with "sfence.vma" to ensure that the addr | ||
has been flushed from TLB. | ||
|
||
If you don't know what to do here, say "Y". | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
subdir-y += sifive | ||
subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += canaan | ||
subdir-y += microchip | ||
|
||
obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += microchip-mpfs-icicle-kit.dtb |
Oops, something went wrong.