StuBS
|
#include "boot/startup_ap.h"
#include "machine/lapic.h"
#include "debug/output.h"
#include "device/textstream.h"
#include "machine/ioapic.h"
#include "machine/core.h"
#include "device/mouse.h"
#include "debug/gdb/stub.h"
#include "interrupt/guard.h"
#include "thread/scheduler.h"
#include "thread/thread.h"
#include "device/watch.h"
#include "machine/hpet.h"
#include "device/clock.h"
#include "device/ticker.h"
#include "thread/assassin.h"
#include "syscall/guarded_keyboard.h"
#include "thread/wakeup.h"
#include "boot/multiboot/data.h"
#include "fs/vfs.h"
#include "fs/ramdisk.h"
#include "syscall/guarded_graphics.h"
#include "user/graphics/full-example.h"
#include "user/app1/appl.h"
#include "user/app2/kappl.h"
Functions | |
int | main () |
Kernels main function. | |
int | main_ap () |
Entry point for application processors. | |
Constants | |
TextStream | kout |
TextStream | dout [Core::MAX] |
Debug window. | |
Mouse | mouse (1280, 1024) |
Watch | watch |
Clock | clock |
Ticker | ticker |
static Assassin | assassin |
GuardedKeyboard | keyboard |
static WakeUp | wakeup |
const unsigned | fb_width = 1280 |
screen width | |
const unsigned | fb_height = 1024 |
screen height | |
const unsigned | fb_bpp = 32 |
bits per pixel | |
const unsigned | fb_size = fb_width * fb_height * fb_bpp / sizeof(char) |
char | buffer_1 [fb_size] |
char | buffer_2 [fb_size] |
GuardedGraphics | graphics (fb_size, buffer_1, buffer_2) |
const char * | os_name = "MP" "StuBS" |
int main | ( | ) |
Kernels main function.
Called after initialization of the system by kernel_init()
int main_ap | ( | ) |
Entry point for application processors.
Called after initialization of the system by kernel_init()
TextStream kout |
TextStream dout[Core::MAX] |
Debug window.
Debug output using DBG like DBG << "var = " << var << endl
should be displayed in window dedicated to the core it is executed on.
While this is quite easy on single core systems like OOStuBS – they only require a single TextStream object called dout
– multi core systems like MPStuBS need an object array with one window per core. In the latter case direct list initialization can be used:
The debug windows in should be located right below the normal output window without any overlap and should be able to display at least 3 lines. In MPStuBS, two windows can be placed side-by-side, having 40 columns each.
As an optional extension, the distribution of the windows can be done automatically in MPStuBS (according to the actual numbers of cores) with TextStream::arrange() – in this case the standard constructor (without parameters) is sufficient.
Mouse mouse(1280, 1024) | ( | 1280 | , |
1024 | |||
) |
Watch watch |
Clock clock |
Ticker ticker |
|
static |
GuardedKeyboard keyboard |
|
static |
const unsigned fb_width = 1280 |
screen width
const unsigned fb_height = 1024 |
screen height
const unsigned fb_bpp = 32 |
bits per pixel
char buffer_1[fb_size] |
char buffer_2[fb_size] |
const char* os_name = "MP" "StuBS" |