Skip to content

Latest commit

 

History

History
123 lines (85 loc) · 5.65 KB

K510_System_memory_map.md

File metadata and controls

123 lines (85 loc) · 5.65 KB

K510 System memory map

Document version: V1.0.0

Published: 2022-03-09

Disclaimer The products, services or features you purchase shall be subject to the commercial contracts and terms of Beijing Canaan Jiesi Information Technology Co., Ltd. ("the Company", the same hereinafter), and all or part of the products, services or features described in this document may not be within the scope of your purchase or use. Except as otherwise agreed in the contract, the Company disclaims all representations or warranties, express or implied, as to the accuracy, reliability, completeness, marketing, specific purpose and non-aggression of any representations, information, or content of this document. Unless otherwise agreed, this document is provided as a guide for use only. Due to product version upgrades or other reasons, the contents of this document may be updated or modified from time to time without any notice.

Trademark Notices

"", "Canaan" icon, Canaan and other trademarks of Canaan and other trademarks of Canaan are trademarks of Beijing Canaan Jiesi Information Technology Co., Ltd. All other trademarks or registered trademarks that may be mentioned in this document are owned by their respective owners.

Copyright ©2022 Beijing Canaan Jiesi Information Technology Co., Ltd This document is only applicable to the development and design of the K510 platform, without the written permission of the company, no unit or individual may disseminate part or all of the content of this document in any form.

Beijing Canaan Jiesi Information Technology Co., Ltd URL: canaan-creative.com Business Enquiries: [email protected]

# preface **Document purpose** This document is a description document for the K510 SDK application example.

Reader Objects

The main people to whom this document (this guide) applies:

  • Software developers
  • Technical support personnel

Revision history The revision history accumulates a description of each document update. The latest version of the document contains updates for all previous versions.

The version number Modified by Date of revision Revision Notes
V1.0.0 System software groups 2022-03-09
**Contents**

[TOC]

1 K510 System Memory Planning

The memory plan of the K510 is shown in the following figure:

There is a 512MB DDR on the K510 crb reference board, with a total of four areas planned:

  • 0~240M planning for Linux kernel
  • 240M~496MB is planned for share memory, using the method of reserving the CMA memory pool, so that the Linux kernel memory management subsystem can also allocate memory from the CMA pool in the absence of use of Share memory
  • 496M~510M is planned for DSP use
  • 510M~512M is planned for logo use

2 Device tree description

The memory planning of the K510 is described in a reserved-meory manner, through the reserved-memory nodes of the device tree. The relevant device tree node information is as follows:

ddr_memory: memory@0 {
    status              = "okay";
    device_type         = "memory";
    reg                 = <0x0 0x00000000 0x0 0x20000000>;
};

sharem_cma:sharem_cma@8000000 {
    compatible          = "k510-share-memory-cma";
    reg                 = <0x0 0xf000000 0x0 0x10000000>;  /*240M~496M*/
};

reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;

    cma_buffer: buffer@f000000 {
        compatible = "shared-dma-pool";
        reusable;
        linux,cma-default;
        reg = <0x0 0xf000000 0x0 0x10000000>;
    };

    dsp_buffer: buffer@1f000000 {
        no-map;
        reg = <0x0 0x1f000000 0x0 0xe00000>;
    };

    logo_buffer: buffer@1fe00000 {
        no-map;
        reg = <0x0 0x1fe00000 0x0 0x200000>;
    };
};

3 Buildroot related configuration

The system memory plan is all described in dts of the Linux kernel, but the loading address of the dsp firmware needs to be configured in buildroot:

configs/k510_crb_lp3_v0_1_defconfig:

configs/k510_crb_lp3_v1_2_defconfig:

BR2_TARGET_EVB_FIRMWARE_LOAD_ADD=0x1f000000

Translation Disclaimer
For the convenience of customers, Canaan uses an AI translator to translate text into multiple languages, which may contain errors. We do not guarantee the accuracy, reliability or timeliness of the translations provided. Canaan shall not be liable for any loss or damage caused by reliance on the accuracy or reliability of the translated information. If there is a content difference between the translations in different languages, the Chinese Simplified version shall prevail.

If you would like to report a translation error or inaccuracy, please feel free to contact us by mail.