コード例 #1
0
ファイル: mmu.c プロジェクト: user890104/openiBoot
void initialize_pagetable() {
	// Initialize the page table with a default identity mapping
	mmu_map_section_range(MemoryStart, MemoryEnd, MemoryStart, FALSE, FALSE);

	// Now we get to setup default mappings that we will need
	mmu_map_section_range(0x08000000, 0x10000000, 0x08000000, TRUE, TRUE);	// unknown, but mapped by iPhone
	
	// Should this be AMC0? I think that using 0x22000000 might be a bug in iBoot,
	// since this was AMC0 on the original iPhone
	mmu_map_section(0x22000000, 0x22000000, TRUE, TRUE);
//	mmu_map_section(AMC0, AMC0, TRUE, TRUE);

	// A quick workaround to allow booting emCORE
	mmu_map_section(0x22000000, 0, TRUE, TRUE);

	// Remap upper half of memory to the lower half
	mmu_map_section_range(MemoryHigher, MemoryEnd, MemoryStart, FALSE, FALSE);
}
コード例 #2
0
ファイル: mmu.c プロジェクト: Bluerise/iphonelinux
void initialize_pagetable() {
	// Initialize the page table with a default identity mapping
	mmu_map_section_range(MemoryStart, MemoryEnd, MemoryStart, FALSE, FALSE);

	// Now we get to setup default mappings that we will need
	mmu_map_section_range(0x08000000, 0x10000000, 0x08000000, TRUE, TRUE);	// unknown, but mapped by iPhone
	mmu_map_section(AMC0, AMC0, TRUE, TRUE);

	// Make our own code cacheable and bufferable
	//mmu_map_section_range(OpenIBootLoad, (uint32_t) &OpenIBootEnd, OpenIBootLoad, TRUE, TRUE);

	// Make ROM buffer cacheable and bufferable
	mmu_map_section(ROM, ROM, TRUE, TRUE);

	// Remap exception vector so we can actually get interrupts
	//mmu_map_section(ExceptionVector, OpenIBootLoad, TRUE, TRUE);

	// Remap upper half of memory to the lower half
	mmu_map_section_range(MemoryHigher, MemoryEnd, MemoryStart, FALSE, FALSE);
}