diff --git a/include/buildnumber.h b/include/buildnumber.h index f3657d7..dd61b46 100644 --- a/include/buildnumber.h +++ b/include/buildnumber.h @@ -1,9 +1,9 @@ #ifndef BUILD_NUMBER -#define BUILD_NUMBER "111" +#define BUILD_NUMBER "117" #endif #ifndef VERSION_STR -#define VERSION_STR "0.0.2.111 - Sat Feb 9 17:10:29 CST 2019" +#define VERSION_STR "0.0.2+117 - Sat Feb 9 21:35:00 CST 2019" #endif #ifndef VERSION_STR_SHORT -#define VERSION_STR_SHORT "0.0.2.111" +#define VERSION_STR_SHORT "0.0.2+117" #endif diff --git a/make_buildnum.sh b/make_buildnum.sh index 3e4202a..811749d 100644 --- a/make_buildnum.sh +++ b/make_buildnum.sh @@ -1,7 +1,7 @@ #!sh # FILE: make_buildnum.sh #version="`sed 's/^ *//' major_version`" -version="0.0.2." +version="0.0.2+" old="`sed 's/^ *//' build.number`" old=$(($old + 1)) echo $old > build.number diff --git a/makefile b/makefile index 8940fa3..79a4bb6 100644 --- a/makefile +++ b/makefile @@ -18,7 +18,7 @@ objects = obj/start.o \ obj/port.o run:kernel.iso - qemu-system-x86_64 -m 64M -cdrom kernel.iso & + qemu-system-x86_64 -m 256M -cdrom kernel.iso & obj/%.o: src/%.c mkdir -p $(@D) @@ -53,4 +53,4 @@ clean: .PHONY: resetbuild resetbuild: - echo 0 > build.number \ No newline at end of file + echo 0 > build.number diff --git a/src/kernel.c b/src/kernel.c index b61b73e..d402ddd 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -124,10 +124,12 @@ void outportb (unsigned short _port, unsigned char _data) extern void main(uint32_t multiboot_magic, const void* multiboot_structure) { - /* You would add commands after here */ init_video(); if(multiboot_magic == 0x2BADB002) { + /* + https://www.gnu.org/software/grub/manual/multiboot/multiboot.html + */ puts("Multiboot 1 compliant bootloader detected.\n"); uint32_t* bootloaderName = (uint32_t*)(((size_t)multiboot_structure) + 64); puts("Bootloader Name: "); @@ -136,6 +138,9 @@ extern void main(uint32_t multiboot_magic, const void* multiboot_structure) } else if (multiboot_magic == 0x36d76289) { + /* + https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html + */ puts("Multiboot 2 compliant bootloader detected.\n"); } else @@ -143,6 +148,7 @@ extern void main(uint32_t multiboot_magic, const void* multiboot_structure) puts("Unkown bootloader magic number detected:"); puts(int_to_string(multiboot_magic, 16)); puts("\n"); + //panic(); } puts("Bootloader structure appears to be have been loaded at memory address: 0x"); puts(int_to_string(multiboot_structure, 16)); @@ -151,13 +157,12 @@ extern void main(uint32_t multiboot_magic, const void* multiboot_structure) puts("Framebuffer address: "); puts(int_to_string((*videoBuffer), 16)); puts("\n"); - + uint32_t* totalMem = (uint32_t*)(((size_t)multiboot_structure) + 8); + puts(int_to_string((*totalMem), 10)); + puts(" kilobytes of RAM installed on the system\n"); puts("Video initialized.\n"); gdt_install(); puts("Global Descriptor Table initialized.\n"); - - //uint32_t* memupper = (uint32_t*)(((size_t)multiboot_structure) + 8); - //puts(int_to_string(memupper, 16)); //size_t heap = 10 * 1024 * 1024; //MemoryManager(heap, (*memupper)*1024 - heap - 10*1024); //second needs to be an address not size //puts("heap: 0x");