The command line arguments to the tool are as follows to mark an ELF binary:Įlfmemtypes ]Įlfmemtypes /bin/bash text SRAM SDRAM0 ANY data SDRAM1 A future enhancement will be to allow data, bss, brk, and stack regions to have their own memory types. Also, although there are no heap (brk) and stack sections defined for ELF binaries, heap and stack regions for the new process currently use the memory types specified for data. Likewise, the data segment includes initialized data (data) and uninitialized data (bss), so all these sections will be allocated to the memory types specified for data. The text segment includes code and read-only data sections, and therefore all these sections will be allocated to the memory types specified for text. Currently, the elfmemtypes tool allows specifying memory types for the text segment and data segment. The memory type mnemonic strings specified to the tool are copied to a temporary file, and that file is passed to objcopy, which copies the temporary file’s contents to the new. It does this by forking and running objcopy as follows: The elfmemtypes tool adds memory type information by adding a new NOTE section with the name ".memtypes" to the ELF binary. This information is then passed down to the mmap() and brk() calls to create new memory regions for the process. In MTA, memory device type information is added to the ELF binaries of programs and shared libraries using the elfmemtypes utility. Memory Type Information in ELF Binaries and the Elfmemtypes Utility We then follow the path and morphing of the memorytype data from its source (the ELF binary) until it reaches the lowest level: when its used to allocate a pageįrame for the process during a page fault exception. Then we describe how memory nodes are configured in the kernel. To understand MTA, it’s best to first describe the memory device type information contained in the ELF binary of programs and shared libraries. Note: to execute a user program directly out of ROM, such as flash, requires a totally different approach from that described here. Therefore in MTA memory devices are also synonymous with NUMA nodes. Each discontiguous memory bank is represented by a NUMA node. Discontiguous memory in Linux in turn is based on Non-Uniform Memory Access (NUMA) nodes. Traditionally, discontiguous memory is meant for platforms whose system memory is not contiguous in the physical memory map. Memory devices in Memory Type Based Allocation (MTA) are based on discontiguous memory support.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |