Screw mac os x and gui debugger.

This commit is contained in:
hyperassembler 2015-09-03 20:22:12 -04:00
parent a58d00f229
commit 454be49390
4 changed files with 13 additions and 10 deletions

View File

@ -2,7 +2,8 @@
plugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, gameport=1, pci_ide=1, acpi=1, ioapic=1
config_interface: textconfig
display_library: sdl
memory: host=32, guest=32
magic_break: enabled=1
memory: host=128, guest=128
romimage: file="/usr/share/bochs/BIOS-bochs-latest"
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
boot: cdrom

View File

@ -38,7 +38,7 @@ LD_SCRIPT_64 := build/link64.ld
GRUB_CFG := build/grub.cfg
OUTPUT_DIR := tmp
OUTPUT_DIR := out
ALL_OUTPUT_DIRS := $(addprefix $(OUTPUT_DIR)/,$(call rdircard,*))
@ -82,7 +82,8 @@ ALL_OBJ_FILES_64 := $(addprefix $(OUTPUT_DIR)/,$(C_OBJ_FILES_64)) $(addprefix $(
#Commands
HOS: init compile link buildsymbol buildiso
HOS: init compile link buildiso clean
# buildsymbol
print_source:
$(info ${ALL_OUTPUT_DIRS})
@ -108,7 +109,7 @@ buildiso:
mv $(OUTPUT_DIR)/$(KERNEL_BIN_64) $(OUTPUT_DIR)/temp_iso/HOS/kernel64
mv $(OUTPUT_DIR)/$(KERNEL_BIN_32) $(OUTPUT_DIR)/temp_iso/HOS/kernel32
cp $(GRUB_CFG) $(OUTPUT_DIR)/temp_iso/boot/grub/
grub-mkrescue -o $(OUTPUT_DIR)/HOS.iso $(OUTPUT_DIR)/temp_iso
grub-mkrescue -o HOS.iso $(OUTPUT_DIR)/temp_iso
rm -rf $(OUTPUT_DIR)/temp_iso
clean:

View File

@ -63,12 +63,13 @@ GDT64: ; Global Descriptor Table (64-bit).
dq GDT64 ; Base.
entry_32:
xchg bx,bx
; close interrupt
cli
; check loaded by grub
cmp eax,GRUB_MAGIC
jmp entry_32.loaded_by_grub
je .loaded_by_grub
hlt
.loaded_by_grub:
@ -132,7 +133,7 @@ mov cr0, eax ; Set control register 0 to the A
; enter x64
lgdt [GDT64.GDT64_PTR]
jmp GDT64.SLCT_CODE:entry
jmp SLCT_CODE:entry
hlt
ensure_support_x64:
@ -171,7 +172,7 @@ ret
[BITS 64]
entry:
cli
mov ax,GDT64.SLCT_DATA
mov ax,SLCT_DATA
mov ds,ax
mov es,ax
mov fs,ax
@ -191,4 +192,4 @@ ret
[BITS 64]
align 4096 ;4k alignment
kernel_heap:
times 4096 db 0
times 4096 db 0

View File

@ -4,8 +4,8 @@
#include "../hal/io.h"
#include "../common/util/util.h"
extern char kernel_start[];
extern char kernel_end[];
extern uint64_t kernel_start;
extern uint64_t kernel_end;
void NATIVE64 kmain(multiboot_info_t *multiboot_info)
{
boot_info_t* boot_info = hal_init(multiboot_info);