git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes to x86 error and interrupt handling
[tpg/acess2.git]
/
Kernel
/
arch
/
x86
/
mm_virt.c
diff --git
a/Kernel/arch/x86/mm_virt.c
b/Kernel/arch/x86/mm_virt.c
index
958b9f1
..
cf77b87
100644
(file)
--- a/
Kernel/arch/x86/mm_virt.c
+++ b/
Kernel/arch/x86/mm_virt.c
@@
-9,7
+9,7
@@
* 0xFE - Unused
* 0xFF - System Calls / Kernel's User Code
*/
* 0xFE - Unused
* 0xFF - System Calls / Kernel's User Code
*/
-#define DEBUG
1
+#define DEBUG
0
#define SANITY 1
#include <acess.h>
#include <mm_phys.h>
#define SANITY 1
#include <acess.h>
#include <mm_phys.h>
@@
-208,7
+208,7
@@
void MM_PageFault(tVAddr Addr, Uint ErrorCode, tRegs *Regs)
(ErrorCode&1?"bad/locked":"non-present"),
(ErrorCode&16?" (Instruction Fetch)":"")
);
(ErrorCode&1?"bad/locked":"non-present"),
(ErrorCode&16?" (Instruction Fetch)":"")
);
- Warning("User Pagefault: Instruction at %
p accessed %p"
, Regs->eip, Addr);
+ Warning("User Pagefault: Instruction at %
04x:%08x accessed %p", Regs->cs
, Regs->eip, Addr);
__asm__ __volatile__ ("sti"); // Restart IRQs
Threads_SegFault(Addr);
return ;
__asm__ __volatile__ ("sti"); // Restart IRQs
Threads_SegFault(Addr);
return ;
@@
-895,10
+895,10
@@
void MM_FreeTemp(tVAddr VAddr)
}
/**
}
/**
- * \fn tVAddr MM_MapHWPage(tPAddr PAddr, Uint Number)
+ * \fn tVAddr MM_MapHWPage
s
(tPAddr PAddr, Uint Number)
* \brief Allocates a contigous number of pages
*/
* \brief Allocates a contigous number of pages
*/
-tVAddr MM_MapHWPage(tPAddr PAddr, Uint Number)
+tVAddr MM_MapHWPage
s
(tPAddr PAddr, Uint Number)
{
int i, j;
{
int i, j;
@@
-962,7
+962,7
@@
tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr)
{
phys = MM_AllocPhys();
*PhysAddr = phys;
{
phys = MM_AllocPhys();
*PhysAddr = phys;
- ret = MM_MapHWPage(phys, 1);
+ ret = MM_MapHWPage
s
(phys, 1);
if(ret == 0) {
MM_DerefPhys(phys);
LEAVE('i', 0);
if(ret == 0) {
MM_DerefPhys(phys);
LEAVE('i', 0);
@@
-981,7
+981,7
@@
tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr)
}
// Allocated successfully, now map
}
// Allocated successfully, now map
- ret = MM_MapHWPage(phys, Pages);
+ ret = MM_MapHWPage
s
(phys, Pages);
if( ret == 0 ) {
// If it didn't map, free then return 0
for(;Pages--;phys+=0x1000)
if( ret == 0 ) {
// If it didn't map, free then return 0
for(;Pages--;phys+=0x1000)
@@
-996,10
+996,10
@@
tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr)
}
/**
}
/**
- * \fn void MM_UnmapHWPage(tVAddr VAddr, Uint Number)
+ * \fn void MM_UnmapHWPage
s
(tVAddr VAddr, Uint Number)
* \brief Unmap a hardware page
*/
* \brief Unmap a hardware page
*/
-void MM_UnmapHWPage(tVAddr VAddr, Uint Number)
+void MM_UnmapHWPage
s
(tVAddr VAddr, Uint Number)
{
int i, j;
// Sanity Check
{
int i, j;
// Sanity Check
@@
-1022,6
+1022,6
@@
void MM_UnmapHWPage(tVAddr VAddr, Uint Number)
EXPORT(MM_GetPhysAddr);
EXPORT(MM_Map);
//EXPORT(MM_Unmap);
EXPORT(MM_GetPhysAddr);
EXPORT(MM_Map);
//EXPORT(MM_Unmap);
-EXPORT(MM_MapHWPage);
+EXPORT(MM_MapHWPage
s
);
EXPORT(MM_AllocDMA);
EXPORT(MM_AllocDMA);
-EXPORT(MM_UnmapHWPage);
+EXPORT(MM_UnmapHWPage
s
);
UCC
git Repository :: git.ucc.asn.au