From 4b80e9762374558077e28e321d75029645529a45 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 4 Jul 2010 13:43:32 +0800 Subject: [PATCH] Commenting is nice (also disabled debug in FDD driver) --- Kernel/arch/x86/main.c | 10 +++------- Modules/Storage/FDD/fdd.c | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Kernel/arch/x86/main.c b/Kernel/arch/x86/main.c index e9cbf2af..3ea4f3f3 100644 --- a/Kernel/arch/x86/main.c +++ b/Kernel/arch/x86/main.c @@ -98,23 +98,19 @@ int kmain(Uint MbMagic, void *MbInfoPtr) for( i = 0; i < mbInfo->ModuleCount; i ++ ) { int ofs; - // TODO: Handle this better by using MM_MapHW/MM_MapTemp - // Adjust into higher half - //mods[i].Start += KERNEL_BASE; - //mods[i].End += KERNEL_BASE; - //mods[i].String += KERNEL_BASE; + // Always HW map the module data gaArch_BootModules[i].Size = mods[i].End - mods[i].Start; ofs = mods[i].Start&0xFFF; gaArch_BootModules[i].Base = (void*)( MM_MapHWPages(mods[i].Start, (gaArch_BootModules[i].Size+ofs+0xFFF) / 0x1000 ) + ofs ); - //gaArch_BootModules[i].ArgString = MM_MapHW(mods[i].String, 1) - // + (mods[i].String&0xFFF); + // Only map the string if needed if( (tVAddr)mods[i].String > MAX_ARGSTR_POS ) { + // Assumes the string is < 4096 bytes long) gaArch_BootModules[i].ArgString = (void*)( MM_MapHWPages((tVAddr)mods[i].String, 2) + ((tVAddr)mods[i].String&0xFFF) diff --git a/Modules/Storage/FDD/fdd.c b/Modules/Storage/FDD/fdd.c index 4a6a5b49..2784b3c5 100644 --- a/Modules/Storage/FDD/fdd.c +++ b/Modules/Storage/FDD/fdd.c @@ -2,7 +2,7 @@ * AcessOS 0.1 * Floppy Disk Access Code */ -#define DEBUG 1 +#define DEBUG 0 #include #include #include -- 2.20.1