Fujitsu DTV/STB solution driver (FAPex driver) Documentation [V01L00R00]


Memory Map for Linux

Table of Contents

The physical address vs the virtual address
The memory configuration of DDR#1

Back to top

The physical address vs the virtual address

This document describes the MB86H61 Linux memory map.

The mapping relation between physical address and virtual address on Linux environment is as following figure.
The MEM_SIZE for Kernel and Driver memory area is value configured by "make menuconfig" as follows.

---- menu config
  System Type  --->
        ARM system type (FUJITSU ARM11 SoC)  --->
    --- FUJITSU ARM11 SoC
        SoC/board type (MB86H61 DEVKIT)  --->
    (0x04000000) Physical Memory Size
    (0x02000000) Memory Size for Video/Audio Firmware
    [*] Large Memory Mapping

The Linux kernel is mapped to the area of MEM_SIZE bytes from 0x20000000 (top address of DDR#1) + CONFIG_FIRM_AREA_SIZE.
And, the area CONFIG_FIRM_AREA_SIZE bytes from top of DDR#1 is defined as the BUF area.

Note:
The maximum size for DDR#1 (area for Kernel, Driver and BUF) and DDR#2 have been limited to 128MB by default memory mapping configuration.


memory_map.png
Back to top

The memory configuration of DDR#1

The memory configuration of DDR#1 (area for Kernel, Driver and BUF) is defined with "${KERNEL_TOP}/drivers/media/fapex/wfe/include/fapex/sys_config.h".
This is dependent on board configuration of "make menuconfig" as follows.

---- menu config
  Device Drivers  --->
    Multimedia devices  --->
     <M> Fujitsu DTV/STB solution
           Fujitsu DTV/STB extension module configuration  --->
             Fujitsu DTV/STB board type configuration  --->
               board type (Fujitsu MB86H61 Development Kit board)  --->

In above case, the memory configuration of DDR#1 (area for Kernel, Driver and BUF) is defined with "${KERNEL_TOP}/drivers/media/fapex/wfe/include/fapex/sys_config_mb86h61_devkit.h" as follows.

    //***********************************************************************
    //***********************************************************************
    //** Define the memory mapping for all hardware blocks
    //***********************************************************************
    //***********************************************************************
    #define DDR_MEMORY_START_1  0x20000000
    #define DDR_MEMORY_START_2  0x40000000
    #define DDR_MEMORY_BYTES_1  0x04000000
    #define DDR_MEMORY_BYTES_2  0x04000000
    #define MEMORY_OFFSET_VIDEO 0
    
    //Memories available on board
    #define FAPEX_SYS_MMAP_DDR_START                DDR_MEMORY_START_1 // fixed!
    #define FAPEX_SYS_MMAP_DDR2_START               DDR_MEMORY_START_2 // fixed!
    #define FAPEX_SYS_MMAP_DDR_BYTES                DDR_MEMORY_BYTES_1
    #define FAPEX_SYS_MMAP_DDR2_BYTES               DDR_MEMORY_BYTES_2
    
    #define PROGRAM_MEMORY_START                    DDR_MEMORY_START_1


    // Audio decoder memory´s location and size.
    #define FAPEX_SYS_MMAP_ARC_APPLICATION_START    ARC_PROGRAM_LOAD_ADDRESS
    #define FAPEX_SYS_MMAP_ARC_APPLICATION_BYTES    0x00400000UL // 4 MB

    // Video decoder memory´s location and size.
    #define FAPEX_SYS_MMAP_VIDEO_DECODER_START      (PROGRAM_MEMORY_START+0x00400000UL)
    #define FAPEX_SYS_MMAP_VIDEO_DECODER_BYTES      0x01100000UL // 17 MB

    // Frame memory´s location.
    #define FAPEX_SYS_MMAP_VIDEO_FRAME_START        (FAPEX_SYS_MMAP_DDR2_START + MEMORY_OFFSET_VIDEO)
    #if(MEMORY_OFFSET_VIDEO == 0x02000000UL)
        #define FAPEX_SYS_MMAP_VIDEO_FRAME_SIZE     (0x01C00000UL)
    #else
        #define FAPEX_SYS_MMAP_VIDEO_FRAME_SIZE     (0x03400000UL)
    #endif

    // Video Scaler´s IPC memory´s location and size of about 4 MB.
    #define FAPEX_SYS_MMAP_VIDEO_SCALER_START       (0xFFFFFFFFUL)
    #define FAPEX_SYS_MMAP_VIDEO_SCALER_SIZE        (0x00400000UL)

    //BM memory's location and size.
    #define FAPEX_SYS_MMAP_BM01_GLOBAL_OFFSET       FAPEX_SYS_MMAP_DDR_START
    #define FAPEX_SYS_MMAP_BM23_GLOBAL_OFFSET       FAPEX_SYS_MMAP_DDR_START

    #define FAPEX_SYS_MMAP_BM_I2S0_START          (PROGRAM_MEMORY_START+0x01500000UL)
    #define FAPEX_SYS_MMAP_BM_I2S0_BYTES          0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_I2S1_START          (PROGRAM_MEMORY_START+0x01510000UL)
    #define FAPEX_SYS_MMAP_BM_I2S1_BYTES          0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_I2S2_START          (PROGRAM_MEMORY_START+0x01520000UL)
    #define FAPEX_SYS_MMAP_BM_I2S2_BYTES          0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_I2S3_START          (PROGRAM_MEMORY_START+0x01530000UL)
    #define FAPEX_SYS_MMAP_BM_I2S3_BYTES          0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_SPDIF_START         (PROGRAM_MEMORY_START+0x01540000UL)
    #define FAPEX_SYS_MMAP_BM_SPDIF_BYTES         0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_TELETEXT_START      (PROGRAM_MEMORY_START+0x01550000UL)
    #define FAPEX_SYS_MMAP_BM_TELETEXT_BYTES      0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_AUDIO_STREAM_START  (PROGRAM_MEMORY_START+0x01560000UL)
    #define FAPEX_SYS_MMAP_BM_AUDIO_STREAM_BYTES  0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_SUBTITLE_START      (PROGRAM_MEMORY_START+0x01570000UL)
    #define FAPEX_SYS_MMAP_BM_SUBTITLE_BYTES      0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_AUDIO2_STREAM_START (PROGRAM_MEMORY_START+0x01580000UL)
    #define FAPEX_SYS_MMAP_BM_AUDIO2_STREAM_BYTES 0x00010000UL // 64 KB
    #define FAPEX_SYS_MMAP_BM_SECTION_START       (PROGRAM_MEMORY_START+0x01590000UL)
    #define FAPEX_SYS_MMAP_BM_SECTION_BYTES       0x00100000UL // 1 MB
    #define FAPEX_SYS_MMAP_BM_SECTION_END         (FAPEX_SYS_MMAP_BM_SECTION_START+FAPEX_SYS_MMAP_BM_SECTION_BYTES)

    // Free available memory's location and size.
    #define FAPEX_SYS_MMAP_SPARE_RESERVED_START   (PROGRAM_MEMORY_START+0x01690000UL)
    #define FAPEX_SYS_MMAP_SPARE_RESERVED_BYTES   0x00070000UL // 448 KB

    // uncashed heap memory's location and size.
    #define FAPEX_SYS_MMAP_UNCASHED_HEAP_START    0x21700000UL
    #define FAPEX_SYS_MMAP_UNCASHED_HEAP_SIZE     0x00100000UL // 1 MB
    
    // OSD/Cursor memory's location and size.
    #define FAPEX_SYS_MMAP_CURSOR_PLANE_START     0x21800000UL
    #define FAPEX_SYS_MMAP_CURSOR_PLANE_BYTES     0x00004000UL // 16 KB
    #define FAPEX_SYS_MMAP_OSD_PLANE_START        0x21804000UL
    
    #define FAPEX_SYS_MMAP_OSD_PLANE_BYTES        0x006FC000UL // 6.99 MB
    #define FAPEX_SYS_MMAP_OSD_PLANE_END          0x21F00000UL
    
    #define PROGRAM_LOAD_ADDRESS                  0x22000000UL //BASE + 32M 
    
    #define FAPEX_SYS_MMAP_ARM_APPLICATION_START  PROGRAM_LOAD_ADDRESS
    #define FAPEX_SYS_MMAP_ARM_APPLICATION_BYTES  0x02000000UL // 32 MB

The area of FAPEX_SYS_MMAP_ARM_APPLICATION_BYTES bytes from FAPEX_SYS_MMAP_ARM_APPLICATION_START is for Kernel and Drivers. The FAPEX_SYS_MMAP_ARM_APPLICATION_BYTES corresponds to the MEM_SIZE - CONFIG_FIRM_AREA_SIZE.
The other area (I2S/SPDIF buffers, Section Data buffer, Video Decoder work area, Audio Decoder Stream buffer, Teletext Stream buffer, OSD Plane, Cursor Plane, Audio Firmware area and etc) are mapped to the BUF area.
The FAPEX_SYS_MMAP_ARC_APPLICATION_BYTES corresponds to the Audio Firmware's program area.

Note:
The FAPEX_SYS_MMAP_ARC_APPLICATION_START is fixed to 0x20000000, the FAPEX_SYS_MMAP_ARC_APPLICATION_BYTES is fixed to 0x00400000. These cannot be reconfigured.
Remarks:
You can reconfigure the memory map for your system. Then, please refer each driver's configuration about the memory map related to each driver.
Back to top


Copyright © 2006-2010 by Fujitsu Semiconductor Europe GmbH
Copyright © 2008-2010 by Fujitsu Semiconductor Limited

Disclaimer:
Please note that the use of this has been based on the terms and conditions of "DK Consent Letter (For Linux)" agreement between you and Fujitsu Semiconductor Limited.
The contents of this document may be revised without prior notice. Contact our sales department for confirmation. The information in this document are presented as is, no license is granted by implication or otherwise.
More...

FUJITSU sales representatives