mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[kernel] Expose a sysconf page to userspace
A structure, system_config, which is dynamically defined by the definitions/sysconf.yaml config, is now mapped into every user address space. The kernel fills this with information about itself and the running machine. User programs access this through the new j6_sysconf fake syscall in libj6. See: Github bug #242 See: [frobozz blog post](https://jsix.dev/posts/frobozz/) Tags:
This commit is contained in:
@@ -60,6 +60,8 @@ kernel = module("kernel",
|
||||
"syscalls/system.cpp",
|
||||
"syscalls/thread.cpp",
|
||||
"syscalls/vm_area.cpp",
|
||||
"sysconf.cpp",
|
||||
"sysconf.h.cog",
|
||||
"task.s",
|
||||
"tss.cpp",
|
||||
"vm_space.cpp",
|
||||
@@ -69,9 +71,11 @@ from glob import glob
|
||||
from os.path import join
|
||||
|
||||
layout = join(source_root, "definitions/memory_layout.yaml")
|
||||
sysconf = join(source_root, "definitions/sysconf.yaml")
|
||||
definitions = glob('definitions/**/*.def', recursive=True)
|
||||
|
||||
kernel.add_depends(["memory.h.cog"], [layout])
|
||||
kernel.add_depends(["sysconf.h.cog"], [sysconf])
|
||||
kernel.add_depends(["syscall.cpp.cog", "syscall.h.cog", "syscalls.inc.cog"], definitions)
|
||||
|
||||
kernel.variables['ldflags'] = ["${ldflags}", "-T", "${source_root}/src/kernel/kernel.ld"]
|
||||
|
||||
Reference in New Issue
Block a user