1
io space and memory space
Not all architectures have IO space defined, I know only the X86 system, and arm
There is no such difference in architecture, arm unified addressing,
On the X86, IO space and memory are independent, they each have their own bus, and IO space is generally 64K,
That is, 16 bits, accessed using the in and out commands. The memory space is 4G.
It can be seen that their differences are very large.
2
Static mappings:
The I/O static mapping is often used in the mapping of register resources, so that when writing kernel code or drivers, it is not
The ioremap is required to be accessed directly using the mapped kernel virtual address.
The MAP_IO member is the interface letter that the kernel provides to the user to create the peripheral I/O resource to the kernel virtual address static mapping table
Number.
The user can specify MAP_IO interface functions when defining the MACHINE_DESC structure, where the s3c2410 platform
As an example.
The S3C2410 MACHINE_DESC structure is defined as follows:
/* ARCH/ARM/MACH-S3C2410/MACH-SMDK2410.C */
Machine_start (SMDK2410, "SMDK2410")
. Phys_io = S3c2410_pa_uart,
. Io_pg_offst = (((u32) S3c24xx_va_uart >>) & 0XFFFC,
. Boot_params = S3c2410_sdram_pa + 0x100,
. Map_io = Smdk2410_map_io,
. INIT_IRQ = S3c24xx_init_irq,
. Init_machine = Smdk2410_init,
. Timer = &s3c24xx_timer,
Machine_end
As above, Map_io is initialized to Smdk2410_map_io. Smdk2410_map_io is our own definition of creative
A function that constructs a static I/O mapping table.
Dynamic Memory Mapping:
Using the Ioremap () function
IO Space and memory space for Linux