From: John Hodge Date: Wed, 20 Jun 2012 14:54:10 +0000 (+0800) Subject: Kernel - Added PMM stats method (stubbed) to x86_64 and template X-Git-Tag: rel0.15~611^2~52 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=ff00630ed805237683c2f8fa47765a1cf5a07578;p=tpg%2Facess2.git Kernel - Added PMM stats method (stubbed) to x86_64 and template --- diff --git a/KernelLand/Kernel/arch/x86_64/include/arch.h b/KernelLand/Kernel/arch/x86_64/include/arch.h index bde7abda..633b167e 100644 --- a/KernelLand/Kernel/arch/x86_64/include/arch.h +++ b/KernelLand/Kernel/arch/x86_64/include/arch.h @@ -11,6 +11,10 @@ #define BITS 64 #define PAGE_SIZE 0x1000 +#ifndef MAX_CPUS +# define MAX_CPUS 8 +#endif + #define STACKED_LOCKS 2 // 0: No, 1: Per-CPU, 2: Per-Thread #define LOCK_DISABLE_INTS 0 diff --git a/KernelLand/Kernel/arch/x86_64/mm_phys.c b/KernelLand/Kernel/arch/x86_64/mm_phys.c index c2c215b3..274b21c7 100644 --- a/KernelLand/Kernel/arch/x86_64/mm_phys.c +++ b/KernelLand/Kernel/arch/x86_64/mm_phys.c @@ -316,6 +316,11 @@ void MM_InitPhys_Multiboot(tMBoot_Info *MBoot) LEAVE('-'); } +void MM_DumpStatistics(void) +{ + // TODO: Statistics for x86_64 PMM +} + /** * \brief Allocate a contiguous range of physical pages with a maximum * bit size of \a MaxBits diff --git a/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h b/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h index 39444d94..cf3018f0 100644 --- a/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h +++ b/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h @@ -27,6 +27,7 @@ int MM_int_GetRangeID( tPAddr Addr ); int MM_int_GetMapEntry( void *Data, int Index, tPAddr *Start, tPAddr *Length ); void MM_Tpl_InitPhys(int MaxRAMPage, void *MemoryMap); +void MM_DumpStatistics(void); // === GLOBALS === tMutex glPhysicalPages; @@ -112,6 +113,11 @@ void MM_Tpl_InitPhys(int MaxRAMPage, void *MemoryMap) LEAVE('-'); } +void MM_DumpStatistics(void) +{ + // TODO: PM Statistics for tpl_mm_phys_bitmap +} + /** * \brief Allocate a contiguous range of physical pages with a maximum * bit size of \a MaxBits diff --git a/KernelLand/Kernel/include/tpl_mm_phys_stack.h b/KernelLand/Kernel/include/tpl_mm_phys_stack.h index 46ceb97d..567cfafd 100644 --- a/KernelLand/Kernel/include/tpl_mm_phys_stack.h +++ b/KernelLand/Kernel/include/tpl_mm_phys_stack.h @@ -78,6 +78,11 @@ void MM_Tpl_InitPhys(int MaxRAMPage) LEAVE('-'); } +void MM_DumpStatistics(void) +{ + // TODO: PM Statistics for tpl_mm_phys_bitmap +} + /** * \brief Allocate a contiguous range of physical pages with a maximum * bit size of \a MaxBits