josh
d7be0159c9
created /kernel/isr subdir, moved isr.asm from boot to isr module, added interrupts.cc for isr() main function and isr_bootstrap() routine
...
git-svn-id: svn://anubis/hos/trunk@66 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-24 14:19:31 +00:00
josh
d352afd079
added int_stack_t type in hos_types.h for interrupt stack access
...
git-svn-id: svn://anubis/hos/trunk@65 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-24 14:02:11 +00:00
josh
1105e6e203
optimized isr.asm a bit
...
git-svn-id: svn://anubis/hos/trunk@64 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-24 13:50:29 +00:00
josh
339eef5976
build process generating assembly list files for .asm sources; ignoring .lst files in /kernel/boot
...
git-svn-id: svn://anubis/hos/trunk@63 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-23 22:03:57 +00:00
josh
6a75fdfc10
Added isr.asm with 50 isr_%d labels defined, ready to call isr()
...
git-svn-id: svn://anubis/hos/trunk@62 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-23 22:02:11 +00:00
josh
63289deade
updated include/portio.h to not use gcc-specific "statement blocks" but instead have inportX() be static inline functions. Verified that the compiler does in fact inline them
...
git-svn-id: svn://anubis/hos/trunk@60 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-20 19:21:20 +00:00
josh
e70b1a5213
removed special cases for formatting of lowest signed values due to Corrin' rationale; fixed formatting routines to handle formatting "0" values
...
git-svn-id: svn://anubis/hos/trunk@59 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-20 19:10:54 +00:00
josh
c21caccb1f
printing memory map, used pages, and free pages on boot
...
git-svn-id: svn://anubis/hos/trunk@58 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-16 00:05:44 +00:00
josh
fd02ee26e1
added kputs_pad(); implemented padding in kprintf(); put some padding tests in k_main()
...
git-svn-id: svn://anubis/hos/trunk@57 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-15 14:53:58 +00:00
josh
ecd74fe35b
starting kio change
...
git-svn-id: svn://anubis/hos/trunk@56 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-15 02:47:46 +00:00
josh
08af04897c
added include/portio.h; using it to update cursor position in kputc()
...
git-svn-id: svn://anubis/hos/trunk@55 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 20:37:10 +00:00
josh
1dd8250048
moved call to stack_bootstrap() into mm_bootstrap() since stack_bootstrap() relies on calling mm_map() and mm_use_virtual_offset was getting unset at the end of mm_bootstrap(); calling k_main() now works!
...
git-svn-id: svn://anubis/hos/trunk@54 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 16:08:06 +00:00
josh
118021a0f6
added Makefile commands to build a binary and an ELF kernel and do disassemble the ELF version
...
git-svn-id: svn://anubis/hos/trunk@53 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 13:50:29 +00:00
josh
bf9c7d74eb
added mm/stack module; initializing "permanent" stack for kernel use while paging, crashing when calling k_main() though...
...
git-svn-id: svn://anubis/hos/trunk@52 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 13:31:08 +00:00
josh
cf2d28f5ce
added k_main.cc, need to set up a stack before calling k_main()
...
git-svn-id: svn://anubis/hos/trunk@51 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 03:34:16 +00:00
josh
594625b0fa
changed lgdt instruction to load from linear address instead of physical address for [mm_gdtr]
...
git-svn-id: svn://anubis/hos/trunk@50 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-14 00:26:40 +00:00
josh
df719b4281
added code to reset segmentation and enable paging; added fmt_xl2a() in kio; added debug prints in k_bootstrap() since kernel is crashing when trying to enable paging
...
git-svn-id: svn://anubis/hos/trunk@49 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 22:58:48 +00:00
josh
0fb590a407
changed kio routines to accept const char *; added MAKE_DESCRIPTOR() macro to mm
...
git-svn-id: svn://anubis/hos/trunk@48 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 22:38:53 +00:00
josh
5b9651299e
fixed a few formatting and string bugs, kprintf() working when called during bootstrapping!
...
git-svn-id: svn://anubis/hos/trunk@47 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 21:54:27 +00:00
josh
a4d497544e
added memcpy{,w,d}(), memset{,w,d}(); filled in kputc()
...
git-svn-id: svn://anubis/hos/trunk@46 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 21:42:18 +00:00
josh
6a69fd06ec
filled in a few more formatting routines; linking with libgcc.a to work with 64-bit unsigned integer division/modulus
...
git-svn-id: svn://anubis/hos/trunk@45 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 20:08:16 +00:00
josh
6a8c7431ff
hos_defines.h should include hos_types.h first
...
git-svn-id: svn://anubis/hos/trunk@44 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 17:15:39 +00:00
josh
be17cde305
added devices and lang directories, added skeleton kio and string modules
...
git-svn-id: svn://anubis/hos/trunk@43 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-13 15:34:39 +00:00
josh
1aace858da
Moved page_directory from an allocated object to a pointer to a run-time allocated page of RAM
...
git-svn-id: svn://anubis/hos/trunk@42 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-06 21:48:04 +00:00
josh
784978b131
boot.asm comments
...
git-svn-id: svn://anubis/hos/trunk@41 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-05 16:38:47 +00:00
josh
54b42c0226
added set_cr3() macro and called it to set the PDBR
...
git-svn-id: svn://anubis/hos/trunk@40 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-04 00:22:18 +00:00
josh
e55f2cdfc4
mapping in kernel virtual address space
...
git-svn-id: svn://anubis/hos/trunk@39 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-03 20:48:51 +00:00
josh
edb1a6426d
minor mm.cc comment changes
...
git-svn-id: svn://anubis/hos/trunk@38 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-02 19:26:52 +00:00
josh
f07e34c849
updated link script to pack things better
...
git-svn-id: svn://anubis/hos/trunk@37 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-02 03:43:44 +00:00
josh
e907902ca0
changed mm functions to C++ linkage
...
git-svn-id: svn://anubis/hos/trunk@36 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-02 03:35:24 +00:00
josh
a8947f8aa3
added mm_map() to map addresses and mm_page_alloc() to allocate physical pages
...
git-svn-id: svn://anubis/hos/trunk@35 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-02 03:28:25 +00:00
josh
2bddc1d428
filled out more of mm_bootstrap() including initializing the free page linked list
...
git-svn-id: svn://anubis/hos/trunk@34 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-02 01:09:09 +00:00
josh
bfb4f3bdd0
changed k_bootstrap from C to C++ source file
...
git-svn-id: svn://anubis/hos/trunk@33 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 21:17:24 +00:00
josh
db192f6d36
added CXXFLAGS to disable rtti and exceptions; added C++ support to header files; moved mm.c to mm.cc to use C++ functionality
...
git-svn-id: svn://anubis/hos/trunk@32 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 19:52:18 +00:00
josh
2faa2cc8d6
added mm_bootstrap() skeleton function
...
git-svn-id: svn://anubis/hos/trunk@31 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 17:34:52 +00:00
josh
02c2b25ded
added DEPS definition in subdir.mak so dependency files are automatically generated again
...
git-svn-id: svn://anubis/hos/trunk@30 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 12:39:43 +00:00
josh
39ea3f231b
added bootstrap_stack so the temporary stack is not in the same place as the page directory
...
git-svn-id: svn://anubis/hos/trunk@29 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 01:53:43 +00:00
josh
981a01ba9b
added linker script symbols and address macros to hos_defines.h
...
git-svn-id: svn://anubis/hos/trunk@28 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-07-01 01:51:02 +00:00
josh
3eea1b4fd3
building in linux with i586-elf cross-compiler as well
...
git-svn-id: svn://anubis/hos/trunk@27 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 23:31:30 +00:00
josh
be8d6015ff
Added mm_record_mmap_entry() and calls to it in k_bootstrap().
...
git-svn-id: svn://anubis/hos/trunk@26 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 21:29:44 +00:00
josh
6ea8fe1a27
Added k_bootstrap.c, k_early_panic.[ch]
...
Calling k_bootstrap() from boot.asm in segmented mode
git-svn-id: svn://anubis/hos/trunk@25 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 20:12:39 +00:00
josh
d4f5a0b244
Added multiboot.h
...
git-svn-id: svn://anubis/hos/trunk@24 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 18:17:20 +00:00
josh
1548e7327a
added SUBDIRS support to subdir.mak for recursive building
...
git-svn-id: svn://anubis/hos/trunk@23 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 17:54:09 +00:00
josh
90e03d4f95
Added include folder with hos_types.h and hos_defines.h
...
Added mm build subdir with mm.c
Updated subdir.mak to build $(subdir)_all.o instead of $(subdir).o
Updated main Makefile to pass SUBDIR in to subdirectory builds, add $(HOS_TOPLEVEL)/include to compiler include path, and made the linker write a map file
Updated boot.asm to use the page_directory symbol from the .bss section defined in mm.o as its temporary stack area
git-svn-id: svn://anubis/hos/trunk@22 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-29 19:55:50 +00:00
josh
fb807847bf
fixed SUBDIRS_clean definition in Makefile
...
git-svn-id: svn://anubis/hos/trunk@21 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-29 13:40:33 +00:00
josh
d8f7e731e1
moved boot.asm into kernel/boot, added kernel/boot/Makefile using new subdir.mak
...
git-svn-id: svn://anubis/hos/trunk@20 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-25 21:57:50 +00:00
josh
a5ca4348d9
changing Makefile system a bit, again
...
git-svn-id: svn://anubis/hos/trunk@19 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-25 19:46:49 +00:00
josh
8fe8d78051
realigned assembly a bit
...
git-svn-id: svn://anubis/hos/trunk@18 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-25 19:12:25 +00:00
josh
1b0da72e5a
moved PLATFORM and associated definitions from Makefile to kernel/Makefile so the kernel can be built by itself
...
git-svn-id: svn://anubis/hos/trunk@17 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-25 18:03:39 +00:00
josh
8493002072
removed jump at start symbol since the bootloader starts after the multiboot header anyway; added diagnostic characters "a", "b"
...
git-svn-id: svn://anubis/hos/trunk@16 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-25 15:16:01 +00:00