CMA size is different on 64GB module

Hi,

After burning the image on 64GB module and booting(32GB module can boot normally), the size of the CMA is too small, causing abnormalities.

Reserved memory: created CMA memory pool at 0x0000001019000000, size 256 MiB

[   19.543115] cma: cma_alloc: alloc failed, req-size: 62832 pages, ret: -12
[   19.550688] WARNING: CPU: 7 PID: 882 at mm/page_alloc.c:4937 __alloc_pages_nodemask+0x2c8/0x320
[   19.560927] ---[ end trace 9296b14f6a23f441 ]---
[   19.566372] nvgpu: 17000000.ga10b            nvgpu_cbc_init_support:91   [ERR]  Failed to allocate comptags
[   19.577046] nvgpu: 17000000.ga10b            nvgpu_finalize_poweron:1010 [ERR]  Failed initialization for: g->ops.cbc.cbc_init_support
[   27.308541] nvgpu: 17000000.ga10b                 gk20a_power_write:127  [ERR]  power_node_write failed at busy
[   30.394308] nvgpu: 17000000.ga10b     nvgpu_timeout_expired_msg_cpu:94   [ERR]  Timeout detected @ nvgpu_pmu_wait_fw_ack_status+0xbc/0x130 [nvgpu]
[   30.408007] nvgpu: 17000000.ga10b             pmu_wait_message_cond:649  [ERR]  PMU wait timeout expired.
[   30.417896] nvgpu: 17000000.ga10b nvgpu_pmu_lsfm_bootstrap_ls_falcon:128  [ERR]  LSF Load failed
[   30.426966] nvgpu: 17000000.ga10b nvgpu_gr_falcon_load_secure_ctxsw_ucode:714  [ERR]  Unable to recover GR falcon

Our HW design has a eeprom on i2c-0 0x51 address , we found that if we remove eeprom config on dts and re-flash image , the cma size is different and the system can boot normal

i2c@3160000 {
    eeprom: eeprom@51 {
            compatible = "atmel,24c02";
            status = "okay";
            reg = <0x51>;
            pagesize = <16>;
    };
};

Reserved memory: created CMA memory pool at 0x0000001009000000, size 512 MiB

The attached is our device boot log
cma_issue.zip (26.4 KB)

Can you tell me why there is such a difference?
When is the size of CMA decided? Is it related to DTS?

Hi,

I think the problem here is your eeprom is affecting the overlay reading.

hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-overlay.dts

We defined a overlay here that if the module is sku 0005, then it will use 512M CMA size.

I think this is more than just CMA size but lots of change/overlay may get affected.

Hi Wayne,

Thanks for your reply.
But why the eeprom cause this problem?
Are there any documents mentioning this information?
Can’t we put an eeprom with address 0x51 on this i2c bus?

Hi,

You can enable UEFI log first so that we can compare the log between your eeprom enable and disable situation.

Hi Wayne,

debug_eeprom.zip (78.0 KB)

There is a error message as below

ValidateEepromData: CRC mismatch, expected 35 got FF
Eeprom data validation failed(Device Error)

Maybe you can try to use the common trick.

In UEFI dtb, disable the eeprom you added.
In kernel dtb, enable the eeprom you added.

With such way, UEFI won’t know there is a eeprom added on that i2c.

Hi Wayne,

1.how to do that? could you please tell me more details
2.We still want to know the root casue.
thanks

There is TBCDTB_FILE and DTB_FILE in your board config. Use separate files in each of them.

DTB_FILE is for kernel dtb and another one is for bootloader dtb.