aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/conf
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-24 23:00:41 -0400
committerIan Moffett <ian@osmora.org>2024-06-24 23:00:41 -0400
commit963478ff0ad358fc3a44ff5dba0c64ddc889f296 (patch)
treea14c3ea6feb7d1b783364737fcefabce249473ff /sys/arch/amd64/conf
parent236963e7563be3e3f8220dac7bb4af446928e194 (diff)
parent6f6a36d1e8b3dd50cb4d394fa1de4888663b4ea5 (diff)
Import hyra expt
Diffstat (limited to 'sys/arch/amd64/conf')
-rw-r--r--sys/arch/amd64/conf/GENERIC5
-rw-r--r--sys/arch/amd64/conf/link.ld53
2 files changed, 58 insertions, 0 deletions
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC
new file mode 100644
index 0000000..a7bbc81
--- /dev/null
+++ b/sys/arch/amd64/conf/GENERIC
@@ -0,0 +1,5 @@
+// Kernel options
+option SPECTRE_IBRS no
+
+// Kernel constants
+setval SCHED_NQUEUE 4
diff --git a/sys/arch/amd64/conf/link.ld b/sys/arch/amd64/conf/link.ld
new file mode 100644
index 0000000..9c47a81
--- /dev/null
+++ b/sys/arch/amd64/conf/link.ld
@@ -0,0 +1,53 @@
+OUTPUT_FORMAT(elf64-x86-64)
+OUTPUT_ARCH(i386:x86-64)
+ENTRY(main)
+
+PHDRS
+{
+ text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */
+ rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */
+ data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */
+}
+
+SECTIONS
+{
+ . = 0xFFFFFFFF80000000;
+
+ .text : {
+ *(.text .text.*)
+ } :text
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .rodata : {
+ *(.rodata .rodata.*)
+ } :rodata
+
+ .drivers : {
+ __drivers_init_start = .;
+ *(.drivers .drivers)
+ __drivers_init_end = .;
+ } :rodata
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .data : {
+ *(.data)
+ } :data
+
+ .bss : {
+ *(COMMON)
+ *(.bss .bss.*)
+ } :data
+
+ /* -- Cache line alignment -- */
+ . = ALIGN(64);
+ .data.cacheline_aligned : {
+ *(.data.cacheline_aligned)
+ }
+
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.note .note.*)
+ }
+}