init commit
This commit is contained in:
3
arch/generic/arch.mak
Normal file
3
arch/generic/arch.mak
Normal file
@@ -0,0 +1,3 @@
|
||||
# Generic architecture flags — override per port
|
||||
ARCH_CFLAGS :=
|
||||
ARCH_LDFLAGS :=
|
||||
7
arch/generic/bits/alltypes.h.in
Normal file
7
arch/generic/bits/alltypes.h.in
Normal file
@@ -0,0 +1,7 @@
|
||||
/* Generic type sizes — override per arch if different */
|
||||
TYPEDEF int ptrdiff_t;
|
||||
TYPEDEF unsigned long size_t;
|
||||
TYPEDEF long ssize_t;
|
||||
TYPEDEF unsigned long uintptr_t;
|
||||
TYPEDEF long intptr_t;
|
||||
TYPEDEF int wchar_t;
|
||||
30
arch/generic/kcall.h
Normal file
30
arch/generic/kcall.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _ELIBC_KCALL_H
|
||||
#define _ELIBC_KCALL_H
|
||||
|
||||
/* Elyz kernel-call abstraction.
|
||||
*
|
||||
* Elyz has NO syscall instruction. Communication with the kernel and PM
|
||||
* actors happens through capability invocation — a mechanism defined by the
|
||||
* kernel ABI (not finalised yet). This header describes the abstract
|
||||
* interface; the arch-specific implementation (arch/<arch>/kcall.h) fills in
|
||||
* the concrete mechanism.
|
||||
*
|
||||
* Current state: STUB — returns -ENOSYS until the Elyz kernel ABI is
|
||||
* stabilised.
|
||||
*/
|
||||
|
||||
#define ELYZ_OP_ALLOCATE 1
|
||||
#define ELYZ_OP_FREE 2
|
||||
#define ELYZ_OP_CARVE 3
|
||||
#define ELYZ_OP_EXIT 4
|
||||
|
||||
struct elyz_kcall {
|
||||
unsigned long opcode;
|
||||
unsigned long arg1;
|
||||
unsigned long arg2;
|
||||
unsigned short channel_id;
|
||||
};
|
||||
|
||||
long __kcall(struct elyz_kcall *msg);
|
||||
|
||||
#endif
|
||||
22
arch/generic/startup_info.h
Normal file
22
arch/generic/startup_info.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _ELIBC_STARTUP_INFO_H
|
||||
#define _ELIBC_STARTUP_INFO_H
|
||||
|
||||
/* Process-startup information block.
|
||||
*
|
||||
* The Elyz loader passes an opaque structure to every new process.
|
||||
* Layout and content are arch-defined (see arch/<arch>/startup_info.h).
|
||||
* At minimum the process receives:
|
||||
* - an initial memory pool (capability / region)
|
||||
* - argc / argv from the parent
|
||||
* - a capability-wallet (CNode) root
|
||||
*/
|
||||
|
||||
struct elyz_startup {
|
||||
unsigned long initial_cnode_cap;
|
||||
unsigned long initial_pool_addr;
|
||||
unsigned long initial_pool_size;
|
||||
int argc;
|
||||
char **argv;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user