Fixed the problem that mm0 would read registers from actual MR0

instead of MR_UNUSED_START.
This commit is contained in:
Bahadir Balban
2008-02-04 19:35:13 +00:00
parent ddba7536cb
commit ca5229ff88
6 changed files with 26 additions and 5 deletions

View File

@@ -11,8 +11,8 @@
#include INC_GLUE(memory.h)
/* Ticks per second, try ticks = 1000 + timeslice = 1 for regressed preemption test. */
#define HZ 100
#define TASK_TIMESLICE_DEFAULT 20
#define HZ 10
#define TASK_TIMESLICE_DEFAULT 100
/* #define TASK_TIMESLICE_DEFAULT (HZ/100)*/
static inline struct ktcb *current_task(void)

View File

@@ -47,7 +47,7 @@ void handle_requests(void)
/* Read mrs not used by syslib */
for (int i = 0; i < MR_UNUSED_TOTAL; i++)
mr[i] = read_mr(i);
mr[i] = read_mr(MR_UNUSED_START + i);
switch(tag) {
case L4_IPC_TAG_WAIT:

View File

@@ -51,5 +51,9 @@ void set_generic_fault_params(struct fault_data *fault)
else
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);
}

View File

@@ -118,7 +118,8 @@ int do_file_page(struct fault_data *fault)
BUG_ON(!list_empty(&page->list));
list_add(&page->list, &page->owner->page_cache_list);
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 */
} else if ((reason & VM_WRITE) && (pte_flags & VM_READ)
&& !(vma_flags & VMA_COW)) {
@@ -457,7 +458,6 @@ void page_fault_handler(l4id_t sender, fault_kdata_t *fkdata)
.kdata = fkdata,
};
printf("%s: Handling fault from %d.\n", __TASKNAME__, sender);
BUG_ON(sender == 0);
/* Get pager specific task info */

4
tools/helper-scripts/touch_all Executable file
View File

@@ -0,0 +1,4 @@
find . -exec touch {} \;
# or
# find . | xargs touch

13
tools/l4-qemunew Executable file
View 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.