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:
34
definitions/sysconf.yaml
Normal file
34
definitions/sysconf.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
address: 0x6a360000
|
||||
vars:
|
||||
- name: version_major
|
||||
section: kernel
|
||||
type: uint8_t
|
||||
|
||||
- name: version_minor
|
||||
section: kernel
|
||||
type: uint8_t
|
||||
|
||||
- name: version_patch
|
||||
section: kernel
|
||||
type: uint16_t
|
||||
|
||||
- name: version_gitsha
|
||||
section: kernel
|
||||
type: uint32_t
|
||||
|
||||
- name: page_size
|
||||
section: sys
|
||||
type: size_t
|
||||
|
||||
- name: large_page_size
|
||||
section: sys
|
||||
type: size_t
|
||||
|
||||
- name: huge_page_size
|
||||
section: sys
|
||||
type: size_t
|
||||
|
||||
- name: num_cpus
|
||||
section: sys
|
||||
type: uint32_t
|
||||
Reference in New Issue
Block a user