-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcpp.toml
More file actions
68 lines (63 loc) · 3.31 KB
/
Copy pathmcpp.toml
File metadata and controls
68 lines (63 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# openarch's aarch64 backend: instructions, and nothing else.
#
# ⚠️ THIS PACKAGE EXPORTS NO MODULE. It defines the C entry points declared in
# `abi/include/openarch/abi.h` and is reached only through them. A consumer
# never names it: the root manifest pulls it in through the `backend` feature,
# whose target-conditional `feature-deps` row selects this one.
#
# The separation is what lets a second implementation of the same ABI exist
# without touching the specification: a vendor's assembler file, a simulator's
# shim, or a second backend for the same ISA at a different privilege level.
# riscv needs that last one — this backend traps into M-mode, and a kernel
# running under SBI traps into S-mode, which is the same mechanism with a
# different prefix on every register and therefore a different backend.
[package]
namespace = "mcpplibs"
name = "openarch-aarch64"
version = "0.9.0"
description = "openarch's aarch64 backend: the instructions behind the ABI"
license = "Apache-2.0"
authors = ["mcpplibs"]
repo = "https://github.com/mcpplibs/openarch"
# ⭐ THE CAPABILITY, NOT THE PACKAGE NAME, IS WHAT A CONSUMER BINDS TO. The root
# package's `backend` feature requires `openarch-backend` and names nobody; the
# resolver binds the one provider in the graph. A consumer's own implementation
# of `openarch/abi.h` declares the same line and is selected the same way.
# ⭐⭐ AND WHICH GROUPS OF THAT INTERFACE THIS BACKEND IMPLEMENTS.
#
# `openarch-backend` says "there is a backend here". It does not say what the
# machine can do, and until every backend could do everything it did not need
# to: riscv64, aarch64 and x86_64 are all application-class machines with a
# memory management unit.
#
# ⚠️ A Cortex-M is not. M-profile has a region-based MPU and no page table, so
# `arch_pte_make_leaf` — one of the two primitives this layer's viability was
# decided on — has nothing to construct. The interface either refuses that
# machine or admits a PARTIAL backend, and refusing it would exclude the class
# of device this layer is most useful on.
#
# So the groups are named. A backend declares what it implements; a kernel
# requires what it needs; the resolver reports a mismatch by name at RESOLUTION
# rather than as a wall of `undefined reference to arch_pte_*` at link time.
#
# ⭐ This is the mechanism openarch already used, applied one level finer. It is
# also the mechanism mcpp uses for target-side layers (docs/14) and for named
# runners: a capability is data, declared by a package, and the engine knows
# only that capabilities exist. Three uses, one mechanism.
# ⭐ `openarch:preemption` — the trap group's ACTION, not only its observation.
#
# `arch_trap_switch` makes the trap resume a different context. Every machine
# needs it to preempt and every machine spells it differently, which is the
# shape of thing this layer exists to hide; a backend that cannot provide it —
# and one could exist, on a machine with no way to change what an exception
# returns to — is refused by name at resolution rather than at link time.
provides = ["openarch-backend",
"openarch:address-space",
"openarch:percpu-register",
"openarch:preemption"]
[build]
sources = ["src/**"]
[targets.openarch-aarch64]
kind = "lib"
[dependencies]
openarch-abi = { path = "../../abi" }