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
Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
arch
/
x86
/
mm_virt.c
diff --git
a/KernelLand/Kernel/arch/x86/mm_virt.c
b/KernelLand/Kernel/arch/x86/mm_virt.c
index
bd7b1df
..
51a3f62
100644
(file)
--- a/
KernelLand/Kernel/arch/x86/mm_virt.c
+++ b/
KernelLand/Kernel/arch/x86/mm_virt.c
@@
-171,6
+171,7
@@
void MM_PageFault(tVAddr Addr, Uint ErrorCode, tRegs *Regs)
&& gaPageTable[Addr>>12] & PF_COW )
{
tPAddr paddr;
&& gaPageTable[Addr>>12] & PF_COW )
{
tPAddr paddr;
+ __asm__ __volatile__ ("sti");
if(MM_GetRefCount( gaPageTable[Addr>>12] & ~0xFFF ) == 1)
{
gaPageTable[Addr>>12] &= ~PF_COW;
if(MM_GetRefCount( gaPageTable[Addr>>12] & ~0xFFF ) == 1)
{
gaPageTable[Addr>>12] &= ~PF_COW;
@@
-197,6
+198,7
@@
void MM_PageFault(tVAddr Addr, Uint ErrorCode, tRegs *Regs)
// If it was a user, tell the thread handler
if(ErrorCode & 4) {
// If it was a user, tell the thread handler
if(ErrorCode & 4) {
+ __asm__ __volatile__ ("sti");
Log_Warning("MMVirt", "User %s %s memory%s",
(ErrorCode&2?"write to":"read from"),
(ErrorCode&1?"bad/locked":"non-present"),
Log_Warning("MMVirt", "User %s %s memory%s",
(ErrorCode&2?"write to":"read from"),
(ErrorCode&1?"bad/locked":"non-present"),
@@
-439,7
+441,8
@@
int MM_Map(tVAddr VAddr, tPAddr PAddr)
//ENTER("xVAddr xPAddr", VAddr, PAddr);
// Sanity check
if( PAddr & 0xFFF || VAddr & 0xFFF ) {
//ENTER("xVAddr xPAddr", VAddr, PAddr);
// Sanity check
if( PAddr & 0xFFF || VAddr & 0xFFF ) {
- Log_Warning("MM_Virt", "MM_Map - Physical or Virtual Addresses are not aligned");
+ Log_Warning("MM_Virt", "MM_Map - Physical or Virtual Addresses are not aligned (0x%P and %p)",
+ PAddr, VAddr);
//LEAVE('i', 0);
return 0;
}
//LEAVE('i', 0);
return 0;
}
@@
-1072,6
+1075,9
@@
tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr)
ENTER("iPages iMaxBits pPhysAddr", Pages, MaxBits, PhysAddr);
ENTER("iPages iMaxBits pPhysAddr", Pages, MaxBits, PhysAddr);
+ if(MaxBits == -1)
+ MaxBits = PHYS_BITS;
+
// Sanity Check
if(MaxBits < 12 || !PhysAddr) {
LEAVE('i', 0);
// Sanity Check
if(MaxBits < 12 || !PhysAddr) {
LEAVE('i', 0);
UCC
git Repository :: git.ucc.asn.au