git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3878dff
)
Kernel - Added PMM stats method (stubbed) to x86_64 and template
author
John Hodge
<
[email protected]
>
Wed, 20 Jun 2012 14:54:10 +0000
(22:54 +0800)
committer
John Hodge
<
[email protected]
>
Wed, 20 Jun 2012 14:54:10 +0000
(22:54 +0800)
KernelLand/Kernel/arch/x86_64/include/arch.h
patch
|
blob
|
history
KernelLand/Kernel/arch/x86_64/mm_phys.c
patch
|
blob
|
history
KernelLand/Kernel/include/tpl_mm_phys_bitmap.h
patch
|
blob
|
history
KernelLand/Kernel/include/tpl_mm_phys_stack.h
patch
|
blob
|
history
diff --git
a/KernelLand/Kernel/arch/x86_64/include/arch.h
b/KernelLand/Kernel/arch/x86_64/include/arch.h
index
bde7abd
..
633b167
100644
(file)
--- 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
#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
#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
c2c215b
..
274b21c
100644
(file)
--- 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('-');
}
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
/**
* \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
39444d9
..
cf3018f
100644
(file)
--- 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);
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;
// === GLOBALS ===
tMutex glPhysicalPages;
@@
-112,6
+113,11
@@
void MM_Tpl_InitPhys(int MaxRAMPage, void *MemoryMap)
LEAVE('-');
}
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
/**
* \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
46ceb97
..
567cfaf
100644
(file)
--- 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('-');
}
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
/**
* \brief Allocate a contiguous range of physical pages with a maximum
* bit size of \a MaxBits
UCC
git Repository :: git.ucc.asn.au