only if CONFIG_VGA is defined, VGA will be mapped into the kernel space

This commit is contained in:
Stefan Lankes 2012-07-22 10:56:03 +02:00
parent cbd5b5be83
commit c0a96953b4
3 changed files with 4 additions and 0 deletions

View File

@ -128,6 +128,7 @@ include/metalsvm/config.inc: include/metalsvm/config.h
@echo "; Before editing this, you should consider editing config.h." >> include/metalsvm/config.inc
@awk '/^#define MAX_CORES/{ print "%define MAX_CORES", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
@awk '/^#define KERNEL_STACK_SIZE/{ print "%define KERNEL_STACK_SIZE", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
@awk '/^#define CONFIG_VGA/{ print "%define CONFIG_VGA", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
%.o : %.asm include/metalsvm/config.inc
@echo [ASM] $@

View File

@ -128,6 +128,7 @@ include/metalsvm/config.inc: include/metalsvm/config.h
@echo "; Before editing this, you should consider editing config.h." >> include/metalsvm/config.inc
@awk '/^#define MAX_CORES/{ print "%define MAX_CORES", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
@awk '/^#define KERNEL_STACK_SIZE/{ print "%define KERNEL_STACK_SIZE", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
@awk '/^#define CONFIG_VGA/{ print "%define CONFIG_VGA", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
%.o : %.asm include/metalsvm/config.inc
@echo [ASM] $@

View File

@ -230,6 +230,7 @@ L0:
add ebx, 0x1000
loop L0
%ifdef CONFIG_VGA
; map the VGA address into the virtual address space
mov edi, 0xB8000
shr edi, 9 ; (edi >> 12) * 8
@ -237,6 +238,7 @@ L0:
mov ebx, 0xB8000
or ebx, 0x00000013
mov DWORD [edi], ebx
%endif
; map multiboot structure into the virtual address space
mov edi, [esp]