Standard Korean pronunciation entry -vowels and consonants


(1) This is a code in the TI platform’s OMAP4430 machine to implement the core file /arch/arm/mach-omap2/board-Map3pandora.c.

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,
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 The physical address to be set should be set

Size    size range

Return to the virtual address of successful film

Void* iormap(unsigned long offset ,unsigned longsize)

1       is some tests for offset. It should not be that these have been set up for these, and they cannot be repeatedly filmed.

2       Apply for a VM_STRUCT structure. Of course, this thing is managed by SLAB.


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,

These two are macro defined prototypes as

The prototype of

#define MACHINE_START(_type,_name)  /
const struct machine_desc __mach_desc_##_type /
 __attribute__((__section__(“”))) = { /
 .nr  = MACH_TYPE_##_type, /
 .name  = _name,
#define MACHINE_END    /
struct machine_desc is:
struct machine_desc {

  * 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 */
 const char  *name;  /* architecture name */
 unsigned long  boot_params; /* tagged list  */
 unsigned int  video_start; /* start of video RAM */
 unsigned int  video_end; /* end of video RAM */
 unsigned int  reserve_lp0 :1; /* never has lp0 */
 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);
MACH_TYPE_SMDK2410 is defined in Arch/Include/ASM-RM/Mach-Types.h, the value is 193.
/* 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 (“.”). 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.
2. Init_irq in Start_kernel () -> Init_irq () -> Init_arch_irq ()
3. Map_io in setup_arch () -> paging_init () -> DeviceMaps_init ()
Others are mainly used in setup_arch ()


Related Posts


Computer network (7th edition) -Chapter 5 Transportation Layer -Important Concept

vue -two -way data binding

Luogu P6192 [Template] The smallest Stanner Tree

Standard Korean pronunciation entry -vowels and consonants

Random Posts

Caddy & GRPC (3) Add a reverse proxy plug -in to Caddy

wire flat meter 5800 all -around program

Front -end HTML framework (frameset) usage detailed analysis

CAS custom data encryption algorithm

About Form Form acquisition value and setting worthy method