No description
Find a file
Hector Martin 96d133e854 mmu: map device memory as non-executable
This fixes the random SErrors after returning from a page fault. Turns
out the M1 was randomly deciding to speculate an instruction fetch from
address 0, triggering a fabric error.

Quoting the ARM ARM:

"Hardware does not prevent speculative instruction fetches from a memory
location with any of the Device memory attributes unless the memory
location is also marked as Execute-never for all Exception levels.

This means that to prevent speculative instruction fetches from memory
locations with Device memory attributes, any location that is assigned
any Device memory type must also be marked as execute-never for all
Exception levels. Failure to mark a memory location with any Device
memory attribute as execute-never for all Exception levels is a
programming error."

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-31 13:42:48 +09:00
3rdparty_licenses Add heapblock and dlmalloc for managing memory 2021-01-29 16:25:15 +09:00
artwork@35626c31f5 Initial commit 2021-01-15 04:03:35 +09:00
data Initial commit 2021-01-15 04:03:35 +09:00
dts kboot: add proper kernel boot & DT manipulation code 2021-01-30 01:37:09 +09:00
proxyclient chainload.py: shut down mmu and flush caches when chainloading 2021-01-30 22:00:00 +09:00
src mmu: map device memory as non-executable 2021-01-31 13:42:48 +09:00
.clang-format .clang-format: AlignConsecutiveMacros: true, 100 columns 2021-01-28 16:06:12 +09:00
.editorconfig .editorconfig: trim trailing whitespace 2021-01-15 04:04:12 +09:00
.gitignore proxyclient: initial files 2021-01-15 04:04:12 +09:00
.gitmodules Initial commit 2021-01-15 04:03:35 +09:00
config.h Add config.h for build-time config options 2021-01-25 17:24:29 +09:00
LICENSE LICENSE: fix typo 2021-01-15 12:55:21 +09:00
m1n1.ld startup: clear bss section 2021-01-30 03:03:03 +09:00
Makefile Makefile: build for armv8.2-a 2021-01-30 22:00:00 +09:00
README.md libfdt: actually add libfdt 2021-01-30 01:37:09 +09:00

m1n1: an experimentation playground for Apple Silicon

(And perhaps some day a Linux bootloader)

License

m1n1 is licensed under the MIT license, as included in the LICENSE file.

  • Copyright (C) 2021 The Asahi Linux contributors

Please see the Git history for authorship information.

Portions of m1n1 are based on mini:

m1n1 embeds libfdt, which is dual BSD and GPL-2 licensed and copyright:

  • Copyright (C) 2014 David Gibson david@gibson.dropbear.id.au
  • Copyright (C) 2018 embedded brains GmbH
  • Copyright (C) 2006-2012 David Gibson, IBM Corporation.
  • Copyright (C) 2012 David Gibson, IBM Corporation.
  • Copyright 2012 Kim Phillips, Freescale Semiconductor.
  • Copyright (C) 2016 Free Electrons
  • Copyright (C) 2016 NextThing Co.

The ADT code in mini is also based on libfdt and subject to the same license.

m1n1 embeds minlzma, which is MIT licensed and copyright:

  • Copyright (c) 2020 Alex Ionescu

m1n1 embeds a slightly modified version of tinf, which is ZLIB licensed and copyright:

  • Copyright (c) 2003-2019 Joergen Ibsen

m1n1 embeds portions taken from arm-trusted-firwmare, which is BSD licensed and copyright:

  • Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.

m1n1 embeds Doug Lea's malloc (dlmalloc), which is in the public domain (CC0).

m1n1 embeds portions of PDCLib, which is in the public domain (CC0.