XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
mm.h File Reference
#include <linux/autoconf.h>
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/mm_types.h>
#include <linux/printk.h>
#include <linux/init.h>
#include <linux/uaccess.h>
#include <Mm/vmmngr.h>
Include dependency graph for mm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vm_operations_struct
 
struct  vm_area_struct
 
struct  vm_area_desc
 

Macros

#define VMA_NORESERVE_BIT   0
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 
#define min_t(type, a, b)   ((type)(a) < (type)(b) ? (type)(a) : (type)(b))
 
#define ARRAY_SIZE(arr)   (sizeof(arr) / sizeof((arr)[0]))
 
#define fallthrough   __attribute__((fallthrough))
 
#define EFAULT   14
 
#define EFBIG   27
 
#define ENXIO   6
 
#define ERESTARTSYS   512
 
#define need_resched()   0
 
#define cond_resched()   ((void)0)
 
#define signal_pending(p)   0
 
#define current   ((void*)0)
 
#define MEM_MAJOR   1
 
#define SEEK_SET   0
 
#define SEEK_CUR   1
 
#define SEEK_END   2
 
#define FMODE_NOWAIT   0x00080000
 
#define FOP_UNSIGNED_OFFSET   0x0001
 
#define VM_PFNMAP   0x00000400 /* the whole range is one page table */
 
#define VM_MIXEDMAP   0x00000100
 
#define VM_IO   0x00004000 /* mapped I/O or similar */
 
#define VM_DONTEXPAND   0x00080000 /* mremap may not grow this */
 
#define VM_DONTDUMP   0x02000000 /* leave out of the core dump */
 
#define PAGE_ALIGNED(addr)   (((uintptr_t)(addr) & (PAGE_SIZE - 1)) == 0)
 
#define VMA_SHARED_BIT   3
 

Typedefs

typedef uint64_t pgprot_t
 
typedef vma_flags_t vm_flags_t
 

Functions

int __register_chrdev (unsigned int major, unsigned int baseminor, unsigned int count, const char *name, const void *fops)
 
void __unregister_chrdev (unsigned int major, unsigned int baseminor, unsigned int count, const char *name)
 
int valid_phys_addr_range (phys_addr_t addr, size_t count)
 
int valid_mmap_phys_addr_range (unsigned long pfn, size_t size)
 
int range_is_allowed (unsigned long pgoff, unsigned long size)
 
int phys_mem_access_prot_allowed (struct file *file, unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
 
unsigned long mm_get_unmapped_area (struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)
 

Variables

t t typedef unsigned long vma_flags_t
 
const struct file_operations kmsg_fops
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   arr)    (sizeof(arr) / sizeof((arr)[0]))

◆ cond_resched

#define cond_resched ( )    ((void)0)

◆ current

#define current   ((void*)0)

◆ EFAULT

#define EFAULT   14

◆ EFBIG

#define EFBIG   27

◆ ENXIO

#define ENXIO   6

◆ ERESTARTSYS

#define ERESTARTSYS   512

◆ fallthrough

#define fallthrough   __attribute__((fallthrough))

◆ FMODE_NOWAIT

#define FMODE_NOWAIT   0x00080000

◆ FOP_UNSIGNED_OFFSET

#define FOP_UNSIGNED_OFFSET   0x0001

◆ MEM_MAJOR

#define MEM_MAJOR   1

◆ min

#define min (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

◆ min_t

#define min_t (   type,
  a,
  b 
)    ((type)(a) < (type)(b) ? (type)(a) : (type)(b))

◆ need_resched

#define need_resched ( )    0

◆ PAGE_ALIGNED

#define PAGE_ALIGNED (   addr)    (((uintptr_t)(addr) & (PAGE_SIZE - 1)) == 0)

◆ SEEK_CUR

#define SEEK_CUR   1

◆ SEEK_END

#define SEEK_END   2

◆ SEEK_SET

#define SEEK_SET   0

◆ signal_pending

#define signal_pending (   p)    0

◆ VM_DONTDUMP

#define VM_DONTDUMP   0x02000000 /* leave out of the core dump */

◆ VM_DONTEXPAND

#define VM_DONTEXPAND   0x00080000 /* mremap may not grow this */

◆ VM_IO

#define VM_IO   0x00004000 /* mapped I/O or similar */

◆ VM_MIXEDMAP

#define VM_MIXEDMAP   0x00000100

◆ VM_PFNMAP

#define VM_PFNMAP   0x00000400 /* the whole range is one page table */

◆ VMA_NORESERVE_BIT

#define VMA_NORESERVE_BIT   0

◆ VMA_SHARED_BIT

#define VMA_SHARED_BIT   3

Typedef Documentation

◆ pgprot_t

typedef uint64_t pgprot_t

◆ vm_flags_t

Function Documentation

◆ __register_chrdev()

int __register_chrdev ( unsigned int  major,
unsigned int  baseminor,
unsigned int  count,
const char *  name,
const void *  fops 
)
extern

◆ __unregister_chrdev()

void __unregister_chrdev ( unsigned int  major,
unsigned int  baseminor,
unsigned int  count,
const char *  name 
)
extern

◆ mm_get_unmapped_area()

unsigned long mm_get_unmapped_area ( struct file *  file,
unsigned long  addr,
unsigned long  len,
unsigned long  pgoff,
unsigned long  flags 
)

◆ phys_mem_access_prot_allowed()

int phys_mem_access_prot_allowed ( struct file *  file,
unsigned long  pfn,
unsigned long  size,
pgprot_t *  vma_prot 
)

◆ range_is_allowed()

int range_is_allowed ( unsigned long  pgoff,
unsigned long  size 
)

◆ valid_mmap_phys_addr_range()

int valid_mmap_phys_addr_range ( unsigned long  pfn,
size_t  size 
)

◆ valid_phys_addr_range()

int valid_phys_addr_range ( phys_addr_t  addr,
size_t  count 
)

Variable Documentation

◆ kmsg_fops

const struct file_operations kmsg_fops
extern

◆ vma_flags_t

t t typedef unsigned long vma_flags_t