mirror of
https://github.com/drasko/codezero.git
synced 2026-04-23 12:19:05 +02:00
Fixed the problem that mm0 would read registers from actual MR0
instead of MR_UNUSED_START.
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
#include INC_GLUE(memory.h)
|
#include INC_GLUE(memory.h)
|
||||||
|
|
||||||
/* Ticks per second, try ticks = 1000 + timeslice = 1 for regressed preemption test. */
|
/* Ticks per second, try ticks = 1000 + timeslice = 1 for regressed preemption test. */
|
||||||
#define HZ 100
|
#define HZ 10
|
||||||
#define TASK_TIMESLICE_DEFAULT 20
|
#define TASK_TIMESLICE_DEFAULT 100
|
||||||
/* #define TASK_TIMESLICE_DEFAULT (HZ/100)*/
|
/* #define TASK_TIMESLICE_DEFAULT (HZ/100)*/
|
||||||
|
|
||||||
static inline struct ktcb *current_task(void)
|
static inline struct ktcb *current_task(void)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void handle_requests(void)
|
|||||||
|
|
||||||
/* Read mrs not used by syslib */
|
/* Read mrs not used by syslib */
|
||||||
for (int i = 0; i < MR_UNUSED_TOTAL; i++)
|
for (int i = 0; i < MR_UNUSED_TOTAL; i++)
|
||||||
mr[i] = read_mr(i);
|
mr[i] = read_mr(MR_UNUSED_START + i);
|
||||||
|
|
||||||
switch(tag) {
|
switch(tag) {
|
||||||
case L4_IPC_TAG_WAIT:
|
case L4_IPC_TAG_WAIT:
|
||||||
|
|||||||
@@ -51,5 +51,9 @@ void set_generic_fault_params(struct fault_data *fault)
|
|||||||
else
|
else
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
printf("%s: Handling %s fault (%s abort) from %d. fault @ 0x%x\n",
|
||||||
|
__TASKNAME__, (fault->reason & VM_READ) ? "read" : "write",
|
||||||
|
is_prefetch_abort(fault->kdata->fsr) ? "prefetch" : "data",
|
||||||
|
fault->task->tid, fault->address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ int do_file_page(struct fault_data *fault)
|
|||||||
BUG_ON(!list_empty(&page->list));
|
BUG_ON(!list_empty(&page->list));
|
||||||
list_add(&page->list, &page->owner->page_cache_list);
|
list_add(&page->list, &page->owner->page_cache_list);
|
||||||
spin_unlock(&page->lock);
|
spin_unlock(&page->lock);
|
||||||
|
printf("%s: Mapped new page @ 0x%x to task: %d\n", __TASKNAME__,
|
||||||
|
fault->address, fault->task->tid);
|
||||||
/* Upgrade RO page to non-cow write */
|
/* Upgrade RO page to non-cow write */
|
||||||
} else if ((reason & VM_WRITE) && (pte_flags & VM_READ)
|
} else if ((reason & VM_WRITE) && (pte_flags & VM_READ)
|
||||||
&& !(vma_flags & VMA_COW)) {
|
&& !(vma_flags & VMA_COW)) {
|
||||||
@@ -457,7 +458,6 @@ void page_fault_handler(l4id_t sender, fault_kdata_t *fkdata)
|
|||||||
.kdata = fkdata,
|
.kdata = fkdata,
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("%s: Handling fault from %d.\n", __TASKNAME__, sender);
|
|
||||||
BUG_ON(sender == 0);
|
BUG_ON(sender == 0);
|
||||||
|
|
||||||
/* Get pager specific task info */
|
/* Get pager specific task info */
|
||||||
|
|||||||
4
tools/helper-scripts/touch_all
Executable file
4
tools/helper-scripts/touch_all
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
find . -exec touch {} \;
|
||||||
|
|
||||||
|
# or
|
||||||
|
# find . | xargs touch
|
||||||
13
tools/l4-qemunew
Executable file
13
tools/l4-qemunew
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
cd build
|
||||||
|
#arm-none-eabi-insight &
|
||||||
|
/opt/bin/qemu-system-arm -s -kernel final.axf -nographic -m 128 -M versatilepb &
|
||||||
|
arm-none-eabi-insight ; pkill qemu-system-arm
|
||||||
|
#arm-none-eabi-gdb ; pkill qemu-system-arm
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# insight works ok if gdbinit script is run from the insight
|
||||||
|
# command window. Then one needs to break at bkpt_phys_to_virt and do:
|
||||||
|
# sym start.axf
|
||||||
|
# Then continue execution to see all symbols. This must be done automatic.
|
||||||
Reference in New Issue
Block a user