From 215a130460f867d59fb262650d77888fb3aa77b9 Mon Sep 17 00:00:00 2001 From: Jan Stoess Date: Fri, 16 May 2008 11:24:35 +0200 Subject: [PATCH] - platform/pc99 is the wrong location for IO-fpage related code. With the new x32/x64 merge, files can now be put to a more appropriate location --- kernel/src/glue/v4-x86/Makeconf | 7 ++++++- kernel/src/glue/v4-x86/exception.cc | 2 +- kernel/src/glue/v4-x86/fpage.h | 6 +++--- .../{platform/pc99 => glue/v4-x86}/io_fpage.h | 15 ++++++--------- .../{platform/pc99 => glue/v4-x86}/io_space.cc | 6 +++--- .../{platform/pc99 => glue/v4-x86}/io_space.h | 18 ++++++++---------- kernel/src/glue/v4-x86/map.h | 6 +++--- .../{platform/pc99 => glue/v4-x86}/mdb_io.cc | 8 ++++---- .../{platform/pc99 => glue/v4-x86}/mdb_io.h | 14 +++++++------- .../{platform/pc99 => glue/v4-x86}/vrt_io.cc | 8 ++++---- .../{platform/pc99 => glue/v4-x86}/vrt_io.h | 12 ++++++------ kernel/src/glue/v4-x86/x32/space.h | 2 +- kernel/src/glue/v4-x86/x64/space.h | 2 +- kernel/src/platform/pc99/Makeconf | 4 ---- 14 files changed, 53 insertions(+), 57 deletions(-) rename kernel/src/{platform/pc99 => glue/v4-x86}/io_fpage.h (95%) rename kernel/src/{platform/pc99 => glue/v4-x86}/io_space.cc (98%) rename kernel/src/{platform/pc99 => glue/v4-x86}/io_space.h (89%) rename kernel/src/{platform/pc99 => glue/v4-x86}/mdb_io.cc (98%) rename kernel/src/{platform/pc99 => glue/v4-x86}/mdb_io.h (92%) rename kernel/src/{platform/pc99 => glue/v4-x86}/vrt_io.cc (97%) rename kernel/src/{platform/pc99 => glue/v4-x86}/vrt_io.h (95%) diff --git a/kernel/src/glue/v4-x86/Makeconf b/kernel/src/glue/v4-x86/Makeconf index 0bb2239c..c0192a61 100644 --- a/kernel/src/glue/v4-x86/Makeconf +++ b/kernel/src/glue/v4-x86/Makeconf @@ -1,6 +1,6 @@ ###################################################################### ## -## Copyright (C) 2007, Karlsruhe University +## Copyright (C) 2007-2008, Karlsruhe University ## ## File path: glue/v4-x86/Makeconf ## @@ -38,3 +38,8 @@ SOURCES += src/glue/v4-x86/timer-apic.cc else SOURCES += src/glue/v4-x86/timer.cc endif + +ifeq ("$(CONFIG_X86_IO_FLEXPAGES)","y") +SOURCES += $(addprefix src/glue/v4-x86/, mdb_io.cc vrt_io.cc io_space.cc) +endif + diff --git a/kernel/src/glue/v4-x86/exception.cc b/kernel/src/glue/v4-x86/exception.cc index 1ca2a864..15d740a5 100644 --- a/kernel/src/glue/v4-x86/exception.cc +++ b/kernel/src/glue/v4-x86/exception.cc @@ -28,7 +28,7 @@ DECLARE_TRACEPOINT (X86_SEGRELOAD); DECLARE_TRACEPOINT (X86_UD); #if defined(CONFIG_X86_IO_FLEXPAGES) -#include INC_PLAT(io_space.h) +#include INC_GLUE(io_space.h) #endif #if defined(CONFIG_X86_COMPATIBILITY_MODE) diff --git a/kernel/src/glue/v4-x86/fpage.h b/kernel/src/glue/v4-x86/fpage.h index b45aa5e5..7e4975e4 100644 --- a/kernel/src/glue/v4-x86/fpage.h +++ b/kernel/src/glue/v4-x86/fpage.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2002-2005, Karlsruhe University + * Copyright (C) 2002-2005, 2008, Karlsruhe University * - * File path: glue/v4-ia32/fpage.h + * File path: glue/v4-x86/fpage.h * Description: V4 flexpages * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ #ifndef __GLUE_V4_X86__X32__FPAGE_H__ #define __GLUE_V4_X86__X32__FPAGE_H__ -#include INC_PLAT(io_fpage.h) +#include INC_GLUE(io_fpage.h) #endif /* !__GLUE_V4_X86__X32__FPAGE_H__ */ diff --git a/kernel/src/platform/pc99/io_fpage.h b/kernel/src/glue/v4-x86/io_fpage.h similarity index 95% rename from kernel/src/platform/pc99/io_fpage.h rename to kernel/src/glue/v4-x86/io_fpage.h index 0d3b8217..6c8c199f 100644 --- a/kernel/src/platform/pc99/io_fpage.h +++ b/kernel/src/glue/v4-x86/io_fpage.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005-2006, Karlsruhe University + * Copyright (C) 2005-2006, 2008, Karlsruhe University * - * File path: platform/pc99/io_fpage.h + * File path: glue/v4-x86/io_fpage.h * Description: IO fpage declaration * * Redistribution and use in source and binary forms, with or without @@ -29,12 +29,8 @@ * $Id: io_fpage.h,v 1.5 2006/02/21 08:43:57 stoess Exp $ * ********************************************************************/ - - -#ifndef __PLATFORM__PC99__IO_FPAGE_H__ -#define __PLATFORM__PC99__IO_FPAGE_H__ - - +#ifndef __GLUE__V4_X86__IO_FPAGE_H__ +#define __GLUE__V4_X86__IO_FPAGE_H__ #if !defined(CONFIG_X86_IO_FLEXPAGES) #include INC_API(generic-archfpage.h) @@ -178,4 +174,5 @@ public: }; #endif /* !defined(CONFIG_X86_IO_FLEXPAGES) */ -#endif /* !__PLATFORM__PC99__IO_FPAGE_H__ */ + +#endif /* !__GLUE__V4_X86__IO_FPAGE_H__ */ diff --git a/kernel/src/platform/pc99/io_space.cc b/kernel/src/glue/v4-x86/io_space.cc similarity index 98% rename from kernel/src/platform/pc99/io_space.cc rename to kernel/src/glue/v4-x86/io_space.cc index 67d9b42a..f7372f10 100644 --- a/kernel/src/platform/pc99/io_space.cc +++ b/kernel/src/glue/v4-x86/io_space.cc @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2004-2007, Karlsruhe University + * Copyright (C) 2004-2008, Karlsruhe University * - * File path: platform/pc99/io_space.cc + * File path: glue/v4-x86/io_space.cc * Description: IO-Fpage implementation for IA-32 * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ #include INC_API(tcb.h) #include INC_API(thread.h) #include INC_GLUE(space.h) -#include INC_PLAT(io_space.h) +#include INC_GLUE(io_space.h) DECLARE_TRACEPOINT (X86_IO_PORT_SPACE); diff --git a/kernel/src/platform/pc99/io_space.h b/kernel/src/glue/v4-x86/io_space.h similarity index 89% rename from kernel/src/platform/pc99/io_space.h rename to kernel/src/glue/v4-x86/io_space.h index a00e0281..3a5ea45e 100644 --- a/kernel/src/platform/pc99/io_space.h +++ b/kernel/src/glue/v4-x86/io_space.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005, 2007, Karlsruhe University + * Copyright (C) 2005, 2007-2008, Karlsruhe University * - * File path: platform/pc99/io_space.h + * File path: glue/v4-x86/io_space.h * Description: IO space specific declarations * * Redistribution and use in source and binary forms, with or without @@ -29,11 +29,8 @@ * $Id: io_space.h,v 1.3 2005/05/19 08:43:48 stoess Exp $ * ********************************************************************/ - -#ifndef __PLATFORM__PC99__IO_SPACE_H__ -#define __PLATFORM__PC99__IO_SPACE_H__ - - +#ifndef __GLUE__V4_X86__IO_SPACE_H__ +#define __GLUE__V4_X86__IO_SPACE_H__ #if !defined(CONFIG_X86_IO_FLEXPAGES) #include INC_API(generic-archmap.h) @@ -44,8 +41,8 @@ #include INC_API(config.h) #include INC_API(fpage.h) #include INC_API(ipc.h) -#include INC_PLAT(vrt_io.h) -#include INC_PLAT(mdb_io.h) +#include INC_GLUE(vrt_io.h) +#include INC_GLUE(mdb_io.h) #define IPC_MR0_IO_PAGEFAULT ((-8UL) << 4) @@ -67,4 +64,5 @@ void set_io_bitmap(space_t *space, word_t port, word_t log2size); -#endif /* !__PLATFORM__PC99__IO_SPACE_H__ */ + +#endif /* !__GLUE__V4_X86__IO_SPACE_H__ */ diff --git a/kernel/src/glue/v4-x86/map.h b/kernel/src/glue/v4-x86/map.h index 9f48b7f4..77c852ed 100644 --- a/kernel/src/glue/v4-x86/map.h +++ b/kernel/src/glue/v4-x86/map.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005, 2007, Karlsruhe University + * Copyright (C) 2005, 2007-2008, Karlsruhe University * - * File path: glue/v4-ia32/map.h + * File path: glue/v4-x86/map.h * Description: * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,6 @@ #ifndef __GLUE_V4_X86__X32__MAP_H__ #define __GLUE_V4_X86__X32__MAP_H__ -#include INC_PLAT(io_space.h) +#include INC_GLUE(io_space.h) #endif /* !__GLUE_V4_X86__X32__MAP_H__ */ diff --git a/kernel/src/platform/pc99/mdb_io.cc b/kernel/src/glue/v4-x86/mdb_io.cc similarity index 98% rename from kernel/src/platform/pc99/mdb_io.cc rename to kernel/src/glue/v4-x86/mdb_io.cc index e24893fa..e7aced4c 100644 --- a/kernel/src/platform/pc99/mdb_io.cc +++ b/kernel/src/glue/v4-x86/mdb_io.cc @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005-2007, Karlsruhe University + * Copyright (C) 2005-2008, Karlsruhe University * - * File path: platform/pc99/mdb_io.cc + * File path: glue/v4-x86/mdb_io.cc * Description: IO port specific generic mappings database functions * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ * ********************************************************************/ #include -#include INC_PLAT(mdb_io.h) -#include INC_PLAT(io_space.h) +#include INC_GLUE(mdb_io.h) +#include INC_GLUE(io_space.h) diff --git a/kernel/src/platform/pc99/mdb_io.h b/kernel/src/glue/v4-x86/mdb_io.h similarity index 92% rename from kernel/src/platform/pc99/mdb_io.h rename to kernel/src/glue/v4-x86/mdb_io.h index 75d8c0c5..4788ed1a 100644 --- a/kernel/src/platform/pc99/mdb_io.h +++ b/kernel/src/glue/v4-x86/mdb_io.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005, 2007, Karlsruhe University + * Copyright (C) 2005, 2007-2008, Karlsruhe University * - * File path: platform/pc99/mdb_io.h + * File path: glue/v4-x86/mdb_io.h * Description: MDB for IO ports specific declarations * * Redistribution and use in source and binary forms, with or without @@ -29,13 +29,12 @@ * $Id: mdb_io.h,v 1.3 2007/01/08 14:08:10 skoglund Exp $ * ********************************************************************/ - -#ifndef __PLATFORM__PC99__MDB_IO_H__ -#define __PLATFORM__PC99__MDB_IO_H__ +#ifndef __GLUE__V4_X86__MDB_IO_H__ +#define __GLUE__V4_X86__MDB_IO_H__ #include #include INC_GLUE(mdb.h) -#include INC_PLAT(vrt_io.h) +#include INC_GLUE(vrt_io.h) #define MDB_IO_SIZES VRT_IO_SIZES #define MDB_IO_NUMSIZES VRT_IO_NUMSIZES @@ -72,4 +71,5 @@ extern mdb_io_t mdb_io; extern mdb_node_t * sigma0_ionode; -#endif /* !__PLATFORM__PC99__MDB_IO_H__ */ + +#endif /* !__GLUE__V4_X86__MDB_IO_H__ */ diff --git a/kernel/src/platform/pc99/vrt_io.cc b/kernel/src/glue/v4-x86/vrt_io.cc similarity index 97% rename from kernel/src/platform/pc99/vrt_io.cc rename to kernel/src/glue/v4-x86/vrt_io.cc index b98d97e7..7b78646f 100644 --- a/kernel/src/platform/pc99/vrt_io.cc +++ b/kernel/src/glue/v4-x86/vrt_io.cc @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005-2007, Karlsruhe University + * Copyright (C) 2005-2008, Karlsruhe University * - * File path: platform/pc99/vrt_io.cc + * File path: glue/v4-x86/vrt_io.cc * Description: VRT for thread objects * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ * ********************************************************************/ #include INC_API(tcb.h) -#include INC_PLAT(vrt_io.h) -#include INC_PLAT(io_space.h) +#include INC_GLUE(vrt_io.h) +#include INC_GLUE(io_space.h) #include #include diff --git a/kernel/src/platform/pc99/vrt_io.h b/kernel/src/glue/v4-x86/vrt_io.h similarity index 95% rename from kernel/src/platform/pc99/vrt_io.h rename to kernel/src/glue/v4-x86/vrt_io.h index 05796738..853887cc 100644 --- a/kernel/src/platform/pc99/vrt_io.h +++ b/kernel/src/glue/v4-x86/vrt_io.h @@ -1,8 +1,8 @@ /********************************************************************* * - * Copyright (C) 2005-2007, Karlsruhe University + * Copyright (C) 2005-2008, Karlsruhe University * - * File path: platform/pc99/vrt_io.h + * File path: glue/v4-x86/vrt_io.h * Description: VRT for IO ports specific declarations * * Redistribution and use in source and binary forms, with or without @@ -29,8 +29,9 @@ * $Id: vrt_io.h,v 1.4 2006/06/08 16:02:02 skoglund Exp $ * ********************************************************************/ -#ifndef __PLATFORM__PC99__VRT_IO_H__ -#define __PLATFORM__PC99__VRT_IO_H__ + +#ifndef __GLUE__V4_X86__VRT_IO_H__ +#define __GLUE__V4_X86__VRT_IO_H__ #include #include @@ -167,5 +168,4 @@ typedef vrt_io_t io_space_t; - -#endif /* !__PLATFORM__PC99__VRT_IO_H__ */ +#endif /* !__GLUE__V4_X86__VRT_IO_H__ */ diff --git a/kernel/src/glue/v4-x86/x32/space.h b/kernel/src/glue/v4-x86/x32/space.h index b20f840f..470d10c5 100644 --- a/kernel/src/glue/v4-x86/x32/space.h +++ b/kernel/src/glue/v4-x86/x32/space.h @@ -48,7 +48,7 @@ #endif #if defined(CONFIG_X86_IO_FLEXPAGES) -#include INC_PLAT(io_space.h) +#include INC_GLUE(io_space.h) #endif // Even if new MDB is not used we need the mdb_t::ctrl_t diff --git a/kernel/src/glue/v4-x86/x64/space.h b/kernel/src/glue/v4-x86/x64/space.h index eec8af07..637239ba 100644 --- a/kernel/src/glue/v4-x86/x64/space.h +++ b/kernel/src/glue/v4-x86/x64/space.h @@ -41,7 +41,7 @@ #include INC_GLUE(config.h) #if defined(CONFIG_X86_IO_FLEXPAGES) -#include INC_PLAT(io_space.h) +#include INC_GLUE(io_space.h) #endif // Even if new MDB is not used we need the mdb_t::ctrl_t diff --git a/kernel/src/platform/pc99/Makeconf b/kernel/src/platform/pc99/Makeconf index f2284cf6..fd434dc0 100644 --- a/kernel/src/platform/pc99/Makeconf +++ b/kernel/src/platform/pc99/Makeconf @@ -10,7 +10,3 @@ ifeq ("$(CONFIG_SMP)","y") SOURCES += src/platform/pc99/smp.S endif -ifeq ("$(CONFIG_X86_IO_FLEXPAGES)","y") -SOURCES += $(addprefix src/platform/pc99/, mdb_io.cc vrt_io.cc io_space.cc) -endif -