diff --git a/MP2/MP2_Sources/bochsout.txt b/MP2/MP2_Sources/bochsout.txt deleted file mode 100644 index 2086560..0000000 --- a/MP2/MP2_Sources/bochsout.txt +++ /dev/null @@ -1,236 +0,0 @@ -00000000000i[ ] Bochs x86 Emulator 2.4.6 -00000000000i[ ] Build from CVS snapshot, on February 22, 2011 -00000000000i[ ] Compiled at Nov 11 2011, 09:31:18 -00000000000i[ ] System configuration -00000000000i[ ] processors: 1 (cores=1, HT threads=1) -00000000000i[ ] A20 line support: yes -00000000000i[ ] CPU configuration -00000000000i[ ] level: 6 -00000000000i[ ] SMP support: no -00000000000i[ ] APIC support: yes -00000000000i[ ] FPU support: yes -00000000000i[ ] MMX support: yes -00000000000i[ ] 3dnow! support: no -00000000000i[ ] SEP support: yes -00000000000i[ ] SSE support: sse2 -00000000000i[ ] XSAVE support: no -00000000000i[ ] AES support: no -00000000000i[ ] MOVBE support: no -00000000000i[ ] x86-64 support: yes -00000000000i[ ] 1G paging support: no -00000000000i[ ] VMX support: no -00000000000i[ ] Optimization configuration -00000000000i[ ] RepeatSpeedups support: yes -00000000000i[ ] Trace cache support: yes -00000000000i[ ] Fast function calls: yes -00000000000i[ ] Devices configuration -00000000000i[ ] ACPI support: yes -00000000000i[ ] NE2000 support: yes -00000000000i[ ] PCI support: yes, enabled=yes -00000000000i[ ] SB16 support: yes -00000000000i[ ] USB support: yes -00000000000i[ ] VGA extension support: vbe -00000000000i[MEM0 ] allocated memory at 0x7f3ed8511010. after alignment, vector=0x7f3ed8512000 -00000000000i[MEM0 ] 32.00MB -00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32 -00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('BIOS-bochs-latest') -00000000000i[MEM0 ] rom at 0xc0000/38400 ('VGABIOS-lgpl-latest') -00000000000i[VTIME] using 'realtime pit' synchronization method -00000000000i[ ] lt_dlhandle is 0x3837560 -00000000000i[PLGIN] loaded plugin libbx_cmos.so -00000000000i[ ] lt_dlhandle is 0x3837f80 -00000000000i[PLGIN] loaded plugin libbx_dma.so -00000000000i[ ] lt_dlhandle is 0x38389e0 -00000000000i[PLGIN] loaded plugin libbx_pic.so -00000000000i[ ] lt_dlhandle is 0x3839220 -00000000000i[PLGIN] loaded plugin libbx_pit.so -00000000000i[ ] lt_dlhandle is 0x3839b90 -00000000000i[PLGIN] loaded plugin libbx_vga.so -00000000000i[ ] lt_dlhandle is 0x383a2c0 -00000000000i[PLGIN] loaded plugin libbx_hdimage.so -00000000000i[ ] lt_dlhandle is 0x383ab80 -00000000000i[PLGIN] loaded plugin libbx_floppy.so -00000000000i[ ] lt_dlhandle is 0x383b770 -00000000000i[PLGIN] loaded plugin libbx_soundmod.so -00000000000i[ ] lt_dlhandle is 0x383cdc0 -00000000000i[PLGIN] loaded plugin libbx_pci.so -00000000000i[ ] lt_dlhandle is 0x383d9f0 -00000000000i[PLGIN] loaded plugin libbx_pci2isa.so -00000000000i[ ] lt_dlhandle is 0x383e2d0 -00000000000i[PLGIN] loaded plugin libbx_usb_common.so -00000000000i[ ] lt_dlhandle is 0x383eb30 -00000000000i[PLGIN] loaded plugin libbx_unmapped.so -00000000000i[ ] lt_dlhandle is 0x383f3a0 -00000000000i[PLGIN] loaded plugin libbx_biosdev.so -00000000000i[ ] lt_dlhandle is 0x383fcd0 -00000000000i[PLGIN] loaded plugin libbx_speaker.so -00000000000i[ ] lt_dlhandle is 0x3840500 -00000000000i[PLGIN] loaded plugin libbx_extfpuirq.so -00000000000i[ ] lt_dlhandle is 0x3840d70 -00000000000i[PLGIN] loaded plugin libbx_gameport.so -00000000000i[ ] lt_dlhandle is 0x38416e0 -00000000000i[PLGIN] loaded plugin libbx_pci_ide.so -00000000000i[ ] lt_dlhandle is 0x38420b0 -00000000000i[PLGIN] loaded plugin libbx_acpi.so -00000000000i[ ] lt_dlhandle is 0x38429f0 -00000000000i[PLGIN] loaded plugin libbx_ioapic.so -00000000000i[ ] lt_dlhandle is 0x38433a0 -00000000000i[PLGIN] loaded plugin libbx_keyboard.so -00000000000i[ ] lt_dlhandle is 0x3843ba0 -00000000000i[PLGIN] loaded plugin libbx_harddrv.so -00000000000i[ ] lt_dlhandle is 0x3855c70 -00000000000i[PLGIN] loaded plugin libbx_serial.so -00000000000i[ ] lt_dlhandle is 0x3856ae0 -00000000000i[PLGIN] loaded plugin libbx_parallel.so -00000000000i[CMOS ] Using specified time for initial clock -00000000000i[CMOS ] Setting initial clock to: Fri Dec 31 17:00:00 1999 (time0=946681200) -00000000000i[DMA ] channel 4 used by cascade -00000000000i[DMA ] channel 2 used by Floppy Drive -00000000000i[FDD ] fd0: 'dev_kernel_grub.img' ro=0, h=2,t=80,spt=18 -00000000000i[PCI ] 440FX Host bridge present at device 0, function 0 -00000000000i[PCI ] PIIX3 PCI-to-ISA bridge present at device 1, function 0 -00000000000i[VGA ] interval=50000 -00000000000i[MEM0 ] Register memory access handlers: 0x00000000000a0000 - 0x00000000000bffff -00000000000i[XGUI ] test_alloc_colors: 16 colors available out of 16 colors tried -00000000000i[XGUI ] font 8 wide x 16 high, display depth = 24 -00000000000i[MEM0 ] Register memory access handlers: 0x00000000e0000000 - 0x00000000e0ffffff -00000000000i[VGA ] VBE Bochs Display Extension Enabled -00000000000i[PLGIN] init_dev of 'unmapped' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'biosdev' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'speaker' plugin device by virtual method -00000000000i[SPEAK] Failed to open /dev/console: Resource temporarily unavailable -00000000000i[SPEAK] Deactivating beep on console -00000000000i[PLGIN] init_dev of 'extfpuirq' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'gameport' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'pci_ide' plugin device by virtual method -00000000000i[PCI ] PIIX3 PCI IDE controller present at device 1, function 1 -00000000000i[PLGIN] init_dev of 'acpi' plugin device by virtual method -00000000000i[PCI ] ACPI Controller present at device 1, function 3 -00000000000i[PLGIN] init_dev of 'ioapic' plugin device by virtual method -00000000000i[IOAP ] initializing I/O APIC -00000000000i[MEM0 ] Register memory access handlers: 0x00000000fec00000 - 0x00000000fec00fff -00000000000i[PLGIN] init_dev of 'keyboard' plugin device by virtual method -00000000000i[KBD ] will paste characters every 1000 keyboard ticks -00000000000i[PLGIN] init_dev of 'harddrv' plugin device by virtual method -00000000000i[HD ] Using boot sequence floppy, none, none -00000000000i[HD ] Floppy boot signature check is enabled -00000000000i[PLGIN] init_dev of 'serial' plugin device by virtual method -00000000000i[SER ] com1 at 0x03f8 irq 4 -00000000000i[PLGIN] init_dev of 'parallel' plugin device by virtual method -00000000000i[PAR ] parallel port 1 at 0x0378 irq 7 -00000000000i[PLGIN] register state of 'unmapped' plugin device by virtual method -00000000000i[PLGIN] register state of 'biosdev' plugin device by virtual method -00000000000i[PLGIN] register state of 'speaker' plugin device by virtual method -00000000000i[PLGIN] register state of 'extfpuirq' plugin device by virtual method -00000000000i[PLGIN] register state of 'gameport' plugin device by virtual method -00000000000i[PLGIN] register state of 'pci_ide' plugin device by virtual method -00000000000i[PLGIN] register state of 'acpi' plugin device by virtual method -00000000000i[PLGIN] register state of 'ioapic' plugin device by virtual method -00000000000i[PLGIN] register state of 'keyboard' plugin device by virtual method -00000000000i[PLGIN] register state of 'harddrv' plugin device by virtual method -00000000000i[PLGIN] register state of 'serial' plugin device by virtual method -00000000000i[PLGIN] register state of 'parallel' plugin device by virtual method -00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called -00000000000i[CPU0 ] cpu hardware reset -00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x00000000fee00000 -00000000000i[CPU0 ] CPUID[0x00000000]: 00000003 756e6547 6c65746e 49656e69 -00000000000i[CPU0 ] CPUID[0x00000001]: 00000f23 00000800 00002000 07cbfbff -00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x00000007]: 00000000 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000001 2a100800 -00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020 -00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75 -00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020 -00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000 -00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000 -00000000000i[PLGIN] reset of 'unmapped' plugin device by virtual method -00000000000i[PLGIN] reset of 'biosdev' plugin device by virtual method -00000000000i[PLGIN] reset of 'speaker' plugin device by virtual method -00000000000i[PLGIN] reset of 'extfpuirq' plugin device by virtual method -00000000000i[PLGIN] reset of 'gameport' plugin device by virtual method -00000000000i[PLGIN] reset of 'pci_ide' plugin device by virtual method -00000000000i[PLGIN] reset of 'acpi' plugin device by virtual method -00000000000i[PLGIN] reset of 'ioapic' plugin device by virtual method -00000000000i[PLGIN] reset of 'keyboard' plugin device by virtual method -00000000000i[PLGIN] reset of 'harddrv' plugin device by virtual method -00000000000i[PLGIN] reset of 'serial' plugin device by virtual method -00000000000i[PLGIN] reset of 'parallel' plugin device by virtual method -00000000000i[XGUI ] [x] Mouse off -00000003302i[BIOS ] $Revision: 1.209 $ $Date: 2008/06/02 20:08:10 $ -00000318057i[KBD ] reset-disable command received -00000438667i[VBIOS] VGABios $Id: vgabios.c,v 1.67 2008/01/27 09:44:12 vruppert Exp $ -00000438738i[VGA ] VBE known Display Interface b0c0 -00000438770i[VGA ] VBE known Display Interface b0c4 -00000441695i[VBIOS] VBE Bios $Id: vbe.c,v 1.60 2008/03/02 07:47:21 vruppert Exp $ -00000600000i[XGUI ] charmap update. Font Height is 16 -00000764696i[BIOS ] Starting rombios32 -00000765523i[BIOS ] ram_size=0x02000000 -00000776678i[BIOS ] Found 1 cpu(s) -00000792979i[BIOS ] bios_table_addr: 0x000fb778 end=0x000fcc00 -00000793046i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001251853i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001711340i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b -00001711387i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 -00001711434i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b -00001711481i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 -00001711497i[P2I ] write: ELCR2 = 0x0a -00001712434i[BIOS ] PIIX3 init: elcr=00 0a -00001732689i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 -00001735926i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 -00001738659i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 -00001739120i[PIDE ] new BM-DMA address: 0xc000 -00001740003i[BIOS ] region 4: 0x0000c000 -00001742579i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 -00001743079i[ACPI ] new irq line = 11 -00001743116i[ACPI ] new PM base address: 0xb000 -00001743178i[ACPI ] new SM base address: 0xb100 -00001743646i[CPU0 ] Enter to System Management Mode -00001743656i[CPU0 ] RSM: Resuming from System Management Mode -00001743690i[PCI ] setting SMRAM control register to 0x4a -00001743972i[PCI ] setting SMRAM control register to 0x0a -00001767253i[BIOS ] MP table addr=0x000fb850 MPC table addr=0x000fb780 size=0xd0 -00001769456i[BIOS ] SMBIOS table addr=0x000fb860 -00001772500i[BIOS ] ACPI tables: RSDP addr=0x000fb970 ACPI DATA addr=0x01ff0000 size=0x9d8 -00001792033i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001793045i[BIOS ] bios_table_cur_addr: 0x000fb994 -00374348939i[BIOS ] Booting from 0000:7c00 -00384200000i[XGUI ] charmap update. Font Height is 16 -00423200000i[XGUI ] charmap update. Font Height is 16 -00430800000i[XGUI ] charmap update. Font Height is 16 -00431000000i[XGUI ] charmap update. Font Height is 16 -00794756000p[XGUI ] >>PANIC<< POWER button turned off. -00794756000i[CPU0 ] CPU is in protected mode (active) -00794756000i[CPU0 ] CS.d_b = 32 bit -00794756000i[CPU0 ] SS.d_b = 32 bit -00794756000i[CPU0 ] EFER = 0x00000000 -00794756000i[CPU0 ] | RAX=0000000000000000 RBX=0000000000026260 -00794756000i[CPU0 ] | RCX=00000000000b8000 RDX=00000000000003d4 -00794756000i[CPU0 ] | RSP=0000000000102f68 RBP=0000000000102f68 -00794756000i[CPU0 ] | RSI=00000000000263d3 RDI=00000000000263df -00794756000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000 -00794756000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000 -00794756000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000 -00794756000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000 -00794756000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf -00794756000i[CPU0 ] | SEG selector base limit G D -00794756000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D -00794756000i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 -00794756000i[CPU0 ] | MSR_FS_BASE:0000000000000000 -00794756000i[CPU0 ] | MSR_GS_BASE:0000000000000000 -00794756000i[CPU0 ] | RIP=0000000000100033 (0000000000100033) -00794756000i[CPU0 ] | CR0=0x60000011 CR2=0x0000000000000000 -00794756000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000 -00794756000i[CPU0 ] 0x0000000000100033>> jmp .-2 (0x00100033) : EBFE -00794756000i[CMOS ] Last time is 946681398 (Fri Dec 31 17:03:18 1999) -00794756000i[XGUI ] Exit -00794756000i[ ] restoring default signal behavior -00794756000i[CTRL ] quit_sim called with exit code 1 diff --git a/MP2/MP2_Sources/dev_kernel_grub.img b/MP2/MP2_Sources/dev_kernel_grub.img deleted file mode 100755 index e548c4d..0000000 Binary files a/MP2/MP2_Sources/dev_kernel_grub.img and /dev/null differ diff --git a/MP2/MP2_Sources/kernel.C b/MP2/MP2_Sources/kernel.C deleted file mode 100755 index 6b4e301..0000000 --- a/MP2/MP2_Sources/kernel.C +++ /dev/null @@ -1,133 +0,0 @@ -/* - File: kernel.C - - Author: R. Bettati - Department of Computer Science - Texas A&M University - Date : 02/02/17 - - - This file has the main entry point to the operating system. - -*/ - - -/*--------------------------------------------------------------------------*/ -/* DEFINES */ -/*--------------------------------------------------------------------------*/ - -#define MB * (0x1 << 20) -#define KB * (0x1 << 10) -/* Makes things easy to read */ - -#define KERNEL_POOL_START_FRAME ((2 MB) / (4 KB)) -#define KERNEL_POOL_SIZE ((2 MB) / (4 KB)) -#define PROCESS_POOL_START_FRAME ((4 MB) / (4 KB)) -#define PROCESS_POOL_SIZE ((28 MB) / (4 KB)) -/* Definition of the kernel and process memory pools */ - -#define MEM_HOLE_START_FRAME ((15 MB) / (4 KB)) -#define MEM_HOLE_SIZE ((1 MB) / (4 KB)) -/* We have a 1 MB hole in physical memory starting at address 15 MB */ - -#define TEST_START_ADDR_PROC (4 MB) -#define TEST_START_ADDR_KERNEL (2 MB) -/* Used in the memory test below to generate sequences of memory references. */ -/* One is for a sequence of memory references in the kernel space, and the */ -/* other for memory references in the process space. */ - -#define N_TEST_ALLOCATIONS -/* Number of recursive allocations that we use to test. */ - -/*--------------------------------------------------------------------------*/ -/* INCLUDES */ -/*--------------------------------------------------------------------------*/ - -#include "machine.H" /* LOW-LEVEL STUFF */ -#include "console.H" - -#include "assert.H" -#include "cont_frame_pool.H" /* The physical memory manager */ - -/*--------------------------------------------------------------------------*/ -/* FORWARDS */ -/*--------------------------------------------------------------------------*/ - -void test_memory(ContFramePool * _pool, unsigned int _allocs_to_go); - -/*--------------------------------------------------------------------------*/ -/* MAIN ENTRY INTO THE OS */ -/*--------------------------------------------------------------------------*/ - -int main() { - - Console::init(); - - /* -- INITIALIZE FRAME POOLS -- */ - - /* ---- KERNEL POOL -- */ - - ContFramePool kernel_mem_pool(KERNEL_POOL_START_FRAME, - KERNEL_POOL_SIZE, - 0, - 0); - - - /* ---- PROCESS POOL -- */ - -/* - unsigned long n_info_frames = ContFramePool::needed_info_frames(PROCESS_POOL_SIZE); - - unsigned long process_mem_pool_info_frame = kernel_mem_pool.get_frames(n_info_frames); - - ContFramePool process_mem_pool(PROCESS_POOL_START_FRAME, - PROCESS_POOL_SIZE, - process_mem_pool_info_frame, - n_info_frames); - - process_mem_pool.mark_inaccessible(MEM_HOLE_START_FRAME, MEM_HOLE_SIZE); -*/ - /* -- MOST OF WHAT WE NEED IS SETUP. THE KERNEL CAN START. */ - - Console::puts("Hello World!\n"); - - /* -- TEST MEMORY ALLOCATOR */ - - test_memory(&kernel_mem_pool, 32); - - /* ---- Add code here to test the frame pool implementation. */ - - /* -- NOW LOOP FOREVER */ - Console::puts("Testing is DONE. We will do nothing forever\n"); - Console::puts("Feel free to turn off the machine now.\n"); - - for(;;); - - /* -- WE DO THE FOLLOWING TO KEEP THE COMPILER HAPPY. */ - return 1; -} - -void test_memory(ContFramePool * _pool, unsigned int _allocs_to_go) { - Console::puts("alloc_to_go = "); Console::puti(_allocs_to_go); Console::puts("\n"); - if (_allocs_to_go > 0) { - int n_frames = _allocs_to_go % 4 + 1; - unsigned long frame = _pool->get_frames(n_frames); - int * value_array = (int*)(frame * (4 KB)); - for (int i = 0; i < (1 KB) * n_frames; i++) { - value_array[i] = _allocs_to_go; - } - test_memory(_pool, _allocs_to_go - 1); - for (int i = 0; i < (1 KB) * n_frames; i++) { - if(value_array[i] != _allocs_to_go){ - Console::puts("MEMORY TEST FAILED. ERROR IN FRAME POOL\n"); - Console::puts("i ="); Console::puti(i); - Console::puts(" v = "); Console::puti(value_array[i]); - Console::puts(" n ="); Console::puti(_allocs_to_go); - Console::puts("\n"); - for(;;); - } - } - ContFramePool::release_frames(frame); - } -} -