kernel: facility for user-visible memory
. map all objects named usermapped_*.o with globally visible pages; usermapped_glo_*.o with the VM 'global' bit on, i.e. permanently in tlb (very scarce resource!) . added kinfo, machine, kmessages and loadinfo for a start . modified log, tty to make use of the shared messages struct
This commit is contained in:
+3
-1
@@ -459,7 +459,6 @@
|
||||
# define GET_MONPARAMS 4 /* get monitor parameters */
|
||||
# define GET_KENV 5 /* get kernel environment string */
|
||||
# define GET_IRQHOOKS 6 /* get the IRQ table */
|
||||
# define GET_KMESSAGES 7 /* get kernel messages */
|
||||
# define GET_PRIVTAB 8 /* get kernel privileges table */
|
||||
# define GET_KADDRESSES 9 /* get various kernel addresses */
|
||||
# define GET_SCHEDINFO 10 /* get scheduling queues */
|
||||
@@ -611,6 +610,9 @@
|
||||
#define SVMCTL_MAP_PHYS_LEN m2_l2
|
||||
|
||||
#define VMMF_UNCACHED (1L << 0)
|
||||
#define VMMF_USER (1L << 1)
|
||||
#define VMMF_WRITE (1L << 2)
|
||||
#define VMMF_GLO (1L << 3)
|
||||
|
||||
/* Values for SVMCTL_PARAM. */
|
||||
#define VMCTL_CLEAR_PAGEFAULT 12
|
||||
|
||||
@@ -168,6 +168,7 @@ int receive(endpoint_t src, message *m_ptr, int *status_ptr);
|
||||
int send(endpoint_t dest, message *m_ptr);
|
||||
int sendnb(endpoint_t dest, message *m_ptr);
|
||||
int senda(asynmsg_t *table, size_t count);
|
||||
int _minix_kernel_info_struct(struct minix_kerninfo **);
|
||||
|
||||
int _do_kernel_call(message *m_ptr);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define SENDREC 3 /* SEND + RECEIVE */
|
||||
#define NOTIFY 4 /* asynchronous notify */
|
||||
#define SENDNB 5 /* nonblocking send */
|
||||
#define MINIX_KERNINFO 6 /* request kernel info structure */
|
||||
#define SENDA 16 /* asynchronous send */
|
||||
#define IPCNO_HIGHEST SENDA
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct kinfo {
|
||||
char param_buf[MULTIBOOT_PARAM_BUF_SIZE];
|
||||
|
||||
/* Minix stuff */
|
||||
struct kmessages *kmess;
|
||||
struct kmessages *kmessages;
|
||||
int do_serial_debug; /* system serial output */
|
||||
int serial_debug_baud; /* serial baud rate */
|
||||
int minix_panicing; /* are we panicing? */
|
||||
|
||||
@@ -168,7 +168,6 @@ int sys_umap_remote(endpoint_t proc_ep, endpoint_t grantee, int seg,
|
||||
vir_bytes vir_addr, vir_bytes bytes, phys_bytes *phys_addr);
|
||||
|
||||
/* Shorthands for sys_getinfo() system call. */
|
||||
#define sys_getkmessages(dst) sys_getinfo(GET_KMESSAGES, dst, 0,0,0)
|
||||
#define sys_getkinfo(dst) sys_getinfo(GET_KINFO, dst, 0,0,0)
|
||||
#define sys_getloadinfo(dst) sys_getinfo(GET_LOADINFO, dst, 0,0,0)
|
||||
#define sys_getmachine(dst) sys_getinfo(GET_MACHINE, dst, 0,0,0)
|
||||
|
||||
@@ -170,5 +170,23 @@ struct k_randomness {
|
||||
} bin[RANDOM_SOURCES];
|
||||
};
|
||||
|
||||
struct minix_kerninfo {
|
||||
/* Binaries will depend on the offsets etc. in this
|
||||
* structure, so it can't be changed willy-nilly. In
|
||||
* other words, it is ABI-restricted.
|
||||
*/
|
||||
#define KERNINFO_MAGIC 0xfc3b84bf
|
||||
u32_t kerninfo_magic;
|
||||
u32_t minix_feature_flags;
|
||||
u32_t flags_unused1;
|
||||
u32_t flags_unused2;
|
||||
u32_t flags_unused3;
|
||||
u32_t flags_unused4;
|
||||
struct kinfo *kinfo;
|
||||
struct machine *machine;
|
||||
struct kmessages *kmessages;
|
||||
struct loadinfo *loadinfo;
|
||||
} __packed;
|
||||
|
||||
#endif /* _TYPE_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user