Import backup from 2005-11-03
This commit is contained in:
parent
7daa1c5336
commit
677551fba5
@ -73,8 +73,8 @@ lang/conv.o: lang/conv.h hos_defines.h
|
|||||||
display/kout.o: hos_defines.h display/kout.h lang/conv.h devices.h
|
display/kout.o: hos_defines.h display/kout.h lang/conv.h devices.h
|
||||||
display/kout.o: char/misc_char.h char/misc_char.h functions.h sys/io.h
|
display/kout.o: char/misc_char.h char/misc_char.h functions.h sys/io.h
|
||||||
display/display.o: devices.h hos_defines.h char/vconsole.h display/display.h
|
display/display.o: devices.h hos_defines.h char/vconsole.h display/display.h
|
||||||
display/display.o: lang/lang.h kernel.h multiboot.h display/vesafb.h
|
display/display.o: lang/lang.h kernel.h multiboot.h char/keyboard.h
|
||||||
display/display.o: char/keyboard.h display/kout.h
|
display/display.o: display/kout.h
|
||||||
sys/pic.o: hos_defines.h sys/pic.h sys/io.h
|
sys/pic.o: hos_defines.h sys/pic.h sys/io.h
|
||||||
char/keyboard.o: hos_defines.h char/keyboard.h sys/io.h functions.h
|
char/keyboard.o: hos_defines.h char/keyboard.h sys/io.h functions.h
|
||||||
char/keyboard.o: lang/conv.h display/kout.h display/display.h devices.h
|
char/keyboard.o: lang/conv.h display/kout.h display/display.h devices.h
|
||||||
@ -90,9 +90,9 @@ block/ramdisk.o: functions.h hos_defines.h sys/io.h mm/vmm.h multiboot.h
|
|||||||
block/ramdisk.o: lang/lang.h block/ramdisk.h devices.h
|
block/ramdisk.o: lang/lang.h block/ramdisk.h devices.h
|
||||||
devices.o: hos_defines.h devices.h char/misc_char.h char/misc_char.h
|
devices.o: hos_defines.h devices.h char/misc_char.h char/misc_char.h
|
||||||
devices.o: char/vconsole.h block/ramdisk.h
|
devices.o: char/vconsole.h block/ramdisk.h
|
||||||
fs/vfs.o: hos_defines.h display/kout.h fs/vfs.h devices.h lang/string.h
|
fs/vfs.o: hos_defines.h display/kout.h functions.h sys/io.h fs/vfs.h
|
||||||
fs/vfs.o: fs/FileSystem.h fs/VFSMount.h fs/FileSystem.h fs/vfs.h
|
fs/vfs.o: devices.h lang/string.h fs/FileSystem.h fs/VFSMount.h
|
||||||
fs/vfs.o: fs/ext2/ext2.h lang/vector.h
|
fs/vfs.o: fs/FileSystem.h fs/vfs.h fs/ext2/ext2.h lang/vector.h
|
||||||
fs/ext2/ext2.o: display/kout.h hos_defines.h mm/vmm.h multiboot.h lang/lang.h
|
fs/ext2/ext2.o: display/kout.h hos_defines.h mm/vmm.h multiboot.h lang/lang.h
|
||||||
fs/ext2/ext2.o: fs/ext2/ext2.h fs/vfs.h devices.h
|
fs/ext2/ext2.o: fs/ext2/ext2.h fs/vfs.h devices.h
|
||||||
fs/sysfs/sysfs.o: display/kout.h hos_defines.h fs/vfs.h devices.h
|
fs/sysfs/sysfs.o: display/kout.h hos_defines.h fs/vfs.h devices.h
|
||||||
|
@ -102,5 +102,7 @@ fs/sysfs/sysfs_entry.o: fs/sysfs/sysfs_entry.h lang/vector.h hos_defines.h
|
|||||||
fs/sysfs/sysfs_entry.o: lang/string.h
|
fs/sysfs/sysfs_entry.o: lang/string.h
|
||||||
sys/pci.o: hos_defines.h display/kout.h sys/io.h sys/pci.h lang/vector.h
|
sys/pci.o: hos_defines.h display/kout.h sys/io.h sys/pci.h lang/vector.h
|
||||||
proc/proc.o: hos_defines.h mm/mm.h kernel.h multiboot.h mm/vmm.h lang/lang.h
|
proc/proc.o: hos_defines.h mm/mm.h kernel.h multiboot.h mm/vmm.h lang/lang.h
|
||||||
proc/proc.o: functions.h sys/io.h proc/proc.h proc/hash.h
|
proc/proc.o: functions.h sys/io.h display/kout.h proc/proc.h proc/hash.h
|
||||||
proc/hash.o: hos_defines.h proc/hash.h
|
proc/proc.o: lang/vector.h
|
||||||
|
proc/hash.o: hos_defines.h proc/hash.h lang/vector.h display/kout.h mm/vmm.h
|
||||||
|
proc/hash.o: multiboot.h
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
;boot.asm
|
;boot.asm
|
||||||
;Author: Josh Holtrop
|
;Author: Josh Holtrop
|
||||||
;Date: 07/08/04
|
;Date: 07/08/04
|
||||||
;Modified: 07/10/04
|
;Modified: 11/01/05
|
||||||
|
|
||||||
|
|
||||||
%define MULTIBOOT_MAGIC 0x1BADB002
|
%define MULTIBOOT_MAGIC 0x1BADB002
|
||||||
@ -25,7 +25,7 @@
|
|||||||
%define KERNEL_P PHYS_START+0x8000 ;1mb+32kb - the kernel's physical address
|
%define KERNEL_P PHYS_START+0x8000 ;1mb+32kb - the kernel's physical address
|
||||||
%define KERNEL_V KERNEL_P+VIRT_OFFSET ;3gb+1mb+32kb, the virtual address of the kernel
|
%define KERNEL_V KERNEL_P+VIRT_OFFSET ;3gb+1mb+32kb, the virtual address of the kernel
|
||||||
|
|
||||||
extern _k_init, _isr, _k_mbsave, _end, _rm_params, _initrd, _tss0, _kprintf
|
extern _k_init, _isr, _k_mbsave, _end, _rm_params, _initrd, _tss0
|
||||||
|
|
||||||
[bits 32]
|
[bits 32]
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "lang/lang.h"
|
#include "lang/lang.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "display/vesafb.h"
|
|
||||||
#include "char/keyboard.h"
|
#include "char/keyboard.h"
|
||||||
#include "display/kout.h"
|
#include "display/kout.h"
|
||||||
|
|
||||||
@ -24,6 +23,7 @@ int display_init()
|
|||||||
{
|
{
|
||||||
vconsole_setup(80, 25);
|
vconsole_setup(80, 25);
|
||||||
display_activate(KERNEL_MSG_CONSOLE);
|
display_activate(KERNEL_MSG_CONSOLE);
|
||||||
|
display_type = DISPLAY_CONSOLE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
display_type = DISPLAY_GRAPHICAL;
|
display_type = DISPLAY_GRAPHICAL;
|
||||||
@ -66,8 +66,10 @@ void display_key_event(u32_t keyCode)
|
|||||||
display_activate(kbdScan - 0x4D);
|
display_activate(kbdScan - 0x4D);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (KBD_ASCII(keyCode))
|
if (KBD_ASCII(keyCode))
|
||||||
putc(KBD_ASCII(keyCode));
|
putc(KBD_ASCII(keyCode));
|
||||||
}
|
}
|
||||||
|
/* TODO: send key to process on active console
|
||||||
|
or graphical control process */
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// kout.c
|
// kout.c
|
||||||
// Author: Josh Holtrop
|
// Author: Josh Holtrop
|
||||||
// Date: 08/02/04
|
// Date: 08/02/04
|
||||||
// Modified: 03/19/05
|
// Modified: 11/02/05
|
||||||
|
|
||||||
#include "hos_defines.h"
|
#include "hos_defines.h"
|
||||||
#include "kout.h"
|
#include "kout.h"
|
||||||
@ -21,7 +21,7 @@ void putc(int c)
|
|||||||
outportb(0x37a, 0x1);
|
outportb(0x37a, 0x1);
|
||||||
// char_write(MAJOR_MISC_CHAR, MISC_CHAR_LP0, c);
|
// char_write(MAJOR_MISC_CHAR, MISC_CHAR_LP0, c);
|
||||||
#endif
|
#endif
|
||||||
char_write(MAJOR_VCONSOLE, KERNEL_MSG_CONSOLE, c); // write to vconsole with minor 1, first allocated
|
char_write(MAJOR_VCONSOLE, KERNEL_MSG_CONSOLE, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
// kernel.h
|
/* kernel.h
|
||||||
// Author: Josh Holtrop
|
* Author: Josh Holtrop
|
||||||
// Date: 08/16/04
|
* Date: 08/16/04
|
||||||
// Modified: 08/18/05
|
* Modified: 11/02/05
|
||||||
// This is the main kernel initialization and boot-strapping file
|
* This is the main kernel initialization and boot-strapping file
|
||||||
|
*/
|
||||||
|
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "multiboot.h"
|
#include "multiboot.h"
|
||||||
@ -127,7 +128,6 @@ void k_init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
display_init(); // initialize display subsystem
|
display_init(); // initialize display subsystem
|
||||||
display_activate(11); // activate kernel dump vconsole
|
|
||||||
kprintf("HOS v0.16 initializing...\n");
|
kprintf("HOS v0.16 initializing...\n");
|
||||||
kprintf("Kernel load size: %d (0x%x) bytes (%d kb)\n", kernel_size(), kernel_size(), kernel_size() >> 10);
|
kprintf("Kernel load size: %d (0x%x) bytes (%d kb)\n", kernel_size(), kernel_size(), kernel_size() >> 10);
|
||||||
kprintf("Kernel memory size: %d (0x%x) bytes (%d kb)\n", kernel_size_used(), kernel_size_used(), kernel_size_used() >> 10);
|
kprintf("Kernel memory size: %d (0x%x) bytes (%d kb)\n", kernel_size_used(), kernel_size_used(), kernel_size_used() >> 10);
|
||||||
|
@ -99,6 +99,7 @@ vector<type> & vector<type>::operator=(const vector<type> & v1)
|
|||||||
myData = new (type *)[myAllocated];
|
myData = new (type *)[myAllocated];
|
||||||
for (u32_t i = 0; i < mySize; i++)
|
for (u32_t i = 0; i < mySize; i++)
|
||||||
myData[i] = new type(*v1.myData[i]);
|
myData[i] = new type(*v1.myData[i]);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename type>
|
template<typename type>
|
||||||
|
@ -74,8 +74,7 @@ u32_t get_pid()
|
|||||||
|
|
||||||
void switch_task(int_stack_t *int_stack, u32_t new_task)
|
void switch_task(int_stack_t *int_stack, u32_t new_task)
|
||||||
{
|
{
|
||||||
memcpy(&((process_t *)processes->get(cur_task))->int_stack,
|
memcpy(&((process_t *)processes->get(cur_task))->int_stack, int_stack,
|
||||||
(void *) int_stack,
|
|
||||||
sizeof(int_stack_t));
|
sizeof(int_stack_t));
|
||||||
cur_task = new_task;
|
cur_task = new_task;
|
||||||
memcpy(int_stack, &((process_t *)processes->get(cur_task))->int_stack,
|
memcpy(int_stack, &((process_t *)processes->get(cur_task))->int_stack,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
; real mode module for HOS
|
; real mode module for HOS
|
||||||
; Author: Josh Holtrop
|
; Author: Josh Holtrop
|
||||||
; Date: 09/20/04
|
; Date: 09/20/04
|
||||||
; Modified: 01/04/05
|
; Modified: 11/01/05
|
||||||
|
|
||||||
%define VIRT_OFFSET 0xC0000000
|
%define VIRT_OFFSET 0xC0000000
|
||||||
%define SIZEOF_RMPARAMS 20
|
%define SIZEOF_RMPARAMS 20
|
||||||
@ -20,7 +20,7 @@
|
|||||||
; ebx = return address
|
; ebx = return address
|
||||||
; ecx = where to store real mode parameter table
|
; ecx = where to store real mode parameter table
|
||||||
start:
|
start:
|
||||||
jmp 24:start_pm16
|
jmp 24:start_pm16 ; uses KERNEL_CODE_BS16 from kernel/boot.asm
|
||||||
[bits 16]
|
[bits 16]
|
||||||
start_pm16: ; in 16-bit protected mode
|
start_pm16: ; in 16-bit protected mode
|
||||||
mov ax, 32
|
mov ax, 32
|
||||||
@ -104,6 +104,12 @@ vesa_mode_loop:
|
|||||||
and ax, VESA_MODE_SUPPORTED | VESA_MODE_COLOR | VESA_MODE_GRAPHICS | VESA_MODE_LFB
|
and ax, VESA_MODE_SUPPORTED | VESA_MODE_COLOR | VESA_MODE_GRAPHICS | VESA_MODE_LFB
|
||||||
cmp ax, VESA_MODE_SUPPORTED | VESA_MODE_COLOR | VESA_MODE_GRAPHICS | VESA_MODE_LFB
|
cmp ax, VESA_MODE_SUPPORTED | VESA_MODE_COLOR | VESA_MODE_GRAPHICS | VESA_MODE_LFB
|
||||||
jnzfar vesa_mode_loop_next
|
jnzfar vesa_mode_loop_next
|
||||||
|
mov ax, [XResolution]
|
||||||
|
cmp ax, 640
|
||||||
|
jlfar vesa_mode_loop_next
|
||||||
|
mov ax, [YResolution]
|
||||||
|
cmp ax, 480
|
||||||
|
jlfar vesa_mode_loop_next
|
||||||
mov al, [BitsPerPixel]
|
mov al, [BitsPerPixel]
|
||||||
cmp al, 15
|
cmp al, 15
|
||||||
jz vesa_mode_good
|
jz vesa_mode_good
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
; rmmod.inc
|
; rmmod.inc
|
||||||
; Author: Josh Holtrop
|
; Author: Josh Holtrop
|
||||||
; Date: 01/04/05
|
; Date: 01/04/05
|
||||||
; Modified: 01/04/05
|
; Modified: 11/02/05
|
||||||
|
|
||||||
%macro jzfar 1
|
%macro jzfar 1
|
||||||
jnz %%skip
|
jnz %%skip
|
||||||
@ -15,6 +15,12 @@
|
|||||||
%%skip:
|
%%skip:
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
%macro jlfar 1
|
||||||
|
jge %%skip
|
||||||
|
jmp %1
|
||||||
|
%%skip:
|
||||||
|
%endmacro
|
||||||
|
|
||||||
%macro ccall 2
|
%macro ccall 2
|
||||||
push %2
|
push %2
|
||||||
call %1
|
call %1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user