UbixOS V2 2.0

Macros | Functions | Variables
main.c File Reference
`#include <ubixos/init.h>`
`#include <sys/gdt.h>`
`#include <sys/video.h>`
`#include <sys/tss.h>`
`#include <sys/bootinfo.h>`
`#include <ubixos/exec.h>`
`#include <ubixos/kpanic.h>`
`#include <ubixos/systemtask.h>`
`#include <vfs/mount.h>`
`#include <lib/kprintf.h>`
`#include <lib/kmalloc.h>`
`#include <sde/sde.h>`
Include dependency graph for main.c:

Go to the source code of this file.

## Macros
#define | B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
#define | B_ADAPTORMASK 0x0f
#define | B_ADAPTORSHIFT 24
#define | B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
#define | B_CONTROLLERMASK 0xf
#define | B_CONTROLLERSHIFT 20
#define | B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
#define | B_PARTITIONMASK 0xff
#define | B_PARTITIONSHIFT 8
#define | B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK)
#define | B_SLICEMASK 0xff
#define | B_SLICESHIFT 20
#define | B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
#define | B_TYPEMASK 0xff
#define | B_TYPESHIFT 0
#define | B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
#define | B_UNITMASK 0xf
#define | B_UNITSHIFT 16

## Functions
int | kmain (uint32_t rootdev)
| This is the entry point into the os where all of the kernels sub systems are started up. More...
| ubixDescriptorTable (ubixGDT, 11)

## Variables
u_long | _bootdev
u_long | _boothowto
struct bootinfo | _bootinfo
char | _kernelname [512]
struct {
} | loadGDT = { (11 * sizeof(union descriptorTableUnion) - 1), ubixGDT }

## Macro Definition Documentation

## ◆ B_ADAPTOR

#define B_ADAPTOR | ( |  | val | ) | (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)

Definition at line 44 of file main.c.

## ◆ B_ADAPTORMASK

#define B_ADAPTORMASK 0x0f

Definition at line 43 of file main.c.

## ◆ B_ADAPTORSHIFT

#define B_ADAPTORSHIFT 24

Definition at line 42 of file main.c.

## ◆ B_CONTROLLER

#define B_CONTROLLER | ( |  | val | ) | (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)

Definition at line 47 of file main.c.

## ◆ B_CONTROLLERMASK

#define B_CONTROLLERMASK 0xf

Definition at line 46 of file main.c.

## ◆ B_CONTROLLERSHIFT

#define B_CONTROLLERSHIFT 20

Definition at line 45 of file main.c.

## ◆ B_PARTITION

#define B_PARTITION | ( |  | val | ) | (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)

Definition at line 68 of file main.c.

## ◆ B_PARTITIONMASK

#define B_PARTITIONMASK 0xff

Definition at line 67 of file main.c.

## ◆ B_PARTITIONSHIFT

#define B_PARTITIONSHIFT 8

Definition at line 66 of file main.c.

## ◆ B_SLICE

#define B_SLICE | ( |  | val | ) | (((val)>>B_SLICESHIFT) & B_SLICEMASK)

Definition at line 62 of file main.c.

## ◆ B_SLICEMASK

#define B_SLICEMASK 0xff

Definition at line 61 of file main.c.

## ◆ B_SLICESHIFT

#define B_SLICESHIFT 20

Definition at line 60 of file main.c.

## ◆ B_TYPE

#define B_TYPE | ( |  | val | ) | (((val) >> B_TYPESHIFT) & B_TYPEMASK)

Definition at line 71 of file main.c.

## ◆ B_TYPEMASK

#define B_TYPEMASK 0xff

Definition at line 70 of file main.c.

## ◆ B_TYPESHIFT

#define B_TYPESHIFT 0

Definition at line 69 of file main.c.

## ◆ B_UNIT

#define B_UNIT | ( |  | val | ) | (((val) >> B_UNITSHIFT) & B_UNITMASK)

Definition at line 65 of file main.c.

## ◆ B_UNITMASK

#define B_UNITMASK 0xf

Definition at line 64 of file main.c.

## ◆ B_UNITSHIFT

#define B_UNITSHIFT 16

Definition at line 63 of file main.c.

## Function Documentation

## ◆ kmain()

int kmain | ( | uint32_t | rootdev | ) |

This is the entry point into the os where all of the kernels sub systems are started up.

Parameters

  rootdev | address of root device structure

Definition at line 133 of file main.c.

## ◆ ubixDescriptorTable()

ubixDescriptorTable | ( | ubixGDT | ,
|  | 11 |
| ) |  |

Definition at line 92 of file main.c.

References dBig, dBiglim, dCode, dData, dDpl0, dDpl3, dLdt, dRead, dTss, dWrite, ubixStandardDescriptor, and VMM_USER_LDT.

## Variable Documentation

## ◆ _bootdev

u_long _bootdev

Definition at line 125 of file main.c.

## ◆ _boothowto

u_long _boothowto

Definition at line 126 of file main.c.

## ◆ _bootinfo

struct bootinfo _bootinfo

Definition at line 123 of file main.c.

## ◆ _kernelname

char _kernelname[512]

Definition at line 124 of file main.c.

## ◆ loadGDT

struct { ... } loadGDT