genarch
[Miscellanea]


Files

file  acpi.h
file  madt.h
file  fb.h
file  font-8x16.h
file  i8042.h
file  acpi.c
 Advanced Configuration and Power Interface (ACPI) initialization.
file  madt.c
 Multiple APIC Description Table (MADT) parsing.
file  fb.c
file  font-8x16.c
file  i8042.c

Data Structures

struct  acpi_rsdp
struct  acpi_sdt_header
struct  acpi_signature_map
struct  acpi_signature_map
struct  acpi_rsdt
struct  acpi_xsdt
struct  acpi_xsdt
struct  madt_apic_header
struct  acpi_madt
struct  madt_l_apic
struct  madt_io_apic
struct  madt_intr_src_ovrd
struct  madt_nmi_src
struct  madt_l_apic_nmi
struct  madt_l_apic_addr_ovrd
struct  madt_io_sapic
struct  madt_l_sapic
struct  madt_platform_intr_src

Defines

#define MADT_L_APIC   0
#define MADT_IO_APIC   1
#define MADT_INTR_SRC_OVRD   2
#define MADT_NMI_SRC   3
#define MADT_L_APIC_NMI   4
#define MADT_L_APIC_ADDR_OVRD   5
#define MADT_IO_SAPIC   6
#define MADT_L_SAPIC   7
#define MADT_PLATFORM_INTR_SRC   8
#define MADT_RESERVED_SKIP_BEGIN   9
#define MADT_RESERVED_SKIP_END   127
#define MADT_RESERVED_OEM_BEGIN   128
#define FONT_GLIPHS   256
#define FONT_SCANLINES   16
#define SC_ESC   0x01
#define SC_BACKSPACE   0x0e
#define SC_LSHIFT   0x2a
#define SC_RSHIFT   0x36
#define SC_CAPSLOCK   0x3a
#define SC_SPEC_ESCAPE   0xe0
#define SC_LEFTARR   0x4b
#define SC_RIGHTARR   0x4d
#define SC_UPARR   0x48
#define SC_DOWNARR   0x50
#define SC_DELETE   0x53
#define SC_HOME   0x47
#define SC_END   0x4f
#define RSDP_SIGNATURE   "RSD PTR "
#define RSDP_REVISION_OFFS   15
#define COL_WIDTH   8
#define ROW_BYTES   (scanline * FONT_SCANLINES)
#define BGCOLOR   0x000080
#define FGCOLOR   0xffff00
#define LOGOCOLOR   0x2020b0
#define RED(x, bits)   ((x >> (16 + 8 - bits)) & ((1 << bits) - 1))
#define GREEN(x, bits)   ((x >> (8 + 8 - bits)) & ((1 << bits) - 1))
#define BLUE(x, bits)   ((x >> (8 - bits)) & ((1 << bits) - 1))
#define POINTPOS(x, y)   ((y) * scanline + (x) * pixelbytes)
#define KBD_ENABLE   0xf4
#define KBD_DISABLE   0xf5
#define KBD_ACK   0xfa
#define i8042_SET_COMMAND   0x60
#define i8042_COMMAND   0x49
#define i8042_BUFFER_FULL_MASK   0x01
#define i8042_WAIT_MASK   0x02
#define SPECIAL   '?'
#define KEY_RELEASE   0x80
#define IGNORE_CODE   0x7f
#define PRESSED_SHIFT   (1<<0)
#define PRESSED_CAPSLOCK   (1<<1)
#define LOCKED_CAPSLOCK   (1<<0)
#define ACTIVE_READ_BUFF_SIZE   16

Functions

void acpi_init (void)
int acpi_sdt_check (__u8 *sdt)
void acpi_madt_parse (void)
void fb_init (__address addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan)
void i8042_init (void)
void i8042_poll (void)
void i8042_grab (void)
void i8042_release (void)
static int rsdp_check (__u8 *rsdp)
static void map_sdt (struct acpi_sdt_header *sdt)
static void configure_via_rsdt (void)
static void configure_via_xsdt (void)
static void madt_l_apic_entry (struct madt_l_apic *la, __u32 index)
static void madt_io_apic_entry (struct madt_io_apic *ioa, __u32 index)
static void madt_intr_src_ovrd_entry (struct madt_intr_src_ovrd *override, __u32 index)
static int madt_cmp (void *a, void *b)
static count_t madt_cpu_count (void)
static bool madt_cpu_enabled (index_t i)
static bool madt_cpu_bootstrap (index_t i)
static __u8 madt_cpu_apic_id (index_t i)
static int madt_irq_to_pin (int irq)
 SPINLOCK_INITIALIZE (fb_lock)
static void rgb_4byte (void *dst, int rgb)
static int byte4_rgb (void *src)
static void rgb_3byte (void *dst, int rgb)
static int byte3_rgb (void *src)
static void rgb_2byte (void *dst, int rgb)
static int byte2_rgb (void *src)
static void rgb_1byte (void *dst, int rgb)
static int byte1_rgb (void *src)
static void putpixel (unsigned int x, unsigned int y, int color)
static int getpixel (unsigned int x, unsigned int y)
static void clear_screen (void)
static void scroll_screen (void)
static void invert_pixel (unsigned int x, unsigned int y)
static void draw_glyph_line (unsigned int glline, unsigned int x, unsigned int y)
static void draw_glyph (__u8 glyph, unsigned int col, unsigned int row)
static void invert_char (unsigned int col, unsigned int row)
static void draw_char (char chr)
static void draw_logo (unsigned int startx, unsigned int starty)
static void invert_cursor (void)
static void fb_putchar (chardev_t *dev, char ch)
static void key_released (__u8 sc)
static void key_pressed (__u8 sc)
static char key_read (chardev_t *d)
 SPINLOCK_INITIALIZE (keylock)
static void i8042_suspend (chardev_t *)
static void i8042_resume (chardev_t *)
static void i8042_interrupt (int n, istate_t *istate)
static void i8042_wait (void)
static __u8 active_read_buff_read (void)
static void active_read_buff_write (__u8 ch)
static void active_read_key_pressed (__u8 sc)

Variables

acpi_rsdp packed
acpi_sdt_header packed
acpi_rsdt packed
acpi_xsdt packed
acpi_rsdpacpi_rsdp
acpi_rsdtacpi_rsdt
acpi_xsdtacpi_xsdt
madt_apic_header packed
acpi_madt packed
madt_l_apic packed
madt_io_apic packed
madt_intr_src_ovrd packed
madt_nmi_src packed
madt_l_apic_nmi packed
madt_l_apic_addr_ovrd packed
madt_io_sapic packed
madt_l_sapic packed
madt_platform_intr_src packed
acpi_madtacpi_madt
smp_config_operations madt_config_operations
spinlock_t fb_lock
unsigned char fb_font [FONT_GLIPHS *FONT_SCANLINES]
acpi_rsdpacpi_rsdp = NULL
acpi_rsdtacpi_rsdt = NULL
acpi_xsdtacpi_xsdt = NULL
acpi_signature_map signature_map []
acpi_madtacpi_madt = NULL
int isa_irq_map [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
madt_l_apicmadt_l_apic_entries = NULL
madt_io_apicmadt_io_apic_entries = NULL
index_t madt_l_apic_entry_index = 0
index_t madt_io_apic_entry_index = 0
count_t madt_l_apic_entry_cnt = 0
count_t madt_io_apic_entry_cnt = 0
count_t cpu_count = 0
madt_apic_header ** madt_entries_index = NULL
int madt_entries_index_cnt = 0
char * entry []
smp_config_operations madt_config_operations
static __u8fbaddress = NULL
static __u8blankline = NULL
static __u8dbbuffer = NULL
static int dboffset
static unsigned int xres = 0
static unsigned int yres = 0
static unsigned int scanline = 0
static unsigned int bitspp = 0
static unsigned int pixelbytes = 0
static unsigned int position = 0
static unsigned int columns = 0
static unsigned int rows = 0
static void(* rgb2scr )(void *, int)
static int(* scr2rgb )(void *)
static chardev_t framebuffer
static chardev_operations_t fb_ops
unsigned char fb_font [FONT_GLIPHS *FONT_SCANLINES]
static __u8 active_read_buff [ACTIVE_READ_BUFF_SIZE]
static volatile int keyflags
static volatile int lockflags
static chardev_t kbrd
static chardev_operations_t ops
static char sc_primary_map []
static char sc_secondary_map []
static iroutine oldvector

Define Documentation

#define ACTIVE_READ_BUFF_SIZE   16
 

Definition at line 95 of file i8042.c.

Referenced by active_read_buff_read(), and active_read_buff_write().

#define BGCOLOR   0x000080
 

Definition at line 72 of file fb.c.

Referenced by fb_init().

#define BLUE x,
bits   )     ((x >> (8 - bits)) & ((1 << bits) - 1))
 

Definition at line 78 of file fb.c.

Referenced by rgb_1byte(), rgb_2byte(), and rgb_3byte().

#define COL_WIDTH   8
 

Definition at line 69 of file fb.c.

Referenced by draw_glyph(), fb_init(), and invert_char().

#define FGCOLOR   0xffff00
 

Definition at line 73 of file fb.c.

Referenced by draw_glyph_line().

#define FONT_GLIPHS   256
 

Definition at line 38 of file font-8x16.h.

#define FONT_SCANLINES   16
 

Definition at line 39 of file font-8x16.h.

Referenced by draw_glyph(), fb_init(), invert_char(), and scroll_screen().

#define GREEN x,
bits   )     ((x >> (8 + 8 - bits)) & ((1 << bits) - 1))
 

Definition at line 77 of file fb.c.

Referenced by rgb_1byte(), rgb_2byte(), and rgb_3byte().

#define i8042_BUFFER_FULL_MASK   0x01
 

Definition at line 76 of file i8042.c.

Referenced by i8042_init(), i8042_poll(), and key_read().

#define i8042_COMMAND   0x49
 

Definition at line 74 of file i8042.c.

Referenced by i8042_grab().

#define i8042_SET_COMMAND   0x60
 

Definition at line 73 of file i8042.c.

Referenced by i8042_grab().

#define i8042_WAIT_MASK   0x02
 

Definition at line 77 of file i8042.c.

Referenced by i8042_wait().

#define IGNORE_CODE   0x7f
 

These codes read from i8042 data register are silently ignored.

Definition at line 85 of file i8042.c.

Referenced by i8042_poll(), and key_read().

#define KBD_ACK   0xfa
 

Definition at line 56 of file i8042.c.

#define KBD_DISABLE   0xf5
 

Definition at line 55 of file i8042.c.

#define KBD_ENABLE   0xf4
 

Keyboard commands.

Definition at line 54 of file i8042.c.

#define KEY_RELEASE   0x80
 

Definition at line 80 of file i8042.c.

Referenced by i8042_interrupt(), i8042_poll(), and key_read().

#define LOCKED_CAPSLOCK   (1<<0)
 

Definition at line 93 of file i8042.c.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define LOGOCOLOR   0x2020b0
 

Definition at line 74 of file fb.c.

Referenced by draw_logo().

#define MADT_INTR_SRC_OVRD   2
 

Definition at line 44 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_IO_APIC   1
 

Definition at line 43 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_IO_SAPIC   6
 

Definition at line 48 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_L_APIC   0
 

Definition at line 42 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_L_APIC_ADDR_OVRD   5
 

Definition at line 47 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_L_APIC_NMI   4
 

Definition at line 46 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_L_SAPIC   7
 

Definition at line 49 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_NMI_SRC   3
 

Definition at line 45 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_PLATFORM_INTR_SRC   8
 

Definition at line 50 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_RESERVED_OEM_BEGIN   128
 

Definition at line 53 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_RESERVED_SKIP_BEGIN   9
 

Definition at line 51 of file madt.h.

Referenced by acpi_madt_parse().

#define MADT_RESERVED_SKIP_END   127
 

Definition at line 52 of file madt.h.

Referenced by acpi_madt_parse().

#define POINTPOS x,
 )     ((y) * scanline + (x) * pixelbytes)
 

Definition at line 80 of file fb.c.

Referenced by fb_init(), getpixel(), and putpixel().

#define PRESSED_CAPSLOCK   (1<<1)
 

Definition at line 92 of file i8042.c.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define PRESSED_SHIFT   (1<<0)
 

Definition at line 91 of file i8042.c.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define RED x,
bits   )     ((x >> (16 + 8 - bits)) & ((1 << bits) - 1))
 

Definition at line 76 of file fb.c.

Referenced by rgb_1byte(), rgb_2byte(), and rgb_3byte().

#define ROW_BYTES   (scanline * FONT_SCANLINES)
 

Definition at line 70 of file fb.c.

Referenced by fb_init(), and scroll_screen().

#define RSDP_REVISION_OFFS   15
 

Definition at line 47 of file acpi.c.

#define RSDP_SIGNATURE   "RSD PTR "
 

Definition at line 46 of file acpi.c.

Referenced by acpi_init().

#define SC_BACKSPACE   0x0e
 

Definition at line 40 of file i8042.h.

#define SC_CAPSLOCK   0x3a
 

Definition at line 43 of file i8042.h.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define SC_DELETE   0x53
 

Definition at line 49 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_DOWNARR   0x50
 

Definition at line 48 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_END   0x4f
 

Definition at line 51 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_ESC   0x01
 

Scancodes.

Definition at line 39 of file i8042.h.

#define SC_HOME   0x47
 

Definition at line 50 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_LEFTARR   0x4b
 

Definition at line 45 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_LSHIFT   0x2a
 

Definition at line 41 of file i8042.h.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define SC_RIGHTARR   0x4d
 

Definition at line 46 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_RSHIFT   0x36
 

Definition at line 42 of file i8042.h.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

#define SC_SPEC_ESCAPE   0xe0
 

Definition at line 44 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SC_UPARR   0x48
 

Definition at line 47 of file i8042.h.

Referenced by active_read_key_pressed(), and key_pressed().

#define SPECIAL   '?'
 

Definition at line 79 of file i8042.c.


Function Documentation

void acpi_init void   ) 
 

Definition at line 139 of file acpi.c.

References acpi_rsdp, acpi_sdt_header::length, NULL, rsdp_check(), and RSDP_SIGNATURE.

Referenced by arch_pre_smp_init().

Here is the call graph for this function:

void acpi_madt_parse void   ) 
 

Definition at line 142 of file madt.c.

References acpi_madt, entry, FRAME_ATOMIC, madt_cmp(), madt_entries_index, madt_entries_index_cnt, MADT_INTR_SRC_OVRD, madt_intr_src_ovrd_entry(), MADT_IO_APIC, madt_io_apic_entry(), MADT_IO_SAPIC, MADT_L_APIC, MADT_L_APIC_ADDR_OVRD, madt_l_apic_entry(), MADT_L_APIC_NMI, MADT_L_SAPIC, MADT_NMI_SRC, MADT_PLATFORM_INTR_SRC, MADT_RESERVED_OEM_BEGIN, MADT_RESERVED_SKIP_BEGIN, MADT_RESERVED_SKIP_END, malloc(), panic, printf(), and qsort().

Here is the call graph for this function:

int acpi_sdt_check __u8 sdt  ) 
 

Definition at line 78 of file acpi.c.

References acpi_sdt_header::length.

Referenced by configure_via_rsdt(), and configure_via_xsdt().

static __u8 active_read_buff_read void   )  [static]
 

Definition at line 449 of file i8042.c.

References active_read_buff, and ACTIVE_READ_BUFF_SIZE.

Referenced by key_read().

static void active_read_buff_write __u8  ch  )  [static]
 

Definition at line 459 of file i8042.c.

References active_read_buff, and ACTIVE_READ_BUFF_SIZE.

Referenced by active_read_key_pressed().

static void active_read_key_pressed __u8  sc  )  [static]
 

Definition at line 469 of file i8042.c.

References active_read_buff_write(), is_lower, keyflags, LOCKED_CAPSLOCK, lockflags, PRESSED_CAPSLOCK, PRESSED_SHIFT, SC_CAPSLOCK, SC_DELETE, SC_DOWNARR, SC_END, SC_HOME, SC_LEFTARR, SC_LSHIFT, sc_primary_map, SC_RIGHTARR, SC_RSHIFT, sc_secondary_map, SC_SPEC_ESCAPE, and SC_UPARR.

Referenced by key_read().

Here is the call graph for this function:

static int byte1_rgb void *  src  )  [static]
 

Return pixel color - 8-bit depth (3:2:3)

Definition at line 144 of file fb.c.

Referenced by fb_init().

static int byte2_rgb void *  src  )  [static]
 

16-bit depth (5:6:5)

Definition at line 131 of file fb.c.

Referenced by fb_init().

static int byte3_rgb void *  src  )  [static]
 

Definition at line 113 of file fb.c.

Referenced by fb_init().

static int byte4_rgb void *  src  )  [static]
 

Definition at line 94 of file fb.c.

Referenced by fb_init().

static void clear_screen void   )  [static]
 

Fill screen with background color

Definition at line 172 of file fb.c.

References blankline, dbbuffer, fbaddress, memcpy(), pixelbytes, scanline, xres, and yres.

Referenced by fb_init().

Here is the call graph for this function:

static void configure_via_rsdt void   )  [static]
 

Definition at line 96 of file acpi.c.

References acpi_rsdt, acpi_sdt_check(), acpi_rsdt::entry, acpi_rsdt::header, acpi_sdt_header::length, map_sdt(), printf(), acpi_signature_map::sdt_ptr, acpi_signature_map::signature, and signature_map.

Here is the call graph for this function:

static void configure_via_xsdt void   )  [static]
 

Definition at line 117 of file acpi.c.

References acpi_rsdt, acpi_sdt_check(), acpi_xsdt, acpi_rsdt::entry, acpi_xsdt::header, acpi_sdt_header::length, map_sdt(), printf(), acpi_signature_map::sdt_ptr, acpi_signature_map::signature, and signature_map.

Here is the call graph for this function:

static void draw_char char  chr  )  [static]
 

Draw character at default position

Definition at line 248 of file fb.c.

References columns, draw_glyph(), and position.

Referenced by fb_putchar().

Here is the call graph for this function:

static void draw_glyph __u8  glyph,
unsigned int  col,
unsigned int  row
[static]
 

Draw character at given position

Definition at line 228 of file fb.c.

References COL_WIDTH, draw_glyph_line(), fb_font, and FONT_SCANLINES.

Referenced by draw_char().

Here is the call graph for this function:

static void draw_glyph_line unsigned int  glline,
unsigned int  x,
unsigned int  y
[static]
 

Draw one line of glyph at a given position

Definition at line 213 of file fb.c.

References FGCOLOR, and putpixel().

Referenced by draw_glyph().

Here is the call graph for this function:

static void draw_logo unsigned int  startx,
unsigned int  starty
[static]
 

Definition at line 253 of file fb.c.

References LOGOCOLOR, and putpixel().

Referenced by fb_init().

Here is the call graph for this function:

void fb_init __address  addr,
unsigned int  x,
unsigned int  y,
unsigned int  bpp,
unsigned int  scan
 

Initialize framebuffer as a chardev output device

Parameters:
addr Physical address of the framebuffer
x Screen width in pixels
y Screen height in pixels
bpp Bits per pixel (8, 16, 24, 32)
scan Bytes per one scanline

Definition at line 339 of file fb.c.

References ASSERT, BGCOLOR, bitspp, blankline, byte1_rgb(), byte2_rgb(), byte3_rgb(), byte4_rgb(), chardev_initialize(), clear_screen(), COL_WIDTH, columns, dbbuffer, dboffset, draw_logo(), fb_ops, fbaddress, fnzb, FONT_SCANLINES, frame_alloc_rc, FRAME_ATOMIC, framebuffer, hw_map(), invert_cursor(), malloc(), NULL, panic, PFN2ADDR(), pixelbytes, POINTPOS, printf(), rgb2scr, rgb_1byte(), rgb_2byte(), rgb_3byte(), rgb_4byte(), ROW_BYTES, rows, scanline, scr2rgb, SIZE2FRAMES(), stdout, sysinfo_set_item_val(), xres, and yres.

Here is the call graph for this function:

static void fb_putchar chardev_t dev,
char  ch
[static]
 

Print character to screen

Emulate basic terminal commands

Definition at line 283 of file fb.c.

References columns, draw_char(), fb_lock, invert_cursor(), position, rows, scroll_screen(), spinlock_lock, and spinlock_unlock().

Here is the call graph for this function:

static int getpixel unsigned int  x,
unsigned int  y
[static]
 

Get pixel from viewport

Definition at line 161 of file fb.c.

References dbbuffer, dboffset, fbaddress, POINTPOS, scr2rgb, and yres.

Referenced by invert_pixel().

void i8042_grab void   ) 
 

Initialize keyboard and service interrupts using kernel routine

Definition at line 278 of file i8042.c.

References exc_register(), i8042_COMMAND, i8042_interrupt(), i8042_SET_COMMAND, i8042_wait(), oldvector, and VECTOR_KBD.

Referenced by arch_grab_console(), and i8042_init().

Here is the call graph for this function:

void i8042_init void   ) 
 

Initialize i8042.

Definition at line 295 of file i8042.c.

References chardev_initialize(), i8042_BUFFER_FULL_MASK, i8042_grab(), IRQ_KBD, kbrd, NULL, oldvector, ops, stdin, and trap_virtual_enable_irqs().

Referenced by arch_post_smp_init().

Here is the call graph for this function:

void i8042_interrupt int  n,
istate_t istate
[static]
 

Process i8042 interrupt.

Parameters:
n Interrupt vector.
istate Interrupted state.

Definition at line 323 of file i8042.c.

References key_pressed(), KEY_RELEASE, key_released(), and trap_virtual_eoi().

Referenced by i8042_grab().

Here is the call graph for this function:

void i8042_poll void   ) 
 

Poll for key press and release events.

This function can be used to implement keyboard polling.

Definition at line 561 of file i8042.c.

References i8042_BUFFER_FULL_MASK, IGNORE_CODE, key_pressed(), KEY_RELEASE, and key_released().

Here is the call graph for this function:

void i8042_release void   ) 
 

Resume the former interrupt vector

Definition at line 288 of file i8042.c.

References exc_register(), oldvector, and VECTOR_KBD.

Referenced by arch_release_console().

Here is the call graph for this function:

void i8042_resume chardev_t  )  [static]
 

Definition at line 440 of file i8042.c.

void i8042_suspend chardev_t  )  [static]
 

Definition at line 445 of file i8042.c.

void i8042_wait void   )  [static]
 

Wait until the controller reads its data.

Definition at line 336 of file i8042.c.

References i8042_WAIT_MASK.

Referenced by i8042_grab().

static void invert_char unsigned int  col,
unsigned int  row
[static]
 

Invert character at given position

Definition at line 237 of file fb.c.

References COL_WIDTH, FONT_SCANLINES, and invert_pixel().

Referenced by invert_cursor().

Here is the call graph for this function:

static void invert_cursor void   )  [static]
 

Definition at line 274 of file fb.c.

References columns, invert_char(), and position.

Referenced by fb_init(), and fb_putchar().

Here is the call graph for this function:

static void invert_pixel unsigned int  x,
unsigned int  y
[static]
 

Definition at line 206 of file fb.c.

References getpixel(), and putpixel().

Referenced by invert_char().

Here is the call graph for this function:

void key_pressed __u8  sc  )  [static]
 

Process keypress.

Parameters:
sc Scancode of the key being pressed.

Definition at line 371 of file i8042.c.

References chardev_push_character(), is_lower, kbrd, keyflags, LOCKED_CAPSLOCK, lockflags, PRESSED_CAPSLOCK, PRESSED_SHIFT, SC_CAPSLOCK, SC_DELETE, SC_DOWNARR, SC_END, SC_HOME, SC_LEFTARR, SC_LSHIFT, sc_primary_map, SC_RIGHTARR, SC_RSHIFT, sc_secondary_map, SC_SPEC_ESCAPE, SC_UPARR, spinlock_lock, and spinlock_unlock().

Referenced by i8042_interrupt(), and i8042_poll().

Here is the call graph for this function:

static char key_read chardev_t d  )  [static]
 

Definition at line 538 of file i8042.c.

References active_read_buff_read(), active_read_key_pressed(), i8042_BUFFER_FULL_MASK, IGNORE_CODE, KEY_RELEASE, and key_released().

Here is the call graph for this function:

void key_released __u8  sc  )  [static]
 

Process release of key.

Parameters:
sc Scancode of the key being released.

Definition at line 346 of file i8042.c.

References keyflags, LOCKED_CAPSLOCK, lockflags, PRESSED_CAPSLOCK, PRESSED_SHIFT, SC_CAPSLOCK, SC_LSHIFT, SC_RSHIFT, spinlock_lock, and spinlock_unlock().

Referenced by i8042_interrupt(), i8042_poll(), and key_read().

Here is the call graph for this function:

int madt_cmp void *  a,
void *  b
[static]
 

Definition at line 134 of file madt.c.

Referenced by acpi_madt_parse().

__u8 madt_cpu_apic_id index_t  i  )  [static]
 

Definition at line 122 of file madt.c.

References ASSERT, madt_entries_index, madt_l_apic_entry_cnt, and madt_l_apic_entry_index.

bool madt_cpu_bootstrap index_t  i  )  [static]
 

Definition at line 116 of file madt.c.

References ASSERT, madt_entries_index, madt_l_apic_entry_cnt, and madt_l_apic_entry_index.

count_t madt_cpu_count void   )  [static]
 

Definition at line 104 of file madt.c.

References madt_l_apic_entry_cnt.

bool madt_cpu_enabled index_t  i  )  [static]
 

Definition at line 109 of file madt.c.

References ASSERT, madt_entries_index, madt_l_apic_entry_cnt, and madt_l_apic_entry_index.

void madt_intr_src_ovrd_entry struct madt_intr_src_ovrd override,
__u32  index
[static]
 

Definition at line 236 of file madt.c.

References ASSERT, madt_intr_src_ovrd::bus, entry, madt_intr_src_ovrd::flags, madt_intr_src_ovrd::global_int, madt_intr_src_ovrd::header, isa_irq_map, printf(), madt_intr_src_ovrd::source, and madt_apic_header::type.

Referenced by acpi_madt_parse().

Here is the call graph for this function:

void madt_io_apic_entry struct madt_io_apic ioa,
__u32  index
[static]
 

Definition at line 224 of file madt.c.

References madt_io_apic::io_apic_address, madt_io_apic_entry_cnt, and madt_io_apic_entry_index.

Referenced by acpi_madt_parse().

int madt_irq_to_pin int  irq  )  [static]
 

Definition at line 128 of file madt.c.

References ASSERT, and isa_irq_map.

void madt_l_apic_entry struct madt_l_apic la,
__u32  index
[static]
 

Definition at line 209 of file madt.c.

References madt_l_apic::apic_id, cpu_count, madt_l_apic::flags, madt_l_apic_entry_cnt, and madt_l_apic_entry_index.

Referenced by acpi_madt_parse().

static void map_sdt struct acpi_sdt_header sdt  )  [static]
 

Definition at line 90 of file acpi.c.

References AS_KERNEL, map_structure(), page_mapping_insert(), and PAGE_NOT_CACHEABLE.

Referenced by configure_via_rsdt(), and configure_via_xsdt().

Here is the call graph for this function:

static void putpixel unsigned int  x,
unsigned int  y,
int  color
[static]
 

Definition at line 150 of file fb.c.

References dbbuffer, dboffset, fbaddress, POINTPOS, and yres.

Referenced by draw_glyph_line(), draw_logo(), and invert_pixel().

static void rgb_1byte void *  dst,
int  rgb
[static]
 

Put pixel - 8-bit depth (3:2:3)

Definition at line 138 of file fb.c.

References BLUE, GREEN, and RED.

Referenced by fb_init().

static void rgb_2byte void *  dst,
int  rgb
[static]
 

16-bit depth (5:6:5)

Definition at line 124 of file fb.c.

References BLUE, GREEN, and RED.

Referenced by fb_init().

static void rgb_3byte void *  dst,
int  rgb
[static]
 

Definition at line 99 of file fb.c.

References BLUE, GREEN, and RED.

Referenced by fb_init().

static void rgb_4byte void *  dst,
int  rgb
[static]
 

Definition at line 89 of file fb.c.

Referenced by fb_init().

static int rsdp_check __u8 rsdp  )  [static]
 

Definition at line 57 of file acpi.c.

References acpi_rsdp, acpi_rsdp::length, and acpi_rsdp::revision.

Referenced by acpi_init().

static void scroll_screen void   )  [static]
 

Scroll screen one row up

Definition at line 185 of file fb.c.

References blankline, dbbuffer, dboffset, fbaddress, FONT_SCANLINES, memcpy(), ROW_BYTES, rows, scanline, and yres.

Referenced by fb_putchar().

Here is the call graph for this function:

SPINLOCK_INITIALIZE keylock   ) 
 

keylock protects keyflags and lockflags.

SPINLOCK_INITIALIZE fb_lock   ) 
 


Variable Documentation

struct acpi_madt* acpi_madt = NULL
 

Definition at line 51 of file madt.c.

Referenced by acpi_madt_parse().

struct acpi_madt* acpi_madt
 

Definition at line 51 of file madt.c.

Referenced by acpi_madt_parse().

struct acpi_rsdp* acpi_rsdp = NULL
 

Definition at line 49 of file acpi.c.

Referenced by acpi_init(), and rsdp_check().

struct acpi_rsdp* acpi_rsdp
 

Definition at line 49 of file acpi.c.

Referenced by acpi_init(), and rsdp_check().

struct acpi_rsdt* acpi_rsdt = NULL
 

Definition at line 50 of file acpi.c.

Referenced by configure_via_rsdt(), and configure_via_xsdt().

struct acpi_rsdt* acpi_rsdt
 

Definition at line 50 of file acpi.c.

Referenced by configure_via_rsdt(), and configure_via_xsdt().

struct acpi_xsdt* acpi_xsdt = NULL
 

Definition at line 51 of file acpi.c.

Referenced by configure_via_xsdt().

struct acpi_xsdt* acpi_xsdt
 

Definition at line 51 of file acpi.c.

Referenced by configure_via_xsdt().

__u8 active_read_buff[ACTIVE_READ_BUFF_SIZE] [static]
 

Definition at line 97 of file i8042.c.

Referenced by active_read_buff_read(), and active_read_buff_write().

unsigned int bitspp = 0 [static]
 

Definition at line 61 of file fb.c.

Referenced by fb_init().

__u8* blankline = NULL [static]
 

Definition at line 54 of file fb.c.

Referenced by clear_screen(), fb_init(), and scroll_screen().

unsigned int columns = 0 [static]
 

Definition at line 65 of file fb.c.

Referenced by draw_char(), fb_init(), fb_putchar(), and invert_cursor().

count_t cpu_count = 0
 

Definition at line 70 of file madt.c.

Referenced by madt_l_apic_entry().

__u8* dbbuffer = NULL [static]
 

Definition at line 55 of file fb.c.

Referenced by clear_screen(), fb_init(), getpixel(), putpixel(), and scroll_screen().

int dboffset [static]
 

Definition at line 56 of file fb.c.

Referenced by fb_init(), getpixel(), putpixel(), and scroll_screen().

char* entry[]
 

Initial value:

 {
        "L_APIC",
        "IO_APIC",
        "INTR_SRC_OVRD",
        "NMI_SRC",
        "L_APIC_NMI",
        "L_APIC_ADDR_OVRD",
        "IO_SAPIC",
        "L_SAPIC",
        "PLATFORM_INTR_SRC"
}

Definition at line 75 of file madt.c.

Referenced by acpi_madt_parse(), elf_frame_free(), elf_page_fault(), elf_share(), and madt_intr_src_ovrd_entry().

unsigned char fb_font[FONT_GLIPHS *FONT_SCANLINES]
 

Definition at line 37 of file font-8x16.c.

Referenced by draw_glyph().

unsigned char fb_font[FONT_GLIPHS *FONT_SCANLINES]
 

Definition at line 37 of file font-8x16.c.

Referenced by draw_glyph().

spinlock_t fb_lock
 

Referenced by fb_putchar().

chardev_operations_t fb_ops [static]
 

Initial value:

 {
        .write = fb_putchar,
}

Definition at line 325 of file fb.c.

Referenced by fb_init().

__u8* fbaddress = NULL [static]
 

Definition at line 52 of file fb.c.

Referenced by clear_screen(), fb_init(), getpixel(), putpixel(), and scroll_screen().

chardev_t framebuffer [static]
 

Definition at line 324 of file fb.c.

Referenced by fb_init().

int isa_irq_map[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
 

Standard ISA IRQ map; can be overriden by Interrupt Source Override entries of MADT.

Definition at line 56 of file madt.c.

Referenced by madt_intr_src_ovrd_entry(), and madt_irq_to_pin().

chardev_t kbrd [static]
 

Definition at line 106 of file i8042.c.

Referenced by i8042_init(), and key_pressed().

volatile int keyflags [static]
 

Tracking of multiple keypresses.

Definition at line 100 of file i8042.c.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

volatile int lockflags [static]
 

Tracking of multiple keys lockings.

Definition at line 101 of file i8042.c.

Referenced by active_read_key_pressed(), key_pressed(), and key_released().

struct smp_config_operations madt_config_operations
 

Initial value:

 {
        .cpu_count = madt_cpu_count,
        .cpu_enabled = madt_cpu_enabled,
        .cpu_bootstrap = madt_cpu_bootstrap,
        .cpu_apic_id = madt_cpu_apic_id,
        .irq_to_pin = madt_irq_to_pin
}

Definition at line 96 of file madt.c.

struct smp_config_operations madt_config_operations
 

Definition at line 96 of file madt.c.

struct madt_apic_header* * madt_entries_index = NULL
 

Definition at line 72 of file madt.c.

Referenced by acpi_madt_parse(), madt_cpu_apic_id(), madt_cpu_bootstrap(), and madt_cpu_enabled().

int madt_entries_index_cnt = 0
 

Definition at line 73 of file madt.c.

Referenced by acpi_madt_parse().

struct madt_io_apic* madt_io_apic_entries = NULL
 

Definition at line 64 of file madt.c.

count_t madt_io_apic_entry_cnt = 0
 

Definition at line 69 of file madt.c.

Referenced by madt_io_apic_entry().

index_t madt_io_apic_entry_index = 0
 

Definition at line 67 of file madt.c.

Referenced by madt_io_apic_entry().

struct madt_l_apic* madt_l_apic_entries = NULL
 

Definition at line 63 of file madt.c.

count_t madt_l_apic_entry_cnt = 0
 

Definition at line 68 of file madt.c.

Referenced by madt_cpu_apic_id(), madt_cpu_bootstrap(), madt_cpu_count(), madt_cpu_enabled(), and madt_l_apic_entry().

index_t madt_l_apic_entry_index = 0
 

Definition at line 66 of file madt.c.

Referenced by madt_cpu_apic_id(), madt_cpu_bootstrap(), madt_cpu_enabled(), and madt_l_apic_entry().

iroutine oldvector [static]
 

Definition at line 276 of file i8042.c.

Referenced by i8042_grab(), i8042_init(), and i8042_release().

chardev_operations_t ops [static]
 

Initial value:

 {
        .suspend = i8042_suspend,
        .resume = i8042_resume,
        .read = key_read
}

Definition at line 107 of file i8042.c.

Referenced by i8042_init().

struct madt_platform_intr_src packed
 

struct madt_l_sapic packed
 

struct madt_io_sapic packed
 

struct madt_l_apic_addr_ovrd packed
 

struct madt_l_apic_nmi packed
 

struct madt_nmi_src packed
 

struct madt_intr_src_ovrd packed
 

struct madt_io_apic packed
 

struct madt_l_apic packed
 

struct acpi_madt packed
 

struct madt_apic_header packed
 

struct acpi_xsdt packed
 

struct acpi_rsdt packed
 

struct acpi_sdt_header packed
 

struct acpi_rsdp packed
 

unsigned int pixelbytes = 0 [static]
 

Definition at line 62 of file fb.c.

Referenced by clear_screen(), and fb_init().

unsigned int position = 0 [static]
 

Definition at line 64 of file fb.c.

Referenced by clever_readline(), draw_char(), fb_putchar(), and invert_cursor().

void(* rgb2scr)(void *, int) [static]
 

Definition at line 85 of file fb.c.

Referenced by fb_init().

unsigned int rows = 0 [static]
 

Definition at line 66 of file fb.c.

Referenced by fb_init(), fb_putchar(), and scroll_screen().

char sc_primary_map[] [static]
 

Primary meaning of scancodes.

Definition at line 114 of file i8042.c.

Referenced by active_read_key_pressed(), and key_pressed().

char sc_secondary_map[] [static]
 

Secondary meaning of scancodes.

Definition at line 194 of file i8042.c.

Referenced by active_read_key_pressed(), and key_pressed().

unsigned int scanline = 0 [static]
 

Definition at line 60 of file fb.c.

Referenced by clear_screen(), fb_init(), and scroll_screen().

int(* scr2rgb)(void *) [static]
 

Definition at line 86 of file fb.c.

Referenced by fb_init(), and getpixel().

struct acpi_signature_map signature_map[]
 

Initial value:

 { 
        { (__u8 *)"APIC", (void *) &acpi_madt, "Multiple APIC Description Table" }
}

Definition at line 53 of file acpi.c.

Referenced by configure_via_rsdt(), and configure_via_xsdt().

unsigned int xres = 0 [static]
 

Definition at line 58 of file fb.c.

Referenced by clear_screen(), and fb_init().

unsigned int yres = 0 [static]
 

Definition at line 59 of file fb.c.

Referenced by clear_screen(), fb_init(), getpixel(), putpixel(), and scroll_screen().


Generated on Sun Jun 18 16:38:05 2006 for HelenOS Kernel (amd64) by  doxygen 1.4.6