#include "threads/init.h"#include <console.h>#include <debug.h>#include <inttypes.h>#include <limits.h>#include <random.h>#include <stddef.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "devices/kbd.h"#include "devices/input.h"#include "devices/pci.h"#include "devices/usb.h"#include "devices/serial.h"#include "devices/timer.h"#include "devices/vga.h"#include "devices/rtc.h"#include "threads/interrupt.h"#include "threads/io.h"#include "threads/loader.h"#include "threads/malloc.h"#include "threads/palloc.h"#include "threads/pte.h"#include "threads/thread.h"#include "tests/threads/tests.h"Go to the source code of this file.
Defines | |
| #define | CONTROL_REG 0x64 |
Functions | |
| static void | bss_init (void) |
| static void | paging_init (void) |
| static void | pci_zone_init (void) |
| static char ** | read_command_line (void) |
| static char ** | parse_options (char **argv) |
| static void | run_actions (char **argv) |
| static void | usage (void) |
| static void | print_stats (void) |
| int | main (void) |
| static void | run_task (char **argv) |
| void | reboot (void) |
| void | power_off (void) |
Variables | |
| uint32_t * | base_page_dir |
| bool | base_page_dir_initialized = 0 |
| bool | power_off_when_done |
| static bool | reboot_when_done |
| static void bss_init | ( | void | ) | [static] |
| int main | ( | void | ) |
Definition at line 82 of file init.c.
References bss_init(), console_init(), exception_init(), filesys_init(), gdt_init(), ide_init(), input_init(), intr_init(), kbd_init(), malloc_init(), paging_init(), palloc_init(), parse_options(), pci_init(), PGSIZE, power_off(), power_off_when_done, printf(), PRIu32, ram_pages, read_command_line(), reboot(), reboot_when_done, run_actions(), serial_init_queue(), syscall_init(), thread_exit(), thread_init(), thread_start(), timer_calibrate(), timer_init(), tss_init(), usb_init(), and usb_storage_init().
| static void paging_init | ( | void | ) | [static] |
Definition at line 174 of file init.c.
References _start(), base_page_dir, base_page_dir_initialized, NULL, PAL_ASSERT, PAL_ZERO, palloc_get_page(), pci_zone_init(), pd_no(), pde_create_kernel(), PGSIZE, pt_no(), pte_create_kernel(), ptov(), ram_pages, and vtop().
Referenced by main().
| static char ** parse_options | ( | char ** | argv | ) | [static] |
Definition at line 266 of file init.c.
References atoi(), name, NULL, PANIC, power_off_when_done, random_init(), reboot_when_done, rtc_get_time(), strcmp(), strtok_r(), thread_mlfqs, usage(), and user_page_limit.
Referenced by main().
| static void pci_zone_init | ( | void | ) | [static] |
Definition at line 213 of file init.c.
References base_page_dir, arc4::i, PAL_ASSERT, PAL_ZERO, palloc_get_page(), PCI_ADDR_ZONE_BEGIN, PCI_ADDR_ZONE_PDES, pd_no(), and pde_create_kernel().
Referenced by paging_init().
| void power_off | ( | void | ) |
Definition at line 506 of file init.c.
References filesys_done(), outb(), print_stats(), printf(), s, and serial_flush().
Referenced by debug_panic(), main(), and usage().
| static void print_stats | ( | void | ) | [static] |
Definition at line 529 of file init.c.
References block_print_stats(), console_print_stats(), exception_print_stats(), kbd_print_stats(), thread_print_stats(), and timer_print_stats().
Referenced by power_off().
| static char ** read_command_line | ( | void | ) | [static] |
Definition at line 231 of file init.c.
References arc4::i, LOADER_ARG_CNT, LOADER_ARGS, LOADER_ARGS_LEN, NULL, PANIC, printf(), ptov(), strchr(), and strnlen().
Referenced by main().
| void reboot | ( | void | ) |
Definition at line 473 of file init.c.
References CONTROL_REG, inb(), outb(), printf(), and timer_udelay().
Referenced by keyboard_interrupt(), and main().
| static void run_actions | ( | char ** | argv | ) | [static] |
Definition at line 335 of file init.c.
References fsutil_append(), fsutil_cat(), fsutil_extract(), fsutil_ls(), fsutil_rm(), name, NULL, PANIC, run_task(), and strcmp().
Referenced by main().
| static void run_task | ( | char ** | argv | ) | [static] |
Definition at line 319 of file init.c.
References printf(), process_execute(), process_wait(), and run_test().
Referenced by run_actions().
| static void usage | ( | void | ) | [static] |
Definition at line 44 of file init.c.
Referenced by pagedir_activate(), pagedir_create(), pagedir_destroy(), pagedir_set_page(), paging_init(), pci_alloc_mem(), and pci_zone_init().
| bool base_page_dir_initialized = 0 |
| bool power_off_when_done |
bool reboot_when_done [static] |
1.5.6