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

Functions

uint32_t defaultAddr (void)
 Default address, should be 0x00000000. More...
 
uint32_t kernelIndex (void)
 Index of kernel's page directory entry. More...
 
uint32_t indexPR (void)
 Partiton descriptor index into itself. More...
 
uint32_t zero (void)
 Zero. That's it. More...
 
uint32_t indexPD (void)
 Page directory index within partition descriptor. More...
 
uint32_t indexSh1 (void)
 Shadow 1 index within partition descriptor. More...
 
uint32_t indexSh2 (void)
 Shadow 2 index within partition descriptor. More...
 
uint32_t indexSh3 (void)
 Configuration tables linked list index within partition descriptor. More...
 
uint32_t PPRidx (void)
 Parent partition index within partition descriptor. More...
 
uint32_t addressEquals (uint32_t addr, uint32_t addr2)
 Checks whether an address is equal to another. More...
 
int geb (const uint32_t a, const uint32_t b)
 Greater or equal. More...
 
int gtb (const uint32_t a, const uint32_t b)
 Greater than. More...
 
int leb (const uint32_t a, const uint32_t b)
 Lower or equal. More...
 
int ltb (const uint32_t a, const uint32_t b)
 Lower than. More...
 
int eqb (const uint32_t a, const uint32_t b)
 Equals. More...
 
uint32_t inc (uint32_t val)
 Increment an integer. More...
 
uint32_t sub (uint32_t val)
 Decrement an integer. More...
 
uint32_t mul3 (uint32_t v)
 Multiply an integer with 3. More...
 
uint32_t getMaxIndex (void)
 Table size. 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 whether an address is equal to another.

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  )

Default address, should be 0x00000000.

Default address, should be 0x00000000.

Returns
The null address.

◆ eqb()

int eqb ( const uint32_t  a,
const uint32_t  b 
)

Equals.

Equals.

Returns
the comparison.

◆ geb()

int geb ( const uint32_t  a,
const uint32_t  b 
)

Greater or equal.

Greater or equal.

Returns
the comparison.

◆ getMaxIndex()

uint32_t getMaxIndex ( void  )

Table size.

Table size.

Returns
the maximum index.

◆ gtb()

int gtb ( const uint32_t  a,
const uint32_t  b 
)

Greater than.

Greater than.

Returns
the comparison.

◆ inc()

uint32_t inc ( uint32_t  val)

Increment an integer.

Increment an integer.

Returns
the incremented value.

◆ indexPD()

uint32_t indexPD ( void  )

Page directory index within partition descriptor.

Page directory index within partition descriptor.

Returns
The page directory index.

◆ indexPR()

uint32_t indexPR ( void  )

Partiton descriptor index into itself.

Partiton descriptor index into itself.

Returns
The partition root.

◆ indexSh1()

uint32_t indexSh1 ( void  )

Shadow 1 index within partition descriptor.

Shadow 1 index within partition descriptor.

Returns
The shadow 1 index.

◆ indexSh2()

uint32_t indexSh2 ( void  )

Shadow 2 index within partition descriptor.

Shadow 2 index within partition descriptor.

Returns
The shadow 2 index.

◆ indexSh3()

uint32_t indexSh3 ( void  )

Configuration tables linked list index within partition descriptor.

Configuration tables linked list index within partition descriptor.

Returns
The shadow 3 index.

◆ kernelIndex()

uint32_t kernelIndex ( void  )

Index of kernel's page directory entry.

Index of kernel's page directory entry.

Returns
The kernel address.

◆ leb()

int leb ( const uint32_t  a,
const uint32_t  b 
)

Lower or equal.

Lower or equal.

Returns
the comparison.

◆ ltb()

int ltb ( const uint32_t  a,
const uint32_t  b 
)

Lower than.

Lower than.

Returns
the comparison.

◆ mul3()

uint32_t mul3 ( uint32_t  v)

Multiply an integer with 3.

Multiply an integer with 3.

Returns
the result of the multiplication by 3.

◆ PPRidx()

uint32_t PPRidx ( void  )

Parent partition index within partition descriptor.

Parent partition index within partition descriptor.

Returns
The parent partition root.

◆ sub()

uint32_t sub ( uint32_t  val)

Decrement an integer.

Decrement an integer.

Returns
the decremented value.

◆ zero()

uint32_t zero ( void  )

Zero. That's it.

Zero. That's it.

Returns
zero.

Variable Documentation

◆ defaultVAddr

const uint32_t defaultVAddr = 0

Default address, should be 0x00000000.