kernels/linux-2.4.0/arch/arm/kernel/ecard.c
/*
 * Set up the expansion card
 * daemon's environment.
 */
Set up the expansion card
daemon's environment.
Set up the expansion card daemon ' s environment .
static void ecard_init_task(int force)
{
	pgd_t *src_pgd, *dst_pgd;
	unsigned int dst_addr = IO_START;
	if (!force)
		exec_mmap();
	src_pgd = pgd_offset(current->mm, IO_BASE);
	dst_pgd = pgd_offset(current->mm, dst_addr);
	while (dst_addr < IO_START + IO_SIZE) {
		*dst_pgd++ = *src_pgd++;
		dst_addr += PGDIR_SIZE;
	}
	flush_tlb_range(current->mm, IO_START, IO_START + IO_SIZE);
	dst_addr = EASI_START;
	src_pgd = pgd_offset(current->mm, EASI_BASE);
	dst_pgd = pgd_offset(current->mm, dst_addr);
	while (dst_addr < EASI_START + EASI_SIZE) {
		*dst_pgd++ = *src_pgd++;
		dst_addr += PGDIR_SIZE;
	}
	flush_tlb_range(current->mm, EASI_START, EASI_START + EASI_SIZE);
}
static void ecard_init_task ( int force ) { pgd_t * src_pgd , * dst_pgd ; unsigned int dst_addr = IO_START ; if ( ! force ) exec_mmap ( ) ; src_pgd = pgd_offset ( current -> mm , IO_BASE ) ; dst_pgd = pgd_offset ( current -> mm , dst_addr ) ; while ( dst_addr < IO_START + IO_SIZE ) { * dst_pgd ++ = * src_pgd ++ ; dst_addr += PGDIR_SIZE ; } flush_tlb_range ( current -> mm , IO_START , IO_START + IO_SIZE ) ; dst_addr = EASI_START ; src_pgd = pgd_offset ( current -> mm , EASI_BASE ) ; dst_pgd = pgd_offset ( current -> mm , dst_addr ) ; while ( dst_addr < EASI_START + EASI_SIZE ) { * dst_pgd ++ = * src_pgd ++ ; dst_addr += PGDIR_SIZE ; } flush_tlb_range ( current -> mm , EASI_START , EASI_START + EASI_SIZE ) ; }
Set up the expansion card
 daemon's environment.
Set up the expansion card daemon ' s environment .
/* We want to set up the page tables for the following mapping:
	 *  Virtual	Physical
	 *  0x03000000	0x03000000
	 *  0x03010000	unmapped
	 *  0x03210000	0x03210000
	 *  0x03400000	unmapped
	 *  0x08000000	0x08000000
	 *  0x10000000	unmapped
	 *
	 * FIXME: we don't follow this 100% yet.
	 */