22 lines
464 B
C
22 lines
464 B
C
#include <machine/mrt.h>
|
|
#include <string.h>
|
|
#include <machine/pmap.h>
|
|
|
|
// early metal init
|
|
void mtl_init(void)
|
|
{
|
|
// initialize metal mode
|
|
memset(&mtl_mrt_tbl, 0, sizeof(mtl_mrt_tbl));
|
|
|
|
mtl_mrt_tbl.entries[MRT_INIT_IDX] = MROUTINE_ENTRY_MAKE(mrt_init, 1);
|
|
|
|
// load mroutine table
|
|
METAL_WMR(METAL_REG_MBR, &mtl_mrt_tbl);
|
|
|
|
// toggle metal mode
|
|
METAL_MENTER(MRT_INIT_IDX);
|
|
|
|
// call dummy mroutine to cache the entries
|
|
METAL_MENTER(0);
|
|
}
|