MACHINE_START(OMAP3_PANDORA, “Pandora Handheld Console”)
.phys_io = 0x48000000,
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
.boot_params = 0x80000100,
.map_io = omap3pandora_map_io,
.init_irq = omap3pandora_init_irq,
.init_machine = omap3pandora_init,
.timer = &omap_timer,
MACHINE_END
Here is a value -added function pointer such as inspection IO, initialization IRQ, initialized machines, etc.omap3pandora_map_io(), (reflecting IO space)
omap3pandora_init_irq (), (initialized board -level interrupt system)
OMAP3PANDORA_INIT (), (OMAPZOOM’s board -level initialization function, such as Flash, USB, serial port, Camera, WIFI, etc.)
are all initialized functions implemented in this file
omap_timer is the timer implemented for the current machine
IO address video
If you want to ask the processor to know the storage space on the peripheral equipment, you must first establish a virtual address to the port address of the bus address. The storage range of peripheral equipment is the top of 4G, and the virtual address that should be set is above 896m, which is where HIGH_MM starts. The page represents init_mm. This is a page table specially used in the core. Together, when calling, it cannot find its existence, so the kernel page indicates that it will not be called. At the same time, the virtual address is also managed by a virtual storage area in the last 128M of 4G.
Offset
Size
Return to the virtual address of successful film
Void* iormap(unsigned long offset ,unsigned longsize)
1
2
3
After the application, the virtual address was obtained, and it was necessary to set up a film on the page table of the init_mm. Add a word, this is here, so sometimes there will be page abnormalities, so you need to synchronize
(2) (This is the platform machine information of the reprinted S3C2410)
MACHINE_START(VR1000, “Thorcom-VR1000”)
/* Maintainer: Ben Dooks <
[email protected]
> */
.phys_ram = S3C2410_SDRAM_PA,
.phys_io = S3C2410_PA_UART,
.io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
.boot_params = S3C2410_SDRAM_PA + 0x100,
.map_io = vr1000_map_io,
.init_irq = s3c24xx_init_irq,
.timer = &s3c24xx_timer,
MACHINE_END
The prototype of
const struct machine_desc __mach_desc_##_type /
__attribute__((__section__(“.arch.info.init”))) = { /
.nr = MACH_TYPE_##_type, /
.name = _name,
};
/*
* Note! The first five elements are used
* by assembler code in head-armv.S
*/
unsigned int nr; /* architecture number */
unsigned int phys_ram; /* start of physical ram */
unsigned int phys_io; /* start of physical io */
unsigned int io_pg_offst; /* byte offset for io
* page tabe entry */
unsigned long boot_params; /* tagged list */
unsigned int video_end; /* end of video RAM */
unsigned int reserve_lp1 :1; /* never has lp1 */
unsigned int reserve_lp2 :1; /* never has lp2 */
unsigned int soft_reboot :1; /* soft reboot */
void (*fixup)(struct machine_desc *,
struct tag *, char **,
struct meminfo *);
void (*map_io)(void);/* IO mapping function */
void (*init_irq)(void);
struct sys_timer *timer; /* system tick timer */
void (*init_machine)(void);
};
/* arch/include/asm-arm/mach-types.h */
#define MACH_TYPE_SMDK2410 193
This value is the type value of the machine, which is generated by the data defined by Arch/ARM/TOOL/MACH-TYPES.
/* arch/arm/tool/mach-types */
smdk2410 ARCH_SMDK2410 SMDK2410 193
from the above discovery, Machine_Start mainly defines the type of “Struct Machine_Desc”, placed in the section (“. Arch.info.init”). It is initialized data. Kernel will be discarded after getting up.
Each member function is called during different periods:
1..Init_machine is called by Customize_machine in arch/arm/kernel/setup.c, placed in the arch_initcall () segment, and will be automatically called in order.
3. Map_io in setup_arch () -> paging_init () -> DeviceMaps_init ()