Exemple #1
0
void
autoconf(void)
{
	/* make IO area mappable from user applications */

	(void)pmap_add_physical_memory(powermac_info.io_base_phys,
				       (powermac_info.io_base_phys +
					powermac_info.io_size),
				       FALSE,
				       PTE_WIMG_IO);

	/* remap IO area into virtual space so that devices can
	 * set up their pointers to a virtual mapping
	 */

	powermac_info.io_base_virt = io_map(powermac_info.io_base_phys,
					    powermac_info.io_size);

	powermac_io_init(powermac_info.io_base_virt);

	/* Make sure that interrupts are correctly initialized before
	 * we run the generic code. setting remains at splhigh. We must
	 * do this AFTER the io mappings have been initialised since
	 * interrupts may use registers in the io space
	 */
	interrupt_init();

#if NCPUS >1
	/*
	 *		Probe the MP hardware now that we have some memory
	 */
	mp_probe_cpus();
#endif	/* NCPUS > 1 */


	/* probeio needs interrupts enabled
	 * interrupts get switched on for the first time here.
	 */
	spllo();

	probeio();

	/* We no longer need BATs to map I/O */
	if (PROCESSOR_VERSION != PROCESSOR_VERSION_601) {
		mtdbatu(3,BAT_INVALID); mtdbatl(3,BAT_INVALID);
		mtdbatu(2,BAT_INVALID); mtdbatl(2,BAT_INVALID);
	}
	
	return;
}
/*
 * Find devices.  The system is alive.
 */
void machine_init(void)
{
	/*
	 * Initialize the console.
	 */
	cninit();

	/*
	 * Set up to use floating point.
	 */
	init_fpu();

#ifdef MACH_HYP
	hyp_init();
#else	/* MACH_HYP */
#ifdef LINUX_DEV
	/*
	 * Initialize Linux drivers.
	 */
	linux_init();
#endif

	/*
	 * Find the devices
	 */
	probeio();
#endif	/* MACH_HYP */

	/*
	 * Get the time
	 */
	inittodr();

#ifndef MACH_HYP
	/*
	 * Tell the BIOS not to clear and test memory.
	 */
	*(unsigned short *)phystokv(0x472) = 0x1234;
#endif	/* MACH_HYP */

#if VM_MIN_KERNEL_ADDRESS == 0
	/*
	 * Unmap page 0 to trap NULL references.
	 *
	 * Note that this breaks accessing some BIOS areas stored there.
	 */
	pmap_unmap_page_zero();
#endif
}
Exemple #3
0
/*
 * Find devices.  The system is alive.
 */
void machine_init()
{
	/*
	 * Initialize the console.
	 */
	cninit();

	/*
	 * Set up to use floating point.
	 */
	init_fpu();

#ifdef LINUX_DEV
	/*
	 * Initialize Linux drivers.
	 */
	linux_init();
#endif

	/*
	 * Find the devices
	 */
	probeio();

	/*
	 * Get the time
	 */
	inittodr();

	/*
	 * Tell the BIOS not to clear and test memory.
	 */
	*(unsigned short *)phystokv(0x472) = 0x1234;

	/*
	 * Unmap page 0 to trap NULL references.
	 */
	pmap_unmap_page_zero();
}
Exemple #4
0
/*
 * Find devices.  The system is alive.
 */
void machine_init()
{
	/*
	 * Set up to use floating point.
	 */
	init_fpu();

	/*
	 * Find the devices
	 */
	probeio();

	/*
	 * Find the root device
	 */
	get_root_device();

	/*
	 * Get the time
	 */
	inittodr();
}