NVIDIA DRIVE OS Linux API Reference

5.1.3.0 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 <nvcommon.h>
28 #include <page.h>
29 #include <qb_malloc.h>
30 
39 void *QbMalloc(NvU32 bytes);
40 
50 void *QbMallocAlign(NvU32 bytes, NvU32 align);
51 
60 void *QbUnCachedMallocAlign(NvU32 bytes, NvU32 align);
61 
68 void QbFree(void *ptr);
76 void QbUnCachedFree(void *ptr);
77 
86 NvError QbAddAndMapRegion(struct QbMemoryMap MapEntry);
87 
92 void QbPerformPageWalk(void);
93 
99 NvU64 QbGetTextPhyOffset(void);
100 
106 NvU64 QbGetDataPhyOffset(void);
115 NvUPtr QbVirtToPhy(NvUPtr Addr);
116 
125 NvUPtr QbPhyToVirt(NvUPtr Addr);
126 
131 void QbMapMemBasic(void);
132 
136 void QbMapSysCfg(void);
137 
147 void QbKernelHandOff(NvU64 KernelStartAddr, NvU64 DtbAddr,
148  NvU64 TextLoadOffset, NvU64 DataLoadOffset);
149 
150 /* FIXME Retain this for T19x */
151 void QbInitMMU(void);
152 void QbDisableMMU(void);
154 #endif // INCLUDED_MM_H
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 * QbUnCachedMallocAlign(NvU32 bytes, NvU32 align)
Allocates aligned uncached memory dynamically.
void QbUnCachedFree(void *ptr)
Frees memory previously allocated using QbUnCachedMallocAlign This API is similar to free calls provi...
void QbFree(void *ptr)
Frees memory previously allocated using QbMalloc.
void * QbMalloc(NvU32 bytes)
Allocates memory dynamically.
void * QbMallocAlign(NvU32 bytes, NvU32 align)
Allocates aligned memory dynamically.
void QbKernelHandOff(NvU64 KernelStartAddr, NvU64 DtbAddr, NvU64 TextLoadOffset, NvU64 DataLoadOffset)
Disables the MMU, I-Cache, Invalidates I-Cache, TLBs Jumps to Kernel.
NvError
The NvError enumeration contains ALL return / error codes.
Definition: nverror.h:36
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.
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.
void QbMapSysCfg(void)
Creates mapping for sysinfo, syscfg.
void QbDisableMMU(void)
NvU64 QbGetDataPhyOffset(void)
Gets the physical offset (LinkAddr - LoadAddr) of Quickboot Data section.