element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MaaXBoard Hardware Design after enabling optee in maaxboard, memory size change from 2G to 3G wrongly
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 9 replies
  • Subscribers 354 subscribers
  • Views 1094 views
  • Users 0 members are here
  • optee
  • maaxboard
Related

after enabling optee in maaxboard, memory size change from 2G to 3G wrongly

gonewtinwind
gonewtinwind over 1 year ago

HI  all,

long time no see

sorry to bother you again

I am using maaxboard yocto mickledore version  https://github.com/Avnet/meta-maaxboard/tree/mickledore ,

and after enable optee, the kernel changes memory size from 2G to 3G wrongly , so if I run : du -sh, find   ..   such as recursive commands,  it will be  out of memory, the kernel will be crashed .

I enable optee in meta-maaxboard/conf/machine/maaxboard.conf

MACHINE_FEATURES += " optee wifi bluetooth bcm43455"

 

anybody know why make this issue. I did  in sumo version, no this issuebefore

My Qz:

1.how to fix it in kernel for adding patches

 

2. if can not fix in kernel ;or how to forcefully set memory to 2G in /boot/uEnv.txt

 I tried all versions from zeus to  mickledore have  the same issue, but I ported by myself a few years ago, sumo version NOT had this issue.

thank you so much.

I also posted my QZ here: 

https://community.nxp.com/t5/i-MX-Processors/after-enabling-optee-in-maaxboard-memory-size-change-from-2G-to/m-p/2075204#M235978

see my debug  info:

correct  iomem before enabling optee: correct the size =2G:40000000-bfffffff : System RAM

 

cat /proc/iomem
00100000-00107fff : 30900000.crypto caam-sm@100000
30050000-3005ffff : 30050000.sai sai@30050000
30200000-3020ffff : 30200000.gpio gpio@30200000
30210000-3021ffff : 30210000.gpio gpio@30210000
30220000-3022ffff : 30220000.gpio gpio@30220000
30230000-3023ffff : 30230000.gpio gpio@30230000
30240000-3024ffff : 30240000.gpio gpio@30240000
30260000-3026ffff : 30260000.tmu tmu@30260000
30280000-3028ffff : 30280000.watchdog watchdog@30280000
302c0000-302cffff : 302c0000.dma-controller dma-controller@302c0000
30330000-3033ffff : 30330000.pinctrl pinctrl@30330000
30350000-3035ffff : 30350000.efuse efuse@30350000
30380000-3038ffff : 30380000.clock-controller clock-controller@30380000
303a0000-303affff : 303a0000.gpc gpc@303a0000
30660000-3066ffff : 30660000.pwm pwm@30660000
30820000-3082ffff : 30820000.spi spi@30820000
30860000-3086ffff : 30860000.serial serial@30860000
30900000-3093ffff : 30900000.crypto crypto@30900000
30a00300-30a003ff : 30a00300.dphy dphy@30a00300
30a20000-30a2ffff : 30a20000.i2c i2c@30a20000
30a60000-30a6ffff : 30a60000.serial serial@30a60000
30aa0000-30aaffff : 30aa0000.mailbox mailbox@30aa0000
30b40000-30b4ffff : 30b40000.mmc mmc@30b40000
30b50000-30b5ffff : 30b50000.mmc mmc@30b50000
30bd0000-30bdffff : 30bd0000.dma-controller dma-controller@30bd0000
30be0000-30beffff : 30be0000.ethernet ethernet@30be0000
32e2d000-32e2dfff : 32e2d000.interrupt-controller interrupt-controller@32e2d000
33000000-33001fff : 33000000.dma-apbh dma-apbh@33000000
38000000-3803ffff : galcore register region
381f0040-381f007f : 381f0040.usb-phy usb-phy@381f0040
38200000-38207fff : usb@38200000
38200000-38207fff : xhci-hcd.3.auto usb@38200000
3820c100-3820ffff : 38200000.usb usb@38200000
382f0040-382f007f : 382f0040.usb-phy usb-phy@382f0040
38300000-38300423 : hantrodec0
38310000-38310423 : hantrodec0
38800000-3880ffff : GICD
38880000-3893ffff : GICR
3d800000-3dbfffff : 3d800000.ddr-pmu ddr-pmu@3d800000
40000000-bfffffff : System RAM
40410000-41dcffff : Kernel code
41dd0000-4210ffff : reserved
42110000-4234ffff : Kernel data
43000000-4300dfff : reserved
44000000-7fffffff : reserved
bd800000-bf9fffff : reserved
bfa58000-bfb58fff : reserved
bfb59000-bfba8fff : reserved
bfbab000-bfbacfff : reserved
bfbad000-bfbadfff : reserved
bfbae000-bfbc1fff : reserved
bfbc2000-bfffffff : reserved

 

--

but after enabling optee the size is 3G 

cat /proc/iomem | grep System
40000000-fdffffff : System RAM
root@maaxboard:~# cat /proc/iomem
00100000-00107fff : 30900000.crypto caam-sm@100000
30050000-3005ffff : 30050000.sai sai@30050000
30200000-3020ffff : 30200000.gpio gpio@30200000
30210000-3021ffff : 30210000.gpio gpio@30210000
30220000-3022ffff : 30220000.gpio gpio@30220000
30230000-3023ffff : 30230000.gpio gpio@30230000
30240000-3024ffff : 30240000.gpio gpio@30240000
30260000-3026ffff : 30260000.tmu tmu@30260000
30280000-3028ffff : 30280000.watchdog watchdog@30280000
302c0000-302cffff : 302c0000.dma-controller dma-controller@302c0000
30330000-3033ffff : 30330000.pinctrl pinctrl@30330000
30350000-3035ffff : 30350000.efuse efuse@30350000
30380000-3038ffff : 30380000.clock-controller clock-controller@30380000
303a0000-303affff : 303a0000.gpc gpc@303a0000
30660000-3066ffff : 30660000.pwm pwm@30660000
30820000-3082ffff : 30820000.spi spi@30820000
30860000-3086ffff : 30860000.serial serial@30860000
30900000-3093ffff : 30900000.crypto crypto@30900000
30a00300-30a003ff : 30a00300.dphy dphy@30a00300
30a20000-30a2ffff : 30a20000.i2c i2c@30a20000
30a60000-30a6ffff : 30a60000.serial serial@30a60000
30aa0000-30aaffff : 30aa0000.mailbox mailbox@30aa0000
30b40000-30b4ffff : 30b40000.mmc mmc@30b40000
30b50000-30b5ffff : 30b50000.mmc mmc@30b50000
30bd0000-30bdffff : 30bd0000.dma-controller dma-controller@30bd0000
30be0000-30beffff : 30be0000.ethernet ethernet@30be0000
32e2d000-32e2dfff : 32e2d000.interrupt-controller interrupt-controller@32e2d000
33000000-33001fff : 33000000.dma-apbh dma-apbh@33000000
38000000-3803ffff : galcore register region
381f0040-381f007f : 381f0040.usb-phy usb-phy@381f0040
38200000-38207fff : usb@38200000
38200000-38207fff : xhci-hcd.3.auto usb@38200000
3820c100-3820ffff : 38200000.usb usb@38200000
382f0040-382f007f : 382f0040.usb-phy usb-phy@382f0040
38300000-38300423 : hantrodec0
38310000-38310423 : hantrodec0
38800000-3880ffff : GICD
38880000-3893ffff : GICR
3d800000-3dbfffff : 3d800000.ddr-pmu ddr-pmu@3d800000
40000000-fdffffff : System RAM
40410000-41dcffff : Kernel code
41dd0000-4210ffff : reserved
42110000-4234ffff : Kernel data
43000000-4300dfff : reserved
44000000-7fffffff : reserved
fa200000-fd7fffff : reserved
fd966000-fd966fff : reserved
fd967000-fd9b6fff : reserved
fd9b9000-fd9bafff : reserved
fd9bb000-fd9cffff : reserved
fd9d0000-fd9d0fff : reserved
fd9d1000-fdffffff : reserved

  • Sign in to reply
  • Cancel

Top Replies

  • gonewtinwind
    gonewtinwind 10 months ago +1 verified
    finally, I fixed the issue, later I will post the patches. here: community.nxp.com/.../false
  • gonewtinwind
    0 gonewtinwind over 1 year ago

    hi 
    is there any avnet engineer know that ?

    it seems Joshua.Foster@AVNET.COM is not working in avnet. I contacted  him  a few years ago. anybody can check the source code for me ? thanks

    a few years ago .I directly add  kernel and optee in yocto   sumo version. my optee  is NOT this issue. but these days , I used all version from zeus to mickledore . all of them have this issue. it seems nobody uses it. I have to check from beginning from uboot ,spl .... .I did not touch it form long time. I think  the issue is in uboot somewhere . but I tried to modify   optee source code  conf.mk CFG_DDR_SIZE ?= 0xc0000000 to CFG_DDR_SIZE ?= 08c0000000 . it seems the DDR size is wrong, so change 3G to 2G,but not useful, uboot can not boot up at all.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind over 1 year ago in reply to gonewtinwind

    in boot command line , bdinfo output: memory size is wrong: size = 0x00000000be000000  (3G) should be 2G 0x80000000 I am going to find where makes it wrong 

    bdinfo
    boot_params = 0x0000000000000000
    DRAM bank = 0x0000000000000000
    -> start = 0x0000000040000000
    -> size = 0x00000000be000000
    flashstart = 0x0000000000000000
    flashsize = 0x0000000000000000
    flashoffset = 0x0000000000000000
    baudrate = 115200 bps
    relocaddr = 0x00000000bfef1000
    reloc off = 0x000000007fcf1000
    Build = 64-bit
    current eth = ethernet@30be0000
    ethaddr = 3a:c9:9f:b9:c6:9f
    IP addr = <NULL>
    fdt_blob = 0x00000000bdee5110
    new_fdt = 0x00000000bdee5110
    fdt_size = 0x000000000000bc80
    lmb_dump_all:
    memory.cnt = 0x1
    memory[0] [0x40000000-0xfdffffff], 0xbe000000 bytes flags: 0
    reserved.cnt = 0x2
    reserved[0] [0xbcedb000-0xfdffffff], 0x41125000 bytes flags: 0
    reserved[1] [0xbdee0af0-0xbfffffff], 0x0211f510 bytes flags: 0
    devicetree = separate
    arch_number = 0x0000000000000000
    TLB addr = 0x00000000bfff0000
    irq_sp = 0x00000000bdee5100
    sp start = 0x00000000bdee5100
    Early malloc usage: bae0 / 10000

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind over 1 year ago in reply to gonewtinwind

    one question:

     which file to generate the following symbol  (DRAM bank ???  start size ) u-boot code: there are lots files contains  them

    DRAM bank = 0x0000000000000000
    -> start = 0x0000000040000000
    -> size = 0x00000000be000000 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind over 1 year ago

    in uboot code, maaxboard.h and maaxboard.dts the memory soze is set correct 0x80000000 ,but where is the wrong setting after built? it's wired, but why my old sumo uboot is correct??/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind 11 months ago

    any help?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind 11 months ago

    any help?
    I changed and checked dtb , ,imx-boot, optee, u-boot , almost I changed every thing that suggestions from the internet and chatgpt. but I can not make the memory size correct 2G. It always set to 3G.
    where is the issue?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind 11 months ago

    I posted this issue in optee too:

    I posted the issue in optee too:
    github.com/.../7388

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    0 gonewtinwind 10 months ago in reply to gonewtinwind

    I want to know 1. optee how to pass optee start address to atf-imx?
    2. atf-imx how to pass memory size and optee start address to u-boot. ?
    currently I found u-boot read the optee start address from rom_pointer[0] (original assemly x1 registor??) . rom_pointer[0] got a wrong start adress: 0xfe000000. and use 0xfe000000 - xxxx = memory wrong size 0xbe000000(3G) . the correct size should be 0x7e000000(2G).
    but I fixed to set rom_pointer[0] to 0xbe000000 but it can make uboot show memory size is correct 0x7e000000(2G) and it can load kernel ,but kernel crash!

    what I Did:
    but:
    1.
    I read the code, change changed -CFG_DDR_SIZE ?= 0xc0000000(3G) to
    +CFG_DDR_SIZE ?= 0x80000000(2G)
    and
    2.
    aft code:

    -BL32_BASE ?= 0xfe000000

    to
    +BL32_BASE ?= 0xbe000000

    1. imx-boot(mkimage)
      cat 0002-iMX8M-soc.mak-mem.patch
      diff -Naur mak-ori/iMX8M/soc.mak mak-patch/iMX8M/soc.mak
      --- mak-ori/iMX8M/soc.mak 2025-04-10 13:33:39.653571463 -0400
      +++ mak-patch/iMX8M/soc.mak 2025-04-21 11:06:12.576283637 -0400
      @@ -75,8 +75,8 @@
      PLAT = imx8mq
      HDMI = yes
      SPL_LOAD_ADDR = 0x7E1000
      -TEE_LOAD_ADDR = 0xfe000000
      -ATF_LOAD_ADDR = 0x00910000
      +TEE_LOAD_ADDR = 0xbe000000
      +ATF_LOAD_ADDR = 0x00920000
      VAL_BOARD = val
      #define the F(Q)SPI header file
      QSPI_HEADER = ../scripts/qspi_header

    it completely no uboot running. I compared with maaxboard mini, I changed almost same as maaxboard-mini, maaxboard-mini works well, maaxboard can not.

    I do know where(atf ??) to set optee start address and make sure it can pass the address to uboot's
    rom_pointer[0]?

    can you show me the data pass flow chat ?????
    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gonewtinwind
    +1 gonewtinwind 10 months ago

    finally, I fixed the issue, later I will post the patches. here: community.nxp.com/.../false

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube