- handle the supervisor bit from SR correctly on iframes
- various notes on 060 vs others: - 060 has 040 compatible mmu, except pgtables must *not* be on copyback memory - 060 has a processor control reg which has a revision number to use in system_info - notes on ctx switch: - must be kept in sync with asm code - fsave generate variable size frames, so reserve space and use non-predecrementing EA. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26288 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -79,6 +79,7 @@ FUNCTION(get_time_base):
|
||||
|
||||
|
||||
#warning M68K: FIX m68k_context_switch
|
||||
// XXX:sync with arch_thread.c:arch_thread_init_kthread_stack
|
||||
// void m68k_context_switch(addr_t *old_sp, addr_t new_sp);
|
||||
FUNCTION(m68k_context_switch):
|
||||
// save fp ?
|
||||
@@ -86,6 +87,7 @@ FUNCTION(m68k_context_switch):
|
||||
movem.l %d0-%d7/%a0-%a7,-(%sp)
|
||||
fmovem %fp0-%fp7,-(%sp)
|
||||
fsave -(%sp)
|
||||
#warning M68K: use fixed size for fsave
|
||||
|
||||
// XXX
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ arch_system_info_init(struct kernel_args *args)
|
||||
sBusClockFrequency = args->arch_args.bus_frequency;
|
||||
|
||||
sCPURevision = args->arch_args.cpu_type; //XXX
|
||||
#warning M68K: use 060 PCR[15:8]
|
||||
sCPUType = B_CPU_M68K;
|
||||
|
||||
return B_OK;
|
||||
|
||||
@@ -84,8 +84,8 @@ m68k_get_user_iframe(void)
|
||||
|
||||
for (i = thread->arch_info.iframes.index - 1; i >= 0; i--) {
|
||||
struct iframe *frame = thread->arch_info.iframes.frames[i];
|
||||
// if (frame->srr1 & MSR_PRIVILEGE_LEVEL)
|
||||
// return frame;
|
||||
if (frame->sr & (1 << M68K_SR_S) == 0)
|
||||
return frame;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -52,6 +52,8 @@ arch_update_thread_single_step()
|
||||
// 0 1 trace on flow
|
||||
// 1 0 single step
|
||||
// 1 1 undef
|
||||
// note 060 and 020(?) only have T1 bit,
|
||||
// but this should be compatible as well.
|
||||
if (thread->debug_info.flags & B_THREAD_DEBUG_SINGLE_STEP) {
|
||||
frame->cpu.sr &= ~(M68K_SR_T_MASK);
|
||||
frame->cpu.sr |= (1 << M68K_SR_T1);
|
||||
|
||||
@@ -28,10 +28,13 @@
|
||||
* so we use a function array to switch to the one we want.
|
||||
*/
|
||||
|
||||
#warning M68K: 060: must *not* have pgtables in copyback cachable mem!!!
|
||||
|
||||
//extern struct m68k_vm_ops m68851_vm_ops;
|
||||
extern struct m68k_vm_ops m68030_vm_ops;
|
||||
//extern struct m68k_vm_ops m68030_vm_ops;
|
||||
//extern struct m68k_vm_ops m68030_vm_ops;
|
||||
//extern struct m68k_vm_ops m68040_vm_ops;
|
||||
// 060 should be identical to 040 except for copyback issue
|
||||
//extern struct m68k_vm_ops m68060_vm_ops;
|
||||
|
||||
#warning M68K: use a static!
|
||||
m68k_vm_ops *get_vm_ops()
|
||||
|
||||
Reference in New Issue
Block a user