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:
fb80e75
)
Kernel - Cleaning up unneeded messages
author
John Hodge
<
[email protected]
>
Tue, 4 Oct 2011 03:59:54 +0000
(11:59 +0800)
committer
John Hodge
<
[email protected]
>
Tue, 4 Oct 2011 03:59:54 +0000
(11:59 +0800)
Kernel/arch/x86/mm_phys.c
patch
|
blob
|
history
Kernel/binary.c
patch
|
blob
|
history
Kernel/debug.c
patch
|
blob
|
history
Kernel/drv/pci.c
patch
|
blob
|
history
Kernel/syscalls.c
patch
|
blob
|
history
Kernel/system.c
patch
|
blob
|
history
diff --git
a/Kernel/arch/x86/mm_phys.c
b/Kernel/arch/x86/mm_phys.c
index
cd4187e
..
0731836
100644
(file)
--- a/
Kernel/arch/x86/mm_phys.c
+++ b/
Kernel/arch/x86/mm_phys.c
@@
-420,10
+420,10
@@
void MM_RefPhys(tPAddr PAddr)
{
int i, base;
tVAddr addr = ((tVAddr)&gaPageReferences[PAddr]) & ~0xFFF;
-
Log_Debug("PMem", "MM_RefPhys: Allocating info for %X", PAddr);
+
//
Log_Debug("PMem", "MM_RefPhys: Allocating info for %X", PAddr);
Mutex_Release( &glPhysAlloc );
if( MM_Allocate( addr ) == 0 ) {
- Log_KernelPanic("PMem", "MM_RefPhys: Out of physical memory
"
);
+ Log_KernelPanic("PMem", "MM_RefPhys: Out of physical memory
allocating info for %X", PAddr*PAGE_SIZE
);
}
Mutex_Acquire( &glPhysAlloc );
diff --git
a/Kernel/binary.c
b/Kernel/binary.c
index
fdb4dba
..
8b7e744
100644
(file)
--- a/
Kernel/binary.c
+++ b/
Kernel/binary.c
@@
-414,7
+414,7
@@
tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path)
{
tBinary *pBinary;
int fp;
- Uint
ident;
+ Uint
32
ident;
tBinaryType *bt = gRegBinTypes;
ENTER("iMountID XInode sPath", MountID, Inode, Path);
@@
-426,19
+426,26
@@
tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path)
LEAVE('n');
return NULL;
}
+
+ LOG("fp = 0x%x", fp);
// Read File Type
VFS_Read(fp, 4, &ident);
VFS_Seek(fp, 0, SEEK_SET);
+ LOG("ident = 0x%x", ident);
+
// Determine the type
for(; bt; bt = bt->Next)
{
- if( (ident & bt->Mask) != (Uint)bt->Ident )
+ if( (ident & bt->Mask) != (Uint
32
)bt->Ident )
continue;
+ LOG("bt = %p (%s)", bt, bt->Name);
pBinary = bt->Load(fp);
break;
}
+
+ LOG("pBinary = %p", pBinary);
// Close File
VFS_Close(fp);
diff --git
a/Kernel/debug.c
b/Kernel/debug.c
index
e0c7af8
..
1718d20
100644
(file)
--- a/
Kernel/debug.c
+++ b/
Kernel/debug.c
@@
-228,9
+228,9
@@
void Debug_SetKTerminal(const char *File)
VFS_Close(tmp);
}
tmp = VFS_Open(File, VFS_OPENFLAG_WRITE);
-
Log_Log("Debug", "Opened '%s' as 0x%x", File, tmp);
+
//
Log_Log("Debug", "Opened '%s' as 0x%x", File, tmp);
giDebug_KTerm = tmp;
-
Log_Log("Debug", "Returning to %p", __builtin_return_address(0));
+
//
Log_Log("Debug", "Returning to %p", __builtin_return_address(0));
}
void Debug_Enter(const char *FuncName, const char *ArgTypes, ...)
diff --git
a/Kernel/drv/pci.c
b/Kernel/drv/pci.c
index
2e107a7
..
f75b5ac
100644
(file)
--- a/
Kernel/drv/pci.c
+++ b/
Kernel/drv/pci.c
@@
-373,7
+373,8
@@
void PCI_ConfigWrite(tPCIDev ID, int Offset, int Size, Uint32 Value)
\r
dev = &gPCI_Devices[ID];
\r
\r
- dword = PCI_CfgReadDWord(dev->bus, dev->slot, dev->fcn, Offset/4);
\r
+ if(Size != 4)
\r
+ dword = PCI_CfgReadDWord(dev->bus, dev->slot, dev->fcn, Offset/4);
\r
switch(Size)
\r
{
\r
case 1:
\r
@@
-418,91
+419,6
@@
Uint32 PCI_GetBAR(tPCIDev id, int BARNum)
return gPCI_Devices[id].ConfigCache[4+BARNum];
\r
}
\r
\r
-#if 0
\r
-/**
\r
- * \brief Assign a port to a BAR
\r
- */
\r
-Uint16 PCI_AssignPort(tPCIDev ID, int bar, int Count)
\r
-{
\r
- #if 1
\r
- Uint16 rv;
\r
- tPCIDevice *dev;
\r
-
\r
- if(id < 0 || id >= giPCI_DeviceCount) return 0;
\r
- if(bar < 0 || bar >= 6) return 0;
\r
- dev = &gPCI_Devices[id];
\r
-
\r
- rv = PCI_CfgReadDWord( dev->bus, dev->slot, dev->fcn, 0x10+bar*4 );
\r
- if(rv & 1) return rv & ~1;
\r
- return 0;
\r
- #else
\r
- Uint16 portVals;
\r
- int gran=0;
\r
- int i, j;
\r
- tPCIDevice *dev;
\r
-
\r
- //LogF("PCI_AssignPort: (id=%i,bar=%i,count=%i)\n", id, bar, count);
\r
-
\r
- if(id < 0 || id >= giPCI_DeviceCount) return 0;
\r
- if(bar < 0 || bar > 5) return 0;
\r
-
\r
- dev = &gPCI_Devices[id];
\r
-
\r
- PCI_CfgWriteDWord( dev->bus, dev->slot, dev->fcn, 0x10+bar*4, -1 );
\r
- portVals = PCI_CfgReadDWord( dev->bus, dev->slot, dev->fcn, 0x10+bar*4 );
\r
- dev->ConfigCache[4+bar] = portVals;
\r
- //LogF(" PCI_AssignPort: portVals = 0x%x\n", portVals);
\r
-
\r
- // Check for IO port
\r
- if( !(portVals & 1) ) return 0;
\r
-
\r
- // Mask out final bit
\r
- portVals &= ~1;
\r
-
\r
- // Get Granuality
\r
- #if ARCHDIR_IS_x86 || ARCHDIR_IS_x86_64
\r
- __asm__ __volatile__ ("bsf %%eax, %%ecx" : "=c" (gran) : "a" (portVals) );
\r
- gran = 1 << gran;
\r
- #else
\r
- {
\r
- for(gran = 1; gran && !(portVals & gran); gran <<= 1);
\r
- }
\r
- #endif
\r
- //LogF(" PCI_AssignPort: gran = 0x%x\n", gran);
\r
-
\r
- // Find free space
\r
- portVals = 0;
\r
- for( i = 0; i < 1<<16; i += gran )
\r
- {
\r
- for( j = 0; j < count; j ++ )
\r
- {
\r
- if( gaPCI_PortBitmap[ (i+j)>>5 ] & 1 << ((i+j)&0x1F) )
\r
- break;
\r
- }
\r
- if(j == count) {
\r
- portVals = i;
\r
- break;
\r
- }
\r
- }
\r
-
\r
- if(portVals)
\r
- {
\r
- for( j = 0; j < count; j ++ )
\r
- {
\r
- if( gaPCI_PortBitmap[ (portVals+j)>>5 ] |= 1 << ((portVals+j)&0x1F) )
\r
- break;
\r
- }
\r
- PCI_CfgWriteDWord( dev->bus, dev->slot, dev->fcn, 0x10+bar*4, portVals|1 );
\r
- dev->ConfigCache[4+bar] = portVals|1;
\r
- }
\r
-
\r
- // Return
\r
- //LogF("PCI_AssignPort: RETURN 0x%x\n", portVals);
\r
- return portVals;
\r
- #endif
\r
-}
\r
-#endif
\r
-
\r
/**
\r
* \brief Get device information for a slot/function
\r
*/
\r
diff --git
a/Kernel/syscalls.c
b/Kernel/syscalls.c
index
00f031f
..
e304b40
100644
(file)
--- a/
Kernel/syscalls.c
+++ b/
Kernel/syscalls.c
@@
-350,10
+350,10
@@
void SyscallHandler(tSyscallRegs *Regs)
if( callNum != SYS_READ && callNum != SYS_WRITE ) {
# endif
LOG("err = %i", err);
- if(Regs->Num != SYS_EXECVE)
- LEAVE('x', ret);
- else
+ if( callNum == SYS_EXECVE )
LOG("Actual %i", ret);
+ else
+ LEAVE('x', ret);
# if DEBUG < 2
}
# endif
diff --git
a/Kernel/system.c
b/Kernel/system.c
index
f346d69
..
986734c
100644
(file)
--- a/
Kernel/system.c
+++ b/
Kernel/system.c
@@
-164,7
+164,7
@@
void System_ExecuteCommandLine(void)
int i;
for( i = 0; i < argc; i++ )
{
- L
og
("argv[%i] = '%s'", i, argv[i]);
+ L
OG
("argv[%i] = '%s'", i, argv[i]);
switch(argv[i][0])
{
// --- VFS ---
@@
-317,17
+317,20
@@
void System_ExecuteScript(void)
tConfigFile *file;
tConfigLine *line;
+ ENTER("");
+
// Open Script
fp = VFS_Open(gsConfigScript, VFS_OPENFLAG_READ);
if(fp == -1) {
Log_Warning("Config", "Passed script '%s' does not exist", gsConfigScript);
+ LEAVE('-');
return;
}
// Get length
VFS_Seek(fp, 0, SEEK_END);
fLen = VFS_Tell(fp);
- L
og_Debug("System", "VFS_Tell(%i
) = %i", fp, fLen);
+ L
OG("VFS_Tell(0x%x
) = %i", fp, fLen);
VFS_Seek(fp, 0, SEEK_SET);
// Read into memory buffer
fData = malloc(fLen+1);
@@
-350,7
+353,7
@@
void System_ExecuteScript(void)
// Prescan and eliminate variables
for( j = 1; j < line->nParts; j++ )
{
- L
og_Debug("Config",
"Arg #%i is '%s'", j, line->Parts[j]);
+ L
OG(
"Arg #%i is '%s'", j, line->Parts[j]);
bReplaced[j] = 0;
if( line->Parts[j][0] != '$' ) continue;
if( line->Parts[j][1] == '?' ) {
@@
-361,7
+364,7
@@
void System_ExecuteScript(void)
if( val < 0 || val > N_VARIABLES ) continue;
val = variables[ val ];
}
- L
og_Debug("Config",
"Replaced arg %i ('%s') with 0x%x", j, line->Parts[j], val);
+ L
OG(
"Replaced arg %i ('%s') with 0x%x", j, line->Parts[j], val);
line->Parts[j] = malloc( BITS/8+2+1 );
sprintf(line->Parts[j], "0x%x", val);
bReplaced[j] = 1;
@@
-408,7
+411,7
@@
void System_ExecuteScript(void)
else {
args[k] = (char *)line->Parts[k+1];
}
- L
og_Debug("Config",
"args[%i] = %p", k, args[k]);
+ L
OG(
"args[%i] = %p", k, args[k]);
}
switch( (enum eConfigCommands) caConfigCommands[j].Index )
{
@@
-438,7
+441,7
@@
void System_ExecuteScript(void)
result = VFS_IOCtl( (Uint)args[0], (Uint)args[1], (void *)args[2] );
break;
}
- L
og_Debug
("Config", "result = %i", result);
+ L
OG
("Config", "result = %i", result);
break;
}
if( j < NUM_CONFIG_COMMANDS ) continue;
@@
-541,6
+544,8
@@
void System_ExecuteScript(void)
// Free data
free( file );
free( fData );
+
+ LEAVE('-');
}
/**
@@
-550,7
+555,7
@@
void System_ExecuteScript(void)
* \return ::tConfigFile structure that represents the original contents
* of \a FileData
*/
-tConfigFile
*System_Int_ParseFile(char *FileData)
+tConfigFile *System_Int_ParseFile(char *FileData)
{
char *ptr;
char *start;
@@
-688,7
+693,7
@@
tConfigFile *System_Int_ParseFile(char *FileData)
if( i < ret->nLines ) {
ret->Lines[i].nParts = 0;
ret->Lines[i].Parts = NULL;
- L
og_Log("System",
"Cleaning up final empty line");
+ L
OG(
"Cleaning up final empty line");
}
LEAVE('p', ret);
UCC
git Repository :: git.ucc.asn.au