NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2017, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
18 #ifndef INCLUDED_MM_H
19 #define INCLUDED_MM_H
20 
27 #include <dlmalloc.h>
28 #include <nvcommon.h>
29 #include <page.h>
30 
39 mspace QbMalloc(NvU32 bytes);
40 
49 mspace QbMallocAlign(NvU32 bytes, NvU32 align);
50 
59 mspace QbUnCachedMallocAlign(NvU32 bytes, NvU32 align);
60 
67 void QbFree(void *ptr);
68 
77 NvError QbAddAndMapRegion(struct QbMemoryMap MapEntry);
78 
83 void QbPerformPageWalk(void);
84 
90 NvU64 QbGetTextPhyOffset(void);
91 
97 NvU64 QbGetDataPhyOffset(void);
106 NvUPtr QbVirtToPhy(NvUPtr Addr);
107 
116 NvUPtr QbPhyToVirt(NvUPtr Addr);
117 
122 void QbMapMemBasic(void);
123 
127 void QbMapSysCfg(void);
128 
138 void QbKernelHandOff(NvU64 KernelStartAddr, NvU64 DtbAddr,
139  NvU64 TextLoadOffset, NvU64 DataLoadOffset);
140 
141 /* FIXME Retain this for T19x */
142 void QbInitMMU(void);
143 void QbDisableMMU(void);
145 #endif // INCLUDED_MM_H
mspace QbUnCachedMallocAlign(NvU32 bytes, NvU32 align)
Allocates aligned uncached memory dynamically.
NvError QbAddAndMapRegion(struct QbMemoryMap MapEntry)
Adds new mapping to the MMU and updates the global mapping table with the new mappings.
void QbInitMMU(void)
void QbFree(void *ptr)
Frees memory previously allocated using QbMalloc.
void QbKernelHandOff(NvU64 KernelStartAddr, NvU64 DtbAddr, NvU64 TextLoadOffset, NvU64 DataLoadOffset)
Disables the MMU, I-Cache, Invalidates I-Cache, TLBs Jumps to Kernel.
void QbMapMemBasic(void)
Initializes the MMU, creates page tables as per s_g_MemoryMap.
NvUPtr QbVirtToPhy(NvUPtr Addr)
Returns the physical address of a given virtual address.
mspace QbMalloc(NvU32 bytes)
Allocates memory dynamically.
NvU64 QbGetTextPhyOffset(void)
Gets the physical offset (LinkAddr - LoadAddr) of Quickboot text section.
NvUPtr QbPhyToVirt(NvUPtr Addr)
Returns the virtual address of the given physical address.
void QbPerformPageWalk(void)
Performs page walk and prints page tables.
mspace QbMallocAlign(NvU32 bytes, NvU32 align)
Allocates aligned memory dynamically.
void QbMapSysCfg(void)
Creates mapping for sysinfo, syscfg.
void QbDisableMMU(void)
NvU64 QbGetDataPhyOffset(void)
Gets the physical offset (LinkAddr - LoadAddr) of Quickboot Data section.