当前位置:网站首页>B_ QuRT_ User_ Guide(34)
B_ QuRT_ User_ Guide(34)
2022-06-30 22:03:00 【weixin_ thirty-eight million four hundred and ninety-eight thou】
B_QuRT_User_Guide(34)
- 21.22 qurt_mem_pool_attr_get_size()
- 21.23 qurt_mem_pool_create()
- 21.24 qurt_mem_pool_remove_pages()
- 21.25 qurt_mem_region_attr_get()
- 21.26 qurt_mem_region_attr_get_bus_attr()
- 21.27 qurt_mem_region_attr_get_cache_mode()
- 21.28 qurt_mem_region_attr_get_mapping()
- 21.29 qurt_mem_region_attr_get_physaddr()
- 21.30 qurt_mem_region_attr_get_size()
- 21.31 qurt_mem_region_attr_get_type()
- 21.32 qurt_mem_region_attr_get_virtaddr()
- 21.33 qurt_mem_region_attr_get_physaddr_64()
- 21.34 qurt_mem_region_attr_init()
21.22 qurt_mem_pool_attr_get_size()
21.22.1 Function document
21.22.1.1 static int qurt_mem_pool_attr_get_size ( qurt_mem_pool_attr_t ∗ attr, int range_id, qurt_size_t ∗ size )
Gets the size of the specified memory pool range .
Related data types
qurt_mem_pool_attr_t
qurt_size_t
Parameters
| in | attr | Pointer to the memory pool attribute structure . |
| in | range_id | Memory pool range key . |
| out | size | Pointer to the target variable of the range size . |
Return value
0 – success .
QURT_EINVALID – Invalid scope .
Dependencies
None.
21.23 qurt_mem_pool_create()
21.23.1 Function document
21.23.1.1 int qurt_mem_pool_create ( char ∗ name, unsigned base, unsigned size,qurt_mem_pool_t ∗ pool )
Dynamically create memory pool objects from physical address ranges .
The pool is allocated a memory area with a specified base address and size .
The base address and size values passed to this function must be the same as 4K Byte boundary alignment , And must be expressed as the actual base address and size value divided by 4K.
For example, function call :qurt_mem_pool_create ("TCM_PHYSPOOL", 0xd8020, 0x20, &pool)
… amount to QuRT The following static pool definitions in the system configuration file :
<physical_pool name="TCM_PHYSPOOL">
<region base="0xd8020000" size="0x20000" />
</physical_pool>
Be careful : Dynamically created pools are different from static pools . especially ,qurt_mem_pool_attr_get() Invalid for dynamically created pools .
Dynamic pool creation will permanently consume system resources , And cannot be undone .
Related data types
qurt_mem_pool_t
Parameters
| in | name | Pointer to memory pool name . |
| in | base | Base address of memory area ( Divide 4K). |
| in | size | Size of memory area ( In bytes )( Divide 4K). |
| out | pool | Pointer to memory pool object . |
Return value
QURT_EOK – success .
Dependencies
None.
21.24 qurt_mem_pool_remove_pages()
21.24.1 Function document
21.24.1.1 int qurt_mem_pool_remove_pages ( qurt_mem_pool_t pool, unsigned first_pageno, unsigned size_in_pages, unsigned flags, void(∗)(void ∗) callback, void ∗ arg )
Delete the physical address range from the specified memory pool object .
If any part of the address range is in use , This operation will return an error without changing the status .
Be careful : Use only root Permission to invoke this operation (guest-OS Pattern ).
future , This operation will support ( adopt flags Parameters ) Delete physical address range when using partial range .
Related data types
qurt_mem_pool_t
Parameters
| in | pool | Memory pool object . |
| in | first_pageno | The first page number of the physical address range ( Equivalent to address >>12) |
| in | size_in_pages | Number of pages within the physical address range ( Equivalent to size >>12) |
| in | flags | delete the selected entry . Return value : 0 – Skip vulnerabilities that are not in the scope of the pool ( Default ) |
QURT_POOL_REMOVE_ALL_OR_NONE – Only if the specified physical address range is completely included in the pool free space ( No holes ) Will delete the page . | ||
| in | callback | The callback procedure called when the page is successfully deleted . If the operation fails , Then... Is not called . take 0 Passing as a parameter value causes the callback to not be called . |
| in | arg | The value passed as a parameter to the callback procedure . |
Return value
QURT_EOK – Page deleted successfully .
Dependencies
None.
21.25 qurt_mem_region_attr_get()
21.25.1 Function document
21.25.1.1 int qurt_mem_region_attr_get ( qurt_mem_region_t region, qurt_mem_region_attr_t ∗ attr )
Get the memory attribute of the specified message area . After the memory area is created , Its properties cannot be changed .
Related data types
qurt_mem_region_t
qurt_mem_region_attr_t
Parameters
| in | region | Memory area object . |
| out | attr | Pointer to the target structure of the memory region property . |
Return value
QURT_EOK – Operation performed successfully .
Error code - Failure .
Dependencies
None.
21.26 qurt_mem_region_attr_get_bus_attr()
21.26.1 Function document
21.26.1.1 static void qurt_mem_region_attr_get_bus_attr ( qurt_mem_region_attr_t ∗attr, unsigned ∗ pbits )
Gets... From the specified memory region attribute structure (A1, A0) Bus attribute bit .
Related data types
qurt_mem_region_attr_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | pbits | Points to... In the memory area attribute structure (A1, A0) Pointer to an unsigned integer filled with bits , Expressed as 2 Bit binary number . |
Return value
None.
Dependencies
None.
21.27 qurt_mem_region_attr_get_cache_mode()
21.27.1 Function document
21.27.1.1 static void qurt_mem_region_attr_get_cache_mode ( qurt_mem_region_attr_t ∗ attr, qurt_mem_cache_mode_t ∗ mode )
Gets the cache operation mode from the specified memory region attribute structure .
Related data types
qurt_mem_region_attr_t
qurt_mem_cache_mode_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | mode | Pointer to the target variable of the cache mode . |
Return value
None.
Dependencies
None.
21.28 qurt_mem_region_attr_get_mapping()
21.28.1 Function document
21.28.1.1 static void qurt_mem_region_attr_get_mapping ( qurt_mem_region_attr_t ∗ attr, qurt_mem_mapping_t ∗ mapping )
Gets the memory map from the specified memory region attribute structure .
Related data types
qurt_mem_region_attr_t
qurt_mem_mapping_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | mapping | Pointer to the target variable of the memory map . |
Return value
None.
Dependencies
None.
21.29 qurt_mem_region_attr_get_physaddr()
21.29.1 Function document
21.28.1.1 static void qurt_mem_region_attr_get_mapping ( qurt_mem_region_attr_t ∗ attr, qurt_mem_mapping_t ∗ mapping )
Gets the memory map from the specified memory region attribute structure .
Related data types
qurt_mem_region_attr_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | addr | Pointer to the target variable of the physical address of the memory area . |
Return value
None.
Dependencies
None.
21.30 qurt_mem_region_attr_get_size()
21.30.1 Function document
21.30.1.1 static void qurt_mem_region_attr_get_size ( qurt_mem_region_attr_t ∗ attr,qurt_size_t ∗ size )
Gets the memory region size from the specified memory region attribute structure .
Related data types
qurt_mem_region_attr_t
qurt_size_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | size | Pointer to the target variable of the memory area size . |
Return value
None.
Dependencies
None.
21.31 qurt_mem_region_attr_get_type()
21.31.1 Function document
21.31.1.1 static void qurt_mem_region_attr_get_type ( qurt_mem_region_attr_t ∗ attr,qurt_mem_region_type_t ∗ type )
Get the memory type from the specified memory area attribute structure .
Related data types
qurt_mem_region_attr_t
qurt_mem_region_type_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | type | Pointer to the target variable of the memory type . |
Return value
None.
Dependencies
None.
21.32 qurt_mem_region_attr_get_virtaddr()
21.32.1 Function document
21.32.1.1 static void qurt_mem_region_attr_get_virtaddr ( qurt_mem_region_attr_t ∗attr, unsigned int ∗ addr )
Get the virtual address of the memory area from the specified memory area attribute structure .
Related data types
qurt_mem_region_attr_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | addr | Pointer to the target variable of the virtual address of the memory area . |
Return value
None.
Dependencies
None.
21.33 qurt_mem_region_attr_get_physaddr_64()
21.33.1 Function document
21.33.1.1 static void qurt_mem_region_attr_get_physaddr_64 ( qurt_mem_region_attr_t ∗ attr, qurt_paddr_64_t ∗ addr_64 )
Gets the name of the memory region from the specified memory region attribute structure 64 Bit physical address .
Related data types
qurt_mem_region_attr_t
qurt_paddr_64_t
Parameters
| in | attr | Pointer to memory region attribute structure . |
| out | addr_64 | Point to memory area 64 Pointer to the target variable of bit physical address . |
Return value
None.
Dependencies
None.
21.34 qurt_mem_region_attr_init()
21.34.1 Function document
21.34.1.1 void qurt_mem_region_attr_init ( qurt_mem_region_attr_t ∗ attr )
Initializes the specified memory region attribute structure with the default attribute value :
- mapping – QURT_MEM_MAPPING_VIRTUAL
- Cache mode ——QURT_MEM_CACHE_WRITEBACK
- Physical address – -1
- Virtual address – -1
- Memory type – QURT_MEM_REGION_LOCAL
- size – -1
Be careful : You have to call qurt_mem_region_attr_set_physaddr() Function to explicitly set the memory physical address property . The size and pool properties are set directly to the parameters in the memory region creation operation .
Related data types
qurt_mem_region_attr_t
Parameters
| in,out | attr | Pointer to the target structure of the memory region property . |
Return value
None.
Dependencies
None.
边栏推荐
- Qsort function and Simulation Implementation of qsort function
- Modify the name of the launched applet
- 谈谈数字化转型的几个关键问题
- On several key issues of digital transformation
- Which direction should college students choose to find jobs after graduation?
- Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
- 1-10 根据不同的url响应客户端的内容
- 吴恩达的机器学习适合入门吗?
- A comprehensive understanding of gout: symptoms, risk factors, pathogenesis and management
- 交易所系统开发如何开发?数字货币交易所系统开发成熟技术案例
猜你喜欢

机器学习适合女生学吗?

Anfulai embedded weekly report no. 270: June 13, 2022 to June 19, 2022

PyTorch量化实践(2)

周少剑,很少见

Is there a shortage? No need to download the free online resources! 2022 favorites must have it!

Is machine learning suitable for girls?

谈谈数字化转型的几个关键问题

全面认识痛风:症状、风险因素、发病机理及管理

【BSP视频教程】BSP视频教程第19期:单片机BootLoader的AES加密实战,含上位机和下位机代码全开源(2022-06-26)

Pytorch quantitative practice (1)
随机推荐
【BSP视频教程】BSP视频教程第19期:单片机BootLoader的AES加密实战,含上位机和下位机代码全开源(2022-06-26)
Develop technology - get time 10 minutes ago
【MySQL入门】第一话 · 初入“数据库”大陆
周少剑,很少见
1-1 basic concepts of database
Excitatory neurotransmitter glutamate and brain health
[backtracking] full arrangement II leetcode47
Is machine learning suitable for girls?
1-12 preliminary understanding of Express
RP prototype resource sharing - shopping app
Anaconda下安装Jupyter notebook
JD and Tencent renewed the three-year strategic cooperation agreement; The starting salary rose to 260000 yuan, and Samsung sk of South Korea scrambled for a raise to retain semiconductor talents; Fir
Interesting plug-ins summary
《Dynamic Routing Between Capsules》论文学习总结
Arcmap|assign values to different categories of IDS with the field calculator
1-19 利用CORS解决接口跨域问题
Vite2 is compatible with lower versions of chrome (such as Sogou 80). Some grammars requiring higher versions are processed through polyfills
请问,启牛证券开户,可以开户吗?安全吗?你想要的答案全在这里
Graduation project
About, Qianxin detects code vulnerabilities and XSS series solves them