Files
lk/arch/m68k/arch.c
2021-06-11 21:13:56 -07:00

45 lines
1.2 KiB
C

/*
* Copyright (c) 2021 Travis Geiselbrecht
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <lk/trace.h>
#include <lk/debug.h>
#include <stdint.h>
#include <arch/m68k.h>
#define LOCAL_TRACE 0
void arch_early_init(void) {
LTRACE;
// set the exception vector base
extern uint32_t exc_vectors[256];
asm volatile("movec %0, %%vbr" :: "r"(exc_vectors));
}
void arch_init(void) {
LTRACE;
}
void arch_idle(void) {
// set the SR such that we're in supervisor state and no ints are masked
asm("stop #0x2000" ::: "cc");
}
void arch_chain_load(void *entry, ulong arg0, ulong arg1, ulong arg2, ulong arg3) {
PANIC_UNIMPLEMENTED;
}
/* unimplemented cache operations */
void arch_disable_cache(uint flags) { PANIC_UNIMPLEMENTED; }
void arch_enable_cache(uint flags) { PANIC_UNIMPLEMENTED; }
void arch_clean_cache_range(addr_t start, size_t len) { PANIC_UNIMPLEMENTED; }
void arch_clean_invalidate_cache_range(addr_t start, size_t len) { PANIC_UNIMPLEMENTED; }
void arch_invalidate_cache_range(addr_t start, size_t len) { PANIC_UNIMPLEMENTED; }
void arch_sync_cache_range(addr_t start, size_t len) { PANIC_UNIMPLEMENTED; }