Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Functions | Variables
armv7/MAL/malinternal.c File Reference
#include <stdint.h>
#include "maldefines.h"
#include "mal.h"

Functions

uint32_t defaultAddr (void)
 Returns the default null address. More...
 
uint32_t kernelIndex (void)
 Returns the kernel address. More...
 
uint32_t indexPR (void)
 Returns the partition root. More...
 
uint32_t zero (void)
 Returns zero. More...
 
uint32_t indexPD (void)
 Returns the page directory index. More...
 
uint32_t indexSh1 (void)
 Returns the shadow 1 index. More...
 
uint32_t indexSh2 (void)
 Returns the shadow 2 index. More...
 
uint32_t indexSh3 (void)
 Returns the shadow 3 index. More...
 
uint32_t PPRidx (void)
 Returns the parent partition root. More...
 
uint32_t addressEquals (uint32_t addr, uint32_t addr2)
 Checks if an address given is equal to another given. More...
 
int geb (const uint32_t a, const uint32_t b)
 the first parameter is greater than or equal to the second one. More...
 
int gtb (const uint32_t a, const uint32_t b)
 the first parameter is greater than the second one. More...
 
int leb (const uint32_t a, const uint32_t b)
 the first parameter is less than or equal to the second one. More...
 
int ltb (const uint32_t a, const uint32_t b)
 the first parameter is less than the second one. More...
 
int eqb (const uint32_t a, const uint32_t b)
 the first parameter is equal to the second one. More...
 
uint32_t inc (uint32_t val)
 incremet the value. More...
 
uint32_t sub (uint32_t val)
 decrement value. More...
 
uint32_t mul3 (uint32_t v)
 multiplies by 3. More...
 
uint32_t getMaxIndex (void)
 get the maximum addressable index in the translation table. More...
 

Variables

const uint32_t defaultVAddr = 0
 Default address, should be 0x00000000. More...
 

Function Documentation

◆ addressEquals()

uint32_t addressEquals ( uint32_t  addr,
uint32_t  addr2 
)

Checks if an address given is equal to another given.

Checks whether an address is equal to another.

Parameters
addrAddress to check
addr2Address to compare to
Returns
0 is not equal, 1 otherwise.

◆ defaultAddr()

uint32_t defaultAddr ( void  )

Returns the default null address.

Default address, should be 0x00000000.

Returns
The null address.

◆ eqb()

int eqb ( const uint32_t  a,
const uint32_t  b 
)

the first parameter is equal to the second one.

Equals.

Returns
the comparison.

◆ geb()

int geb ( const uint32_t  a,
const uint32_t  b 
)

the first parameter is greater than or equal to the second one.

Greater or equal.

Returns
the comparison.

◆ getMaxIndex()

uint32_t getMaxIndex ( void  )

get the maximum addressable index in the translation table.

Table size.

Returns
the maximum index.

◆ gtb()

int gtb ( const uint32_t  a,
const uint32_t  b 
)

the first parameter is greater than the second one.

Greater than.

Returns
the comparison.

◆ inc()

uint32_t inc ( uint32_t  val)

incremet the value.

Increment an integer.

Returns
the incremented value.

◆ indexPD()

uint32_t indexPD ( void  )

Returns the page directory index.

Page directory index within partition descriptor.

Returns
The page directory index.

◆ indexPR()

uint32_t indexPR ( void  )

Returns the partition root.

Partiton descriptor index into itself.

Returns
The partition root.

◆ indexSh1()

uint32_t indexSh1 ( void  )

Returns the shadow 1 index.

Shadow 1 index within partition descriptor.

Returns
The shadow 1 index.

◆ indexSh2()

uint32_t indexSh2 ( void  )

Returns the shadow 2 index.

Shadow 2 index within partition descriptor.

Returns
The shadow 2 index.

◆ indexSh3()

uint32_t indexSh3 ( void  )

Returns the shadow 3 index.

Configuration tables linked list index within partition descriptor.

Returns
The shadow 3 index.

◆ kernelIndex()

uint32_t kernelIndex ( void  )

Returns the kernel address.

Index of kernel's page directory entry.

Returns
The kernel address.

◆ leb()

int leb ( const uint32_t  a,
const uint32_t  b 
)

the first parameter is less than or equal to the second one.

Lower or equal.

Returns
the comparison.

◆ ltb()

int ltb ( const uint32_t  a,
const uint32_t  b 
)

the first parameter is less than the second one.

Lower than.

Returns
the comparison.

◆ mul3()

uint32_t mul3 ( uint32_t  v)

multiplies by 3.

Multiply an integer with 3.

Returns
the result of the multiplication by 3.

◆ PPRidx()

uint32_t PPRidx ( void  )

Returns the parent partition root.

Parent partition index within partition descriptor.

Returns
The parent partition root.

◆ sub()

uint32_t sub ( uint32_t  val)

decrement value.

Decrement an integer.

Returns
the decremented value.

◆ zero()

uint32_t zero ( void  )

Returns zero.

Zero. That's it.

Returns
zero.

Variable Documentation

◆ defaultVAddr

const uint32_t defaultVAddr = 0

Default address, should be 0x00000000.