a commit
This commit is contained in:
16
kernel/include/amemcpy.h
Normal file
16
kernel/include/amemcpy.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef HEADER_AMEMCPY_H
|
||||
#define HEADER_AMEMCPY_H
|
||||
|
||||
#include <aal/cpu.h>
|
||||
|
||||
static void memcpy_async_wait(unsigned long *notify)
|
||||
{
|
||||
while (!*notify) {
|
||||
cpu_pause();
|
||||
}
|
||||
}
|
||||
|
||||
int memcpy_async(unsigned long dest, unsigned long src,
|
||||
unsigned long len, int wait, unsigned long *notify);
|
||||
|
||||
#endif
|
||||
@@ -6,7 +6,12 @@
|
||||
#include <aal/mm.h>
|
||||
#include <list.h>
|
||||
|
||||
#define VR_STACK 1
|
||||
#define VR_STACK 0x1
|
||||
#define VR_RESERVED 0x2
|
||||
#define VR_IO_NOCACHE 0x100
|
||||
#define VR_REMOTE 0x200
|
||||
|
||||
#define PS_ZOMBIE 0x1
|
||||
|
||||
struct vm_range {
|
||||
struct list_head list;
|
||||
@@ -37,6 +42,9 @@ struct process {
|
||||
};
|
||||
|
||||
struct process *create_process(unsigned long user_pc);
|
||||
void destroy_process(struct process *proc);
|
||||
void free_process_memory(struct process *proc);
|
||||
|
||||
int add_process_memory_range(struct process *process,
|
||||
unsigned long start, unsigned long end,
|
||||
unsigned long phys, unsigned long flag);
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
#define NUM_SYSCALLS 255
|
||||
|
||||
#define REQUEST_PAGE_COUNT 16
|
||||
#define RESPONSE_PAGE_COUNT 16
|
||||
#define DOORBELL_PAGE_COUNT 1
|
||||
#define SCD_RESERVED_COUNT \
|
||||
(REQUEST_PAGE_COUNT + RESPONSE_PAGE_COUNT + DOORBELL_PAGE_COUNT)
|
||||
|
||||
#define SCD_MSG_PREPARE_PROCESS 0x1
|
||||
#define SCD_MSG_PREPARE_PROCESS_ACKED 0x2
|
||||
#define SCD_MSG_SCHEDULE_PROCESS 0x3
|
||||
@@ -40,6 +46,7 @@ struct ikc_scd_init_param {
|
||||
unsigned long request_page;
|
||||
unsigned long response_page;
|
||||
unsigned long doorbell_page;
|
||||
unsigned long post_page;
|
||||
};
|
||||
|
||||
struct syscall_request {
|
||||
@@ -52,6 +59,10 @@ struct syscall_response {
|
||||
long ret;
|
||||
};
|
||||
|
||||
struct syscall_post {
|
||||
unsigned long v[4];
|
||||
};
|
||||
|
||||
struct syscall_params {
|
||||
unsigned long request_rpa, request_pa;
|
||||
struct syscall_request *request_va;
|
||||
@@ -60,6 +71,12 @@ struct syscall_params {
|
||||
|
||||
unsigned long doorbell_rpa, doorbell_pa;
|
||||
unsigned long *doorbell_va;
|
||||
|
||||
unsigned int post_idx;
|
||||
unsigned long post_rpa, post_pa;
|
||||
struct syscall_post *post_va;
|
||||
unsigned long post_fin;
|
||||
struct syscall_post post_buf;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user