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
Kernel/x86 - acpica: Debug to trace AE_NO_MEMORY cause
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
arch
/
x86
/
acpica.c
diff --git
a/KernelLand/Kernel/arch/x86/acpica.c
b/KernelLand/Kernel/arch/x86/acpica.c
index
57d7fe8
..
1534789
100644
(file)
--- a/
KernelLand/Kernel/arch/x86/acpica.c
+++ b/
KernelLand/Kernel/arch/x86/acpica.c
@@
-94,7
+94,7
@@
ACPI_PHYSICAL_ADDRESS AcpiOsGetRootPointer(void)
if( ACPI_FAILURE(rv) )
return 0;
if( ACPI_FAILURE(rv) )
return 0;
- LOG("val=%x", val);
+ LOG("val=
0x
%x", val);
return val;
// (Or use EFI)
return val;
// (Or use EFI)
@@
-170,11
+170,15
@@
ACPI_STATUS AcpiOsDeleteCache(ACPI_CACHE_T *Cache)
ACPI_STATUS AcpiOsPurgeCache(ACPI_CACHE_T *Cache)
{
ACPI_STATUS AcpiOsPurgeCache(ACPI_CACHE_T *Cache)
{
- if( Cache == NULL )
+ ENTER("pCache", Cache);
+ if( Cache == NULL ) {
+ LEAVE('i', AE_BAD_PARAMETER);
return AE_BAD_PARAMETER;
return AE_BAD_PARAMETER;
+ }
memset(Cache->ObjectStates, 0, sizeof(char)*Cache->nObj);
memset(Cache->ObjectStates, 0, sizeof(char)*Cache->nObj);
+ LEAVE('i', AE_OK);
return AE_OK;
}
return AE_OK;
}
@@
-192,7
+196,8
@@
void *AcpiOsAcquireObject(ACPI_CACHE_T *Cache)
}
}
}
}
- Log_Debug("ACPICA", "AcpiOsAcquireObject: %i objects used", Cache->nObj);
+ Log_Debug("ACPICA", "AcpiOsAcquireObject: All %i objects used in '%s'",
+ Cache->nObj, Cache->Name);
LEAVE('n');
return NULL;
LEAVE('n');
return NULL;
@@
-202,6
+207,7
@@
ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object)
{
if( Cache == NULL || Object == NULL )
return AE_BAD_PARAMETER;
{
if( Cache == NULL || Object == NULL )
return AE_BAD_PARAMETER;
+ ENTER("pCache pObject", Cache, Object);
tVAddr delta = (tVAddr)Object - (tVAddr)Cache->First;
delta /= Cache->ObjectSize;
tVAddr delta = (tVAddr)Object - (tVAddr)Cache->First;
delta /= Cache->ObjectSize;
@@
-212,6
+218,7
@@
ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object)
Cache->ObjectStates[delta] = 0;
Cache->ObjectStates[delta] = 0;
+ LEAVE('i', AE_OK);
return AE_OK;
}
return AE_OK;
}
@@
-222,8
+229,13
@@
void *AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_SIZE Length)
Uint ofs = PhysicalAddress & (PAGE_SIZE-1);
int npages = (ofs + Length + (PAGE_SIZE-1)) / PAGE_SIZE;
Uint ofs = PhysicalAddress & (PAGE_SIZE-1);
int npages = (ofs + Length + (PAGE_SIZE-1)) / PAGE_SIZE;
- void *rv = ((char*)MM_MapHWPages(PhysicalAddress, npages)) + ofs;
+ char *maploc = (void*)MM_MapHWPages(PhysicalAddress, npages);
+ if(!maploc) {
+ LOG("Mapping %P+0x%x failed", PhysicalAddress, Length);
+ return NULL;
+ }
// MM_DumpTables(0, -1);
// MM_DumpTables(0, -1);
+ void *rv = maploc + ofs;
LOG("Map (%P+%i pg) to %p", PhysicalAddress, npages, rv);
return rv;
}
LOG("Map (%P+%i pg) to %p", PhysicalAddress, npages, rv);
return rv;
}
UCC
git Repository :: git.ucc.asn.au