コード例 #1
0
ファイル: arm32_machdep.c プロジェクト: goroutines/rumprun
void
bootsync(void)
{
	static bool bootsyncdone = false;

	if (bootsyncdone) return;

	bootsyncdone = true;

	/* Make sure we can still manage to do things */
	if (GetCPSR() & I32_bit) {
		/*
		 * If we get here then boot has been called without RB_NOSYNC
		 * and interrupts were disabled. This means the boot() call
		 * did not come from a user process e.g. shutdown, but must
		 * have come from somewhere in the kernel.
		 */
		IRQenable;
		printf("Warning IRQ's disabled during boot()\n");
	}

	vfs_shutdown();

	resettodr();
}
コード例 #2
0
ファイル: arm_mmu.cpp プロジェクト: MarginC/kame
BOOL
MemoryManager_ArmMMU::init(void)
{
	u_int32_t reg;

	_kmode = SetKMode(1);
	// Check system mode
	if ((GetCPSR() & 0x1f) != 0x1f) {
		DPRINTF((TEXT("not System mode\n")));
		return FALSE;
	}
	// Domain access control.(full access)
	SetCop15Reg3(~0);

	// Get Translation table base.
	reg = GetCop15Reg2();
	_table_base =  reg & ARM_MMU_TABLEBASE_MASK;
	DPRINTF((TEXT("page directory address=0x%08x->0x%08x(0x%08x)\n"),
	    _table_base, readPhysical4(_table_base), reg));

	return TRUE;
}