Repository navigation
Expand file tree
/
Copy pathmcpp.toml
More file actions
64 lines (59 loc) · 3.13 KB
/
Copy pathmcpp.toml
File metadata and controls
64 lines (59 loc) · 3.13 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
# openkal on UEFI Boot Services.
#
# THE TARGET IS `x86_64-windows-gnu`, AND THAT IS NOT A WORKAROUND.
#
# A UEFI application is PE/COFF with subsystem 10, entered through the Microsoft
# x64 calling convention. Both are properties this toolchain already has, so
# firmware function pointers are called directly rather than through per-call
# annotations.
#
# The first analysis of this backend concluded that mcpp would need a new
# "PE freestanding" target before a UEFI application could exist. Measured: it
# does not. The three link flags below produce
# `IMAGE_SUBSYSTEM_EFI_APPLICATION (0xA)` with no DLL imports, which is what
# firmware loads.
[package]
namespace = "mcpplibs"
name = "openkal-uefi"
version = "0.11.0"
description = "An implementation of openkal on UEFI Boot Services, for applications the firmware loads before an operating system exists"
license = "Apache-2.0"
# The layer this package supplies, in the vocabulary the engine resolves.
#
# `mcpp:kernel-abi` names the platform interface a C library sits on. On a
# traditional stack that seam is unnamed — a C library issues system calls or
# calls the platform's own entry points directly — and naming it is what lets
# one C library sit above several platforms. `=openkal` is the interface this
# package answers to; several packages answer to it and the engine knows none
# of them by name.
provides = ["mcpp:kernel-abi=openkal"]
authors = ["mcpplibs"]
repo = "https://github.com/mcpplibs/openkal-uefi"
# The interfaces this implementation provides, which `kal_interfaces()' answers too
# (src/version.cpp). 0.9.0 stated the list as a key of [package], where the engine does not read
# it, so a consumer bound every interface (openkal-run then referred to fifteen this
# implementation does not have); the list belongs to [kernel-abi].
[kernel-abi]
provides-interfaces = ["openkal.abort", "openkal.env", "openkal.exec", "openkal.fs", "openkal.memory",
"openkal.random", "openkal.stream", "openkal.time"]
[dependencies]
# Every patch release of the specification's minor version (openkal clause 8).
openkal = "^0.25.0"
# The program's entry belongs to this implementation in both arrangements. With
# no C library it runs the image's initialisers and calls `main`; `standalone`
# (0.10.0) is the arrangement beneath a C library written above openkal
# (openkal-musl names it so on `cfg(os = "uefi")`), whose `__libc_start_main`
# receives the program and does both.
[features]
standalone = { defines = ["OKUEFI_STANDALONE"] }
# No stack probes (0.11.0): the firmware's stack is committed in whole, and no run-time beneath
# this implementation defines `__chkstk', which a frame larger than a page otherwise calls (a name
# of openkal.fs is converted in a buffer of 2 KiB on the stack). The example's board states it for
# the whole program; a row that does not still links this implementation.
[build]
flags = [
{ glob = "src/**", cxxflags = ["-fno-exceptions", "-fno-rtti",
"-fno-stack-protector",
"-fno-asynchronous-unwind-tables",
"-mno-stack-arg-probe"] },
]