forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regions_mm: New memory mapping functions
The previous memory mapping function did not work properly if the buffer size exceeded the memory page size. In this case the size of the region to be checked passed to the sys_bitarray_is_region_cleared function was zero, causing the function to always return false. As a result, the allocator stated that a page was already mapped for a given address and did not map it. This led to a cpu exception when trying to access the allocated buffer. The function responsible for unmapping memory had a similar problem. Additionally, the size of the freed area was incorrectly determined and an incorrect offset was passed to the sys_bitarray_is_region_cleared function. New functions have been created to map and unmap memory pages for allocated buffers. It don't need allocation of temporary array and manipulation of memblocks bitarray. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
- Loading branch information
1 parent
cabc2e8
commit 5081044
Showing
1 changed file
with
129 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters