Cannot allocate SWIOTLB buffer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cannot allocate SWIOTLB buffer

1,925件の閲覧回数
renanqiang
Contributor I

Hello,

I am trying to change DDR size from 1GB to 128MB on our LS1012A board, as the below abnormal log when boot kernel, 'cannot allocate SWIOTLB buffe'. 

pastedImage_1.png

Seems 'cannot allocate SWIOTLB buffer' will make the DMA don't work, thereby make the peripheral interface don't work.  

Some people say fix this problem might need to enable 'DMA Remapping' in kernel config, but i don't find the DMARemapping option in freescale.config file. 

Is there anyone know how to fix this problem?   Thanks.

ラベル(2)
0 件の賞賛
1 返信

1,441件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello ren anqiang,

The function swiotlb_init is invoked in arch/arm64/mm/init.c as the following.

void __init mem_init(void)
{
        swiotlb_init(1);

        set_max_mapnr(pfn_to_page(max_pfn) - mem_map);

The function swiotlb_init is defined in lib/swiotlb.c as the following.

void  __init
swiotlb_init(int verbose)
{
        size_t default_size = IO_TLB_DEFAULT_SIZE;
        unsigned char *vstart;
        unsigned long bytes;

        if (!io_tlb_nslabs) {
                io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
                io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
        }

  ... ...

 #define IO_TLB_DEFAULT_SIZE (64UL<<20)

IO_TLB_DEFAULT_SIZE is defined as 64M by default, please modify it according to your requirement.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛