summaryrefslogtreecommitdiff
path: root/src/kernel/task
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-01 12:20:45 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-01 12:20:45 +0200
commit5cac9acd3aedc8043d4272d93c56805c46ff6214 (patch)
treeba9eb5ef86f7cf7afd4f7ab02de1d6bb86715632 /src/kernel/task
parent66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 (diff)
downloadTCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.tar.gz
TCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.zip
Some cleanup ; relocated the kernel at 0xC0000000
Diffstat (limited to 'src/kernel/task')
-rw-r--r--src/kernel/task/syscall.c4
-rw-r--r--src/kernel/task/task.c6
2 files changed, 3 insertions, 7 deletions
diff --git a/src/kernel/task/syscall.c b/src/kernel/task/syscall.c
index 3ae546f..5d40596 100644
--- a/src/kernel/task/syscall.c
+++ b/src/kernel/task/syscall.c
@@ -23,8 +23,6 @@ CALL1(monitor_write, printk_sc);
CALL1V(idt_waitIrq, irq_wait_sc);
CALL0(proc_priv, proc_priv_sc);
CALL2(process_setheapseg, proc_setheap_sc);
-CALL2(shm_create, shm_create_sc);
-CALL1(shm_delete, shm_delete_sc);
static void thread_new_sc(struct registers* r) {
cli();
@@ -42,6 +40,4 @@ int_callback syscalls[NUMBER_OF_SYSCALLS] = {
irq_wait_sc,
proc_priv_sc,
proc_setheap_sc,
- shm_create_sc,
- shm_delete_sc, //10
0 };
diff --git a/src/kernel/task/task.c b/src/kernel/task/task.c
index 3d322c1..a6becdb 100644
--- a/src/kernel/task/task.c
+++ b/src/kernel/task/task.c
@@ -42,7 +42,7 @@ void tasking_init() {
monitor_write("[Tasking] ");
}
-/* Called by the paging functions when a page table is allocated in the kernel space (>0xE0000000).
+/* Called by the paging functions when a page table is allocated in the kernel space (>K_HIGHHALF_ADDR).
Updates the page directories of all the processes. */
void tasking_updateKernelPagetable(uint32_t idx, struct page_table *table, uint32_t tablephysical) {
if (idx < 896) return;
@@ -103,7 +103,7 @@ uint32_t tasking_handleException(struct registers *regs) {
"Page Fault","Unknown Interrupt","Coprocessor Fault","Alignment Check","Machine Check"};
monitor_write(exception_messages[regs->int_no]);
monitor_write("'\teip:"); monitor_writeHex(regs->eip);
- if (regs->eip >= 0xE0000000) {
+ if (regs->eip >= K_HIGHHALF_ADDR) {
monitor_write("\n Exception stack trace :\n");
stack_trace(regs->ebp);
PANIC("Kernel error'd.");
@@ -342,7 +342,7 @@ static void process_delete(struct process *pr) {
/* System call. Called by the app to define the place for the heap. */
int process_setheapseg(size_t start, size_t end) { //syscall
struct process *p = current_thread->process;
- if (start >= 0xE0000000 || end >= 0xE0000000) return -1;
+ if (start >= K_HIGHHALF_ADDR || end >= K_HIGHHALF_ADDR) return -1;
if (p->heapseg == 0) {
struct segment *s = simpleseg_make(start, end - start, 1);
if (s == 0) return -5;