mirror of
https://github.com/ziglang/zig.git
synced 2025-02-10 14:40:16 +00:00
Merge remote-tracking branch 'origin/master' into llvm8
This commit is contained in:
commit
54edbc6815
8
.gitattributes
vendored
8
.gitattributes
vendored
@ -1,2 +1,10 @@
|
||||
*.zig text eol=lf
|
||||
langref.html.in text eol=lf
|
||||
|
||||
c_headers/* linguist-vendored
|
||||
deps/* linguist-vendored
|
||||
libc/glibc/* linguist-vendored
|
||||
libc/musl/* linguist-vendored
|
||||
libc/include/* linguist-vendored
|
||||
libcxx/* linguist-vendored
|
||||
libunwind/* linguist-vendored
|
||||
|
4016
CMakeLists.txt
4016
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -1088,8 +1088,6 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
|
||||
tmp_source_file_name,
|
||||
"--output-dir",
|
||||
tmp_dir_name,
|
||||
"--cache",
|
||||
"off",
|
||||
});
|
||||
try out.print("<pre><code class=\"shell\">$ zig test {}.zig", code.name);
|
||||
switch (code.mode) {
|
||||
@ -1127,8 +1125,6 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
|
||||
tmp_source_file_name,
|
||||
"--output-dir",
|
||||
tmp_dir_name,
|
||||
"--cache",
|
||||
"off",
|
||||
});
|
||||
try out.print("<pre><code class=\"shell\">$ zig test {}.zig", code.name);
|
||||
switch (code.mode) {
|
||||
@ -1186,8 +1182,6 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
|
||||
tmp_source_file_name,
|
||||
"--output-dir",
|
||||
tmp_dir_name,
|
||||
"--cache",
|
||||
"off",
|
||||
});
|
||||
switch (code.mode) {
|
||||
builtin.Mode.Debug => {},
|
||||
|
@ -4352,42 +4352,191 @@ test "float widening" {
|
||||
}
|
||||
{#code_end#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: Arrays#}
|
||||
<p>TODO: [N]T to []const T</p>
|
||||
<p>TODO: *const [N]T to []const T</p>
|
||||
<p>TODO: [N]T to *const []const T</p>
|
||||
<p>TODO: [N]T to ?[]const T</p>
|
||||
<p>TODO: *[N]T to []T</p>
|
||||
<p>TODO: *[N]T to [*]T</p>
|
||||
<p>TODO: *[N]T to ?[*]T</p>
|
||||
<p>TODO: *T to *[1]T</p>
|
||||
<p>TODO: [N]T to E![]const T</p>
|
||||
{#header_open|Implicit Cast: Arrays and Pointers#}
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
// This cast exists primarily so that string literals can be
|
||||
// passed to functions that accept const slices. However
|
||||
// it is probably going to be removed from the language when
|
||||
// https://github.com/ziglang/zig/issues/265 is implemented.
|
||||
test "[N]T to []const T" {
|
||||
var x1: []const u8 = "hello";
|
||||
var x2: []const u8 = [5]u8{ 'h', 'e', 'l', 'l', 111 };
|
||||
assert(std.mem.eql(u8, x1, x2));
|
||||
|
||||
var y: []const f32 = [2]f32{ 1.2, 3.4 };
|
||||
assert(y[0] == 1.2);
|
||||
}
|
||||
|
||||
// Likewise, it works when the destination type is an error union.
|
||||
test "[N]T to E![]const T" {
|
||||
var x1: anyerror![]const u8 = "hello";
|
||||
var x2: anyerror![]const u8 = [5]u8{ 'h', 'e', 'l', 'l', 111 };
|
||||
assert(std.mem.eql(u8, try x1, try x2));
|
||||
|
||||
var y: anyerror![]const f32 = [2]f32{ 1.2, 3.4 };
|
||||
assert((try y)[0] == 1.2);
|
||||
}
|
||||
|
||||
// Likewise, it works when the destination type is an optional.
|
||||
test "[N]T to ?[]const T" {
|
||||
var x1: ?[]const u8 = "hello";
|
||||
var x2: ?[]const u8 = [5]u8{ 'h', 'e', 'l', 'l', 111 };
|
||||
assert(std.mem.eql(u8, x1.?, x2.?));
|
||||
|
||||
var y: ?[]const f32 = [2]f32{ 1.2, 3.4 };
|
||||
assert(y.?[0] == 1.2);
|
||||
}
|
||||
|
||||
// In this cast, the array length becomes the slice length.
|
||||
test "*[N]T to []T" {
|
||||
var buf: [5]u8 = "hello";
|
||||
const x: []u8 = &buf;
|
||||
assert(std.mem.eql(u8, x, "hello"));
|
||||
|
||||
const buf2 = [2]f32{ 1.2, 3.4 };
|
||||
const x2: []const f32 = &buf2;
|
||||
assert(std.mem.eql(f32, x2, [2]f32{ 1.2, 3.4 }));
|
||||
}
|
||||
|
||||
// Single-item pointers to arrays can be implicitly casted to
|
||||
// unknown length pointers.
|
||||
test "*[N]T to [*]T" {
|
||||
var buf: [5]u8 = "hello";
|
||||
const x: [*]u8 = &buf;
|
||||
assert(x[4] == 'o');
|
||||
// x[5] would be an uncaught out of bounds pointer dereference!
|
||||
}
|
||||
|
||||
// Likewise, it works when the destination type is an optional.
|
||||
test "*[N]T to ?[*]T" {
|
||||
var buf: [5]u8 = "hello";
|
||||
const x: ?[*]u8 = &buf;
|
||||
assert(x.?[4] == 'o');
|
||||
}
|
||||
|
||||
// Single-item pointers can be cast to len-1 single-item arrays.
|
||||
test "*T to *[1]T" {
|
||||
var x: i32 = 1234;
|
||||
const y: *[1]i32 = &x;
|
||||
const z: [*]i32 = y;
|
||||
assert(z[0] == 1234);
|
||||
}
|
||||
{#code_end#}
|
||||
{#see_also|C Pointers#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: Optionals#}
|
||||
<p>TODO: T to ?T</p>
|
||||
<p>TODO: T to E!?T</p>
|
||||
<p>TODO: null to ?T</p>
|
||||
<p>
|
||||
The payload type of {#link|Optionals#}, as well as {#link|null#}, implicitly cast to the optional type.
|
||||
</p>
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
test "implicit casting to optionals" {
|
||||
const x: ?i32 = 1234;
|
||||
const y: ?i32 = null;
|
||||
|
||||
assert(x.? == 1234);
|
||||
assert(y == null);
|
||||
}
|
||||
{#code_end#}
|
||||
<p>It works nested inside the {#link|Error Union Type#}, too:</p>
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
test "implicit casting to optionals wrapped in error union" {
|
||||
const x: anyerror!?i32 = 1234;
|
||||
const y: anyerror!?i32 = null;
|
||||
|
||||
assert((try x).? == 1234);
|
||||
assert((try y) == null);
|
||||
}
|
||||
{#code_end#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: T to E!T#}
|
||||
<p>TODO</p>
|
||||
{#header_open|Implicit Cast: Error Unions#}
|
||||
<p>The the payload type of an {#link|Error Union Type#} as well as the {#link|Error Set Type#}
|
||||
implicitly cast to the error union type:
|
||||
</p>
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
test "implicit casting to error unions" {
|
||||
const x: anyerror!i32 = 1234;
|
||||
const y: anyerror!i32 = error.Failure;
|
||||
|
||||
assert((try x) == 1234);
|
||||
std.testing.expectError(error.Failure, y);
|
||||
}
|
||||
{#code_end#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: E to E!T#}
|
||||
<p>TODO</p>
|
||||
{#header_open|Implicit Cast: Compile-Time Known Numbers#}
|
||||
<p>When a number is {#link|comptime#}-known to be representable in the destination type,
|
||||
it may be implicitly casted:
|
||||
</p>
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
test "implicit casting large integer type to smaller one when value is comptime known to fit" {
|
||||
const x: u64 = 255;
|
||||
const y: u8 = x;
|
||||
assert(y == 255);
|
||||
}
|
||||
{#code_end#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: compile-time known numbers#}
|
||||
<p>TODO</p>
|
||||
{#header_open|Implicit Cast: unions and enums#}
|
||||
<p>Tagged unions can be implicitly cast to enums, and enums can be implicitly casted to tagged unions
|
||||
when they are {#link|comptime#}-known to be a field of the union that has only one possible value, such as
|
||||
{#link|void#}:
|
||||
</p>
|
||||
{#code_begin|test#}
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
const E = enum {
|
||||
One,
|
||||
Two,
|
||||
Three,
|
||||
};
|
||||
|
||||
const U = union(E) {
|
||||
One: i32,
|
||||
Two: f32,
|
||||
Three,
|
||||
};
|
||||
|
||||
test "implicit casting between unions and enums" {
|
||||
var u = U{ .Two = 12.34 };
|
||||
var e: E = u;
|
||||
assert(e == E.Two);
|
||||
|
||||
const three = E.Three;
|
||||
var another_u: U = three;
|
||||
assert(another_u == E.Three);
|
||||
}
|
||||
{#code_end#}
|
||||
{#see_also|union|enum#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: union to enum#}
|
||||
<p>TODO</p>
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: enum to union#}
|
||||
<p>TODO</p>
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: T to *T when @sizeOf(T) == 0#}
|
||||
<p>TODO</p>
|
||||
{#header_open|Implicit Cast: Zero Bit Types#}
|
||||
<p>{#link|Zero Bit Types#} may be implicitly casted to single-item {#link|Pointers#},
|
||||
regardless of const.</p>
|
||||
<p>TODO document the reasoning for this</p>
|
||||
<p>TODO document whether vice versa should work and why</p>
|
||||
{#code_begin|test#}
|
||||
test "implicit casting of zero bit types" {
|
||||
var x: void = {};
|
||||
var y: *void = x;
|
||||
//var z: void = y; // TODO
|
||||
}
|
||||
{#code_end#}
|
||||
{#header_close#}
|
||||
{#header_open|Implicit Cast: undefined#}
|
||||
<p>TODO</p>
|
||||
<p>{#link|undefined#} can be cast to any type.</p>
|
||||
{#header_close#}
|
||||
{#header_close#}
|
||||
|
||||
@ -6066,6 +6215,35 @@ test "main" {
|
||||
<p>
|
||||
Creates a symbol in the output object file.
|
||||
</p>
|
||||
<p>
|
||||
This function can be called from a {#link|comptime#} block to conditionally export symbols.
|
||||
When {#syntax#}target{#endsyntax#} is a function with the C calling convention and
|
||||
{#syntax#}linkage{#endsyntax#} is {#syntax#}Strong{#endsyntax#}, this is equivalent to
|
||||
the {#syntax#}export{#endsyntax#} keyword used on a function:
|
||||
</p>
|
||||
{#code_begin|obj#}
|
||||
const builtin = @import("builtin");
|
||||
|
||||
comptime {
|
||||
@export("foo", internalName, builtin.GlobalLinkage.Strong);
|
||||
}
|
||||
|
||||
extern fn internalName() void {}
|
||||
{#code_end#}
|
||||
<p>This is equivalent to:</p>
|
||||
{#code_begin|obj#}
|
||||
export fn foo() void {}
|
||||
{#code_end#}
|
||||
<p>Note that even when using {#syntax#}export{#endsyntax#}, {#syntax#}@"foo"{#endsyntax#} syntax can
|
||||
be used to choose any string for the symbol name:</p>
|
||||
{#code_begin|obj#}
|
||||
export fn @"A function name that is a complete sentence."() void {}
|
||||
{#code_end#}
|
||||
<p>
|
||||
When looking at the resulting object, you can see the symbol is used verbatim:
|
||||
</p>
|
||||
<pre>00000000000001f0 T A function name that is a complete sentence.</pre>
|
||||
{#see_also|Exporting a C Library#}
|
||||
{#header_close#}
|
||||
|
||||
{#header_open|@fence#}
|
||||
@ -7925,6 +8103,7 @@ pub fn build(b: *Builder) void {
|
||||
$ ./test
|
||||
$ echo $?
|
||||
0</code></pre>
|
||||
{#see_also|export#}
|
||||
{#header_close#}
|
||||
{#header_open|Mixing Object Files#}
|
||||
<p>
|
||||
|
26
libc/include/aarch64-linux-musleabi/asm/auxvec.h
Normal file
26
libc/include/aarch64-linux-musleabi/asm/auxvec.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_AUXVEC_H
|
||||
#define __ASM_AUXVEC_H
|
||||
|
||||
/* vDSO location */
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */
|
||||
|
||||
#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */
|
||||
|
||||
#endif
|
24
libc/include/aarch64-linux-musleabi/asm/bitsperlong.h
Normal file
24
libc/include/aarch64-linux-musleabi/asm/bitsperlong.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_BITSPERLONG_H
|
||||
#define __ASM_BITSPERLONG_H
|
||||
|
||||
#define __BITS_PER_LONG 64
|
||||
|
||||
#include <asm-generic/bitsperlong.h>
|
||||
|
||||
#endif /* __ASM_BITSPERLONG_H */
|
9
libc/include/aarch64-linux-musleabi/asm/bpf_perf_event.h
Normal file
9
libc/include/aarch64-linux-musleabi/asm/bpf_perf_event.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ASM_BPF_PERF_EVENT_H__
|
||||
#define __ASM_BPF_PERF_EVENT_H__
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
typedef struct user_pt_regs bpf_user_pt_regs_t;
|
||||
|
||||
#endif /* __ASM_BPF_PERF_EVENT_H__ */
|
26
libc/include/aarch64-linux-musleabi/asm/byteorder.h
Normal file
26
libc/include/aarch64-linux-musleabi/asm/byteorder.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_BYTEORDER_H
|
||||
#define __ASM_BYTEORDER_H
|
||||
|
||||
#ifdef __AARCH64EB__
|
||||
#include <linux/byteorder/big_endian.h>
|
||||
#else
|
||||
#include <linux/byteorder/little_endian.h>
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_BYTEORDER_H */
|
30
libc/include/aarch64-linux-musleabi/asm/fcntl.h
Normal file
30
libc/include/aarch64-linux-musleabi/asm/fcntl.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_FCNTL_H
|
||||
#define __ASM_FCNTL_H
|
||||
|
||||
/*
|
||||
* Using our own definitions for AArch32 (compat) support.
|
||||
*/
|
||||
#define O_DIRECTORY 040000 /* must be a directory */
|
||||
#define O_NOFOLLOW 0100000 /* don't follow links */
|
||||
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
|
||||
#define O_LARGEFILE 0400000
|
||||
|
||||
#include <asm-generic/fcntl.h>
|
||||
|
||||
#endif
|
52
libc/include/aarch64-linux-musleabi/asm/hwcap.h
Normal file
52
libc/include/aarch64-linux-musleabi/asm/hwcap.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_HWCAP_H
|
||||
#define __ASM_HWCAP_H
|
||||
|
||||
/*
|
||||
* HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP
|
||||
*/
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
|
||||
#endif /* __ASM_HWCAP_H */
|
310
libc/include/aarch64-linux-musleabi/asm/kvm.h
Normal file
310
libc/include/aarch64-linux-musleabi/asm/kvm.h
Normal file
@ -0,0 +1,310 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012,2013 - ARM Ltd
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* Derived from arch/arm/include/uapi/asm/kvm.h:
|
||||
* Copyright (C) 2012 - Virtual Open Systems and Columbia University
|
||||
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ARM_KVM_H__
|
||||
#define __ARM_KVM_H__
|
||||
|
||||
#define KVM_SPSR_EL1 0
|
||||
#define KVM_SPSR_SVC KVM_SPSR_EL1
|
||||
#define KVM_SPSR_ABT 1
|
||||
#define KVM_SPSR_UND 2
|
||||
#define KVM_SPSR_IRQ 3
|
||||
#define KVM_SPSR_FIQ 4
|
||||
#define KVM_NR_SPSR 5
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/psci.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#define __KVM_HAVE_GUEST_DEBUG
|
||||
#define __KVM_HAVE_IRQ_LINE
|
||||
#define __KVM_HAVE_READONLY_MEM
|
||||
#define __KVM_HAVE_VCPU_EVENTS
|
||||
|
||||
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
|
||||
|
||||
#define KVM_REG_SIZE(id) \
|
||||
(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
|
||||
|
||||
struct kvm_regs {
|
||||
struct user_pt_regs regs; /* sp = sp_el0 */
|
||||
|
||||
__u64 sp_el1;
|
||||
__u64 elr_el1;
|
||||
|
||||
__u64 spsr[KVM_NR_SPSR];
|
||||
|
||||
struct user_fpsimd_state fp_regs;
|
||||
};
|
||||
|
||||
/*
|
||||
* Supported CPU Targets - Adding a new target type is not recommended,
|
||||
* unless there are some special registers not supported by the
|
||||
* genericv8 syreg table.
|
||||
*/
|
||||
#define KVM_ARM_TARGET_AEM_V8 0
|
||||
#define KVM_ARM_TARGET_FOUNDATION_V8 1
|
||||
#define KVM_ARM_TARGET_CORTEX_A57 2
|
||||
#define KVM_ARM_TARGET_XGENE_POTENZA 3
|
||||
#define KVM_ARM_TARGET_CORTEX_A53 4
|
||||
/* Generic ARM v8 target */
|
||||
#define KVM_ARM_TARGET_GENERIC_V8 5
|
||||
|
||||
#define KVM_ARM_NUM_TARGETS 6
|
||||
|
||||
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
|
||||
#define KVM_ARM_DEVICE_TYPE_SHIFT 0
|
||||
#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT)
|
||||
#define KVM_ARM_DEVICE_ID_SHIFT 16
|
||||
#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT)
|
||||
|
||||
/* Supported device IDs */
|
||||
#define KVM_ARM_DEVICE_VGIC_V2 0
|
||||
|
||||
/* Supported VGIC address types */
|
||||
#define KVM_VGIC_V2_ADDR_TYPE_DIST 0
|
||||
#define KVM_VGIC_V2_ADDR_TYPE_CPU 1
|
||||
|
||||
#define KVM_VGIC_V2_DIST_SIZE 0x1000
|
||||
#define KVM_VGIC_V2_CPU_SIZE 0x2000
|
||||
|
||||
/* Supported VGICv3 address types */
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
|
||||
#define KVM_VGIC_ITS_ADDR_TYPE 4
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5
|
||||
|
||||
#define KVM_VGIC_V3_DIST_SIZE SZ_64K
|
||||
#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
|
||||
#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K)
|
||||
|
||||
#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
|
||||
#define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */
|
||||
#define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */
|
||||
#define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */
|
||||
|
||||
struct kvm_vcpu_init {
|
||||
__u32 target;
|
||||
__u32 features[7];
|
||||
};
|
||||
|
||||
struct kvm_sregs {
|
||||
};
|
||||
|
||||
struct kvm_fpu {
|
||||
};
|
||||
|
||||
/*
|
||||
* See v8 ARM ARM D7.3: Debug Registers
|
||||
*
|
||||
* The architectural limit is 16 debug registers of each type although
|
||||
* in practice there are usually less (see ID_AA64DFR0_EL1).
|
||||
*
|
||||
* Although the control registers are architecturally defined as 32
|
||||
* bits wide we use a 64 bit structure here to keep parity with
|
||||
* KVM_GET/SET_ONE_REG behaviour which treats all system registers as
|
||||
* 64 bit values. It also allows for the possibility of the
|
||||
* architecture expanding the control registers without having to
|
||||
* change the userspace ABI.
|
||||
*/
|
||||
#define KVM_ARM_MAX_DBG_REGS 16
|
||||
struct kvm_guest_debug_arch {
|
||||
__u64 dbg_bcr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_bvr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_wcr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_wvr[KVM_ARM_MAX_DBG_REGS];
|
||||
};
|
||||
|
||||
struct kvm_debug_exit_arch {
|
||||
__u32 hsr;
|
||||
__u64 far; /* used for watchpoints */
|
||||
};
|
||||
|
||||
/*
|
||||
* Architecture specific defines for kvm_guest_debug->control
|
||||
*/
|
||||
|
||||
#define KVM_GUESTDBG_USE_SW_BP (1 << 16)
|
||||
#define KVM_GUESTDBG_USE_HW (1 << 17)
|
||||
|
||||
struct kvm_sync_regs {
|
||||
/* Used with KVM_CAP_ARM_USER_IRQ */
|
||||
__u64 device_irq_level;
|
||||
};
|
||||
|
||||
struct kvm_arch_memory_slot {
|
||||
};
|
||||
|
||||
/* for KVM_GET/SET_VCPU_EVENTS */
|
||||
struct kvm_vcpu_events {
|
||||
struct {
|
||||
__u8 serror_pending;
|
||||
__u8 serror_has_esr;
|
||||
/* Align it to 8 bytes */
|
||||
__u8 pad[6];
|
||||
__u64 serror_esr;
|
||||
} exception;
|
||||
__u32 reserved[12];
|
||||
};
|
||||
|
||||
/* If you need to interpret the index values, here is the key: */
|
||||
#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000
|
||||
#define KVM_REG_ARM_COPROC_SHIFT 16
|
||||
|
||||
/* Normal registers are mapped as coprocessor 16. */
|
||||
#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / sizeof(__u32))
|
||||
|
||||
/* Some registers need more space to represent values. */
|
||||
#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00
|
||||
#define KVM_REG_ARM_DEMUX_ID_SHIFT 8
|
||||
#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT)
|
||||
#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF
|
||||
#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0
|
||||
|
||||
/* AArch64 system registers */
|
||||
#define KVM_REG_ARM64_SYSREG (0x0013 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000
|
||||
#define KVM_REG_ARM64_SYSREG_OP0_SHIFT 14
|
||||
#define KVM_REG_ARM64_SYSREG_OP1_MASK 0x0000000000003800
|
||||
#define KVM_REG_ARM64_SYSREG_OP1_SHIFT 11
|
||||
#define KVM_REG_ARM64_SYSREG_CRN_MASK 0x0000000000000780
|
||||
#define KVM_REG_ARM64_SYSREG_CRN_SHIFT 7
|
||||
#define KVM_REG_ARM64_SYSREG_CRM_MASK 0x0000000000000078
|
||||
#define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3
|
||||
#define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007
|
||||
#define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0
|
||||
|
||||
#define ARM64_SYS_REG_SHIFT_MASK(x,n) \
|
||||
(((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & \
|
||||
KVM_REG_ARM64_SYSREG_ ## n ## _MASK)
|
||||
|
||||
#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) \
|
||||
(KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op2, OP2))
|
||||
|
||||
#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64)
|
||||
|
||||
/* Physical Timer EL0 Registers */
|
||||
#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1)
|
||||
#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2)
|
||||
#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1)
|
||||
|
||||
/* EL0 Virtual Timer Registers */
|
||||
#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1)
|
||||
#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
|
||||
#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
|
||||
|
||||
/* KVM-as-firmware specific pseudo-registers */
|
||||
#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \
|
||||
KVM_REG_ARM_FW | ((r) & 0xffff))
|
||||
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
|
||||
|
||||
/* Device Control API: ARM VGIC */
|
||||
#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
|
||||
#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2
|
||||
#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32
|
||||
#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT 32
|
||||
#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \
|
||||
(0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0
|
||||
#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff)
|
||||
#define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CTRL 4
|
||||
#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
|
||||
#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
|
||||
#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
|
||||
(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
|
||||
#define VGIC_LEVEL_INFO_LINE_LEVEL 0
|
||||
|
||||
#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
|
||||
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
|
||||
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
|
||||
#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
|
||||
#define KVM_DEV_ARM_ITS_CTRL_RESET 4
|
||||
|
||||
/* Device Control API on vcpu fd */
|
||||
#define KVM_ARM_VCPU_PMU_V3_CTRL 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_IRQ 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_INIT 1
|
||||
#define KVM_ARM_VCPU_TIMER_CTRL 1
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1
|
||||
|
||||
/* KVM_IRQ_LINE irq field index values */
|
||||
#define KVM_ARM_IRQ_TYPE_SHIFT 24
|
||||
#define KVM_ARM_IRQ_TYPE_MASK 0xff
|
||||
#define KVM_ARM_IRQ_VCPU_SHIFT 16
|
||||
#define KVM_ARM_IRQ_VCPU_MASK 0xff
|
||||
#define KVM_ARM_IRQ_NUM_SHIFT 0
|
||||
#define KVM_ARM_IRQ_NUM_MASK 0xffff
|
||||
|
||||
/* irq_type field */
|
||||
#define KVM_ARM_IRQ_TYPE_CPU 0
|
||||
#define KVM_ARM_IRQ_TYPE_SPI 1
|
||||
#define KVM_ARM_IRQ_TYPE_PPI 2
|
||||
|
||||
/* out-of-kernel GIC cpu interrupt injection irq_number field */
|
||||
#define KVM_ARM_IRQ_CPU_IRQ 0
|
||||
#define KVM_ARM_IRQ_CPU_FIQ 1
|
||||
|
||||
/*
|
||||
* This used to hold the highest supported SPI, but it is now obsolete
|
||||
* and only here to provide source code level compatibility with older
|
||||
* userland. The highest SPI number can be set via KVM_DEV_ARM_VGIC_GRP_NR_IRQS.
|
||||
*/
|
||||
#define KVM_ARM_IRQ_GIC_MAX 127
|
||||
|
||||
/* One single KVM irqchip, ie. the VGIC */
|
||||
#define KVM_NR_IRQCHIPS 1
|
||||
|
||||
/* PSCI interface */
|
||||
#define KVM_PSCI_FN_BASE 0x95c1ba5e
|
||||
#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n))
|
||||
|
||||
#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0)
|
||||
#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1)
|
||||
#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)
|
||||
#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3)
|
||||
|
||||
#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS
|
||||
#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED
|
||||
#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS
|
||||
#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ARM_KVM_H__ */
|
1
libc/include/aarch64-linux-musleabi/asm/kvm_para.h
Normal file
1
libc/include/aarch64-linux-musleabi/asm/kvm_para.h
Normal file
@ -0,0 +1 @@
|
||||
#include <asm-generic/kvm_para.h>
|
24
libc/include/aarch64-linux-musleabi/asm/param.h
Normal file
24
libc/include/aarch64-linux-musleabi/asm/param.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_PARAM_H
|
||||
#define __ASM_PARAM_H
|
||||
|
||||
#define EXEC_PAGESIZE 65536
|
||||
|
||||
#include <asm-generic/param.h>
|
||||
|
||||
#endif
|
41
libc/include/aarch64-linux-musleabi/asm/perf_regs.h
Normal file
41
libc/include/aarch64-linux-musleabi/asm/perf_regs.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_ARM64_PERF_REGS_H
|
||||
#define _ASM_ARM64_PERF_REGS_H
|
||||
|
||||
enum perf_event_arm_regs {
|
||||
PERF_REG_ARM64_X0,
|
||||
PERF_REG_ARM64_X1,
|
||||
PERF_REG_ARM64_X2,
|
||||
PERF_REG_ARM64_X3,
|
||||
PERF_REG_ARM64_X4,
|
||||
PERF_REG_ARM64_X5,
|
||||
PERF_REG_ARM64_X6,
|
||||
PERF_REG_ARM64_X7,
|
||||
PERF_REG_ARM64_X8,
|
||||
PERF_REG_ARM64_X9,
|
||||
PERF_REG_ARM64_X10,
|
||||
PERF_REG_ARM64_X11,
|
||||
PERF_REG_ARM64_X12,
|
||||
PERF_REG_ARM64_X13,
|
||||
PERF_REG_ARM64_X14,
|
||||
PERF_REG_ARM64_X15,
|
||||
PERF_REG_ARM64_X16,
|
||||
PERF_REG_ARM64_X17,
|
||||
PERF_REG_ARM64_X18,
|
||||
PERF_REG_ARM64_X19,
|
||||
PERF_REG_ARM64_X20,
|
||||
PERF_REG_ARM64_X21,
|
||||
PERF_REG_ARM64_X22,
|
||||
PERF_REG_ARM64_X23,
|
||||
PERF_REG_ARM64_X24,
|
||||
PERF_REG_ARM64_X25,
|
||||
PERF_REG_ARM64_X26,
|
||||
PERF_REG_ARM64_X27,
|
||||
PERF_REG_ARM64_X28,
|
||||
PERF_REG_ARM64_X29,
|
||||
PERF_REG_ARM64_LR,
|
||||
PERF_REG_ARM64_SP,
|
||||
PERF_REG_ARM64_PC,
|
||||
PERF_REG_ARM64_MAX,
|
||||
};
|
||||
#endif /* _ASM_ARM64_PERF_REGS_H */
|
11
libc/include/aarch64-linux-musleabi/asm/posix_types.h
Normal file
11
libc/include/aarch64-linux-musleabi/asm/posix_types.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_POSIX_TYPES_H
|
||||
#define __ASM_POSIX_TYPES_H
|
||||
|
||||
typedef unsigned short __kernel_old_uid_t;
|
||||
typedef unsigned short __kernel_old_gid_t;
|
||||
#define __kernel_old_uid_t __kernel_old_uid_t
|
||||
|
||||
#include <asm-generic/posix_types.h>
|
||||
|
||||
#endif /* __ASM_POSIX_TYPES_H */
|
233
libc/include/aarch64-linux-musleabi/asm/ptrace.h
Normal file
233
libc/include/aarch64-linux-musleabi/asm/ptrace.h
Normal file
@ -0,0 +1,233 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Based on arch/arm/include/asm/ptrace.h
|
||||
*
|
||||
* Copyright (C) 1996-2003 Russell King
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_PTRACE_H
|
||||
#define __ASM_PTRACE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/hwcap.h>
|
||||
#include <asm/sigcontext.h>
|
||||
|
||||
|
||||
/*
|
||||
* PSR bits
|
||||
*/
|
||||
#define PSR_MODE_EL0t 0x00000000
|
||||
#define PSR_MODE_EL1t 0x00000004
|
||||
#define PSR_MODE_EL1h 0x00000005
|
||||
#define PSR_MODE_EL2t 0x00000008
|
||||
#define PSR_MODE_EL2h 0x00000009
|
||||
#define PSR_MODE_EL3t 0x0000000c
|
||||
#define PSR_MODE_EL3h 0x0000000d
|
||||
#define PSR_MODE_MASK 0x0000000f
|
||||
|
||||
/* AArch32 CPSR bits */
|
||||
#define PSR_MODE32_BIT 0x00000010
|
||||
|
||||
/* AArch64 SPSR bits */
|
||||
#define PSR_F_BIT 0x00000040
|
||||
#define PSR_I_BIT 0x00000080
|
||||
#define PSR_A_BIT 0x00000100
|
||||
#define PSR_D_BIT 0x00000200
|
||||
#define PSR_PAN_BIT 0x00400000
|
||||
#define PSR_UAO_BIT 0x00800000
|
||||
#define PSR_V_BIT 0x10000000
|
||||
#define PSR_C_BIT 0x20000000
|
||||
#define PSR_Z_BIT 0x40000000
|
||||
#define PSR_N_BIT 0x80000000
|
||||
|
||||
/*
|
||||
* Groups of PSR bits
|
||||
*/
|
||||
#define PSR_f 0xff000000 /* Flags */
|
||||
#define PSR_s 0x00ff0000 /* Status */
|
||||
#define PSR_x 0x0000ff00 /* Extension */
|
||||
#define PSR_c 0x000000ff /* Control */
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/prctl.h>
|
||||
|
||||
/*
|
||||
* User structures for general purpose, floating point and debug registers.
|
||||
*/
|
||||
struct user_pt_regs {
|
||||
__u64 regs[31];
|
||||
__u64 sp;
|
||||
__u64 pc;
|
||||
__u64 pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_state {
|
||||
__uint128_t vregs[32];
|
||||
__u32 fpsr;
|
||||
__u32 fpcr;
|
||||
__u32 __reserved[2];
|
||||
};
|
||||
|
||||
struct user_hwdebug_state {
|
||||
__u32 dbg_info;
|
||||
__u32 pad;
|
||||
struct {
|
||||
__u64 addr;
|
||||
__u32 ctrl;
|
||||
__u32 pad;
|
||||
} dbg_regs[16];
|
||||
};
|
||||
|
||||
/* SVE/FP/SIMD state (NT_ARM_SVE) */
|
||||
|
||||
struct user_sve_header {
|
||||
__u32 size; /* total meaningful regset content in bytes */
|
||||
__u32 max_size; /* maxmium possible size for this thread */
|
||||
__u16 vl; /* current vector length */
|
||||
__u16 max_vl; /* maximum possible vector length */
|
||||
__u16 flags;
|
||||
__u16 __reserved;
|
||||
};
|
||||
|
||||
/* Definitions for user_sve_header.flags: */
|
||||
#define SVE_PT_REGS_MASK (1 << 0)
|
||||
|
||||
#define SVE_PT_REGS_FPSIMD 0
|
||||
#define SVE_PT_REGS_SVE SVE_PT_REGS_MASK
|
||||
|
||||
/*
|
||||
* Common SVE_PT_* flags:
|
||||
* These must be kept in sync with prctl interface in <linux/ptrace.h>
|
||||
*/
|
||||
#define SVE_PT_VL_INHERIT (PR_SVE_VL_INHERIT >> 16)
|
||||
#define SVE_PT_VL_ONEXEC (PR_SVE_SET_VL_ONEXEC >> 16)
|
||||
|
||||
|
||||
/*
|
||||
* The remainder of the SVE state follows struct user_sve_header. The
|
||||
* total size of the SVE state (including header) depends on the
|
||||
* metadata in the header: SVE_PT_SIZE(vq, flags) gives the total size
|
||||
* of the state in bytes, including the header.
|
||||
*
|
||||
* Refer to <asm/sigcontext.h> for details of how to pass the correct
|
||||
* "vq" argument to these macros.
|
||||
*/
|
||||
|
||||
/* Offset from the start of struct user_sve_header to the register data */
|
||||
#define SVE_PT_REGS_OFFSET \
|
||||
((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
/*
|
||||
* The register data content and layout depends on the value of the
|
||||
* flags field.
|
||||
*/
|
||||
|
||||
/*
|
||||
* (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_FPSIMD case:
|
||||
*
|
||||
* The payload starts at offset SVE_PT_FPSIMD_OFFSET, and is of type
|
||||
* struct user_fpsimd_state. Additional data might be appended in the
|
||||
* future: use SVE_PT_FPSIMD_SIZE(vq, flags) to compute the total size.
|
||||
* SVE_PT_FPSIMD_SIZE(vq, flags) will never be less than
|
||||
* sizeof(struct user_fpsimd_state).
|
||||
*/
|
||||
|
||||
#define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET
|
||||
|
||||
#define SVE_PT_FPSIMD_SIZE(vq, flags) (sizeof(struct user_fpsimd_state))
|
||||
|
||||
/*
|
||||
* (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE case:
|
||||
*
|
||||
* The payload starts at offset SVE_PT_SVE_OFFSET, and is of size
|
||||
* SVE_PT_SVE_SIZE(vq, flags).
|
||||
*
|
||||
* Additional macros describe the contents and layout of the payload.
|
||||
* For each, SVE_PT_SVE_x_OFFSET(args) is the start offset relative to
|
||||
* the start of struct user_sve_header, and SVE_PT_SVE_x_SIZE(args) is
|
||||
* the size in bytes:
|
||||
*
|
||||
* x type description
|
||||
* - ---- -----------
|
||||
* ZREGS \
|
||||
* ZREG |
|
||||
* PREGS | refer to <asm/sigcontext.h>
|
||||
* PREG |
|
||||
* FFR /
|
||||
*
|
||||
* FPSR uint32_t FPSR
|
||||
* FPCR uint32_t FPCR
|
||||
*
|
||||
* Additional data might be appended in the future.
|
||||
*/
|
||||
|
||||
#define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq)
|
||||
#define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
#define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq)
|
||||
#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32)
|
||||
#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32)
|
||||
|
||||
#define __SVE_SIG_TO_PT(offset) \
|
||||
((offset) - SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET)
|
||||
|
||||
#define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET
|
||||
|
||||
#define SVE_PT_SVE_ZREGS_OFFSET \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_ZREGS_OFFSET)
|
||||
#define SVE_PT_SVE_ZREG_OFFSET(vq, n) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_ZREG_OFFSET(vq, n))
|
||||
#define SVE_PT_SVE_ZREGS_SIZE(vq) \
|
||||
(SVE_PT_SVE_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET)
|
||||
|
||||
#define SVE_PT_SVE_PREGS_OFFSET(vq) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_PREGS_OFFSET(vq))
|
||||
#define SVE_PT_SVE_PREG_OFFSET(vq, n) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_PREG_OFFSET(vq, n))
|
||||
#define SVE_PT_SVE_PREGS_SIZE(vq) \
|
||||
(SVE_PT_SVE_PREG_OFFSET(vq, SVE_NUM_PREGS) - \
|
||||
SVE_PT_SVE_PREGS_OFFSET(vq))
|
||||
|
||||
#define SVE_PT_SVE_FFR_OFFSET(vq) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_FFR_OFFSET(vq))
|
||||
|
||||
#define SVE_PT_SVE_FPSR_OFFSET(vq) \
|
||||
((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + \
|
||||
(SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
#define SVE_PT_SVE_FPCR_OFFSET(vq) \
|
||||
(SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE)
|
||||
|
||||
/*
|
||||
* Any future extension appended after FPCR must be aligned to the next
|
||||
* 128-bit boundary.
|
||||
*/
|
||||
|
||||
#define SVE_PT_SVE_SIZE(vq, flags) \
|
||||
((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \
|
||||
- SVE_PT_SVE_OFFSET + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_PT_SIZE(vq, flags) \
|
||||
(((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? \
|
||||
SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \
|
||||
: SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_PTRACE_H */
|
27
libc/include/aarch64-linux-musleabi/asm/setup.h
Normal file
27
libc/include/aarch64-linux-musleabi/asm/setup.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Based on arch/arm/include/asm/setup.h
|
||||
*
|
||||
* Copyright (C) 1997-1999 Russell King
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SETUP_H
|
||||
#define __ASM_SETUP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define COMMAND_LINE_SIZE 2048
|
||||
|
||||
#endif
|
238
libc/include/aarch64-linux-musleabi/asm/sigcontext.h
Normal file
238
libc/include/aarch64-linux-musleabi/asm/sigcontext.h
Normal file
@ -0,0 +1,238 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGCONTEXT_H
|
||||
#define __ASM_SIGCONTEXT_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Signal context structure - contains all info to do with the state
|
||||
* before the signal handler was invoked.
|
||||
*/
|
||||
struct sigcontext {
|
||||
__u64 fault_address;
|
||||
/* AArch64 registers */
|
||||
__u64 regs[31];
|
||||
__u64 sp;
|
||||
__u64 pc;
|
||||
__u64 pstate;
|
||||
/* 4K reserved for FP/SIMD state and future expansion */
|
||||
__u8 __reserved[4096] __attribute__((__aligned__(16)));
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocation of __reserved[]:
|
||||
* (Note: records do not necessarily occur in the order shown here.)
|
||||
*
|
||||
* size description
|
||||
*
|
||||
* 0x210 fpsimd_context
|
||||
* 0x10 esr_context
|
||||
* 0x8a0 sve_context (vl <= 64) (optional)
|
||||
* 0x20 extra_context (optional)
|
||||
* 0x10 terminator (null _aarch64_ctx)
|
||||
*
|
||||
* 0x510 (reserved for future allocation)
|
||||
*
|
||||
* New records that can exceed this space need to be opt-in for userspace, so
|
||||
* that an expanded signal frame is not generated unexpectedly. The mechanism
|
||||
* for opting in will depend on the extension that generates each new record.
|
||||
* The above table documents the maximum set and sizes of records than can be
|
||||
* generated when userspace does not opt in for any such extension.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Header to be used at the beginning of structures extending the user
|
||||
* context. Such structures must be placed after the rt_sigframe on the stack
|
||||
* and be 16-byte aligned. The last structure must be a dummy one with the
|
||||
* magic and size set to 0.
|
||||
*/
|
||||
struct _aarch64_ctx {
|
||||
__u32 magic;
|
||||
__u32 size;
|
||||
};
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
|
||||
struct fpsimd_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u32 fpsr;
|
||||
__u32 fpcr;
|
||||
__uint128_t vregs[32];
|
||||
};
|
||||
|
||||
/* ESR_EL1 context */
|
||||
#define ESR_MAGIC 0x45535201
|
||||
|
||||
struct esr_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u64 esr;
|
||||
};
|
||||
|
||||
/*
|
||||
* extra_context: describes extra space in the signal frame for
|
||||
* additional structures that don't fit in sigcontext.__reserved[].
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* 1) fpsimd_context, esr_context and extra_context must be placed in
|
||||
* sigcontext.__reserved[] if present. They cannot be placed in the
|
||||
* extra space. Any other record can be placed either in the extra
|
||||
* space or in sigcontext.__reserved[], unless otherwise specified in
|
||||
* this file.
|
||||
*
|
||||
* 2) There must not be more than one extra_context.
|
||||
*
|
||||
* 3) If extra_context is present, it must be followed immediately in
|
||||
* sigcontext.__reserved[] by the terminating null _aarch64_ctx.
|
||||
*
|
||||
* 4) The extra space to which datap points must start at the first
|
||||
* 16-byte aligned address immediately after the terminating null
|
||||
* _aarch64_ctx that follows the extra_context structure in
|
||||
* __reserved[]. The extra space may overrun the end of __reserved[],
|
||||
* as indicated by a sufficiently large value for the size field.
|
||||
*
|
||||
* 5) The extra space must itself be terminated with a null
|
||||
* _aarch64_ctx.
|
||||
*/
|
||||
#define EXTRA_MAGIC 0x45585401
|
||||
|
||||
struct extra_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u64 datap; /* 16-byte aligned pointer to extra space cast to __u64 */
|
||||
__u32 size; /* size in bytes of the extra space */
|
||||
__u32 __reserved[3];
|
||||
};
|
||||
|
||||
#define SVE_MAGIC 0x53564501
|
||||
|
||||
struct sve_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u16 vl;
|
||||
__u16 __reserved[3];
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
* The SVE architecture leaves space for future expansion of the
|
||||
* vector length beyond its initial architectural limit of 2048 bits
|
||||
* (16 quadwords).
|
||||
*
|
||||
* See linux/Documentation/arm64/sve.txt for a description of the VL/VQ
|
||||
* terminology.
|
||||
*/
|
||||
#define SVE_VQ_BYTES 16 /* number of bytes per quadword */
|
||||
|
||||
#define SVE_VQ_MIN 1
|
||||
#define SVE_VQ_MAX 512
|
||||
|
||||
#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
|
||||
#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_NUM_ZREGS 32
|
||||
#define SVE_NUM_PREGS 16
|
||||
|
||||
#define sve_vl_valid(vl) \
|
||||
((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
|
||||
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
|
||||
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
|
||||
|
||||
/*
|
||||
* If the SVE registers are currently live for the thread at signal delivery,
|
||||
* sve_context.head.size >=
|
||||
* SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl))
|
||||
* and the register data may be accessed using the SVE_SIG_*() macros.
|
||||
*
|
||||
* If sve_context.head.size <
|
||||
* SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)),
|
||||
* the SVE registers were not live for the thread and no register data
|
||||
* is included: in this case, the SVE_SIG_*() macros should not be
|
||||
* used except for this check.
|
||||
*
|
||||
* The same convention applies when returning from a signal: a caller
|
||||
* will need to remove or resize the sve_context block if it wants to
|
||||
* make the SVE registers live when they were previously non-live or
|
||||
* vice-versa. This may require the the caller to allocate fresh
|
||||
* memory and/or move other context blocks in the signal frame.
|
||||
*
|
||||
* Changing the vector length during signal return is not permitted:
|
||||
* sve_context.vl must equal the thread's current vector length when
|
||||
* doing a sigreturn.
|
||||
*
|
||||
*
|
||||
* Note: for all these macros, the "vq" argument denotes the SVE
|
||||
* vector length in quadwords (i.e., units of 128 bits).
|
||||
*
|
||||
* The correct way to obtain vq is to use sve_vq_from_vl(vl). The
|
||||
* result is valid if and only if sve_vl_valid(vl) is true. This is
|
||||
* guaranteed for a struct sve_context written by the kernel.
|
||||
*
|
||||
*
|
||||
* Additional macros describe the contents and layout of the payload.
|
||||
* For each, SVE_SIG_x_OFFSET(args) is the start offset relative to
|
||||
* the start of struct sve_context, and SVE_SIG_x_SIZE(args) is the
|
||||
* size in bytes:
|
||||
*
|
||||
* x type description
|
||||
* - ---- -----------
|
||||
* REGS the entire SVE context
|
||||
*
|
||||
* ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers
|
||||
* ZREG __uint128_t[vq] individual Z-register Zn
|
||||
*
|
||||
* PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers
|
||||
* PREG uint16_t[vq] individual P-register Pn
|
||||
*
|
||||
* FFR uint16_t[vq] first-fault status register
|
||||
*
|
||||
* Additional data might be appended in the future.
|
||||
*/
|
||||
|
||||
#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8))
|
||||
#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
|
||||
#define SVE_SIG_REGS_OFFSET \
|
||||
((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
|
||||
#define SVE_SIG_ZREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_ZREGS_SIZE(vq) \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
|
||||
|
||||
#define SVE_SIG_PREGS_OFFSET(vq) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
|
||||
#define SVE_SIG_PREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_PREGS_SIZE(vq) \
|
||||
(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
|
||||
|
||||
#define SVE_SIG_FFR_OFFSET(vq) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
|
||||
|
||||
#define SVE_SIG_REGS_SIZE(vq) \
|
||||
(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
|
||||
|
||||
#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
|
||||
|
||||
|
||||
#endif /* __ASM_SIGCONTEXT_H */
|
24
libc/include/aarch64-linux-musleabi/asm/siginfo.h
Normal file
24
libc/include/aarch64-linux-musleabi/asm/siginfo.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGINFO_H
|
||||
#define __ASM_SIGINFO_H
|
||||
|
||||
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||
|
||||
#include <asm-generic/siginfo.h>
|
||||
|
||||
#endif
|
28
libc/include/aarch64-linux-musleabi/asm/signal.h
Normal file
28
libc/include/aarch64-linux-musleabi/asm/signal.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGNAL_H
|
||||
#define __ASM_SIGNAL_H
|
||||
|
||||
/* Required for AArch32 compatibility. */
|
||||
#define SA_RESTORER 0x04000000
|
||||
|
||||
#define MINSIGSTKSZ 5120
|
||||
#define SIGSTKSZ 16384
|
||||
|
||||
#include <asm-generic/signal.h>
|
||||
|
||||
#endif
|
17
libc/include/aarch64-linux-musleabi/asm/stat.h
Normal file
17
libc/include/aarch64-linux-musleabi/asm/stat.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <asm-generic/stat.h>
|
24
libc/include/aarch64-linux-musleabi/asm/statfs.h
Normal file
24
libc/include/aarch64-linux-musleabi/asm/statfs.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_STATFS_H
|
||||
#define __ASM_STATFS_H
|
||||
|
||||
#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4)))
|
||||
|
||||
#include <asm-generic/statfs.h>
|
||||
|
||||
#endif
|
33
libc/include/aarch64-linux-musleabi/asm/ucontext.h
Normal file
33
libc/include/aarch64-linux-musleabi/asm/ucontext.h
Normal file
@ -0,0 +1,33 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_UCONTEXT_H
|
||||
#define __ASM_UCONTEXT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
/* glibc uses a 1024-bit sigset_t */
|
||||
__u8 __unused[1024 / 8 - sizeof(sigset_t)];
|
||||
/* last for future expansion */
|
||||
struct sigcontext uc_mcontext;
|
||||
};
|
||||
|
||||
#endif /* __ASM_UCONTEXT_H */
|
20
libc/include/aarch64-linux-musleabi/asm/unistd.h
Normal file
20
libc/include/aarch64-linux-musleabi/asm/unistd.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
|
||||
#include <asm-generic/unistd.h>
|
47
libc/include/aarch64-linux-musleabi/bfd_stdint.h
Normal file
47
libc/include/aarch64-linux-musleabi/bfd_stdint.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* generated for aarch64-linux-musleabi-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
401
libc/include/aarch64-linux-musleabi/bits/alltypes.h
Normal file
401
libc/include/aarch64-linux-musleabi/bits/alltypes.h
Normal file
@ -0,0 +1,401 @@
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
|
||||
typedef __builtin_va_list va_list;
|
||||
#define __DEFINED_va_list
|
||||
#endif
|
||||
|
||||
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
|
||||
typedef __builtin_va_list __isoc_va_list;
|
||||
#define __DEFINED___isoc_va_list
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
|
||||
typedef unsigned wchar_t;
|
||||
#define __DEFINED_wchar_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef int blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned int nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
|
||||
typedef float float_t;
|
||||
#define __DEFINED_float_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
|
||||
typedef double double_t;
|
||||
#define __DEFINED_double_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
|
||||
typedef struct { long long __ll; long double __ld; } max_align_t;
|
||||
#define __DEFINED_max_align_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
|
||||
typedef long time_t;
|
||||
#define __DEFINED_time_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
|
||||
typedef long suseconds_t;
|
||||
#define __DEFINED_suseconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
#define __DEFINED_pthread_attr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
#define __DEFINED_pthread_mutex_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
#define __DEFINED_mtx_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
#define __DEFINED_pthread_cond_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
#define __DEFINED_cnd_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
#define __DEFINED_pthread_rwlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
#define __DEFINED_pthread_barrier_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
|
||||
typedef unsigned _Addr size_t;
|
||||
#define __DEFINED_size_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
|
||||
typedef unsigned _Addr uintptr_t;
|
||||
#define __DEFINED_uintptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
|
||||
typedef _Addr ptrdiff_t;
|
||||
#define __DEFINED_ptrdiff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
|
||||
typedef _Addr ssize_t;
|
||||
#define __DEFINED_ssize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
|
||||
typedef _Addr intptr_t;
|
||||
#define __DEFINED_intptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
|
||||
typedef _Addr regoff_t;
|
||||
#define __DEFINED_regoff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
|
||||
typedef _Reg register_t;
|
||||
#define __DEFINED_register_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
|
||||
typedef signed char int8_t;
|
||||
#define __DEFINED_int8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
|
||||
typedef signed short int16_t;
|
||||
#define __DEFINED_int16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
|
||||
typedef signed int int32_t;
|
||||
#define __DEFINED_int32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
|
||||
typedef signed _Int64 int64_t;
|
||||
#define __DEFINED_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
|
||||
typedef signed _Int64 intmax_t;
|
||||
#define __DEFINED_intmax_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
|
||||
typedef unsigned char uint8_t;
|
||||
#define __DEFINED_uint8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
|
||||
typedef unsigned short uint16_t;
|
||||
#define __DEFINED_uint16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
|
||||
typedef unsigned int uint32_t;
|
||||
#define __DEFINED_uint32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
|
||||
typedef unsigned _Int64 uint64_t;
|
||||
#define __DEFINED_uint64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
|
||||
typedef unsigned _Int64 u_int64_t;
|
||||
#define __DEFINED_u_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
|
||||
typedef unsigned _Int64 uintmax_t;
|
||||
#define __DEFINED_uintmax_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
|
||||
typedef unsigned mode_t;
|
||||
#define __DEFINED_mode_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned _Reg nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
|
||||
typedef _Int64 off_t;
|
||||
#define __DEFINED_off_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
|
||||
typedef unsigned _Int64 ino_t;
|
||||
#define __DEFINED_ino_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
|
||||
typedef unsigned _Int64 dev_t;
|
||||
#define __DEFINED_dev_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef long blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
|
||||
typedef _Int64 blkcnt_t;
|
||||
#define __DEFINED_blkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
|
||||
typedef unsigned _Int64 fsblkcnt_t;
|
||||
#define __DEFINED_fsblkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
|
||||
typedef unsigned _Int64 fsfilcnt_t;
|
||||
#define __DEFINED_fsfilcnt_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
|
||||
typedef unsigned long wctype_t;
|
||||
#define __DEFINED_wctype_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
|
||||
typedef void * timer_t;
|
||||
#define __DEFINED_timer_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
|
||||
typedef int clockid_t;
|
||||
#define __DEFINED_clockid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
|
||||
typedef long clock_t;
|
||||
#define __DEFINED_clock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
|
||||
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
|
||||
#define __DEFINED_struct_timeval
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
|
||||
struct timespec { time_t tv_sec; long tv_nsec; };
|
||||
#define __DEFINED_struct_timespec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
|
||||
typedef int pid_t;
|
||||
#define __DEFINED_pid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
|
||||
typedef unsigned id_t;
|
||||
#define __DEFINED_id_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
|
||||
typedef unsigned uid_t;
|
||||
#define __DEFINED_uid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
|
||||
typedef unsigned gid_t;
|
||||
#define __DEFINED_gid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
|
||||
typedef int key_t;
|
||||
#define __DEFINED_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
|
||||
typedef unsigned useconds_t;
|
||||
#define __DEFINED_useconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef unsigned long pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef struct __pthread * pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
|
||||
typedef int pthread_once_t;
|
||||
#define __DEFINED_pthread_once_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
|
||||
typedef unsigned pthread_key_t;
|
||||
#define __DEFINED_pthread_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
|
||||
typedef int pthread_spinlock_t;
|
||||
#define __DEFINED_pthread_spinlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_mutexattr_t;
|
||||
#define __DEFINED_pthread_mutexattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_condattr_t;
|
||||
#define __DEFINED_pthread_condattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_barrierattr_t;
|
||||
#define __DEFINED_pthread_barrierattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
|
||||
typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
#define __DEFINED_pthread_rwlockattr_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
|
||||
typedef struct _IO_FILE FILE;
|
||||
#define __DEFINED_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
|
||||
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
|
||||
#define __DEFINED_mbstate_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
|
||||
typedef struct __locale_struct * locale_t;
|
||||
#define __DEFINED_locale_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
|
||||
typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
|
||||
#define __DEFINED_sigset_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
|
||||
struct iovec { void *iov_base; size_t iov_len; };
|
||||
#define __DEFINED_struct_iovec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
|
||||
typedef unsigned socklen_t;
|
||||
#define __DEFINED_socklen_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
|
||||
typedef unsigned short sa_family_t;
|
||||
#define __DEFINED_sa_family_t
|
||||
#endif
|
||||
|
||||
|
||||
#undef _Addr
|
||||
#undef _Int64
|
||||
#undef _Reg
|
5
libc/include/aarch64-linux-musleabi/bits/endian.h
Normal file
5
libc/include/aarch64-linux-musleabi/bits/endian.h
Normal file
@ -0,0 +1,5 @@
|
||||
#if __AARCH64EB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
19
libc/include/aarch64-linux-musleabi/bits/fenv.h
Normal file
19
libc/include/aarch64-linux-musleabi/bits/fenv.h
Normal file
@ -0,0 +1,19 @@
|
||||
#define FE_INVALID 1
|
||||
#define FE_DIVBYZERO 2
|
||||
#define FE_OVERFLOW 4
|
||||
#define FE_UNDERFLOW 8
|
||||
#define FE_INEXACT 16
|
||||
#define FE_ALL_EXCEPT 31
|
||||
#define FE_TONEAREST 0
|
||||
#define FE_DOWNWARD 0x800000
|
||||
#define FE_UPWARD 0x400000
|
||||
#define FE_TOWARDZERO 0xc00000
|
||||
|
||||
typedef unsigned int fexcept_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int __fpcr;
|
||||
unsigned int __fpsr;
|
||||
} fenv_t;
|
||||
|
||||
#define FE_DFL_ENV ((const fenv_t *) -1)
|
16
libc/include/aarch64-linux-musleabi/bits/float.h
Normal file
16
libc/include/aarch64-linux-musleabi/bits/float.h
Normal file
@ -0,0 +1,16 @@
|
||||
#define FLT_EVAL_METHOD 0
|
||||
|
||||
#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
|
||||
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
|
||||
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
|
||||
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
|
||||
|
||||
#define LDBL_MANT_DIG 113
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
#define LDBL_MAX_EXP 16384
|
||||
|
||||
#define LDBL_DIG 33
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#define DECIMAL_DIG 36
|
28
libc/include/aarch64-linux-musleabi/bits/hwcap.h
Normal file
28
libc/include/aarch64-linux-musleabi/bits/hwcap.h
Normal file
@ -0,0 +1,28 @@
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
14
libc/include/aarch64-linux-musleabi/bits/ipc.h
Normal file
14
libc/include/aarch64-linux-musleabi/bits/ipc.h
Normal file
@ -0,0 +1,14 @@
|
||||
struct ipc_perm {
|
||||
key_t __ipc_perm_key;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
uid_t cuid;
|
||||
gid_t cgid;
|
||||
mode_t mode;
|
||||
unsigned short __ipc_perm_seq;
|
||||
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
7
libc/include/aarch64-linux-musleabi/bits/limits.h
Normal file
7
libc/include/aarch64-linux-musleabi/bits/limits.h
Normal file
@ -0,0 +1,7 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#endif
|
||||
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL
|
2
libc/include/aarch64-linux-musleabi/bits/posix.h
Normal file
2
libc/include/aarch64-linux-musleabi/bits/posix.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define _POSIX_V6_LP64_OFF64 1
|
||||
#define _POSIX_V7_LP64_OFF64 1
|
2
libc/include/aarch64-linux-musleabi/bits/reg.h
Normal file
2
libc/include/aarch64-linux-musleabi/bits/reg.h
Normal file
@ -0,0 +1,2 @@
|
||||
#undef __WORDSIZE
|
||||
#define __WORDSIZE 64
|
14
libc/include/aarch64-linux-musleabi/bits/sem.h
Normal file
14
libc/include/aarch64-linux-musleabi/bits/sem.h
Normal file
@ -0,0 +1,14 @@
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm;
|
||||
time_t sem_otime;
|
||||
time_t sem_ctime;
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
unsigned short sem_nsems;
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
#else
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
unsigned short sem_nsems;
|
||||
#endif
|
||||
time_t __unused3;
|
||||
time_t __unused4;
|
||||
};
|
1
libc/include/aarch64-linux-musleabi/bits/setjmp.h
Normal file
1
libc/include/aarch64-linux-musleabi/bits/setjmp.h
Normal file
@ -0,0 +1 @@
|
||||
typedef unsigned long __jmp_buf[22];
|
153
libc/include/aarch64-linux-musleabi/bits/signal.h
Normal file
153
libc/include/aarch64-linux-musleabi/bits/signal.h
Normal file
@ -0,0 +1,153 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MINSIGSTKSZ 6144
|
||||
#define SIGSTKSZ 12288
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef unsigned long greg_t;
|
||||
typedef unsigned long gregset_t[34];
|
||||
|
||||
typedef struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
} fpregset_t;
|
||||
typedef struct sigcontext {
|
||||
unsigned long fault_address;
|
||||
unsigned long regs[31];
|
||||
unsigned long sp, pc, pstate;
|
||||
long double __reserved[256];
|
||||
} mcontext_t;
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
#define ESR_MAGIC 0x45535201
|
||||
#define EXTRA_MAGIC 0x45585401
|
||||
#define SVE_MAGIC 0x53564501
|
||||
struct _aarch64_ctx {
|
||||
unsigned int magic;
|
||||
unsigned int size;
|
||||
};
|
||||
struct fpsimd_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
long double vregs[32];
|
||||
};
|
||||
struct esr_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long esr;
|
||||
};
|
||||
struct extra_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long datap;
|
||||
unsigned int size;
|
||||
unsigned int __reserved[3];
|
||||
};
|
||||
struct sve_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned short vl;
|
||||
unsigned short __reserved[3];
|
||||
};
|
||||
#define SVE_VQ_BYTES 16
|
||||
#define SVE_VQ_MIN 1
|
||||
#define SVE_VQ_MAX 512
|
||||
#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
|
||||
#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
|
||||
#define SVE_NUM_ZREGS 32
|
||||
#define SVE_NUM_PREGS 16
|
||||
#define sve_vl_valid(vl) \
|
||||
((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
|
||||
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
|
||||
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
|
||||
#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
#define SVE_SIG_REGS_OFFSET \
|
||||
((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
|
||||
#define SVE_SIG_ZREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_ZREGS_SIZE(vq) \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
|
||||
#define SVE_SIG_PREGS_OFFSET(vq) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
|
||||
#define SVE_SIG_PREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_PREGS_SIZE(vq) \
|
||||
(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
|
||||
#define SVE_SIG_FFR_OFFSET(vq) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
|
||||
#define SVE_SIG_REGS_SIZE(vq) \
|
||||
(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
|
||||
#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
|
||||
#else
|
||||
typedef struct {
|
||||
long double __regs[18+256];
|
||||
} mcontext_t;
|
||||
#endif
|
||||
|
||||
struct sigaltstack {
|
||||
void *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
};
|
||||
|
||||
typedef struct __ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct __ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t uc_mcontext;
|
||||
} ucontext_t;
|
||||
|
||||
#define SA_NOCLDSTOP 1
|
||||
#define SA_NOCLDWAIT 2
|
||||
#define SA_SIGINFO 4
|
||||
#define SA_ONSTACK 0x08000000
|
||||
#define SA_RESTART 0x10000000
|
||||
#define SA_NODEFER 0x40000000
|
||||
#define SA_RESETHAND 0x80000000
|
||||
#define SA_RESTORER 0x04000000
|
||||
|
||||
#endif
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGIOT SIGABRT
|
||||
#define SIGBUS 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGUSR1 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGUSR2 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGSTKFLT 16
|
||||
#define SIGCHLD 17
|
||||
#define SIGCONT 18
|
||||
#define SIGSTOP 19
|
||||
#define SIGTSTP 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGURG 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGIO 29
|
||||
#define SIGPOLL 29
|
||||
#define SIGPWR 30
|
||||
#define SIGSYS 31
|
||||
#define SIGUNUSED SIGSYS
|
||||
|
||||
#define _NSIG 65
|
33
libc/include/aarch64-linux-musleabi/bits/socket.h
Normal file
33
libc/include/aarch64-linux-musleabi/bits/socket.h
Normal file
@ -0,0 +1,33 @@
|
||||
#include <endian.h>
|
||||
|
||||
struct msghdr {
|
||||
void *msg_name;
|
||||
socklen_t msg_namelen;
|
||||
struct iovec *msg_iov;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1, msg_iovlen;
|
||||
#else
|
||||
int msg_iovlen, __pad1;
|
||||
#endif
|
||||
void *msg_control;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad2;
|
||||
socklen_t msg_controllen;
|
||||
#else
|
||||
socklen_t msg_controllen;
|
||||
int __pad2;
|
||||
#endif
|
||||
int msg_flags;
|
||||
};
|
||||
|
||||
struct cmsghdr {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1;
|
||||
socklen_t cmsg_len;
|
||||
#else
|
||||
socklen_t cmsg_len;
|
||||
int __pad1;
|
||||
#endif
|
||||
int cmsg_level;
|
||||
int cmsg_type;
|
||||
};
|
18
libc/include/aarch64-linux-musleabi/bits/stat.h
Normal file
18
libc/include/aarch64-linux-musleabi/bits/stat.h
Normal file
@ -0,0 +1,18 @@
|
||||
struct stat {
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
mode_t st_mode;
|
||||
nlink_t st_nlink;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
dev_t st_rdev;
|
||||
unsigned long __pad;
|
||||
off_t st_size;
|
||||
blksize_t st_blksize;
|
||||
int __pad2;
|
||||
blkcnt_t st_blocks;
|
||||
struct timespec st_atim;
|
||||
struct timespec st_mtim;
|
||||
struct timespec st_ctim;
|
||||
unsigned __unused[2];
|
||||
};
|
555
libc/include/aarch64-linux-musleabi/bits/syscall.h
Normal file
555
libc/include/aarch64-linux-musleabi/bits/syscall.h
Normal file
@ -0,0 +1,555 @@
|
||||
#define __NR_io_setup 0
|
||||
#define __NR_io_destroy 1
|
||||
#define __NR_io_submit 2
|
||||
#define __NR_io_cancel 3
|
||||
#define __NR_io_getevents 4
|
||||
#define __NR_setxattr 5
|
||||
#define __NR_lsetxattr 6
|
||||
#define __NR_fsetxattr 7
|
||||
#define __NR_getxattr 8
|
||||
#define __NR_lgetxattr 9
|
||||
#define __NR_fgetxattr 10
|
||||
#define __NR_listxattr 11
|
||||
#define __NR_llistxattr 12
|
||||
#define __NR_flistxattr 13
|
||||
#define __NR_removexattr 14
|
||||
#define __NR_lremovexattr 15
|
||||
#define __NR_fremovexattr 16
|
||||
#define __NR_getcwd 17
|
||||
#define __NR_lookup_dcookie 18
|
||||
#define __NR_eventfd2 19
|
||||
#define __NR_epoll_create1 20
|
||||
#define __NR_epoll_ctl 21
|
||||
#define __NR_epoll_pwait 22
|
||||
#define __NR_dup 23
|
||||
#define __NR_dup3 24
|
||||
#define __NR_fcntl 25
|
||||
#define __NR_inotify_init1 26
|
||||
#define __NR_inotify_add_watch 27
|
||||
#define __NR_inotify_rm_watch 28
|
||||
#define __NR_ioctl 29
|
||||
#define __NR_ioprio_set 30
|
||||
#define __NR_ioprio_get 31
|
||||
#define __NR_flock 32
|
||||
#define __NR_mknodat 33
|
||||
#define __NR_mkdirat 34
|
||||
#define __NR_unlinkat 35
|
||||
#define __NR_symlinkat 36
|
||||
#define __NR_linkat 37
|
||||
#define __NR_renameat 38
|
||||
#define __NR_umount2 39
|
||||
#define __NR_mount 40
|
||||
#define __NR_pivot_root 41
|
||||
#define __NR_nfsservctl 42
|
||||
#define __NR_statfs 43
|
||||
#define __NR_fstatfs 44
|
||||
#define __NR_truncate 45
|
||||
#define __NR_ftruncate 46
|
||||
#define __NR_fallocate 47
|
||||
#define __NR_faccessat 48
|
||||
#define __NR_chdir 49
|
||||
#define __NR_fchdir 50
|
||||
#define __NR_chroot 51
|
||||
#define __NR_fchmod 52
|
||||
#define __NR_fchmodat 53
|
||||
#define __NR_fchownat 54
|
||||
#define __NR_fchown 55
|
||||
#define __NR_openat 56
|
||||
#define __NR_close 57
|
||||
#define __NR_vhangup 58
|
||||
#define __NR_pipe2 59
|
||||
#define __NR_quotactl 60
|
||||
#define __NR_getdents64 61
|
||||
#define __NR_lseek 62
|
||||
#define __NR_read 63
|
||||
#define __NR_write 64
|
||||
#define __NR_readv 65
|
||||
#define __NR_writev 66
|
||||
#define __NR_pread64 67
|
||||
#define __NR_pwrite64 68
|
||||
#define __NR_preadv 69
|
||||
#define __NR_pwritev 70
|
||||
#define __NR_sendfile 71
|
||||
#define __NR_pselect6 72
|
||||
#define __NR_ppoll 73
|
||||
#define __NR_signalfd4 74
|
||||
#define __NR_vmsplice 75
|
||||
#define __NR_splice 76
|
||||
#define __NR_tee 77
|
||||
#define __NR_readlinkat 78
|
||||
#define __NR_newfstatat 79
|
||||
#define __NR_fstat 80
|
||||
#define __NR_sync 81
|
||||
#define __NR_fsync 82
|
||||
#define __NR_fdatasync 83
|
||||
#define __NR_sync_file_range 84
|
||||
#define __NR_timerfd_create 85
|
||||
#define __NR_timerfd_settime 86
|
||||
#define __NR_timerfd_gettime 87
|
||||
#define __NR_utimensat 88
|
||||
#define __NR_acct 89
|
||||
#define __NR_capget 90
|
||||
#define __NR_capset 91
|
||||
#define __NR_personality 92
|
||||
#define __NR_exit 93
|
||||
#define __NR_exit_group 94
|
||||
#define __NR_waitid 95
|
||||
#define __NR_set_tid_address 96
|
||||
#define __NR_unshare 97
|
||||
#define __NR_futex 98
|
||||
#define __NR_set_robust_list 99
|
||||
#define __NR_get_robust_list 100
|
||||
#define __NR_nanosleep 101
|
||||
#define __NR_getitimer 102
|
||||
#define __NR_setitimer 103
|
||||
#define __NR_kexec_load 104
|
||||
#define __NR_init_module 105
|
||||
#define __NR_delete_module 106
|
||||
#define __NR_timer_create 107
|
||||
#define __NR_timer_gettime 108
|
||||
#define __NR_timer_getoverrun 109
|
||||
#define __NR_timer_settime 110
|
||||
#define __NR_timer_delete 111
|
||||
#define __NR_clock_settime 112
|
||||
#define __NR_clock_gettime 113
|
||||
#define __NR_clock_getres 114
|
||||
#define __NR_clock_nanosleep 115
|
||||
#define __NR_syslog 116
|
||||
#define __NR_ptrace 117
|
||||
#define __NR_sched_setparam 118
|
||||
#define __NR_sched_setscheduler 119
|
||||
#define __NR_sched_getscheduler 120
|
||||
#define __NR_sched_getparam 121
|
||||
#define __NR_sched_setaffinity 122
|
||||
#define __NR_sched_getaffinity 123
|
||||
#define __NR_sched_yield 124
|
||||
#define __NR_sched_get_priority_max 125
|
||||
#define __NR_sched_get_priority_min 126
|
||||
#define __NR_sched_rr_get_interval 127
|
||||
#define __NR_restart_syscall 128
|
||||
#define __NR_kill 129
|
||||
#define __NR_tkill 130
|
||||
#define __NR_tgkill 131
|
||||
#define __NR_sigaltstack 132
|
||||
#define __NR_rt_sigsuspend 133
|
||||
#define __NR_rt_sigaction 134
|
||||
#define __NR_rt_sigprocmask 135
|
||||
#define __NR_rt_sigpending 136
|
||||
#define __NR_rt_sigtimedwait 137
|
||||
#define __NR_rt_sigqueueinfo 138
|
||||
#define __NR_rt_sigreturn 139
|
||||
#define __NR_setpriority 140
|
||||
#define __NR_getpriority 141
|
||||
#define __NR_reboot 142
|
||||
#define __NR_setregid 143
|
||||
#define __NR_setgid 144
|
||||
#define __NR_setreuid 145
|
||||
#define __NR_setuid 146
|
||||
#define __NR_setresuid 147
|
||||
#define __NR_getresuid 148
|
||||
#define __NR_setresgid 149
|
||||
#define __NR_getresgid 150
|
||||
#define __NR_setfsuid 151
|
||||
#define __NR_setfsgid 152
|
||||
#define __NR_times 153
|
||||
#define __NR_setpgid 154
|
||||
#define __NR_getpgid 155
|
||||
#define __NR_getsid 156
|
||||
#define __NR_setsid 157
|
||||
#define __NR_getgroups 158
|
||||
#define __NR_setgroups 159
|
||||
#define __NR_uname 160
|
||||
#define __NR_sethostname 161
|
||||
#define __NR_setdomainname 162
|
||||
#define __NR_getrlimit 163
|
||||
#define __NR_setrlimit 164
|
||||
#define __NR_getrusage 165
|
||||
#define __NR_umask 166
|
||||
#define __NR_prctl 167
|
||||
#define __NR_getcpu 168
|
||||
#define __NR_gettimeofday 169
|
||||
#define __NR_settimeofday 170
|
||||
#define __NR_adjtimex 171
|
||||
#define __NR_getpid 172
|
||||
#define __NR_getppid 173
|
||||
#define __NR_getuid 174
|
||||
#define __NR_geteuid 175
|
||||
#define __NR_getgid 176
|
||||
#define __NR_getegid 177
|
||||
#define __NR_gettid 178
|
||||
#define __NR_sysinfo 179
|
||||
#define __NR_mq_open 180
|
||||
#define __NR_mq_unlink 181
|
||||
#define __NR_mq_timedsend 182
|
||||
#define __NR_mq_timedreceive 183
|
||||
#define __NR_mq_notify 184
|
||||
#define __NR_mq_getsetattr 185
|
||||
#define __NR_msgget 186
|
||||
#define __NR_msgctl 187
|
||||
#define __NR_msgrcv 188
|
||||
#define __NR_msgsnd 189
|
||||
#define __NR_semget 190
|
||||
#define __NR_semctl 191
|
||||
#define __NR_semtimedop 192
|
||||
#define __NR_semop 193
|
||||
#define __NR_shmget 194
|
||||
#define __NR_shmctl 195
|
||||
#define __NR_shmat 196
|
||||
#define __NR_shmdt 197
|
||||
#define __NR_socket 198
|
||||
#define __NR_socketpair 199
|
||||
#define __NR_bind 200
|
||||
#define __NR_listen 201
|
||||
#define __NR_accept 202
|
||||
#define __NR_connect 203
|
||||
#define __NR_getsockname 204
|
||||
#define __NR_getpeername 205
|
||||
#define __NR_sendto 206
|
||||
#define __NR_recvfrom 207
|
||||
#define __NR_setsockopt 208
|
||||
#define __NR_getsockopt 209
|
||||
#define __NR_shutdown 210
|
||||
#define __NR_sendmsg 211
|
||||
#define __NR_recvmsg 212
|
||||
#define __NR_readahead 213
|
||||
#define __NR_brk 214
|
||||
#define __NR_munmap 215
|
||||
#define __NR_mremap 216
|
||||
#define __NR_add_key 217
|
||||
#define __NR_request_key 218
|
||||
#define __NR_keyctl 219
|
||||
#define __NR_clone 220
|
||||
#define __NR_execve 221
|
||||
#define __NR_mmap 222
|
||||
#define __NR_fadvise64 223
|
||||
#define __NR_swapon 224
|
||||
#define __NR_swapoff 225
|
||||
#define __NR_mprotect 226
|
||||
#define __NR_msync 227
|
||||
#define __NR_mlock 228
|
||||
#define __NR_munlock 229
|
||||
#define __NR_mlockall 230
|
||||
#define __NR_munlockall 231
|
||||
#define __NR_mincore 232
|
||||
#define __NR_madvise 233
|
||||
#define __NR_remap_file_pages 234
|
||||
#define __NR_mbind 235
|
||||
#define __NR_get_mempolicy 236
|
||||
#define __NR_set_mempolicy 237
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_move_pages 239
|
||||
#define __NR_rt_tgsigqueueinfo 240
|
||||
#define __NR_perf_event_open 241
|
||||
#define __NR_accept4 242
|
||||
#define __NR_recvmmsg 243
|
||||
#define __NR_wait4 260
|
||||
#define __NR_prlimit64 261
|
||||
#define __NR_fanotify_init 262
|
||||
#define __NR_fanotify_mark 263
|
||||
#define __NR_name_to_handle_at 264
|
||||
#define __NR_open_by_handle_at 265
|
||||
#define __NR_clock_adjtime 266
|
||||
#define __NR_syncfs 267
|
||||
#define __NR_setns 268
|
||||
#define __NR_sendmmsg 269
|
||||
#define __NR_process_vm_readv 270
|
||||
#define __NR_process_vm_writev 271
|
||||
#define __NR_kcmp 272
|
||||
#define __NR_finit_module 273
|
||||
#define __NR_sched_setattr 274
|
||||
#define __NR_sched_getattr 275
|
||||
#define __NR_renameat2 276
|
||||
#define __NR_seccomp 277
|
||||
#define __NR_getrandom 278
|
||||
#define __NR_memfd_create 279
|
||||
#define __NR_bpf 280
|
||||
#define __NR_execveat 281
|
||||
#define __NR_userfaultfd 282
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_mlock2 284
|
||||
#define __NR_copy_file_range 285
|
||||
#define __NR_preadv2 286
|
||||
#define __NR_pwritev2 287
|
||||
#define __NR_pkey_mprotect 288
|
||||
#define __NR_pkey_alloc 289
|
||||
#define __NR_pkey_free 290
|
||||
#define __NR_statx 291
|
||||
#define __NR_io_pgetevents 292
|
||||
|
||||
#define SYS_io_setup 0
|
||||
#define SYS_io_destroy 1
|
||||
#define SYS_io_submit 2
|
||||
#define SYS_io_cancel 3
|
||||
#define SYS_io_getevents 4
|
||||
#define SYS_setxattr 5
|
||||
#define SYS_lsetxattr 6
|
||||
#define SYS_fsetxattr 7
|
||||
#define SYS_getxattr 8
|
||||
#define SYS_lgetxattr 9
|
||||
#define SYS_fgetxattr 10
|
||||
#define SYS_listxattr 11
|
||||
#define SYS_llistxattr 12
|
||||
#define SYS_flistxattr 13
|
||||
#define SYS_removexattr 14
|
||||
#define SYS_lremovexattr 15
|
||||
#define SYS_fremovexattr 16
|
||||
#define SYS_getcwd 17
|
||||
#define SYS_lookup_dcookie 18
|
||||
#define SYS_eventfd2 19
|
||||
#define SYS_epoll_create1 20
|
||||
#define SYS_epoll_ctl 21
|
||||
#define SYS_epoll_pwait 22
|
||||
#define SYS_dup 23
|
||||
#define SYS_dup3 24
|
||||
#define SYS_fcntl 25
|
||||
#define SYS_inotify_init1 26
|
||||
#define SYS_inotify_add_watch 27
|
||||
#define SYS_inotify_rm_watch 28
|
||||
#define SYS_ioctl 29
|
||||
#define SYS_ioprio_set 30
|
||||
#define SYS_ioprio_get 31
|
||||
#define SYS_flock 32
|
||||
#define SYS_mknodat 33
|
||||
#define SYS_mkdirat 34
|
||||
#define SYS_unlinkat 35
|
||||
#define SYS_symlinkat 36
|
||||
#define SYS_linkat 37
|
||||
#define SYS_renameat 38
|
||||
#define SYS_umount2 39
|
||||
#define SYS_mount 40
|
||||
#define SYS_pivot_root 41
|
||||
#define SYS_nfsservctl 42
|
||||
#define SYS_statfs 43
|
||||
#define SYS_fstatfs 44
|
||||
#define SYS_truncate 45
|
||||
#define SYS_ftruncate 46
|
||||
#define SYS_fallocate 47
|
||||
#define SYS_faccessat 48
|
||||
#define SYS_chdir 49
|
||||
#define SYS_fchdir 50
|
||||
#define SYS_chroot 51
|
||||
#define SYS_fchmod 52
|
||||
#define SYS_fchmodat 53
|
||||
#define SYS_fchownat 54
|
||||
#define SYS_fchown 55
|
||||
#define SYS_openat 56
|
||||
#define SYS_close 57
|
||||
#define SYS_vhangup 58
|
||||
#define SYS_pipe2 59
|
||||
#define SYS_quotactl 60
|
||||
#define SYS_getdents64 61
|
||||
#define SYS_lseek 62
|
||||
#define SYS_read 63
|
||||
#define SYS_write 64
|
||||
#define SYS_readv 65
|
||||
#define SYS_writev 66
|
||||
#define SYS_pread64 67
|
||||
#define SYS_pwrite64 68
|
||||
#define SYS_preadv 69
|
||||
#define SYS_pwritev 70
|
||||
#define SYS_sendfile 71
|
||||
#define SYS_pselect6 72
|
||||
#define SYS_ppoll 73
|
||||
#define SYS_signalfd4 74
|
||||
#define SYS_vmsplice 75
|
||||
#define SYS_splice 76
|
||||
#define SYS_tee 77
|
||||
#define SYS_readlinkat 78
|
||||
#define SYS_newfstatat 79
|
||||
#define SYS_fstat 80
|
||||
#define SYS_sync 81
|
||||
#define SYS_fsync 82
|
||||
#define SYS_fdatasync 83
|
||||
#define SYS_sync_file_range 84
|
||||
#define SYS_timerfd_create 85
|
||||
#define SYS_timerfd_settime 86
|
||||
#define SYS_timerfd_gettime 87
|
||||
#define SYS_utimensat 88
|
||||
#define SYS_acct 89
|
||||
#define SYS_capget 90
|
||||
#define SYS_capset 91
|
||||
#define SYS_personality 92
|
||||
#define SYS_exit 93
|
||||
#define SYS_exit_group 94
|
||||
#define SYS_waitid 95
|
||||
#define SYS_set_tid_address 96
|
||||
#define SYS_unshare 97
|
||||
#define SYS_futex 98
|
||||
#define SYS_set_robust_list 99
|
||||
#define SYS_get_robust_list 100
|
||||
#define SYS_nanosleep 101
|
||||
#define SYS_getitimer 102
|
||||
#define SYS_setitimer 103
|
||||
#define SYS_kexec_load 104
|
||||
#define SYS_init_module 105
|
||||
#define SYS_delete_module 106
|
||||
#define SYS_timer_create 107
|
||||
#define SYS_timer_gettime 108
|
||||
#define SYS_timer_getoverrun 109
|
||||
#define SYS_timer_settime 110
|
||||
#define SYS_timer_delete 111
|
||||
#define SYS_clock_settime 112
|
||||
#define SYS_clock_gettime 113
|
||||
#define SYS_clock_getres 114
|
||||
#define SYS_clock_nanosleep 115
|
||||
#define SYS_syslog 116
|
||||
#define SYS_ptrace 117
|
||||
#define SYS_sched_setparam 118
|
||||
#define SYS_sched_setscheduler 119
|
||||
#define SYS_sched_getscheduler 120
|
||||
#define SYS_sched_getparam 121
|
||||
#define SYS_sched_setaffinity 122
|
||||
#define SYS_sched_getaffinity 123
|
||||
#define SYS_sched_yield 124
|
||||
#define SYS_sched_get_priority_max 125
|
||||
#define SYS_sched_get_priority_min 126
|
||||
#define SYS_sched_rr_get_interval 127
|
||||
#define SYS_restart_syscall 128
|
||||
#define SYS_kill 129
|
||||
#define SYS_tkill 130
|
||||
#define SYS_tgkill 131
|
||||
#define SYS_sigaltstack 132
|
||||
#define SYS_rt_sigsuspend 133
|
||||
#define SYS_rt_sigaction 134
|
||||
#define SYS_rt_sigprocmask 135
|
||||
#define SYS_rt_sigpending 136
|
||||
#define SYS_rt_sigtimedwait 137
|
||||
#define SYS_rt_sigqueueinfo 138
|
||||
#define SYS_rt_sigreturn 139
|
||||
#define SYS_setpriority 140
|
||||
#define SYS_getpriority 141
|
||||
#define SYS_reboot 142
|
||||
#define SYS_setregid 143
|
||||
#define SYS_setgid 144
|
||||
#define SYS_setreuid 145
|
||||
#define SYS_setuid 146
|
||||
#define SYS_setresuid 147
|
||||
#define SYS_getresuid 148
|
||||
#define SYS_setresgid 149
|
||||
#define SYS_getresgid 150
|
||||
#define SYS_setfsuid 151
|
||||
#define SYS_setfsgid 152
|
||||
#define SYS_times 153
|
||||
#define SYS_setpgid 154
|
||||
#define SYS_getpgid 155
|
||||
#define SYS_getsid 156
|
||||
#define SYS_setsid 157
|
||||
#define SYS_getgroups 158
|
||||
#define SYS_setgroups 159
|
||||
#define SYS_uname 160
|
||||
#define SYS_sethostname 161
|
||||
#define SYS_setdomainname 162
|
||||
#define SYS_getrlimit 163
|
||||
#define SYS_setrlimit 164
|
||||
#define SYS_getrusage 165
|
||||
#define SYS_umask 166
|
||||
#define SYS_prctl 167
|
||||
#define SYS_getcpu 168
|
||||
#define SYS_gettimeofday 169
|
||||
#define SYS_settimeofday 170
|
||||
#define SYS_adjtimex 171
|
||||
#define SYS_getpid 172
|
||||
#define SYS_getppid 173
|
||||
#define SYS_getuid 174
|
||||
#define SYS_geteuid 175
|
||||
#define SYS_getgid 176
|
||||
#define SYS_getegid 177
|
||||
#define SYS_gettid 178
|
||||
#define SYS_sysinfo 179
|
||||
#define SYS_mq_open 180
|
||||
#define SYS_mq_unlink 181
|
||||
#define SYS_mq_timedsend 182
|
||||
#define SYS_mq_timedreceive 183
|
||||
#define SYS_mq_notify 184
|
||||
#define SYS_mq_getsetattr 185
|
||||
#define SYS_msgget 186
|
||||
#define SYS_msgctl 187
|
||||
#define SYS_msgrcv 188
|
||||
#define SYS_msgsnd 189
|
||||
#define SYS_semget 190
|
||||
#define SYS_semctl 191
|
||||
#define SYS_semtimedop 192
|
||||
#define SYS_semop 193
|
||||
#define SYS_shmget 194
|
||||
#define SYS_shmctl 195
|
||||
#define SYS_shmat 196
|
||||
#define SYS_shmdt 197
|
||||
#define SYS_socket 198
|
||||
#define SYS_socketpair 199
|
||||
#define SYS_bind 200
|
||||
#define SYS_listen 201
|
||||
#define SYS_accept 202
|
||||
#define SYS_connect 203
|
||||
#define SYS_getsockname 204
|
||||
#define SYS_getpeername 205
|
||||
#define SYS_sendto 206
|
||||
#define SYS_recvfrom 207
|
||||
#define SYS_setsockopt 208
|
||||
#define SYS_getsockopt 209
|
||||
#define SYS_shutdown 210
|
||||
#define SYS_sendmsg 211
|
||||
#define SYS_recvmsg 212
|
||||
#define SYS_readahead 213
|
||||
#define SYS_brk 214
|
||||
#define SYS_munmap 215
|
||||
#define SYS_mremap 216
|
||||
#define SYS_add_key 217
|
||||
#define SYS_request_key 218
|
||||
#define SYS_keyctl 219
|
||||
#define SYS_clone 220
|
||||
#define SYS_execve 221
|
||||
#define SYS_mmap 222
|
||||
#define SYS_fadvise64 223
|
||||
#define SYS_swapon 224
|
||||
#define SYS_swapoff 225
|
||||
#define SYS_mprotect 226
|
||||
#define SYS_msync 227
|
||||
#define SYS_mlock 228
|
||||
#define SYS_munlock 229
|
||||
#define SYS_mlockall 230
|
||||
#define SYS_munlockall 231
|
||||
#define SYS_mincore 232
|
||||
#define SYS_madvise 233
|
||||
#define SYS_remap_file_pages 234
|
||||
#define SYS_mbind 235
|
||||
#define SYS_get_mempolicy 236
|
||||
#define SYS_set_mempolicy 237
|
||||
#define SYS_migrate_pages 238
|
||||
#define SYS_move_pages 239
|
||||
#define SYS_rt_tgsigqueueinfo 240
|
||||
#define SYS_perf_event_open 241
|
||||
#define SYS_accept4 242
|
||||
#define SYS_recvmmsg 243
|
||||
#define SYS_wait4 260
|
||||
#define SYS_prlimit64 261
|
||||
#define SYS_fanotify_init 262
|
||||
#define SYS_fanotify_mark 263
|
||||
#define SYS_name_to_handle_at 264
|
||||
#define SYS_open_by_handle_at 265
|
||||
#define SYS_clock_adjtime 266
|
||||
#define SYS_syncfs 267
|
||||
#define SYS_setns 268
|
||||
#define SYS_sendmmsg 269
|
||||
#define SYS_process_vm_readv 270
|
||||
#define SYS_process_vm_writev 271
|
||||
#define SYS_kcmp 272
|
||||
#define SYS_finit_module 273
|
||||
#define SYS_sched_setattr 274
|
||||
#define SYS_sched_getattr 275
|
||||
#define SYS_renameat2 276
|
||||
#define SYS_seccomp 277
|
||||
#define SYS_getrandom 278
|
||||
#define SYS_memfd_create 279
|
||||
#define SYS_bpf 280
|
||||
#define SYS_execveat 281
|
||||
#define SYS_userfaultfd 282
|
||||
#define SYS_membarrier 283
|
||||
#define SYS_mlock2 284
|
||||
#define SYS_copy_file_range 285
|
||||
#define SYS_preadv2 286
|
||||
#define SYS_pwritev2 287
|
||||
#define SYS_pkey_mprotect 288
|
||||
#define SYS_pkey_alloc 289
|
||||
#define SYS_pkey_free 290
|
||||
#define SYS_statx 291
|
||||
#define SYS_io_pgetevents 292
|
16
libc/include/aarch64-linux-musleabi/bits/user.h
Normal file
16
libc/include/aarch64-linux-musleabi/bits/user.h
Normal file
@ -0,0 +1,16 @@
|
||||
struct user_regs_struct {
|
||||
unsigned long long regs[31];
|
||||
unsigned long long sp;
|
||||
unsigned long long pc;
|
||||
unsigned long long pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
};
|
||||
|
||||
#define ELF_NREG 34
|
||||
typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
|
||||
typedef struct user_fpsimd_struct elf_fpregset_t;
|
26
libc/include/aarch64_be-linux-musl/asm/auxvec.h
Normal file
26
libc/include/aarch64_be-linux-musl/asm/auxvec.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_AUXVEC_H
|
||||
#define __ASM_AUXVEC_H
|
||||
|
||||
/* vDSO location */
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */
|
||||
|
||||
#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */
|
||||
|
||||
#endif
|
24
libc/include/aarch64_be-linux-musl/asm/bitsperlong.h
Normal file
24
libc/include/aarch64_be-linux-musl/asm/bitsperlong.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_BITSPERLONG_H
|
||||
#define __ASM_BITSPERLONG_H
|
||||
|
||||
#define __BITS_PER_LONG 64
|
||||
|
||||
#include <asm-generic/bitsperlong.h>
|
||||
|
||||
#endif /* __ASM_BITSPERLONG_H */
|
9
libc/include/aarch64_be-linux-musl/asm/bpf_perf_event.h
Normal file
9
libc/include/aarch64_be-linux-musl/asm/bpf_perf_event.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ASM_BPF_PERF_EVENT_H__
|
||||
#define __ASM_BPF_PERF_EVENT_H__
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
typedef struct user_pt_regs bpf_user_pt_regs_t;
|
||||
|
||||
#endif /* __ASM_BPF_PERF_EVENT_H__ */
|
26
libc/include/aarch64_be-linux-musl/asm/byteorder.h
Normal file
26
libc/include/aarch64_be-linux-musl/asm/byteorder.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_BYTEORDER_H
|
||||
#define __ASM_BYTEORDER_H
|
||||
|
||||
#ifdef __AARCH64EB__
|
||||
#include <linux/byteorder/big_endian.h>
|
||||
#else
|
||||
#include <linux/byteorder/little_endian.h>
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_BYTEORDER_H */
|
30
libc/include/aarch64_be-linux-musl/asm/fcntl.h
Normal file
30
libc/include/aarch64_be-linux-musl/asm/fcntl.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_FCNTL_H
|
||||
#define __ASM_FCNTL_H
|
||||
|
||||
/*
|
||||
* Using our own definitions for AArch32 (compat) support.
|
||||
*/
|
||||
#define O_DIRECTORY 040000 /* must be a directory */
|
||||
#define O_NOFOLLOW 0100000 /* don't follow links */
|
||||
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
|
||||
#define O_LARGEFILE 0400000
|
||||
|
||||
#include <asm-generic/fcntl.h>
|
||||
|
||||
#endif
|
52
libc/include/aarch64_be-linux-musl/asm/hwcap.h
Normal file
52
libc/include/aarch64_be-linux-musl/asm/hwcap.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_HWCAP_H
|
||||
#define __ASM_HWCAP_H
|
||||
|
||||
/*
|
||||
* HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP
|
||||
*/
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
|
||||
#endif /* __ASM_HWCAP_H */
|
310
libc/include/aarch64_be-linux-musl/asm/kvm.h
Normal file
310
libc/include/aarch64_be-linux-musl/asm/kvm.h
Normal file
@ -0,0 +1,310 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012,2013 - ARM Ltd
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* Derived from arch/arm/include/uapi/asm/kvm.h:
|
||||
* Copyright (C) 2012 - Virtual Open Systems and Columbia University
|
||||
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ARM_KVM_H__
|
||||
#define __ARM_KVM_H__
|
||||
|
||||
#define KVM_SPSR_EL1 0
|
||||
#define KVM_SPSR_SVC KVM_SPSR_EL1
|
||||
#define KVM_SPSR_ABT 1
|
||||
#define KVM_SPSR_UND 2
|
||||
#define KVM_SPSR_IRQ 3
|
||||
#define KVM_SPSR_FIQ 4
|
||||
#define KVM_NR_SPSR 5
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/psci.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#define __KVM_HAVE_GUEST_DEBUG
|
||||
#define __KVM_HAVE_IRQ_LINE
|
||||
#define __KVM_HAVE_READONLY_MEM
|
||||
#define __KVM_HAVE_VCPU_EVENTS
|
||||
|
||||
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
|
||||
|
||||
#define KVM_REG_SIZE(id) \
|
||||
(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
|
||||
|
||||
struct kvm_regs {
|
||||
struct user_pt_regs regs; /* sp = sp_el0 */
|
||||
|
||||
__u64 sp_el1;
|
||||
__u64 elr_el1;
|
||||
|
||||
__u64 spsr[KVM_NR_SPSR];
|
||||
|
||||
struct user_fpsimd_state fp_regs;
|
||||
};
|
||||
|
||||
/*
|
||||
* Supported CPU Targets - Adding a new target type is not recommended,
|
||||
* unless there are some special registers not supported by the
|
||||
* genericv8 syreg table.
|
||||
*/
|
||||
#define KVM_ARM_TARGET_AEM_V8 0
|
||||
#define KVM_ARM_TARGET_FOUNDATION_V8 1
|
||||
#define KVM_ARM_TARGET_CORTEX_A57 2
|
||||
#define KVM_ARM_TARGET_XGENE_POTENZA 3
|
||||
#define KVM_ARM_TARGET_CORTEX_A53 4
|
||||
/* Generic ARM v8 target */
|
||||
#define KVM_ARM_TARGET_GENERIC_V8 5
|
||||
|
||||
#define KVM_ARM_NUM_TARGETS 6
|
||||
|
||||
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
|
||||
#define KVM_ARM_DEVICE_TYPE_SHIFT 0
|
||||
#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT)
|
||||
#define KVM_ARM_DEVICE_ID_SHIFT 16
|
||||
#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT)
|
||||
|
||||
/* Supported device IDs */
|
||||
#define KVM_ARM_DEVICE_VGIC_V2 0
|
||||
|
||||
/* Supported VGIC address types */
|
||||
#define KVM_VGIC_V2_ADDR_TYPE_DIST 0
|
||||
#define KVM_VGIC_V2_ADDR_TYPE_CPU 1
|
||||
|
||||
#define KVM_VGIC_V2_DIST_SIZE 0x1000
|
||||
#define KVM_VGIC_V2_CPU_SIZE 0x2000
|
||||
|
||||
/* Supported VGICv3 address types */
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
|
||||
#define KVM_VGIC_ITS_ADDR_TYPE 4
|
||||
#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5
|
||||
|
||||
#define KVM_VGIC_V3_DIST_SIZE SZ_64K
|
||||
#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
|
||||
#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K)
|
||||
|
||||
#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
|
||||
#define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */
|
||||
#define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */
|
||||
#define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */
|
||||
|
||||
struct kvm_vcpu_init {
|
||||
__u32 target;
|
||||
__u32 features[7];
|
||||
};
|
||||
|
||||
struct kvm_sregs {
|
||||
};
|
||||
|
||||
struct kvm_fpu {
|
||||
};
|
||||
|
||||
/*
|
||||
* See v8 ARM ARM D7.3: Debug Registers
|
||||
*
|
||||
* The architectural limit is 16 debug registers of each type although
|
||||
* in practice there are usually less (see ID_AA64DFR0_EL1).
|
||||
*
|
||||
* Although the control registers are architecturally defined as 32
|
||||
* bits wide we use a 64 bit structure here to keep parity with
|
||||
* KVM_GET/SET_ONE_REG behaviour which treats all system registers as
|
||||
* 64 bit values. It also allows for the possibility of the
|
||||
* architecture expanding the control registers without having to
|
||||
* change the userspace ABI.
|
||||
*/
|
||||
#define KVM_ARM_MAX_DBG_REGS 16
|
||||
struct kvm_guest_debug_arch {
|
||||
__u64 dbg_bcr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_bvr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_wcr[KVM_ARM_MAX_DBG_REGS];
|
||||
__u64 dbg_wvr[KVM_ARM_MAX_DBG_REGS];
|
||||
};
|
||||
|
||||
struct kvm_debug_exit_arch {
|
||||
__u32 hsr;
|
||||
__u64 far; /* used for watchpoints */
|
||||
};
|
||||
|
||||
/*
|
||||
* Architecture specific defines for kvm_guest_debug->control
|
||||
*/
|
||||
|
||||
#define KVM_GUESTDBG_USE_SW_BP (1 << 16)
|
||||
#define KVM_GUESTDBG_USE_HW (1 << 17)
|
||||
|
||||
struct kvm_sync_regs {
|
||||
/* Used with KVM_CAP_ARM_USER_IRQ */
|
||||
__u64 device_irq_level;
|
||||
};
|
||||
|
||||
struct kvm_arch_memory_slot {
|
||||
};
|
||||
|
||||
/* for KVM_GET/SET_VCPU_EVENTS */
|
||||
struct kvm_vcpu_events {
|
||||
struct {
|
||||
__u8 serror_pending;
|
||||
__u8 serror_has_esr;
|
||||
/* Align it to 8 bytes */
|
||||
__u8 pad[6];
|
||||
__u64 serror_esr;
|
||||
} exception;
|
||||
__u32 reserved[12];
|
||||
};
|
||||
|
||||
/* If you need to interpret the index values, here is the key: */
|
||||
#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000
|
||||
#define KVM_REG_ARM_COPROC_SHIFT 16
|
||||
|
||||
/* Normal registers are mapped as coprocessor 16. */
|
||||
#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / sizeof(__u32))
|
||||
|
||||
/* Some registers need more space to represent values. */
|
||||
#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00
|
||||
#define KVM_REG_ARM_DEMUX_ID_SHIFT 8
|
||||
#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT)
|
||||
#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF
|
||||
#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0
|
||||
|
||||
/* AArch64 system registers */
|
||||
#define KVM_REG_ARM64_SYSREG (0x0013 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000
|
||||
#define KVM_REG_ARM64_SYSREG_OP0_SHIFT 14
|
||||
#define KVM_REG_ARM64_SYSREG_OP1_MASK 0x0000000000003800
|
||||
#define KVM_REG_ARM64_SYSREG_OP1_SHIFT 11
|
||||
#define KVM_REG_ARM64_SYSREG_CRN_MASK 0x0000000000000780
|
||||
#define KVM_REG_ARM64_SYSREG_CRN_SHIFT 7
|
||||
#define KVM_REG_ARM64_SYSREG_CRM_MASK 0x0000000000000078
|
||||
#define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3
|
||||
#define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007
|
||||
#define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0
|
||||
|
||||
#define ARM64_SYS_REG_SHIFT_MASK(x,n) \
|
||||
(((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & \
|
||||
KVM_REG_ARM64_SYSREG_ ## n ## _MASK)
|
||||
|
||||
#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) \
|
||||
(KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | \
|
||||
ARM64_SYS_REG_SHIFT_MASK(op2, OP2))
|
||||
|
||||
#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64)
|
||||
|
||||
/* Physical Timer EL0 Registers */
|
||||
#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1)
|
||||
#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2)
|
||||
#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1)
|
||||
|
||||
/* EL0 Virtual Timer Registers */
|
||||
#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1)
|
||||
#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
|
||||
#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
|
||||
|
||||
/* KVM-as-firmware specific pseudo-registers */
|
||||
#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT)
|
||||
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \
|
||||
KVM_REG_ARM_FW | ((r) & 0xffff))
|
||||
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
|
||||
|
||||
/* Device Control API: ARM VGIC */
|
||||
#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
|
||||
#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2
|
||||
#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32
|
||||
#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT 32
|
||||
#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \
|
||||
(0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0
|
||||
#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff)
|
||||
#define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CTRL 4
|
||||
#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
|
||||
#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
|
||||
#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
|
||||
(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
|
||||
#define VGIC_LEVEL_INFO_LINE_LEVEL 0
|
||||
|
||||
#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
|
||||
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
|
||||
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
|
||||
#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
|
||||
#define KVM_DEV_ARM_ITS_CTRL_RESET 4
|
||||
|
||||
/* Device Control API on vcpu fd */
|
||||
#define KVM_ARM_VCPU_PMU_V3_CTRL 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_IRQ 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_INIT 1
|
||||
#define KVM_ARM_VCPU_TIMER_CTRL 1
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1
|
||||
|
||||
/* KVM_IRQ_LINE irq field index values */
|
||||
#define KVM_ARM_IRQ_TYPE_SHIFT 24
|
||||
#define KVM_ARM_IRQ_TYPE_MASK 0xff
|
||||
#define KVM_ARM_IRQ_VCPU_SHIFT 16
|
||||
#define KVM_ARM_IRQ_VCPU_MASK 0xff
|
||||
#define KVM_ARM_IRQ_NUM_SHIFT 0
|
||||
#define KVM_ARM_IRQ_NUM_MASK 0xffff
|
||||
|
||||
/* irq_type field */
|
||||
#define KVM_ARM_IRQ_TYPE_CPU 0
|
||||
#define KVM_ARM_IRQ_TYPE_SPI 1
|
||||
#define KVM_ARM_IRQ_TYPE_PPI 2
|
||||
|
||||
/* out-of-kernel GIC cpu interrupt injection irq_number field */
|
||||
#define KVM_ARM_IRQ_CPU_IRQ 0
|
||||
#define KVM_ARM_IRQ_CPU_FIQ 1
|
||||
|
||||
/*
|
||||
* This used to hold the highest supported SPI, but it is now obsolete
|
||||
* and only here to provide source code level compatibility with older
|
||||
* userland. The highest SPI number can be set via KVM_DEV_ARM_VGIC_GRP_NR_IRQS.
|
||||
*/
|
||||
#define KVM_ARM_IRQ_GIC_MAX 127
|
||||
|
||||
/* One single KVM irqchip, ie. the VGIC */
|
||||
#define KVM_NR_IRQCHIPS 1
|
||||
|
||||
/* PSCI interface */
|
||||
#define KVM_PSCI_FN_BASE 0x95c1ba5e
|
||||
#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n))
|
||||
|
||||
#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0)
|
||||
#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1)
|
||||
#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)
|
||||
#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3)
|
||||
|
||||
#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS
|
||||
#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED
|
||||
#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS
|
||||
#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ARM_KVM_H__ */
|
1
libc/include/aarch64_be-linux-musl/asm/kvm_para.h
Normal file
1
libc/include/aarch64_be-linux-musl/asm/kvm_para.h
Normal file
@ -0,0 +1 @@
|
||||
#include <asm-generic/kvm_para.h>
|
24
libc/include/aarch64_be-linux-musl/asm/param.h
Normal file
24
libc/include/aarch64_be-linux-musl/asm/param.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_PARAM_H
|
||||
#define __ASM_PARAM_H
|
||||
|
||||
#define EXEC_PAGESIZE 65536
|
||||
|
||||
#include <asm-generic/param.h>
|
||||
|
||||
#endif
|
41
libc/include/aarch64_be-linux-musl/asm/perf_regs.h
Normal file
41
libc/include/aarch64_be-linux-musl/asm/perf_regs.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_ARM64_PERF_REGS_H
|
||||
#define _ASM_ARM64_PERF_REGS_H
|
||||
|
||||
enum perf_event_arm_regs {
|
||||
PERF_REG_ARM64_X0,
|
||||
PERF_REG_ARM64_X1,
|
||||
PERF_REG_ARM64_X2,
|
||||
PERF_REG_ARM64_X3,
|
||||
PERF_REG_ARM64_X4,
|
||||
PERF_REG_ARM64_X5,
|
||||
PERF_REG_ARM64_X6,
|
||||
PERF_REG_ARM64_X7,
|
||||
PERF_REG_ARM64_X8,
|
||||
PERF_REG_ARM64_X9,
|
||||
PERF_REG_ARM64_X10,
|
||||
PERF_REG_ARM64_X11,
|
||||
PERF_REG_ARM64_X12,
|
||||
PERF_REG_ARM64_X13,
|
||||
PERF_REG_ARM64_X14,
|
||||
PERF_REG_ARM64_X15,
|
||||
PERF_REG_ARM64_X16,
|
||||
PERF_REG_ARM64_X17,
|
||||
PERF_REG_ARM64_X18,
|
||||
PERF_REG_ARM64_X19,
|
||||
PERF_REG_ARM64_X20,
|
||||
PERF_REG_ARM64_X21,
|
||||
PERF_REG_ARM64_X22,
|
||||
PERF_REG_ARM64_X23,
|
||||
PERF_REG_ARM64_X24,
|
||||
PERF_REG_ARM64_X25,
|
||||
PERF_REG_ARM64_X26,
|
||||
PERF_REG_ARM64_X27,
|
||||
PERF_REG_ARM64_X28,
|
||||
PERF_REG_ARM64_X29,
|
||||
PERF_REG_ARM64_LR,
|
||||
PERF_REG_ARM64_SP,
|
||||
PERF_REG_ARM64_PC,
|
||||
PERF_REG_ARM64_MAX,
|
||||
};
|
||||
#endif /* _ASM_ARM64_PERF_REGS_H */
|
11
libc/include/aarch64_be-linux-musl/asm/posix_types.h
Normal file
11
libc/include/aarch64_be-linux-musl/asm/posix_types.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_POSIX_TYPES_H
|
||||
#define __ASM_POSIX_TYPES_H
|
||||
|
||||
typedef unsigned short __kernel_old_uid_t;
|
||||
typedef unsigned short __kernel_old_gid_t;
|
||||
#define __kernel_old_uid_t __kernel_old_uid_t
|
||||
|
||||
#include <asm-generic/posix_types.h>
|
||||
|
||||
#endif /* __ASM_POSIX_TYPES_H */
|
233
libc/include/aarch64_be-linux-musl/asm/ptrace.h
Normal file
233
libc/include/aarch64_be-linux-musl/asm/ptrace.h
Normal file
@ -0,0 +1,233 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Based on arch/arm/include/asm/ptrace.h
|
||||
*
|
||||
* Copyright (C) 1996-2003 Russell King
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_PTRACE_H
|
||||
#define __ASM_PTRACE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/hwcap.h>
|
||||
#include <asm/sigcontext.h>
|
||||
|
||||
|
||||
/*
|
||||
* PSR bits
|
||||
*/
|
||||
#define PSR_MODE_EL0t 0x00000000
|
||||
#define PSR_MODE_EL1t 0x00000004
|
||||
#define PSR_MODE_EL1h 0x00000005
|
||||
#define PSR_MODE_EL2t 0x00000008
|
||||
#define PSR_MODE_EL2h 0x00000009
|
||||
#define PSR_MODE_EL3t 0x0000000c
|
||||
#define PSR_MODE_EL3h 0x0000000d
|
||||
#define PSR_MODE_MASK 0x0000000f
|
||||
|
||||
/* AArch32 CPSR bits */
|
||||
#define PSR_MODE32_BIT 0x00000010
|
||||
|
||||
/* AArch64 SPSR bits */
|
||||
#define PSR_F_BIT 0x00000040
|
||||
#define PSR_I_BIT 0x00000080
|
||||
#define PSR_A_BIT 0x00000100
|
||||
#define PSR_D_BIT 0x00000200
|
||||
#define PSR_PAN_BIT 0x00400000
|
||||
#define PSR_UAO_BIT 0x00800000
|
||||
#define PSR_V_BIT 0x10000000
|
||||
#define PSR_C_BIT 0x20000000
|
||||
#define PSR_Z_BIT 0x40000000
|
||||
#define PSR_N_BIT 0x80000000
|
||||
|
||||
/*
|
||||
* Groups of PSR bits
|
||||
*/
|
||||
#define PSR_f 0xff000000 /* Flags */
|
||||
#define PSR_s 0x00ff0000 /* Status */
|
||||
#define PSR_x 0x0000ff00 /* Extension */
|
||||
#define PSR_c 0x000000ff /* Control */
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/prctl.h>
|
||||
|
||||
/*
|
||||
* User structures for general purpose, floating point and debug registers.
|
||||
*/
|
||||
struct user_pt_regs {
|
||||
__u64 regs[31];
|
||||
__u64 sp;
|
||||
__u64 pc;
|
||||
__u64 pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_state {
|
||||
__uint128_t vregs[32];
|
||||
__u32 fpsr;
|
||||
__u32 fpcr;
|
||||
__u32 __reserved[2];
|
||||
};
|
||||
|
||||
struct user_hwdebug_state {
|
||||
__u32 dbg_info;
|
||||
__u32 pad;
|
||||
struct {
|
||||
__u64 addr;
|
||||
__u32 ctrl;
|
||||
__u32 pad;
|
||||
} dbg_regs[16];
|
||||
};
|
||||
|
||||
/* SVE/FP/SIMD state (NT_ARM_SVE) */
|
||||
|
||||
struct user_sve_header {
|
||||
__u32 size; /* total meaningful regset content in bytes */
|
||||
__u32 max_size; /* maxmium possible size for this thread */
|
||||
__u16 vl; /* current vector length */
|
||||
__u16 max_vl; /* maximum possible vector length */
|
||||
__u16 flags;
|
||||
__u16 __reserved;
|
||||
};
|
||||
|
||||
/* Definitions for user_sve_header.flags: */
|
||||
#define SVE_PT_REGS_MASK (1 << 0)
|
||||
|
||||
#define SVE_PT_REGS_FPSIMD 0
|
||||
#define SVE_PT_REGS_SVE SVE_PT_REGS_MASK
|
||||
|
||||
/*
|
||||
* Common SVE_PT_* flags:
|
||||
* These must be kept in sync with prctl interface in <linux/ptrace.h>
|
||||
*/
|
||||
#define SVE_PT_VL_INHERIT (PR_SVE_VL_INHERIT >> 16)
|
||||
#define SVE_PT_VL_ONEXEC (PR_SVE_SET_VL_ONEXEC >> 16)
|
||||
|
||||
|
||||
/*
|
||||
* The remainder of the SVE state follows struct user_sve_header. The
|
||||
* total size of the SVE state (including header) depends on the
|
||||
* metadata in the header: SVE_PT_SIZE(vq, flags) gives the total size
|
||||
* of the state in bytes, including the header.
|
||||
*
|
||||
* Refer to <asm/sigcontext.h> for details of how to pass the correct
|
||||
* "vq" argument to these macros.
|
||||
*/
|
||||
|
||||
/* Offset from the start of struct user_sve_header to the register data */
|
||||
#define SVE_PT_REGS_OFFSET \
|
||||
((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
/*
|
||||
* The register data content and layout depends on the value of the
|
||||
* flags field.
|
||||
*/
|
||||
|
||||
/*
|
||||
* (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_FPSIMD case:
|
||||
*
|
||||
* The payload starts at offset SVE_PT_FPSIMD_OFFSET, and is of type
|
||||
* struct user_fpsimd_state. Additional data might be appended in the
|
||||
* future: use SVE_PT_FPSIMD_SIZE(vq, flags) to compute the total size.
|
||||
* SVE_PT_FPSIMD_SIZE(vq, flags) will never be less than
|
||||
* sizeof(struct user_fpsimd_state).
|
||||
*/
|
||||
|
||||
#define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET
|
||||
|
||||
#define SVE_PT_FPSIMD_SIZE(vq, flags) (sizeof(struct user_fpsimd_state))
|
||||
|
||||
/*
|
||||
* (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE case:
|
||||
*
|
||||
* The payload starts at offset SVE_PT_SVE_OFFSET, and is of size
|
||||
* SVE_PT_SVE_SIZE(vq, flags).
|
||||
*
|
||||
* Additional macros describe the contents and layout of the payload.
|
||||
* For each, SVE_PT_SVE_x_OFFSET(args) is the start offset relative to
|
||||
* the start of struct user_sve_header, and SVE_PT_SVE_x_SIZE(args) is
|
||||
* the size in bytes:
|
||||
*
|
||||
* x type description
|
||||
* - ---- -----------
|
||||
* ZREGS \
|
||||
* ZREG |
|
||||
* PREGS | refer to <asm/sigcontext.h>
|
||||
* PREG |
|
||||
* FFR /
|
||||
*
|
||||
* FPSR uint32_t FPSR
|
||||
* FPCR uint32_t FPCR
|
||||
*
|
||||
* Additional data might be appended in the future.
|
||||
*/
|
||||
|
||||
#define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq)
|
||||
#define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
#define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq)
|
||||
#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32)
|
||||
#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32)
|
||||
|
||||
#define __SVE_SIG_TO_PT(offset) \
|
||||
((offset) - SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET)
|
||||
|
||||
#define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET
|
||||
|
||||
#define SVE_PT_SVE_ZREGS_OFFSET \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_ZREGS_OFFSET)
|
||||
#define SVE_PT_SVE_ZREG_OFFSET(vq, n) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_ZREG_OFFSET(vq, n))
|
||||
#define SVE_PT_SVE_ZREGS_SIZE(vq) \
|
||||
(SVE_PT_SVE_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET)
|
||||
|
||||
#define SVE_PT_SVE_PREGS_OFFSET(vq) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_PREGS_OFFSET(vq))
|
||||
#define SVE_PT_SVE_PREG_OFFSET(vq, n) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_PREG_OFFSET(vq, n))
|
||||
#define SVE_PT_SVE_PREGS_SIZE(vq) \
|
||||
(SVE_PT_SVE_PREG_OFFSET(vq, SVE_NUM_PREGS) - \
|
||||
SVE_PT_SVE_PREGS_OFFSET(vq))
|
||||
|
||||
#define SVE_PT_SVE_FFR_OFFSET(vq) \
|
||||
__SVE_SIG_TO_PT(SVE_SIG_FFR_OFFSET(vq))
|
||||
|
||||
#define SVE_PT_SVE_FPSR_OFFSET(vq) \
|
||||
((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + \
|
||||
(SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
#define SVE_PT_SVE_FPCR_OFFSET(vq) \
|
||||
(SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE)
|
||||
|
||||
/*
|
||||
* Any future extension appended after FPCR must be aligned to the next
|
||||
* 128-bit boundary.
|
||||
*/
|
||||
|
||||
#define SVE_PT_SVE_SIZE(vq, flags) \
|
||||
((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \
|
||||
- SVE_PT_SVE_OFFSET + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_PT_SIZE(vq, flags) \
|
||||
(((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? \
|
||||
SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \
|
||||
: SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_PTRACE_H */
|
27
libc/include/aarch64_be-linux-musl/asm/setup.h
Normal file
27
libc/include/aarch64_be-linux-musl/asm/setup.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Based on arch/arm/include/asm/setup.h
|
||||
*
|
||||
* Copyright (C) 1997-1999 Russell King
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SETUP_H
|
||||
#define __ASM_SETUP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define COMMAND_LINE_SIZE 2048
|
||||
|
||||
#endif
|
238
libc/include/aarch64_be-linux-musl/asm/sigcontext.h
Normal file
238
libc/include/aarch64_be-linux-musl/asm/sigcontext.h
Normal file
@ -0,0 +1,238 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGCONTEXT_H
|
||||
#define __ASM_SIGCONTEXT_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Signal context structure - contains all info to do with the state
|
||||
* before the signal handler was invoked.
|
||||
*/
|
||||
struct sigcontext {
|
||||
__u64 fault_address;
|
||||
/* AArch64 registers */
|
||||
__u64 regs[31];
|
||||
__u64 sp;
|
||||
__u64 pc;
|
||||
__u64 pstate;
|
||||
/* 4K reserved for FP/SIMD state and future expansion */
|
||||
__u8 __reserved[4096] __attribute__((__aligned__(16)));
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocation of __reserved[]:
|
||||
* (Note: records do not necessarily occur in the order shown here.)
|
||||
*
|
||||
* size description
|
||||
*
|
||||
* 0x210 fpsimd_context
|
||||
* 0x10 esr_context
|
||||
* 0x8a0 sve_context (vl <= 64) (optional)
|
||||
* 0x20 extra_context (optional)
|
||||
* 0x10 terminator (null _aarch64_ctx)
|
||||
*
|
||||
* 0x510 (reserved for future allocation)
|
||||
*
|
||||
* New records that can exceed this space need to be opt-in for userspace, so
|
||||
* that an expanded signal frame is not generated unexpectedly. The mechanism
|
||||
* for opting in will depend on the extension that generates each new record.
|
||||
* The above table documents the maximum set and sizes of records than can be
|
||||
* generated when userspace does not opt in for any such extension.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Header to be used at the beginning of structures extending the user
|
||||
* context. Such structures must be placed after the rt_sigframe on the stack
|
||||
* and be 16-byte aligned. The last structure must be a dummy one with the
|
||||
* magic and size set to 0.
|
||||
*/
|
||||
struct _aarch64_ctx {
|
||||
__u32 magic;
|
||||
__u32 size;
|
||||
};
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
|
||||
struct fpsimd_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u32 fpsr;
|
||||
__u32 fpcr;
|
||||
__uint128_t vregs[32];
|
||||
};
|
||||
|
||||
/* ESR_EL1 context */
|
||||
#define ESR_MAGIC 0x45535201
|
||||
|
||||
struct esr_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u64 esr;
|
||||
};
|
||||
|
||||
/*
|
||||
* extra_context: describes extra space in the signal frame for
|
||||
* additional structures that don't fit in sigcontext.__reserved[].
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* 1) fpsimd_context, esr_context and extra_context must be placed in
|
||||
* sigcontext.__reserved[] if present. They cannot be placed in the
|
||||
* extra space. Any other record can be placed either in the extra
|
||||
* space or in sigcontext.__reserved[], unless otherwise specified in
|
||||
* this file.
|
||||
*
|
||||
* 2) There must not be more than one extra_context.
|
||||
*
|
||||
* 3) If extra_context is present, it must be followed immediately in
|
||||
* sigcontext.__reserved[] by the terminating null _aarch64_ctx.
|
||||
*
|
||||
* 4) The extra space to which datap points must start at the first
|
||||
* 16-byte aligned address immediately after the terminating null
|
||||
* _aarch64_ctx that follows the extra_context structure in
|
||||
* __reserved[]. The extra space may overrun the end of __reserved[],
|
||||
* as indicated by a sufficiently large value for the size field.
|
||||
*
|
||||
* 5) The extra space must itself be terminated with a null
|
||||
* _aarch64_ctx.
|
||||
*/
|
||||
#define EXTRA_MAGIC 0x45585401
|
||||
|
||||
struct extra_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u64 datap; /* 16-byte aligned pointer to extra space cast to __u64 */
|
||||
__u32 size; /* size in bytes of the extra space */
|
||||
__u32 __reserved[3];
|
||||
};
|
||||
|
||||
#define SVE_MAGIC 0x53564501
|
||||
|
||||
struct sve_context {
|
||||
struct _aarch64_ctx head;
|
||||
__u16 vl;
|
||||
__u16 __reserved[3];
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
* The SVE architecture leaves space for future expansion of the
|
||||
* vector length beyond its initial architectural limit of 2048 bits
|
||||
* (16 quadwords).
|
||||
*
|
||||
* See linux/Documentation/arm64/sve.txt for a description of the VL/VQ
|
||||
* terminology.
|
||||
*/
|
||||
#define SVE_VQ_BYTES 16 /* number of bytes per quadword */
|
||||
|
||||
#define SVE_VQ_MIN 1
|
||||
#define SVE_VQ_MAX 512
|
||||
|
||||
#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
|
||||
#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_NUM_ZREGS 32
|
||||
#define SVE_NUM_PREGS 16
|
||||
|
||||
#define sve_vl_valid(vl) \
|
||||
((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
|
||||
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
|
||||
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
|
||||
|
||||
/*
|
||||
* If the SVE registers are currently live for the thread at signal delivery,
|
||||
* sve_context.head.size >=
|
||||
* SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl))
|
||||
* and the register data may be accessed using the SVE_SIG_*() macros.
|
||||
*
|
||||
* If sve_context.head.size <
|
||||
* SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)),
|
||||
* the SVE registers were not live for the thread and no register data
|
||||
* is included: in this case, the SVE_SIG_*() macros should not be
|
||||
* used except for this check.
|
||||
*
|
||||
* The same convention applies when returning from a signal: a caller
|
||||
* will need to remove or resize the sve_context block if it wants to
|
||||
* make the SVE registers live when they were previously non-live or
|
||||
* vice-versa. This may require the the caller to allocate fresh
|
||||
* memory and/or move other context blocks in the signal frame.
|
||||
*
|
||||
* Changing the vector length during signal return is not permitted:
|
||||
* sve_context.vl must equal the thread's current vector length when
|
||||
* doing a sigreturn.
|
||||
*
|
||||
*
|
||||
* Note: for all these macros, the "vq" argument denotes the SVE
|
||||
* vector length in quadwords (i.e., units of 128 bits).
|
||||
*
|
||||
* The correct way to obtain vq is to use sve_vq_from_vl(vl). The
|
||||
* result is valid if and only if sve_vl_valid(vl) is true. This is
|
||||
* guaranteed for a struct sve_context written by the kernel.
|
||||
*
|
||||
*
|
||||
* Additional macros describe the contents and layout of the payload.
|
||||
* For each, SVE_SIG_x_OFFSET(args) is the start offset relative to
|
||||
* the start of struct sve_context, and SVE_SIG_x_SIZE(args) is the
|
||||
* size in bytes:
|
||||
*
|
||||
* x type description
|
||||
* - ---- -----------
|
||||
* REGS the entire SVE context
|
||||
*
|
||||
* ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers
|
||||
* ZREG __uint128_t[vq] individual Z-register Zn
|
||||
*
|
||||
* PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers
|
||||
* PREG uint16_t[vq] individual P-register Pn
|
||||
*
|
||||
* FFR uint16_t[vq] first-fault status register
|
||||
*
|
||||
* Additional data might be appended in the future.
|
||||
*/
|
||||
|
||||
#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8))
|
||||
#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
|
||||
#define SVE_SIG_REGS_OFFSET \
|
||||
((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
|
||||
#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
|
||||
#define SVE_SIG_ZREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_ZREGS_SIZE(vq) \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
|
||||
|
||||
#define SVE_SIG_PREGS_OFFSET(vq) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
|
||||
#define SVE_SIG_PREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_PREGS_SIZE(vq) \
|
||||
(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
|
||||
|
||||
#define SVE_SIG_FFR_OFFSET(vq) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
|
||||
|
||||
#define SVE_SIG_REGS_SIZE(vq) \
|
||||
(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
|
||||
|
||||
#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
|
||||
|
||||
|
||||
#endif /* __ASM_SIGCONTEXT_H */
|
24
libc/include/aarch64_be-linux-musl/asm/siginfo.h
Normal file
24
libc/include/aarch64_be-linux-musl/asm/siginfo.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGINFO_H
|
||||
#define __ASM_SIGINFO_H
|
||||
|
||||
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||
|
||||
#include <asm-generic/siginfo.h>
|
||||
|
||||
#endif
|
28
libc/include/aarch64_be-linux-musl/asm/signal.h
Normal file
28
libc/include/aarch64_be-linux-musl/asm/signal.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_SIGNAL_H
|
||||
#define __ASM_SIGNAL_H
|
||||
|
||||
/* Required for AArch32 compatibility. */
|
||||
#define SA_RESTORER 0x04000000
|
||||
|
||||
#define MINSIGSTKSZ 5120
|
||||
#define SIGSTKSZ 16384
|
||||
|
||||
#include <asm-generic/signal.h>
|
||||
|
||||
#endif
|
17
libc/include/aarch64_be-linux-musl/asm/stat.h
Normal file
17
libc/include/aarch64_be-linux-musl/asm/stat.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <asm-generic/stat.h>
|
24
libc/include/aarch64_be-linux-musl/asm/statfs.h
Normal file
24
libc/include/aarch64_be-linux-musl/asm/statfs.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_STATFS_H
|
||||
#define __ASM_STATFS_H
|
||||
|
||||
#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4)))
|
||||
|
||||
#include <asm-generic/statfs.h>
|
||||
|
||||
#endif
|
33
libc/include/aarch64_be-linux-musl/asm/ucontext.h
Normal file
33
libc/include/aarch64_be-linux-musl/asm/ucontext.h
Normal file
@ -0,0 +1,33 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_UCONTEXT_H
|
||||
#define __ASM_UCONTEXT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
/* glibc uses a 1024-bit sigset_t */
|
||||
__u8 __unused[1024 / 8 - sizeof(sigset_t)];
|
||||
/* last for future expansion */
|
||||
struct sigcontext uc_mcontext;
|
||||
};
|
||||
|
||||
#endif /* __ASM_UCONTEXT_H */
|
20
libc/include/aarch64_be-linux-musl/asm/unistd.h
Normal file
20
libc/include/aarch64_be-linux-musl/asm/unistd.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
|
||||
#include <asm-generic/unistd.h>
|
47
libc/include/aarch64_be-linux-musl/bfd_stdint.h
Normal file
47
libc/include/aarch64_be-linux-musl/bfd_stdint.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* generated for aarch64_be-linux-musl-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
401
libc/include/aarch64_be-linux-musl/bits/alltypes.h
Normal file
401
libc/include/aarch64_be-linux-musl/bits/alltypes.h
Normal file
@ -0,0 +1,401 @@
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
|
||||
typedef __builtin_va_list va_list;
|
||||
#define __DEFINED_va_list
|
||||
#endif
|
||||
|
||||
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
|
||||
typedef __builtin_va_list __isoc_va_list;
|
||||
#define __DEFINED___isoc_va_list
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
|
||||
typedef unsigned wchar_t;
|
||||
#define __DEFINED_wchar_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef int blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned int nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
|
||||
typedef float float_t;
|
||||
#define __DEFINED_float_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
|
||||
typedef double double_t;
|
||||
#define __DEFINED_double_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
|
||||
typedef struct { long long __ll; long double __ld; } max_align_t;
|
||||
#define __DEFINED_max_align_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
|
||||
typedef long time_t;
|
||||
#define __DEFINED_time_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
|
||||
typedef long suseconds_t;
|
||||
#define __DEFINED_suseconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
#define __DEFINED_pthread_attr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
#define __DEFINED_pthread_mutex_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
#define __DEFINED_mtx_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
#define __DEFINED_pthread_cond_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
#define __DEFINED_cnd_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
#define __DEFINED_pthread_rwlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
#define __DEFINED_pthread_barrier_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
|
||||
typedef unsigned _Addr size_t;
|
||||
#define __DEFINED_size_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
|
||||
typedef unsigned _Addr uintptr_t;
|
||||
#define __DEFINED_uintptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
|
||||
typedef _Addr ptrdiff_t;
|
||||
#define __DEFINED_ptrdiff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
|
||||
typedef _Addr ssize_t;
|
||||
#define __DEFINED_ssize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
|
||||
typedef _Addr intptr_t;
|
||||
#define __DEFINED_intptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
|
||||
typedef _Addr regoff_t;
|
||||
#define __DEFINED_regoff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
|
||||
typedef _Reg register_t;
|
||||
#define __DEFINED_register_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
|
||||
typedef signed char int8_t;
|
||||
#define __DEFINED_int8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
|
||||
typedef signed short int16_t;
|
||||
#define __DEFINED_int16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
|
||||
typedef signed int int32_t;
|
||||
#define __DEFINED_int32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
|
||||
typedef signed _Int64 int64_t;
|
||||
#define __DEFINED_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
|
||||
typedef signed _Int64 intmax_t;
|
||||
#define __DEFINED_intmax_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
|
||||
typedef unsigned char uint8_t;
|
||||
#define __DEFINED_uint8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
|
||||
typedef unsigned short uint16_t;
|
||||
#define __DEFINED_uint16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
|
||||
typedef unsigned int uint32_t;
|
||||
#define __DEFINED_uint32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
|
||||
typedef unsigned _Int64 uint64_t;
|
||||
#define __DEFINED_uint64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
|
||||
typedef unsigned _Int64 u_int64_t;
|
||||
#define __DEFINED_u_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
|
||||
typedef unsigned _Int64 uintmax_t;
|
||||
#define __DEFINED_uintmax_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
|
||||
typedef unsigned mode_t;
|
||||
#define __DEFINED_mode_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned _Reg nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
|
||||
typedef _Int64 off_t;
|
||||
#define __DEFINED_off_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
|
||||
typedef unsigned _Int64 ino_t;
|
||||
#define __DEFINED_ino_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
|
||||
typedef unsigned _Int64 dev_t;
|
||||
#define __DEFINED_dev_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef long blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
|
||||
typedef _Int64 blkcnt_t;
|
||||
#define __DEFINED_blkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
|
||||
typedef unsigned _Int64 fsblkcnt_t;
|
||||
#define __DEFINED_fsblkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
|
||||
typedef unsigned _Int64 fsfilcnt_t;
|
||||
#define __DEFINED_fsfilcnt_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
|
||||
typedef unsigned long wctype_t;
|
||||
#define __DEFINED_wctype_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
|
||||
typedef void * timer_t;
|
||||
#define __DEFINED_timer_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
|
||||
typedef int clockid_t;
|
||||
#define __DEFINED_clockid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
|
||||
typedef long clock_t;
|
||||
#define __DEFINED_clock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
|
||||
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
|
||||
#define __DEFINED_struct_timeval
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
|
||||
struct timespec { time_t tv_sec; long tv_nsec; };
|
||||
#define __DEFINED_struct_timespec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
|
||||
typedef int pid_t;
|
||||
#define __DEFINED_pid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
|
||||
typedef unsigned id_t;
|
||||
#define __DEFINED_id_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
|
||||
typedef unsigned uid_t;
|
||||
#define __DEFINED_uid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
|
||||
typedef unsigned gid_t;
|
||||
#define __DEFINED_gid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
|
||||
typedef int key_t;
|
||||
#define __DEFINED_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
|
||||
typedef unsigned useconds_t;
|
||||
#define __DEFINED_useconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef unsigned long pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef struct __pthread * pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
|
||||
typedef int pthread_once_t;
|
||||
#define __DEFINED_pthread_once_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
|
||||
typedef unsigned pthread_key_t;
|
||||
#define __DEFINED_pthread_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
|
||||
typedef int pthread_spinlock_t;
|
||||
#define __DEFINED_pthread_spinlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_mutexattr_t;
|
||||
#define __DEFINED_pthread_mutexattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_condattr_t;
|
||||
#define __DEFINED_pthread_condattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_barrierattr_t;
|
||||
#define __DEFINED_pthread_barrierattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
|
||||
typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
#define __DEFINED_pthread_rwlockattr_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
|
||||
typedef struct _IO_FILE FILE;
|
||||
#define __DEFINED_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
|
||||
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
|
||||
#define __DEFINED_mbstate_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
|
||||
typedef struct __locale_struct * locale_t;
|
||||
#define __DEFINED_locale_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
|
||||
typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
|
||||
#define __DEFINED_sigset_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
|
||||
struct iovec { void *iov_base; size_t iov_len; };
|
||||
#define __DEFINED_struct_iovec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
|
||||
typedef unsigned socklen_t;
|
||||
#define __DEFINED_socklen_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
|
||||
typedef unsigned short sa_family_t;
|
||||
#define __DEFINED_sa_family_t
|
||||
#endif
|
||||
|
||||
|
||||
#undef _Addr
|
||||
#undef _Int64
|
||||
#undef _Reg
|
5
libc/include/aarch64_be-linux-musl/bits/endian.h
Normal file
5
libc/include/aarch64_be-linux-musl/bits/endian.h
Normal file
@ -0,0 +1,5 @@
|
||||
#if __AARCH64EB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
19
libc/include/aarch64_be-linux-musl/bits/fenv.h
Normal file
19
libc/include/aarch64_be-linux-musl/bits/fenv.h
Normal file
@ -0,0 +1,19 @@
|
||||
#define FE_INVALID 1
|
||||
#define FE_DIVBYZERO 2
|
||||
#define FE_OVERFLOW 4
|
||||
#define FE_UNDERFLOW 8
|
||||
#define FE_INEXACT 16
|
||||
#define FE_ALL_EXCEPT 31
|
||||
#define FE_TONEAREST 0
|
||||
#define FE_DOWNWARD 0x800000
|
||||
#define FE_UPWARD 0x400000
|
||||
#define FE_TOWARDZERO 0xc00000
|
||||
|
||||
typedef unsigned int fexcept_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int __fpcr;
|
||||
unsigned int __fpsr;
|
||||
} fenv_t;
|
||||
|
||||
#define FE_DFL_ENV ((const fenv_t *) -1)
|
16
libc/include/aarch64_be-linux-musl/bits/float.h
Normal file
16
libc/include/aarch64_be-linux-musl/bits/float.h
Normal file
@ -0,0 +1,16 @@
|
||||
#define FLT_EVAL_METHOD 0
|
||||
|
||||
#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
|
||||
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
|
||||
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
|
||||
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
|
||||
|
||||
#define LDBL_MANT_DIG 113
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
#define LDBL_MAX_EXP 16384
|
||||
|
||||
#define LDBL_DIG 33
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#define DECIMAL_DIG 36
|
28
libc/include/aarch64_be-linux-musl/bits/hwcap.h
Normal file
28
libc/include/aarch64_be-linux-musl/bits/hwcap.h
Normal file
@ -0,0 +1,28 @@
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
14
libc/include/aarch64_be-linux-musl/bits/ipc.h
Normal file
14
libc/include/aarch64_be-linux-musl/bits/ipc.h
Normal file
@ -0,0 +1,14 @@
|
||||
struct ipc_perm {
|
||||
key_t __ipc_perm_key;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
uid_t cuid;
|
||||
gid_t cgid;
|
||||
mode_t mode;
|
||||
unsigned short __ipc_perm_seq;
|
||||
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
7
libc/include/aarch64_be-linux-musl/bits/limits.h
Normal file
7
libc/include/aarch64_be-linux-musl/bits/limits.h
Normal file
@ -0,0 +1,7 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#endif
|
||||
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL
|
2
libc/include/aarch64_be-linux-musl/bits/posix.h
Normal file
2
libc/include/aarch64_be-linux-musl/bits/posix.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define _POSIX_V6_LP64_OFF64 1
|
||||
#define _POSIX_V7_LP64_OFF64 1
|
2
libc/include/aarch64_be-linux-musl/bits/reg.h
Normal file
2
libc/include/aarch64_be-linux-musl/bits/reg.h
Normal file
@ -0,0 +1,2 @@
|
||||
#undef __WORDSIZE
|
||||
#define __WORDSIZE 64
|
14
libc/include/aarch64_be-linux-musl/bits/sem.h
Normal file
14
libc/include/aarch64_be-linux-musl/bits/sem.h
Normal file
@ -0,0 +1,14 @@
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm;
|
||||
time_t sem_otime;
|
||||
time_t sem_ctime;
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
unsigned short sem_nsems;
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
#else
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
unsigned short sem_nsems;
|
||||
#endif
|
||||
time_t __unused3;
|
||||
time_t __unused4;
|
||||
};
|
1
libc/include/aarch64_be-linux-musl/bits/setjmp.h
Normal file
1
libc/include/aarch64_be-linux-musl/bits/setjmp.h
Normal file
@ -0,0 +1 @@
|
||||
typedef unsigned long __jmp_buf[22];
|
153
libc/include/aarch64_be-linux-musl/bits/signal.h
Normal file
153
libc/include/aarch64_be-linux-musl/bits/signal.h
Normal file
@ -0,0 +1,153 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MINSIGSTKSZ 6144
|
||||
#define SIGSTKSZ 12288
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef unsigned long greg_t;
|
||||
typedef unsigned long gregset_t[34];
|
||||
|
||||
typedef struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
} fpregset_t;
|
||||
typedef struct sigcontext {
|
||||
unsigned long fault_address;
|
||||
unsigned long regs[31];
|
||||
unsigned long sp, pc, pstate;
|
||||
long double __reserved[256];
|
||||
} mcontext_t;
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
#define ESR_MAGIC 0x45535201
|
||||
#define EXTRA_MAGIC 0x45585401
|
||||
#define SVE_MAGIC 0x53564501
|
||||
struct _aarch64_ctx {
|
||||
unsigned int magic;
|
||||
unsigned int size;
|
||||
};
|
||||
struct fpsimd_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
long double vregs[32];
|
||||
};
|
||||
struct esr_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long esr;
|
||||
};
|
||||
struct extra_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long datap;
|
||||
unsigned int size;
|
||||
unsigned int __reserved[3];
|
||||
};
|
||||
struct sve_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned short vl;
|
||||
unsigned short __reserved[3];
|
||||
};
|
||||
#define SVE_VQ_BYTES 16
|
||||
#define SVE_VQ_MIN 1
|
||||
#define SVE_VQ_MAX 512
|
||||
#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
|
||||
#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
|
||||
#define SVE_NUM_ZREGS 32
|
||||
#define SVE_NUM_PREGS 16
|
||||
#define sve_vl_valid(vl) \
|
||||
((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
|
||||
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
|
||||
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
|
||||
#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
#define SVE_SIG_REGS_OFFSET \
|
||||
((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
|
||||
#define SVE_SIG_ZREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_ZREGS_SIZE(vq) \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
|
||||
#define SVE_SIG_PREGS_OFFSET(vq) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
|
||||
#define SVE_SIG_PREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_PREGS_SIZE(vq) \
|
||||
(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
|
||||
#define SVE_SIG_FFR_OFFSET(vq) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
|
||||
#define SVE_SIG_REGS_SIZE(vq) \
|
||||
(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
|
||||
#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
|
||||
#else
|
||||
typedef struct {
|
||||
long double __regs[18+256];
|
||||
} mcontext_t;
|
||||
#endif
|
||||
|
||||
struct sigaltstack {
|
||||
void *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
};
|
||||
|
||||
typedef struct __ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct __ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t uc_mcontext;
|
||||
} ucontext_t;
|
||||
|
||||
#define SA_NOCLDSTOP 1
|
||||
#define SA_NOCLDWAIT 2
|
||||
#define SA_SIGINFO 4
|
||||
#define SA_ONSTACK 0x08000000
|
||||
#define SA_RESTART 0x10000000
|
||||
#define SA_NODEFER 0x40000000
|
||||
#define SA_RESETHAND 0x80000000
|
||||
#define SA_RESTORER 0x04000000
|
||||
|
||||
#endif
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGIOT SIGABRT
|
||||
#define SIGBUS 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGUSR1 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGUSR2 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGSTKFLT 16
|
||||
#define SIGCHLD 17
|
||||
#define SIGCONT 18
|
||||
#define SIGSTOP 19
|
||||
#define SIGTSTP 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGURG 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGIO 29
|
||||
#define SIGPOLL 29
|
||||
#define SIGPWR 30
|
||||
#define SIGSYS 31
|
||||
#define SIGUNUSED SIGSYS
|
||||
|
||||
#define _NSIG 65
|
33
libc/include/aarch64_be-linux-musl/bits/socket.h
Normal file
33
libc/include/aarch64_be-linux-musl/bits/socket.h
Normal file
@ -0,0 +1,33 @@
|
||||
#include <endian.h>
|
||||
|
||||
struct msghdr {
|
||||
void *msg_name;
|
||||
socklen_t msg_namelen;
|
||||
struct iovec *msg_iov;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1, msg_iovlen;
|
||||
#else
|
||||
int msg_iovlen, __pad1;
|
||||
#endif
|
||||
void *msg_control;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad2;
|
||||
socklen_t msg_controllen;
|
||||
#else
|
||||
socklen_t msg_controllen;
|
||||
int __pad2;
|
||||
#endif
|
||||
int msg_flags;
|
||||
};
|
||||
|
||||
struct cmsghdr {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1;
|
||||
socklen_t cmsg_len;
|
||||
#else
|
||||
socklen_t cmsg_len;
|
||||
int __pad1;
|
||||
#endif
|
||||
int cmsg_level;
|
||||
int cmsg_type;
|
||||
};
|
18
libc/include/aarch64_be-linux-musl/bits/stat.h
Normal file
18
libc/include/aarch64_be-linux-musl/bits/stat.h
Normal file
@ -0,0 +1,18 @@
|
||||
struct stat {
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
mode_t st_mode;
|
||||
nlink_t st_nlink;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
dev_t st_rdev;
|
||||
unsigned long __pad;
|
||||
off_t st_size;
|
||||
blksize_t st_blksize;
|
||||
int __pad2;
|
||||
blkcnt_t st_blocks;
|
||||
struct timespec st_atim;
|
||||
struct timespec st_mtim;
|
||||
struct timespec st_ctim;
|
||||
unsigned __unused[2];
|
||||
};
|
555
libc/include/aarch64_be-linux-musl/bits/syscall.h
Normal file
555
libc/include/aarch64_be-linux-musl/bits/syscall.h
Normal file
@ -0,0 +1,555 @@
|
||||
#define __NR_io_setup 0
|
||||
#define __NR_io_destroy 1
|
||||
#define __NR_io_submit 2
|
||||
#define __NR_io_cancel 3
|
||||
#define __NR_io_getevents 4
|
||||
#define __NR_setxattr 5
|
||||
#define __NR_lsetxattr 6
|
||||
#define __NR_fsetxattr 7
|
||||
#define __NR_getxattr 8
|
||||
#define __NR_lgetxattr 9
|
||||
#define __NR_fgetxattr 10
|
||||
#define __NR_listxattr 11
|
||||
#define __NR_llistxattr 12
|
||||
#define __NR_flistxattr 13
|
||||
#define __NR_removexattr 14
|
||||
#define __NR_lremovexattr 15
|
||||
#define __NR_fremovexattr 16
|
||||
#define __NR_getcwd 17
|
||||
#define __NR_lookup_dcookie 18
|
||||
#define __NR_eventfd2 19
|
||||
#define __NR_epoll_create1 20
|
||||
#define __NR_epoll_ctl 21
|
||||
#define __NR_epoll_pwait 22
|
||||
#define __NR_dup 23
|
||||
#define __NR_dup3 24
|
||||
#define __NR_fcntl 25
|
||||
#define __NR_inotify_init1 26
|
||||
#define __NR_inotify_add_watch 27
|
||||
#define __NR_inotify_rm_watch 28
|
||||
#define __NR_ioctl 29
|
||||
#define __NR_ioprio_set 30
|
||||
#define __NR_ioprio_get 31
|
||||
#define __NR_flock 32
|
||||
#define __NR_mknodat 33
|
||||
#define __NR_mkdirat 34
|
||||
#define __NR_unlinkat 35
|
||||
#define __NR_symlinkat 36
|
||||
#define __NR_linkat 37
|
||||
#define __NR_renameat 38
|
||||
#define __NR_umount2 39
|
||||
#define __NR_mount 40
|
||||
#define __NR_pivot_root 41
|
||||
#define __NR_nfsservctl 42
|
||||
#define __NR_statfs 43
|
||||
#define __NR_fstatfs 44
|
||||
#define __NR_truncate 45
|
||||
#define __NR_ftruncate 46
|
||||
#define __NR_fallocate 47
|
||||
#define __NR_faccessat 48
|
||||
#define __NR_chdir 49
|
||||
#define __NR_fchdir 50
|
||||
#define __NR_chroot 51
|
||||
#define __NR_fchmod 52
|
||||
#define __NR_fchmodat 53
|
||||
#define __NR_fchownat 54
|
||||
#define __NR_fchown 55
|
||||
#define __NR_openat 56
|
||||
#define __NR_close 57
|
||||
#define __NR_vhangup 58
|
||||
#define __NR_pipe2 59
|
||||
#define __NR_quotactl 60
|
||||
#define __NR_getdents64 61
|
||||
#define __NR_lseek 62
|
||||
#define __NR_read 63
|
||||
#define __NR_write 64
|
||||
#define __NR_readv 65
|
||||
#define __NR_writev 66
|
||||
#define __NR_pread64 67
|
||||
#define __NR_pwrite64 68
|
||||
#define __NR_preadv 69
|
||||
#define __NR_pwritev 70
|
||||
#define __NR_sendfile 71
|
||||
#define __NR_pselect6 72
|
||||
#define __NR_ppoll 73
|
||||
#define __NR_signalfd4 74
|
||||
#define __NR_vmsplice 75
|
||||
#define __NR_splice 76
|
||||
#define __NR_tee 77
|
||||
#define __NR_readlinkat 78
|
||||
#define __NR_newfstatat 79
|
||||
#define __NR_fstat 80
|
||||
#define __NR_sync 81
|
||||
#define __NR_fsync 82
|
||||
#define __NR_fdatasync 83
|
||||
#define __NR_sync_file_range 84
|
||||
#define __NR_timerfd_create 85
|
||||
#define __NR_timerfd_settime 86
|
||||
#define __NR_timerfd_gettime 87
|
||||
#define __NR_utimensat 88
|
||||
#define __NR_acct 89
|
||||
#define __NR_capget 90
|
||||
#define __NR_capset 91
|
||||
#define __NR_personality 92
|
||||
#define __NR_exit 93
|
||||
#define __NR_exit_group 94
|
||||
#define __NR_waitid 95
|
||||
#define __NR_set_tid_address 96
|
||||
#define __NR_unshare 97
|
||||
#define __NR_futex 98
|
||||
#define __NR_set_robust_list 99
|
||||
#define __NR_get_robust_list 100
|
||||
#define __NR_nanosleep 101
|
||||
#define __NR_getitimer 102
|
||||
#define __NR_setitimer 103
|
||||
#define __NR_kexec_load 104
|
||||
#define __NR_init_module 105
|
||||
#define __NR_delete_module 106
|
||||
#define __NR_timer_create 107
|
||||
#define __NR_timer_gettime 108
|
||||
#define __NR_timer_getoverrun 109
|
||||
#define __NR_timer_settime 110
|
||||
#define __NR_timer_delete 111
|
||||
#define __NR_clock_settime 112
|
||||
#define __NR_clock_gettime 113
|
||||
#define __NR_clock_getres 114
|
||||
#define __NR_clock_nanosleep 115
|
||||
#define __NR_syslog 116
|
||||
#define __NR_ptrace 117
|
||||
#define __NR_sched_setparam 118
|
||||
#define __NR_sched_setscheduler 119
|
||||
#define __NR_sched_getscheduler 120
|
||||
#define __NR_sched_getparam 121
|
||||
#define __NR_sched_setaffinity 122
|
||||
#define __NR_sched_getaffinity 123
|
||||
#define __NR_sched_yield 124
|
||||
#define __NR_sched_get_priority_max 125
|
||||
#define __NR_sched_get_priority_min 126
|
||||
#define __NR_sched_rr_get_interval 127
|
||||
#define __NR_restart_syscall 128
|
||||
#define __NR_kill 129
|
||||
#define __NR_tkill 130
|
||||
#define __NR_tgkill 131
|
||||
#define __NR_sigaltstack 132
|
||||
#define __NR_rt_sigsuspend 133
|
||||
#define __NR_rt_sigaction 134
|
||||
#define __NR_rt_sigprocmask 135
|
||||
#define __NR_rt_sigpending 136
|
||||
#define __NR_rt_sigtimedwait 137
|
||||
#define __NR_rt_sigqueueinfo 138
|
||||
#define __NR_rt_sigreturn 139
|
||||
#define __NR_setpriority 140
|
||||
#define __NR_getpriority 141
|
||||
#define __NR_reboot 142
|
||||
#define __NR_setregid 143
|
||||
#define __NR_setgid 144
|
||||
#define __NR_setreuid 145
|
||||
#define __NR_setuid 146
|
||||
#define __NR_setresuid 147
|
||||
#define __NR_getresuid 148
|
||||
#define __NR_setresgid 149
|
||||
#define __NR_getresgid 150
|
||||
#define __NR_setfsuid 151
|
||||
#define __NR_setfsgid 152
|
||||
#define __NR_times 153
|
||||
#define __NR_setpgid 154
|
||||
#define __NR_getpgid 155
|
||||
#define __NR_getsid 156
|
||||
#define __NR_setsid 157
|
||||
#define __NR_getgroups 158
|
||||
#define __NR_setgroups 159
|
||||
#define __NR_uname 160
|
||||
#define __NR_sethostname 161
|
||||
#define __NR_setdomainname 162
|
||||
#define __NR_getrlimit 163
|
||||
#define __NR_setrlimit 164
|
||||
#define __NR_getrusage 165
|
||||
#define __NR_umask 166
|
||||
#define __NR_prctl 167
|
||||
#define __NR_getcpu 168
|
||||
#define __NR_gettimeofday 169
|
||||
#define __NR_settimeofday 170
|
||||
#define __NR_adjtimex 171
|
||||
#define __NR_getpid 172
|
||||
#define __NR_getppid 173
|
||||
#define __NR_getuid 174
|
||||
#define __NR_geteuid 175
|
||||
#define __NR_getgid 176
|
||||
#define __NR_getegid 177
|
||||
#define __NR_gettid 178
|
||||
#define __NR_sysinfo 179
|
||||
#define __NR_mq_open 180
|
||||
#define __NR_mq_unlink 181
|
||||
#define __NR_mq_timedsend 182
|
||||
#define __NR_mq_timedreceive 183
|
||||
#define __NR_mq_notify 184
|
||||
#define __NR_mq_getsetattr 185
|
||||
#define __NR_msgget 186
|
||||
#define __NR_msgctl 187
|
||||
#define __NR_msgrcv 188
|
||||
#define __NR_msgsnd 189
|
||||
#define __NR_semget 190
|
||||
#define __NR_semctl 191
|
||||
#define __NR_semtimedop 192
|
||||
#define __NR_semop 193
|
||||
#define __NR_shmget 194
|
||||
#define __NR_shmctl 195
|
||||
#define __NR_shmat 196
|
||||
#define __NR_shmdt 197
|
||||
#define __NR_socket 198
|
||||
#define __NR_socketpair 199
|
||||
#define __NR_bind 200
|
||||
#define __NR_listen 201
|
||||
#define __NR_accept 202
|
||||
#define __NR_connect 203
|
||||
#define __NR_getsockname 204
|
||||
#define __NR_getpeername 205
|
||||
#define __NR_sendto 206
|
||||
#define __NR_recvfrom 207
|
||||
#define __NR_setsockopt 208
|
||||
#define __NR_getsockopt 209
|
||||
#define __NR_shutdown 210
|
||||
#define __NR_sendmsg 211
|
||||
#define __NR_recvmsg 212
|
||||
#define __NR_readahead 213
|
||||
#define __NR_brk 214
|
||||
#define __NR_munmap 215
|
||||
#define __NR_mremap 216
|
||||
#define __NR_add_key 217
|
||||
#define __NR_request_key 218
|
||||
#define __NR_keyctl 219
|
||||
#define __NR_clone 220
|
||||
#define __NR_execve 221
|
||||
#define __NR_mmap 222
|
||||
#define __NR_fadvise64 223
|
||||
#define __NR_swapon 224
|
||||
#define __NR_swapoff 225
|
||||
#define __NR_mprotect 226
|
||||
#define __NR_msync 227
|
||||
#define __NR_mlock 228
|
||||
#define __NR_munlock 229
|
||||
#define __NR_mlockall 230
|
||||
#define __NR_munlockall 231
|
||||
#define __NR_mincore 232
|
||||
#define __NR_madvise 233
|
||||
#define __NR_remap_file_pages 234
|
||||
#define __NR_mbind 235
|
||||
#define __NR_get_mempolicy 236
|
||||
#define __NR_set_mempolicy 237
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_move_pages 239
|
||||
#define __NR_rt_tgsigqueueinfo 240
|
||||
#define __NR_perf_event_open 241
|
||||
#define __NR_accept4 242
|
||||
#define __NR_recvmmsg 243
|
||||
#define __NR_wait4 260
|
||||
#define __NR_prlimit64 261
|
||||
#define __NR_fanotify_init 262
|
||||
#define __NR_fanotify_mark 263
|
||||
#define __NR_name_to_handle_at 264
|
||||
#define __NR_open_by_handle_at 265
|
||||
#define __NR_clock_adjtime 266
|
||||
#define __NR_syncfs 267
|
||||
#define __NR_setns 268
|
||||
#define __NR_sendmmsg 269
|
||||
#define __NR_process_vm_readv 270
|
||||
#define __NR_process_vm_writev 271
|
||||
#define __NR_kcmp 272
|
||||
#define __NR_finit_module 273
|
||||
#define __NR_sched_setattr 274
|
||||
#define __NR_sched_getattr 275
|
||||
#define __NR_renameat2 276
|
||||
#define __NR_seccomp 277
|
||||
#define __NR_getrandom 278
|
||||
#define __NR_memfd_create 279
|
||||
#define __NR_bpf 280
|
||||
#define __NR_execveat 281
|
||||
#define __NR_userfaultfd 282
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_mlock2 284
|
||||
#define __NR_copy_file_range 285
|
||||
#define __NR_preadv2 286
|
||||
#define __NR_pwritev2 287
|
||||
#define __NR_pkey_mprotect 288
|
||||
#define __NR_pkey_alloc 289
|
||||
#define __NR_pkey_free 290
|
||||
#define __NR_statx 291
|
||||
#define __NR_io_pgetevents 292
|
||||
|
||||
#define SYS_io_setup 0
|
||||
#define SYS_io_destroy 1
|
||||
#define SYS_io_submit 2
|
||||
#define SYS_io_cancel 3
|
||||
#define SYS_io_getevents 4
|
||||
#define SYS_setxattr 5
|
||||
#define SYS_lsetxattr 6
|
||||
#define SYS_fsetxattr 7
|
||||
#define SYS_getxattr 8
|
||||
#define SYS_lgetxattr 9
|
||||
#define SYS_fgetxattr 10
|
||||
#define SYS_listxattr 11
|
||||
#define SYS_llistxattr 12
|
||||
#define SYS_flistxattr 13
|
||||
#define SYS_removexattr 14
|
||||
#define SYS_lremovexattr 15
|
||||
#define SYS_fremovexattr 16
|
||||
#define SYS_getcwd 17
|
||||
#define SYS_lookup_dcookie 18
|
||||
#define SYS_eventfd2 19
|
||||
#define SYS_epoll_create1 20
|
||||
#define SYS_epoll_ctl 21
|
||||
#define SYS_epoll_pwait 22
|
||||
#define SYS_dup 23
|
||||
#define SYS_dup3 24
|
||||
#define SYS_fcntl 25
|
||||
#define SYS_inotify_init1 26
|
||||
#define SYS_inotify_add_watch 27
|
||||
#define SYS_inotify_rm_watch 28
|
||||
#define SYS_ioctl 29
|
||||
#define SYS_ioprio_set 30
|
||||
#define SYS_ioprio_get 31
|
||||
#define SYS_flock 32
|
||||
#define SYS_mknodat 33
|
||||
#define SYS_mkdirat 34
|
||||
#define SYS_unlinkat 35
|
||||
#define SYS_symlinkat 36
|
||||
#define SYS_linkat 37
|
||||
#define SYS_renameat 38
|
||||
#define SYS_umount2 39
|
||||
#define SYS_mount 40
|
||||
#define SYS_pivot_root 41
|
||||
#define SYS_nfsservctl 42
|
||||
#define SYS_statfs 43
|
||||
#define SYS_fstatfs 44
|
||||
#define SYS_truncate 45
|
||||
#define SYS_ftruncate 46
|
||||
#define SYS_fallocate 47
|
||||
#define SYS_faccessat 48
|
||||
#define SYS_chdir 49
|
||||
#define SYS_fchdir 50
|
||||
#define SYS_chroot 51
|
||||
#define SYS_fchmod 52
|
||||
#define SYS_fchmodat 53
|
||||
#define SYS_fchownat 54
|
||||
#define SYS_fchown 55
|
||||
#define SYS_openat 56
|
||||
#define SYS_close 57
|
||||
#define SYS_vhangup 58
|
||||
#define SYS_pipe2 59
|
||||
#define SYS_quotactl 60
|
||||
#define SYS_getdents64 61
|
||||
#define SYS_lseek 62
|
||||
#define SYS_read 63
|
||||
#define SYS_write 64
|
||||
#define SYS_readv 65
|
||||
#define SYS_writev 66
|
||||
#define SYS_pread64 67
|
||||
#define SYS_pwrite64 68
|
||||
#define SYS_preadv 69
|
||||
#define SYS_pwritev 70
|
||||
#define SYS_sendfile 71
|
||||
#define SYS_pselect6 72
|
||||
#define SYS_ppoll 73
|
||||
#define SYS_signalfd4 74
|
||||
#define SYS_vmsplice 75
|
||||
#define SYS_splice 76
|
||||
#define SYS_tee 77
|
||||
#define SYS_readlinkat 78
|
||||
#define SYS_newfstatat 79
|
||||
#define SYS_fstat 80
|
||||
#define SYS_sync 81
|
||||
#define SYS_fsync 82
|
||||
#define SYS_fdatasync 83
|
||||
#define SYS_sync_file_range 84
|
||||
#define SYS_timerfd_create 85
|
||||
#define SYS_timerfd_settime 86
|
||||
#define SYS_timerfd_gettime 87
|
||||
#define SYS_utimensat 88
|
||||
#define SYS_acct 89
|
||||
#define SYS_capget 90
|
||||
#define SYS_capset 91
|
||||
#define SYS_personality 92
|
||||
#define SYS_exit 93
|
||||
#define SYS_exit_group 94
|
||||
#define SYS_waitid 95
|
||||
#define SYS_set_tid_address 96
|
||||
#define SYS_unshare 97
|
||||
#define SYS_futex 98
|
||||
#define SYS_set_robust_list 99
|
||||
#define SYS_get_robust_list 100
|
||||
#define SYS_nanosleep 101
|
||||
#define SYS_getitimer 102
|
||||
#define SYS_setitimer 103
|
||||
#define SYS_kexec_load 104
|
||||
#define SYS_init_module 105
|
||||
#define SYS_delete_module 106
|
||||
#define SYS_timer_create 107
|
||||
#define SYS_timer_gettime 108
|
||||
#define SYS_timer_getoverrun 109
|
||||
#define SYS_timer_settime 110
|
||||
#define SYS_timer_delete 111
|
||||
#define SYS_clock_settime 112
|
||||
#define SYS_clock_gettime 113
|
||||
#define SYS_clock_getres 114
|
||||
#define SYS_clock_nanosleep 115
|
||||
#define SYS_syslog 116
|
||||
#define SYS_ptrace 117
|
||||
#define SYS_sched_setparam 118
|
||||
#define SYS_sched_setscheduler 119
|
||||
#define SYS_sched_getscheduler 120
|
||||
#define SYS_sched_getparam 121
|
||||
#define SYS_sched_setaffinity 122
|
||||
#define SYS_sched_getaffinity 123
|
||||
#define SYS_sched_yield 124
|
||||
#define SYS_sched_get_priority_max 125
|
||||
#define SYS_sched_get_priority_min 126
|
||||
#define SYS_sched_rr_get_interval 127
|
||||
#define SYS_restart_syscall 128
|
||||
#define SYS_kill 129
|
||||
#define SYS_tkill 130
|
||||
#define SYS_tgkill 131
|
||||
#define SYS_sigaltstack 132
|
||||
#define SYS_rt_sigsuspend 133
|
||||
#define SYS_rt_sigaction 134
|
||||
#define SYS_rt_sigprocmask 135
|
||||
#define SYS_rt_sigpending 136
|
||||
#define SYS_rt_sigtimedwait 137
|
||||
#define SYS_rt_sigqueueinfo 138
|
||||
#define SYS_rt_sigreturn 139
|
||||
#define SYS_setpriority 140
|
||||
#define SYS_getpriority 141
|
||||
#define SYS_reboot 142
|
||||
#define SYS_setregid 143
|
||||
#define SYS_setgid 144
|
||||
#define SYS_setreuid 145
|
||||
#define SYS_setuid 146
|
||||
#define SYS_setresuid 147
|
||||
#define SYS_getresuid 148
|
||||
#define SYS_setresgid 149
|
||||
#define SYS_getresgid 150
|
||||
#define SYS_setfsuid 151
|
||||
#define SYS_setfsgid 152
|
||||
#define SYS_times 153
|
||||
#define SYS_setpgid 154
|
||||
#define SYS_getpgid 155
|
||||
#define SYS_getsid 156
|
||||
#define SYS_setsid 157
|
||||
#define SYS_getgroups 158
|
||||
#define SYS_setgroups 159
|
||||
#define SYS_uname 160
|
||||
#define SYS_sethostname 161
|
||||
#define SYS_setdomainname 162
|
||||
#define SYS_getrlimit 163
|
||||
#define SYS_setrlimit 164
|
||||
#define SYS_getrusage 165
|
||||
#define SYS_umask 166
|
||||
#define SYS_prctl 167
|
||||
#define SYS_getcpu 168
|
||||
#define SYS_gettimeofday 169
|
||||
#define SYS_settimeofday 170
|
||||
#define SYS_adjtimex 171
|
||||
#define SYS_getpid 172
|
||||
#define SYS_getppid 173
|
||||
#define SYS_getuid 174
|
||||
#define SYS_geteuid 175
|
||||
#define SYS_getgid 176
|
||||
#define SYS_getegid 177
|
||||
#define SYS_gettid 178
|
||||
#define SYS_sysinfo 179
|
||||
#define SYS_mq_open 180
|
||||
#define SYS_mq_unlink 181
|
||||
#define SYS_mq_timedsend 182
|
||||
#define SYS_mq_timedreceive 183
|
||||
#define SYS_mq_notify 184
|
||||
#define SYS_mq_getsetattr 185
|
||||
#define SYS_msgget 186
|
||||
#define SYS_msgctl 187
|
||||
#define SYS_msgrcv 188
|
||||
#define SYS_msgsnd 189
|
||||
#define SYS_semget 190
|
||||
#define SYS_semctl 191
|
||||
#define SYS_semtimedop 192
|
||||
#define SYS_semop 193
|
||||
#define SYS_shmget 194
|
||||
#define SYS_shmctl 195
|
||||
#define SYS_shmat 196
|
||||
#define SYS_shmdt 197
|
||||
#define SYS_socket 198
|
||||
#define SYS_socketpair 199
|
||||
#define SYS_bind 200
|
||||
#define SYS_listen 201
|
||||
#define SYS_accept 202
|
||||
#define SYS_connect 203
|
||||
#define SYS_getsockname 204
|
||||
#define SYS_getpeername 205
|
||||
#define SYS_sendto 206
|
||||
#define SYS_recvfrom 207
|
||||
#define SYS_setsockopt 208
|
||||
#define SYS_getsockopt 209
|
||||
#define SYS_shutdown 210
|
||||
#define SYS_sendmsg 211
|
||||
#define SYS_recvmsg 212
|
||||
#define SYS_readahead 213
|
||||
#define SYS_brk 214
|
||||
#define SYS_munmap 215
|
||||
#define SYS_mremap 216
|
||||
#define SYS_add_key 217
|
||||
#define SYS_request_key 218
|
||||
#define SYS_keyctl 219
|
||||
#define SYS_clone 220
|
||||
#define SYS_execve 221
|
||||
#define SYS_mmap 222
|
||||
#define SYS_fadvise64 223
|
||||
#define SYS_swapon 224
|
||||
#define SYS_swapoff 225
|
||||
#define SYS_mprotect 226
|
||||
#define SYS_msync 227
|
||||
#define SYS_mlock 228
|
||||
#define SYS_munlock 229
|
||||
#define SYS_mlockall 230
|
||||
#define SYS_munlockall 231
|
||||
#define SYS_mincore 232
|
||||
#define SYS_madvise 233
|
||||
#define SYS_remap_file_pages 234
|
||||
#define SYS_mbind 235
|
||||
#define SYS_get_mempolicy 236
|
||||
#define SYS_set_mempolicy 237
|
||||
#define SYS_migrate_pages 238
|
||||
#define SYS_move_pages 239
|
||||
#define SYS_rt_tgsigqueueinfo 240
|
||||
#define SYS_perf_event_open 241
|
||||
#define SYS_accept4 242
|
||||
#define SYS_recvmmsg 243
|
||||
#define SYS_wait4 260
|
||||
#define SYS_prlimit64 261
|
||||
#define SYS_fanotify_init 262
|
||||
#define SYS_fanotify_mark 263
|
||||
#define SYS_name_to_handle_at 264
|
||||
#define SYS_open_by_handle_at 265
|
||||
#define SYS_clock_adjtime 266
|
||||
#define SYS_syncfs 267
|
||||
#define SYS_setns 268
|
||||
#define SYS_sendmmsg 269
|
||||
#define SYS_process_vm_readv 270
|
||||
#define SYS_process_vm_writev 271
|
||||
#define SYS_kcmp 272
|
||||
#define SYS_finit_module 273
|
||||
#define SYS_sched_setattr 274
|
||||
#define SYS_sched_getattr 275
|
||||
#define SYS_renameat2 276
|
||||
#define SYS_seccomp 277
|
||||
#define SYS_getrandom 278
|
||||
#define SYS_memfd_create 279
|
||||
#define SYS_bpf 280
|
||||
#define SYS_execveat 281
|
||||
#define SYS_userfaultfd 282
|
||||
#define SYS_membarrier 283
|
||||
#define SYS_mlock2 284
|
||||
#define SYS_copy_file_range 285
|
||||
#define SYS_preadv2 286
|
||||
#define SYS_pwritev2 287
|
||||
#define SYS_pkey_mprotect 288
|
||||
#define SYS_pkey_alloc 289
|
||||
#define SYS_pkey_free 290
|
||||
#define SYS_statx 291
|
||||
#define SYS_io_pgetevents 292
|
16
libc/include/aarch64_be-linux-musl/bits/user.h
Normal file
16
libc/include/aarch64_be-linux-musl/bits/user.h
Normal file
@ -0,0 +1,16 @@
|
||||
struct user_regs_struct {
|
||||
unsigned long long regs[31];
|
||||
unsigned long long sp;
|
||||
unsigned long long pc;
|
||||
unsigned long long pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
};
|
||||
|
||||
#define ELF_NREG 34
|
||||
typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
|
||||
typedef struct user_fpsimd_struct elf_fpregset_t;
|
12
libc/include/arm-linux-musleabi/asm/fcntl.h
Normal file
12
libc/include/arm-linux-musleabi/asm/fcntl.h
Normal file
@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ARM_FCNTL_H
|
||||
#define _ARM_FCNTL_H
|
||||
|
||||
#define O_DIRECTORY 040000 /* must be a directory */
|
||||
#define O_NOFOLLOW 0100000 /* don't follow links */
|
||||
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
|
||||
#define O_LARGEFILE 0400000
|
||||
|
||||
#include <asm-generic/fcntl.h>
|
||||
|
||||
#endif
|
9
libc/include/arm-linux-musleabi/asm/ioctls.h
Normal file
9
libc/include/arm-linux-musleabi/asm/ioctls.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_ARM_IOCTLS_H
|
||||
#define __ASM_ARM_IOCTLS_H
|
||||
|
||||
#define FIOQSIZE 0x545E
|
||||
|
||||
#include <asm-generic/ioctls.h>
|
||||
|
||||
#endif
|
4
libc/include/arm-linux-musleabi/asm/mman.h
Normal file
4
libc/include/arm-linux-musleabi/asm/mman.h
Normal file
@ -0,0 +1,4 @@
|
||||
#include <asm-generic/mman.h>
|
||||
|
||||
#define arch_mmap_check(addr, len, flags) \
|
||||
(((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)
|
13
libc/include/arm-linux-musleabi/asm/statfs.h
Normal file
13
libc/include/arm-linux-musleabi/asm/statfs.h
Normal file
@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASMARM_STATFS_H
|
||||
#define _ASMARM_STATFS_H
|
||||
|
||||
/*
|
||||
* With EABI there is 4 bytes of padding added to this structure.
|
||||
* Let's pack it so the padding goes away to simplify dual ABI support.
|
||||
* Note that user space does NOT have to pack this structure.
|
||||
*/
|
||||
#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))
|
||||
|
||||
#include <asm-generic/statfs.h>
|
||||
#endif
|
52
libc/include/arm-linux-musleabi/asm/swab.h
Normal file
52
libc/include/arm-linux-musleabi/asm/swab.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* arch/arm/include/asm/byteorder.h
|
||||
*
|
||||
* ARM Endian-ness. In little endian mode, the data bus is connected such
|
||||
* that byte accesses appear as:
|
||||
* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31
|
||||
* and word accesses (data or instruction) appear as:
|
||||
* d0...d31
|
||||
*
|
||||
* When in big endian mode, byte accesses appear as:
|
||||
* 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7
|
||||
* and word accesses (data or instruction) appear as:
|
||||
* d0...d31
|
||||
*/
|
||||
#ifndef __ASM_ARM_SWAB_H
|
||||
#define __ASM_ARM_SWAB_H
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
|
||||
# define __SWAB_64_THRU_32__
|
||||
#endif
|
||||
|
||||
|
||||
static __inline__ __u32 __arch_swab32(__u32 x)
|
||||
{
|
||||
__u32 t;
|
||||
|
||||
#ifndef __thumb__
|
||||
if (!__builtin_constant_p(x)) {
|
||||
/*
|
||||
* The compiler needs a bit of a hint here to always do the
|
||||
* right thing and not screw it up to different degrees
|
||||
* depending on the gcc version.
|
||||
*/
|
||||
__asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
|
||||
} else
|
||||
#endif
|
||||
t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */
|
||||
|
||||
x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */
|
||||
t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */
|
||||
x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */
|
||||
|
||||
return x;
|
||||
}
|
||||
#define __arch_swab32 __arch_swab32
|
||||
|
||||
|
||||
#endif /* __ASM_ARM_SWAB_H */
|
41
libc/include/arm-linux-musleabi/asm/types.h
Normal file
41
libc/include/arm-linux-musleabi/asm/types.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_TYPES_H
|
||||
#define _ASM_TYPES_H
|
||||
|
||||
#include <asm-generic/int-ll64.h>
|
||||
|
||||
/*
|
||||
* The C99 types uintXX_t that are usually defined in 'stdint.h' are not as
|
||||
* unambiguous on ARM as you would expect. For the types below, there is a
|
||||
* difference on ARM between GCC built for bare metal ARM, GCC built for glibc
|
||||
* and the kernel itself, which results in build errors if you try to build with
|
||||
* -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h'
|
||||
* in order to use NEON intrinsics)
|
||||
*
|
||||
* As the typedefs for these types in 'stdint.h' are based on builtin defines
|
||||
* supplied by GCC, we can tweak these to align with the kernel's idea of those
|
||||
* types, so 'linux/types.h' and 'stdint.h' can be safely included from the same
|
||||
* source file (provided that -ffreestanding is used).
|
||||
*
|
||||
* int32_t uint32_t uintptr_t
|
||||
* bare metal GCC long unsigned long unsigned int
|
||||
* glibc GCC int unsigned int unsigned int
|
||||
* kernel int unsigned int unsigned long
|
||||
*/
|
||||
|
||||
#ifdef __INT32_TYPE__
|
||||
#undef __INT32_TYPE__
|
||||
#define __INT32_TYPE__ int
|
||||
#endif
|
||||
|
||||
#ifdef __UINT32_TYPE__
|
||||
#undef __UINT32_TYPE__
|
||||
#define __UINT32_TYPE__ unsigned int
|
||||
#endif
|
||||
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
#undef __UINTPTR_TYPE__
|
||||
#define __UINTPTR_TYPE__ unsigned long
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_TYPES_H */
|
8034
libc/include/arm-linux-musleabi/bfd.h
Normal file
8034
libc/include/arm-linux-musleabi/bfd.h
Normal file
File diff suppressed because it is too large
Load Diff
47
libc/include/arm-linux-musleabi/bfd_stdint.h
Normal file
47
libc/include/arm-linux-musleabi/bfd_stdint.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* generated for arm-linux-musleabi-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
40
libc/include/arm-linux-musleabi/bits/fcntl.h
Normal file
40
libc/include/arm-linux-musleabi/bits/fcntl.h
Normal file
@ -0,0 +1,40 @@
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DSYNC 010000
|
||||
#define O_SYNC 04010000
|
||||
#define O_RSYNC 04010000
|
||||
#define O_DIRECTORY 040000
|
||||
#define O_NOFOLLOW 0100000
|
||||
#define O_CLOEXEC 02000000
|
||||
|
||||
#define O_ASYNC 020000
|
||||
#define O_DIRECT 0200000
|
||||
#define O_LARGEFILE 0400000
|
||||
#define O_NOATIME 01000000
|
||||
#define O_PATH 010000000
|
||||
#define O_TMPFILE 020040000
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
|
||||
#define F_DUPFD 0
|
||||
#define F_GETFD 1
|
||||
#define F_SETFD 2
|
||||
#define F_GETFL 3
|
||||
#define F_SETFL 4
|
||||
|
||||
#define F_SETOWN 8
|
||||
#define F_GETOWN 9
|
||||
#define F_SETSIG 10
|
||||
#define F_GETSIG 11
|
||||
|
||||
#define F_GETLK 12
|
||||
#define F_SETLK 13
|
||||
#define F_SETLKW 14
|
||||
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
53
libc/include/arm-linux-musleabi/bits/hwcap.h
Normal file
53
libc/include/arm-linux-musleabi/bits/hwcap.h
Normal file
@ -0,0 +1,53 @@
|
||||
#define HWCAP_SWP (1 << 0)
|
||||
#define HWCAP_HALF (1 << 1)
|
||||
#define HWCAP_THUMB (1 << 2)
|
||||
#define HWCAP_26BIT (1 << 3)
|
||||
#define HWCAP_FAST_MULT (1 << 4)
|
||||
#define HWCAP_FPA (1 << 5)
|
||||
#define HWCAP_VFP (1 << 6)
|
||||
#define HWCAP_EDSP (1 << 7)
|
||||
#define HWCAP_JAVA (1 << 8)
|
||||
#define HWCAP_IWMMXT (1 << 9)
|
||||
#define HWCAP_CRUNCH (1 << 10)
|
||||
#define HWCAP_THUMBEE (1 << 11)
|
||||
#define HWCAP_NEON (1 << 12)
|
||||
#define HWCAP_VFPv3 (1 << 13)
|
||||
#define HWCAP_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_TLS (1 << 15)
|
||||
#define HWCAP_VFPv4 (1 << 16)
|
||||
#define HWCAP_IDIVA (1 << 17)
|
||||
#define HWCAP_IDIVT (1 << 18)
|
||||
#define HWCAP_VFPD32 (1 << 19)
|
||||
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
|
||||
#define HWCAP_LPAE (1 << 20)
|
||||
#define HWCAP_EVTSTRM (1 << 21)
|
||||
|
||||
#define HWCAP2_AES (1 << 0)
|
||||
#define HWCAP2_PMULL (1 << 1)
|
||||
#define HWCAP2_SHA1 (1 << 2)
|
||||
#define HWCAP2_SHA2 (1 << 3)
|
||||
#define HWCAP2_CRC32 (1 << 4)
|
||||
|
||||
#define HWCAP_ARM_SWP (1 << 0)
|
||||
#define HWCAP_ARM_HALF (1 << 1)
|
||||
#define HWCAP_ARM_THUMB (1 << 2)
|
||||
#define HWCAP_ARM_26BIT (1 << 3)
|
||||
#define HWCAP_ARM_FAST_MULT (1 << 4)
|
||||
#define HWCAP_ARM_FPA (1 << 5)
|
||||
#define HWCAP_ARM_VFP (1 << 6)
|
||||
#define HWCAP_ARM_EDSP (1 << 7)
|
||||
#define HWCAP_ARM_JAVA (1 << 8)
|
||||
#define HWCAP_ARM_IWMMXT (1 << 9)
|
||||
#define HWCAP_ARM_CRUNCH (1 << 10)
|
||||
#define HWCAP_ARM_THUMBEE (1 << 11)
|
||||
#define HWCAP_ARM_NEON (1 << 12)
|
||||
#define HWCAP_ARM_VFPv3 (1 << 13)
|
||||
#define HWCAP_ARM_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_ARM_TLS (1 << 15)
|
||||
#define HWCAP_ARM_VFPv4 (1 << 16)
|
||||
#define HWCAP_ARM_IDIVA (1 << 17)
|
||||
#define HWCAP_ARM_IDIVT (1 << 18)
|
||||
#define HWCAP_ARM_VFPD32 (1 << 19)
|
||||
#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
|
||||
#define HWCAP_ARM_LPAE (1 << 20)
|
||||
#define HWCAP_ARM_EVTSTRM (1 << 21)
|
2
libc/include/arm-linux-musleabi/bits/ioctl_fix.h
Normal file
2
libc/include/arm-linux-musleabi/bits/ioctl_fix.h
Normal file
@ -0,0 +1,2 @@
|
||||
#undef FIOQSIZE
|
||||
#define FIOQSIZE 0x545e
|
15
libc/include/arm-linux-musleabi/bits/msg.h
Normal file
15
libc/include/arm-linux-musleabi/bits/msg.h
Normal file
@ -0,0 +1,15 @@
|
||||
struct msqid_ds {
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
int __unused1;
|
||||
time_t msg_rtime;
|
||||
int __unused2;
|
||||
time_t msg_ctime;
|
||||
int __unused3;
|
||||
unsigned long msg_cbytes;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msg_lrpid;
|
||||
unsigned long __unused[2];
|
||||
};
|
25
libc/include/arm-linux-musleabi/bits/ptrace.h
Normal file
25
libc/include/arm-linux-musleabi/bits/ptrace.h
Normal file
@ -0,0 +1,25 @@
|
||||
#define PTRACE_GETWMMXREGS 18
|
||||
#define PTRACE_SETWMMXREGS 19
|
||||
#define PTRACE_GET_THREAD_AREA 22
|
||||
#define PTRACE_SET_SYSCALL 23
|
||||
#define PTRACE_GETCRUNCHREGS 25
|
||||
#define PTRACE_SETCRUNCHREGS 26
|
||||
#define PTRACE_GETVFPREGS 27
|
||||
#define PTRACE_SETVFPREGS 28
|
||||
#define PTRACE_GETHBPREGS 29
|
||||
#define PTRACE_SETHBPREGS 30
|
||||
#define PTRACE_GETFDPIC 31
|
||||
#define PTRACE_GETFDPIC_EXEC 0
|
||||
#define PTRACE_GETFDPIC_INTERP 1
|
||||
|
||||
#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
|
||||
#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
|
||||
#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
|
||||
#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
|
||||
#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
|
||||
#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
|
||||
#define PT_GETVFPREGS PTRACE_GETVFPREGS
|
||||
#define PT_SETVFPREGS PTRACE_SETVFPREGS
|
||||
#define PT_GETHBPREGS PTRACE_GETHBPREGS
|
||||
#define PT_SETHBPREGS PTRACE_SETHBPREGS
|
||||
#define PT_GETFDPIC PTRACE_GETFDPIC
|
27
libc/include/arm-linux-musleabi/bits/shm.h
Normal file
27
libc/include/arm-linux-musleabi/bits/shm.h
Normal file
@ -0,0 +1,27 @@
|
||||
#define SHMLBA 4096
|
||||
|
||||
struct shmid_ds {
|
||||
struct ipc_perm shm_perm;
|
||||
size_t shm_segsz;
|
||||
time_t shm_atime;
|
||||
int __unused1;
|
||||
time_t shm_dtime;
|
||||
int __unused2;
|
||||
time_t shm_ctime;
|
||||
int __unused3;
|
||||
pid_t shm_cpid;
|
||||
pid_t shm_lpid;
|
||||
unsigned long shm_nattch;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
struct shminfo {
|
||||
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
|
||||
};
|
||||
|
||||
struct shm_info {
|
||||
int __used_ids;
|
||||
unsigned long shm_tot, shm_rss, shm_swp;
|
||||
unsigned long __swap_attempts, __swap_successes;
|
||||
};
|
20
libc/include/arm-linux-musleabi/bits/stdint.h
Normal file
20
libc/include/arm-linux-musleabi/bits/stdint.h
Normal file
@ -0,0 +1,20 @@
|
||||
typedef int32_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef uint32_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
#define INT_FAST16_MIN INT32_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
|
||||
#define INT_FAST16_MAX INT32_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
|
||||
#define UINT_FAST16_MAX UINT32_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#define SIZE_MAX UINT32_MAX
|
12
libc/include/arm-linux-musleabihf/asm/fcntl.h
Normal file
12
libc/include/arm-linux-musleabihf/asm/fcntl.h
Normal file
@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ARM_FCNTL_H
|
||||
#define _ARM_FCNTL_H
|
||||
|
||||
#define O_DIRECTORY 040000 /* must be a directory */
|
||||
#define O_NOFOLLOW 0100000 /* don't follow links */
|
||||
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
|
||||
#define O_LARGEFILE 0400000
|
||||
|
||||
#include <asm-generic/fcntl.h>
|
||||
|
||||
#endif
|
9
libc/include/arm-linux-musleabihf/asm/ioctls.h
Normal file
9
libc/include/arm-linux-musleabihf/asm/ioctls.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_ARM_IOCTLS_H
|
||||
#define __ASM_ARM_IOCTLS_H
|
||||
|
||||
#define FIOQSIZE 0x545E
|
||||
|
||||
#include <asm-generic/ioctls.h>
|
||||
|
||||
#endif
|
4
libc/include/arm-linux-musleabihf/asm/mman.h
Normal file
4
libc/include/arm-linux-musleabihf/asm/mman.h
Normal file
@ -0,0 +1,4 @@
|
||||
#include <asm-generic/mman.h>
|
||||
|
||||
#define arch_mmap_check(addr, len, flags) \
|
||||
(((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)
|
13
libc/include/arm-linux-musleabihf/asm/statfs.h
Normal file
13
libc/include/arm-linux-musleabihf/asm/statfs.h
Normal file
@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASMARM_STATFS_H
|
||||
#define _ASMARM_STATFS_H
|
||||
|
||||
/*
|
||||
* With EABI there is 4 bytes of padding added to this structure.
|
||||
* Let's pack it so the padding goes away to simplify dual ABI support.
|
||||
* Note that user space does NOT have to pack this structure.
|
||||
*/
|
||||
#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))
|
||||
|
||||
#include <asm-generic/statfs.h>
|
||||
#endif
|
52
libc/include/arm-linux-musleabihf/asm/swab.h
Normal file
52
libc/include/arm-linux-musleabihf/asm/swab.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* arch/arm/include/asm/byteorder.h
|
||||
*
|
||||
* ARM Endian-ness. In little endian mode, the data bus is connected such
|
||||
* that byte accesses appear as:
|
||||
* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31
|
||||
* and word accesses (data or instruction) appear as:
|
||||
* d0...d31
|
||||
*
|
||||
* When in big endian mode, byte accesses appear as:
|
||||
* 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7
|
||||
* and word accesses (data or instruction) appear as:
|
||||
* d0...d31
|
||||
*/
|
||||
#ifndef __ASM_ARM_SWAB_H
|
||||
#define __ASM_ARM_SWAB_H
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
|
||||
# define __SWAB_64_THRU_32__
|
||||
#endif
|
||||
|
||||
|
||||
static __inline__ __u32 __arch_swab32(__u32 x)
|
||||
{
|
||||
__u32 t;
|
||||
|
||||
#ifndef __thumb__
|
||||
if (!__builtin_constant_p(x)) {
|
||||
/*
|
||||
* The compiler needs a bit of a hint here to always do the
|
||||
* right thing and not screw it up to different degrees
|
||||
* depending on the gcc version.
|
||||
*/
|
||||
__asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
|
||||
} else
|
||||
#endif
|
||||
t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */
|
||||
|
||||
x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */
|
||||
t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */
|
||||
x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */
|
||||
|
||||
return x;
|
||||
}
|
||||
#define __arch_swab32 __arch_swab32
|
||||
|
||||
|
||||
#endif /* __ASM_ARM_SWAB_H */
|
41
libc/include/arm-linux-musleabihf/asm/types.h
Normal file
41
libc/include/arm-linux-musleabihf/asm/types.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_TYPES_H
|
||||
#define _ASM_TYPES_H
|
||||
|
||||
#include <asm-generic/int-ll64.h>
|
||||
|
||||
/*
|
||||
* The C99 types uintXX_t that are usually defined in 'stdint.h' are not as
|
||||
* unambiguous on ARM as you would expect. For the types below, there is a
|
||||
* difference on ARM between GCC built for bare metal ARM, GCC built for glibc
|
||||
* and the kernel itself, which results in build errors if you try to build with
|
||||
* -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h'
|
||||
* in order to use NEON intrinsics)
|
||||
*
|
||||
* As the typedefs for these types in 'stdint.h' are based on builtin defines
|
||||
* supplied by GCC, we can tweak these to align with the kernel's idea of those
|
||||
* types, so 'linux/types.h' and 'stdint.h' can be safely included from the same
|
||||
* source file (provided that -ffreestanding is used).
|
||||
*
|
||||
* int32_t uint32_t uintptr_t
|
||||
* bare metal GCC long unsigned long unsigned int
|
||||
* glibc GCC int unsigned int unsigned int
|
||||
* kernel int unsigned int unsigned long
|
||||
*/
|
||||
|
||||
#ifdef __INT32_TYPE__
|
||||
#undef __INT32_TYPE__
|
||||
#define __INT32_TYPE__ int
|
||||
#endif
|
||||
|
||||
#ifdef __UINT32_TYPE__
|
||||
#undef __UINT32_TYPE__
|
||||
#define __UINT32_TYPE__ unsigned int
|
||||
#endif
|
||||
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
#undef __UINTPTR_TYPE__
|
||||
#define __UINTPTR_TYPE__ unsigned long
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_TYPES_H */
|
8034
libc/include/arm-linux-musleabihf/bfd.h
Normal file
8034
libc/include/arm-linux-musleabihf/bfd.h
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user