[eros-cvs] cvs commit: eros/src/base/sys/key mk_Checkpoint.cxx mk_Console.cxx mk_DevicePrivs.cxx mk_Discrim.cxx mk_KeyBits.cxx mk_ProcessTool.cxx mk_Returner.cxx mk_SleepKey.cxx mk_SysTrace.cxx mk_TimeOfDay.cxx mk_TimePage.cxx mk_VoidKey.cxx pk_DeviceKey.cxx pk_GateKey.cxx pk_NodeKey.cxx pk_NumberKey.cxx pk_PageKey.cxx pk_ProcessKey.cxx pk_RangeKey.cxx pk_SchedKey.cxx pk_SegmentKey.cxx pk_WrapperKey.cxx
shap@eros.cs.jhu.edu
shap@eros.cs.jhu.edu
Sun, 25 Nov 2001 20:05:41 -0500
shap 01/11/25 20:05:41
Modified: src/base/sys config.common files.common
src/base/sys/arch/i486/conf ALL DEFAULT SMALL files.pc
src/base/sys/arch/i486/ddb db_interface.cxx
src/base/sys/arch/i486/kernel BIOS32.cxx BadOpcode.cxx
BptTrap.cxx CMOS.cxx DebugException.cxx
Debugger.cxx DebuggerStubs.cxx DivZeroFault.cxx
FloppyCtrlr.cxx FpuTrap.cxx GDT.cxx GPFault.cxx
HardClock.cxx IDT.cxx IRQ386.cxx IntTrap.cxx
Invoke.cxx IpcTrap.cxx KernContext.cxx Keyboard.cxx
Machine.cxx PageFault.cxx PseudoInstr.cxx
ReservedFault.cxx SSFault.cxx SegPresFault.cxx
Thread386.cxx UserContext.cxx UserContextIPC.cxx
UserContextInvoke.cxx
src/base/sys/ddb db_command.cxx db_eros.cxx db_examine.cxx
db_input.cxx db_lex.cxx db_nmhack.cxx db_output.hxx
db_run.cxx db_sym.cxx
src/base/sys/kernel kern_AutoConf.cxx kern_Check.cxx
kern_Checker.cxx kern_Context.cxx
kern_CoreObHash.cxx kern_CoreObSleep.cxx
kern_CoreObject.cxx kern_CpuReserve.cxx
kern_Depend.cxx kern_IRQ.cxx kern_IdleThread.cxx
kern_Invoke.cxx kern_IoRegion.cxx kern_Key.cxx
kern_KeyRing.cxx kern_Node.cxx kern_ObjectCache.cxx
kern_ObjectHeader.cxx kern_ObjectSource.cxx
kern_Persist.cxx kern_PhysMem.cxx
kern_PhysPageSource.cxx kern_PreloadObSource.cxx
kern_RamDisk.cxx kern_Segment.cxx kern_SysTimer.cxx
kern_Task.cxx kern_Thread.cxx kern_Twiddler.cxx
kern_heap.cxx kern_main.cxx kern_util.cxx
src/base/sys/kerninc kernel.hxx util.h
src/base/sys/key mk_Checkpoint.cxx mk_Console.cxx
mk_DevicePrivs.cxx mk_Discrim.cxx mk_KeyBits.cxx
mk_ProcessTool.cxx mk_Returner.cxx mk_SleepKey.cxx
mk_SysTrace.cxx mk_TimeOfDay.cxx mk_TimePage.cxx
mk_VoidKey.cxx pk_DeviceKey.cxx pk_GateKey.cxx
pk_NodeKey.cxx pk_NumberKey.cxx pk_PageKey.cxx
pk_ProcessKey.cxx pk_RangeKey.cxx pk_SchedKey.cxx
pk_SegmentKey.cxx pk_WrapperKey.cxx
Removed: src/base/sys/arch/i486/ddb db_serial.cxx
src/base/sys/ddb db_output.cxx
src/base/sys/kernel kern_MsgLog.cxx
src/base/sys/kerninc Console.hxx MsgLog.hxx
Log:
This *should* be all of the changes for serial debugging. Major part
was introduction of ConsoleStream and SerialStream and the supporting
KernelStream class.
While I was at it I merged the various variants of printf() and
friends.
MsgLog is now dead. The majority of the files touched were to
eliminate references to MsgLog and to rename db_printf() to printf().
Revision Changes Path
1.20 +27 -17 eros/src/base/sys/config.common
Index: config.common
===================================================================
RCS file: /cvs/eros/src/base/sys/config.common,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- config.common 2001/10/16 18:41:00 1.19
+++ config.common 2001/11/26 01:05:36 1.20
@@ -1,3 +1,4 @@
+# -*- python -*-
#
# Copyright (C) 1998, 1999, Jonathan S. Shapiro.
#
@@ -18,10 +19,36 @@
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+#####################################################################
+#
+# Incorporates the kernel debugger into the kernel.
+#
+#####################################################################
defoption("ddb")
+
+#####################################################################
+#
+# Determines whether kernel debugger watchpoints will be
+# supported. This option has not been tested in a very long time, and
+# may not be working.
+#
+#####################################################################
defoption("ddb_watch")
depends("ddb_watch", "ddb")
+#####################################################################
+#
+# Determine what device the kernel debugger, if present, should use as
+# its input/output device. At most one of these should be set at a
+# time. If no selection is made here, and the debugger is enabled,
+# the debugger defaults to using the first serial port (tty0).
+#
+#####################################################################
+defoption("ddb_on_console")
+depends("ddb_on_console", "ddb")
+defoption("ddb_on_tty0")
+depends("ddb_on_tty0", "ddb")
+
defoption("ndebug", 1)
defoption("inet")
defoption("scsi")
@@ -134,20 +161,3 @@
#
#####################################################################
defoption("test_procs")
-
-#####################################################################
-#
-# Controls whether the keyboard driver is included.
-#
-#####################################################################
-defoption("kbd")
-option("kbd")
-
-#####################################################################
-#
-# Controls whether console frame buffer support is enabled at boot
-# time.
-#
-#####################################################################
-defoption("consfb")
-option("consfb")
1.36 +3 -3 eros/src/base/sys/files.common
Index: files.common
===================================================================
RCS file: /cvs/eros/src/base/sys/files.common,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- files.common 2001/08/27 21:09:28 1.35
+++ files.common 2001/11/26 01:05:36 1.36
@@ -24,7 +24,6 @@
file("kernel/kern_AutoConf.cxx")
file("kernel/kern_Node.cxx")
file("kernel/kern_util.cxx")
-file("kernel/kern_MsgLog.cxx")
file("kernel/kern_Thread.cxx")
file("kernel/kern_IoRegion.cxx")
file("kernel/kern_Depend.cxx")
@@ -47,13 +46,15 @@
file("kernel/kern_IdleThread.cxx")
file("kernel/kern_Task.cxx")
file("kernel/kern_Twiddler.cxx")
-file("console/cons_font_8x16.cxx", consfb)
#file("kernel/kern_Persist.cxx")
file("kernel/kern_Profile.cxx")
file("kernel/kern_qsort.cxx")
file("kernel/kern_memory.cxx")
file("kernel/kern_Invoke.cxx")
file("kernel/kern_dma.c")
+file("kernel/kern_LogStream.cxx")
+file("kernel/kern_printf.cxx")
+file("kernel/kern_KernStream.cxx")
#file("IO/io_Request.cxx")
#file("IO/io_Partition.cxx")
#file("IO/io_RequestQueue.cxx")
@@ -112,7 +113,6 @@
file("ddb/db_expr.cxx", ddb)
file("ddb/db_input.cxx", ddb)
file("ddb/db_lex.cxx", ddb)
-file("ddb/db_output.cxx", ddb)
file("ddb/db_print.cxx", ddb)
file("ddb/db_run.cxx", ddb)
file("ddb/db_sym.cxx", ddb)
1.19 +4 -4 eros/src/base/sys/arch/i486/conf/ALL
Index: ALL
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/ALL,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ALL 2001/10/16 18:41:00 1.18
+++ ALL 2001/11/26 01:05:36 1.19
@@ -72,11 +72,11 @@
#
#############################################
-if isoption("kbd"):
- isa_template("kbd")
+#if isoption("ddb"):
+# isa_template("dbserial")
-if isoption("ddb"):
- isa_template("dbserial")
+if isoption("ddb") and not isoption("ddb_on_console") and not isoption("ddb_on_tty0"):
+ option("ddb_on_console")
# PC's have a legacy of hard drive interfaces. These include:
#
1.10 +1 -1 eros/src/base/sys/arch/i486/conf/DEFAULT
Index: DEFAULT
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/DEFAULT,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DEFAULT 2001/08/16 21:06:33 1.9
+++ DEFAULT 2001/11/26 01:05:36 1.10
@@ -20,8 +20,8 @@
include("../../../config.common")
-#exclude("kbd")
option("ddb")
+#option("ddb_on_tty0")
# option("kern_profile")
# option("kern_timing_stats")
1.11 +0 -2 eros/src/base/sys/arch/i486/conf/SMALL
Index: SMALL
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/SMALL,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SMALL 2001/08/27 21:09:13 1.10
+++ SMALL 2001/11/26 01:05:36 1.11
@@ -20,8 +20,6 @@
include("../../../config.common")
-exclude("consfb")
-
option("ndebug")
#defoption("fast_ipc_stats")
#option("fast_ipc_stats")
1.22 +4 -5 eros/src/base/sys/arch/i486/conf/files.pc
Index: files.pc
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/files.pc,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- files.pc 2001/10/16 18:41:00 1.21
+++ files.pc 2001/11/26 01:05:36 1.22
@@ -40,7 +40,6 @@
file("arch/i486/ddb/db_interface.cxx", ddb)
file("arch/i486/ddb/db_disasm.cxx", ddb)
file("arch/i486/ddb/db_trace.cxx", ddb)
-file("arch/i486/ddb/db_serial.cxx", ddb)
# Capability invocation stub for self-invocation by kernel processes:
file("arch/i486/capstubs/call.S")
@@ -56,7 +55,6 @@
file("arch/i486/kernel/AutoConf.cxx")
file("arch/i486/kernel/IDT.cxx")
file("arch/i486/kernel/TSS.cxx")
-file("arch/i486/kernel/Keyboard.cxx", kbd or ddb)
file("arch/i486/kernel/HardClock.cxx")
file("arch/i486/kernel/CMOS.cxx")
file("arch/i486/kernel/Thread386.cxx")
@@ -80,8 +78,9 @@
file("arch/i486/kernel/GDT.cxx")
file("arch/i486/kernel/longjmp.S")
-file("console/cons_VESA.cxx", consfb)
-file("console/cons_SVGA.cxx", consfb)
-file("console/cons_TextMode.cxx")
+# This one is unconditionally included so that we can show status on
+# the way up:
+file("arch/i486/kernel/ConsoleStream.cxx")
+file("arch/i486/kernel/SerialStream.cxx", ddb_on_tty0)
include("../../../files.common")
1.12 +3 -5 eros/src/base/sys/arch/i486/ddb/db_interface.cxx
Index: db_interface.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/ddb/db_interface.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- db_interface.cxx 2001/06/10 19:41:47 1.11
+++ db_interface.cxx 2001/11/26 01:05:37 1.12
@@ -39,13 +39,11 @@
#include <ddb/db_output.hxx>
#include <ddb/db_access.hxx>
#include <kerninc/IRQ.hxx>
-#include <kerninc/Console.hxx>
-#ifdef DB_DEBUG
-#include <kerninc/MsgLog.hxx>
-#endif
+/* #include <kerninc/Console.hxx> */
+#include <kerninc/KernStream.hxx>
#include <eros/setjmp.h>
-#define cnpollc(x) Console::SetPoll((x))
+#define cnpollc(x) KernStream::dbg_stream->SetDebugging((x))
void kdbprinttrap(int type, int code);
extern void db_trap(int type, int code);
1.28 +25 -25 eros/src/base/sys/arch/i486/kernel/BIOS32.cxx
Index: BIOS32.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/BIOS32.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- BIOS32.cxx 2001/09/14 17:11:19 1.27
+++ BIOS32.cxx 2001/11/26 01:05:37 1.28
@@ -23,7 +23,7 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/util.h>
#include <kerninc/PCI.hxx>
#include <kerninc/IRQ.hxx>
#include "Segment.hxx"
@@ -136,7 +136,7 @@
bios32_init()
{
DEBUG(bios32)
- MsgLog::dprintf(true, "Initializing BIOS32\n");
+ dprintf(true, "Initializing BIOS32\n");
if (Bios32IsInit)
return;
@@ -151,7 +151,7 @@
uint32_t length = entry->fields.length * 16;
if (length == 0) {
- MsgLog::printf("BIOS32: WARNING! bogus bios32 structure at 0x%08x\n", entry);
+ printf("BIOS32: WARNING! bogus bios32 structure at 0x%08x\n", entry);
continue;
}
@@ -165,19 +165,19 @@
continue;
DEBUG(bios32)
- MsgLog::dprintf(true, "BIOS32: structure found at 0x%08x\n", entry);
+ dprintf(true, "BIOS32: structure found at 0x%08x\n", entry);
if (entry->fields.revision != 0x0)
- MsgLog::fatal("Unsupported BIOS32 revision %d at 0x%08x\n",
+ fatal("Unsupported BIOS32 revision %d at 0x%08x\n",
entry->fields.revision, entry);
if (Bios32EntryPt == 0) {
if (entry->fields.entry > 0x100000)
- MsgLog::fatal("BIOS32 entry point in high memory at 0x%08x\n",
+ fatal("BIOS32 entry point in high memory at 0x%08x\n",
entry->fields.entry);
Bios32EntryPt = Bios32FarPtr.offset = entry->fields.entry;
- MsgLog::printf("BIOS32 Services Directory found at 0x%08x\n",
+ printf("BIOS32 Services Directory found at 0x%08x\n",
entry->fields.entry);
}
}
@@ -185,7 +185,7 @@
Bios32IsInit = true;
DEBUG(bios32)
- MsgLog::dprintf(true, "BIOS32 initialization completed: %s\n",
+ dprintf(true, "BIOS32 initialization completed: %s\n",
Bios32IsInit ? "good" : "not present");
}
@@ -219,11 +219,11 @@
return address + entry;
case 0x80: /* Not present */
- MsgLog::printf("Bios32FindService(%ld) : not present\n", service);
+ printf("Bios32FindService(%ld) : not present\n", service);
return 0;
default: /* Shouldn't happen */
- MsgLog::fatal("Bios32FindService(%ld) : returned 0x%x\n",
+ fatal("Bios32FindService(%ld) : returned 0x%x\n",
service, returnCode);
return 0;
}
@@ -244,22 +244,22 @@
return;
DEBUG(pcibios)
- MsgLog::dprintf(true,"Initializing PCI Bios\n");
+ dprintf(true,"Initializing PCI Bios\n");
bios32_init();
if (Bios32EntryPt == 0) {
- MsgLog::printf("PciBios::Init(): no BIOS32 entry point\n");
+ printf("PciBios::Init(): no BIOS32 entry point\n");
return;
}
DEBUG(pcibios)
- MsgLog::dprintf(true,"First call to Bios32FindService()\n");
+ dprintf(true,"First call to Bios32FindService()\n");
PciBiosEntryPt = Bios32FindService(Signature::pcisvc);
DEBUG(pcibios)
- MsgLog::dprintf(true,"First call to Bios32FindService() -- made it\n");
+ dprintf(true,"First call to Bios32FindService() -- made it\n");
if (PciBiosEntryPt) {
uint32_t signature;
@@ -289,30 +289,30 @@
minorRevision = pack & 0xff;
#if 0
- MsgLog::printf("Found PCI BIOS with signature 0x%08x (\"%c%c%c%c\")\n",
+ printf("Found PCI BIOS with signature 0x%08x (\"%c%c%c%c\")\n",
signature,
signature & 0xff,
(signature >> 8) & 0xff,
(signature >> 16) & 0xff,
(signature >> 24) & 0xff);
- MsgLog::printf(" status=%d\n", status);
- MsgLog::printf(" majorRev=0x%x\n", majorRevision);
- MsgLog::printf(" minorRev=0x%x\n", minorRevision);
+ printf(" status=%d\n", status);
+ printf(" majorRev=0x%x\n", majorRevision);
+ printf(" minorRev=0x%x\n", minorRevision);
#endif
if (signature != Signature::pci) {
PciBiosEntryPt = 0;
- MsgLog::printf("PCI BIOS signature is bad\n");
+ printf("PCI BIOS signature is bad\n");
halt('B');
}
if (status)
- MsgLog::printf("Unexpected status %d from PciFn::BiosPresent\n",
+ printf("Unexpected status %d from PciFn::BiosPresent\n",
status);
if (PciBiosEntryPt) {
- MsgLog::printf("PCI BIOS revision %x.%02x entry at 0x%x\n",
+ printf("PCI BIOS revision %x.%02x entry at 0x%x\n",
majorRevision, minorRevision, PciBiosEntryPt);
}
}
@@ -347,7 +347,7 @@
uint16_t ret = 0;
DEBUG(pcibios)
- MsgLog::dprintf(true,"Call to PciBios::FindDevice()\n");
+ dprintf(true,"Call to PciBios::FindDevice()\n");
SET_SELECTOR(PciFarPtr);
@@ -366,7 +366,7 @@
IRQ::ENABLE();
DEBUG(pcibios)
- MsgLog::dprintf(true,"Call to PciBios::FindDevice() -- done\n");
+ dprintf(true,"Call to PciBios::FindDevice() -- done\n");
bus = (bx >> 8) & 0xff;
device_fn = bx & 0xff;
@@ -383,7 +383,7 @@
SET_SELECTOR(PciFarPtr);
DEBUG(pcibios)
- MsgLog::dprintf(true,"Call to PciBios::FindClass()\n");
+ dprintf(true,"Call to PciBios::FindClass()\n");
IRQ::DISABLE();
__asm__ (LCALL(%%edi)"\n\t"
@@ -399,7 +399,7 @@
IRQ::ENABLE();
DEBUG(pcibios)
- MsgLog::dprintf(true,"Call to PciBios::FindClass() -- done\n");
+ dprintf(true,"Call to PciBios::FindClass() -- done\n");
bus = (bx >> 8) & 0xff;
device_fn = bx & 0xff;
1.41 +0 -1 eros/src/base/sys/arch/i486/kernel/BadOpcode.cxx
Index: BadOpcode.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/BadOpcode.cxx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- BadOpcode.cxx 2001/06/18 18:51:08 1.40
+++ BadOpcode.cxx 2001/11/26 01:05:37 1.41
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/AutoConf.hxx>
1.34 +2 -3 eros/src/base/sys/arch/i486/kernel/BptTrap.cxx
Index: BptTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/BptTrap.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- BptTrap.cxx 2001/06/18 18:51:08 1.33
+++ BptTrap.cxx 2001/11/26 01:05:37 1.34
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/AutoConf.hxx>
@@ -52,14 +51,14 @@
#ifdef OPTION_DDB
continue_user_bpt = false;
- MsgLog::dprintf(true, "Domain takes BPT trap. error=%d eip=0x%08x\n",
+ dprintf(true, "Domain takes BPT trap. error=%d eip=0x%08x\n",
sa->Error, sa->EIP);
if (continue_user_bpt) {
sa->EIP += 0x1;
return false;
}
#else
- MsgLog::printf("Domain takes BPT trap. error=%d eip=0x%08x\n",
+ printf("Domain takes BPT trap. error=%d eip=0x%08x\n",
sa->Error, sa->EIP);
/* sa->Dump(); */
#endif
1.22 +1 -2 eros/src/base/sys/arch/i486/kernel/CMOS.cxx
Index: CMOS.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/CMOS.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- CMOS.cxx 2001/06/05 14:38:13 1.21
+++ CMOS.cxx 2001/11/26 01:05:37 1.22
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <eros/i486/io.h>
#include "CMOS.hxx"
@@ -49,7 +48,7 @@
nKbytes = cmosByte(0x18);
nKbytes2 = cmosByte(0x17);
- MsgLog::printf("nKbytes: %x nKbytes2: %x\n", nKbytes, nKbytes2);
+ printf("nKbytes: %x nKbytes2: %x\n", nKbytes, nKbytes2);
nKbytes = cmosByte(0x18u) << 8 | cmosByte(0x17u);
return nKbytes;
1.34 +7 -8 eros/src/base/sys/arch/i486/kernel/DebugException.cxx
Index: DebugException.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/DebugException.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- DebugException.cxx 2001/06/18 18:51:08 1.33
+++ DebugException.cxx 2001/11/26 01:05:37 1.34
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Machine.hxx>
@@ -153,7 +152,7 @@
ArchContext* ctxt = (ArchContext*) Thread::CurContext();
/* if (shouldShow) */
- MsgLog::printf("Debug %s. (%s) context = 0x%08x, eip = 0x%08x\n",
+ printf("Debug %s. (%s) context = 0x%08x, eip = 0x%08x\n",
(justTrace ? "trace" : "exception"),
Thread::Current()->Name(),
ctxt, ctxt->fixRegs.EIP);
@@ -170,18 +169,18 @@
uint32_t bptType = bptInfo & 3;
uint32_t bptLen = (bptInfo >> 2) & 3;
- MsgLog::printf(" [%d] %c 0x%08x (%s) len=%d ",
+ printf(" [%d] %c 0x%08x (%s) len=%d ",
i,
(fired ? '*' : ' '),
watch[i],
BptType[bptType],
BptLength[bptLen]);
if (i % 2 == 1)
- MsgLog::printf("\n");
+ printf("\n");
}
if (dbStatus & 0x8000u)
- MsgLog::printf(" * Single step completed\n");
+ printf(" * Single step completed\n");
}
}
#endif
@@ -200,9 +199,9 @@
#ifdef OPTION_DDB
if ( sa_IsProcess(sa) ) {
if (dbStatus & DBG_STATUS_BS) {
- MsgLog::dprintf(true,
- "User process has single stepped. EIP=0x%08x\n",
- sa->EIP);
+ dprintf(true,
+ "User process has single stepped. EIP=0x%08x\n",
+ sa->EIP);
sa->EFLAGS &= ~MASK_EFLAGS_Trap;
}
}
1.38 +9 -10 eros/src/base/sys/arch/i486/kernel/Debugger.cxx
Index: Debugger.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/Debugger.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- Debugger.cxx 2001/06/17 20:45:55 1.37
+++ Debugger.cxx 2001/11/26 01:05:37 1.38
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/SymNames.hxx>
@@ -74,10 +73,10 @@
: /* no inputs */);
if (msg) {
- MsgLog::printf("%s\n", msg);
+ printf("%s\n", msg);
}
else if ( Thread::Current()->IsUser() ) {
- MsgLog::printf("Backtrace() called -- curthread (0x%08x) = %s\n",
+ printf("Backtrace() called -- curthread (0x%08x) = %s\n",
Thread::Current(), Thread::Current()->Name());
}
else {
@@ -87,7 +86,7 @@
Word* tStackTop = tStack + pkt->threadStackSize;
#endif
- MsgLog::printf("Backtrace() on 0x%08x (%s)\n",
+ printf("Backtrace() on 0x%08x (%s)\n",
Thread::Current(),
Thread::Current()->Name());
}
@@ -104,12 +103,12 @@
const FuncSym *pSymEnt = GetSymName(address);
if ( (address < (uint32_t) &_start) || (address >= (uint32_t) &etext) ) {
- MsgLog::printf("Non-text frame 0x%08x!\n", address);
+ printf("Non-text frame 0x%08x!\n", address);
break;
}
if (pSymEnt) {
- MsgLog::printf(" %d: 0x%08x+%08x %s... ebp=0x%x\n",
+ printf(" %d: 0x%08x+%08x %s... ebp=0x%x\n",
i,
pSymEnt->address,
address - pSymEnt->address,
@@ -133,7 +132,7 @@
if (pSymEnt->address == (uint32_t) intr_entry) {
fixregs_t *pSaveArea = (fixregs_t*) pFrame[2];
- MsgLog::printf(" sa=0x%08x cs=0x%02x eip=0x%08x fva=0x%08x\n"
+ printf(" sa=0x%08x cs=0x%02x eip=0x%08x fva=0x%08x\n"
" int#=0x%x error=0x%x\n",
pSaveArea, pSaveArea->CS,
pSaveArea->EIP,
@@ -144,7 +143,7 @@
if ( (pSaveArea->EFLAGS & MASK_EFLAGS_Virt8086) ||
((pSaveArea->CS & ~0x3u) == 0x18 ) ) {
/* returning to non-kernel context */
- MsgLog::printf("Interrupted user context\n");
+ printf("Interrupted user context\n");
break;
}
@@ -159,14 +158,14 @@
}
if ( ((uint32_t)pFrame < (uint32_t) &etext) || ((uint32_t)pFrame >= (uint32_t) &end) ) {
- MsgLog::printf("Non-kernel frame 0x%08x!\n", pFrame);
+ printf("Non-kernel frame 0x%08x!\n", pFrame);
break;
}
}
else {
- MsgLog::printf(" %d: 0x%08x+??? ??\?(...)...\n",
+ printf(" %d: 0x%08x+??? ??\?(...)...\n",
i, address);
break;
}
1.21 +2 -3 eros/src/base/sys/arch/i486/kernel/DebuggerStubs.cxx
Index: DebuggerStubs.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/DebuggerStubs.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DebuggerStubs.cxx 2001/06/10 19:41:48 1.20
+++ DebuggerStubs.cxx 2001/11/26 01:05:37 1.21
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/SymNames.hxx>
@@ -39,9 +38,9 @@
void Debug::Backtrace(const char *msg, bool shouldHalt)
{
if (msg)
- MsgLog::printf("%s\n", msg);
+ printf("%s\n", msg);
else
- MsgLog::printf("Stub backtrace called\n");
+ printf("Stub backtrace called\n");
if (shouldHalt)
halt('a');
1.31 +0 -1 eros/src/base/sys/arch/i486/kernel/DivZeroFault.cxx
Index: DivZeroFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/DivZeroFault.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- DivZeroFault.cxx 2001/06/18 18:51:08 1.30
+++ DivZeroFault.cxx 2001/11/26 01:05:37 1.31
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/AutoConf.hxx>
1.34 +15 -15 eros/src/base/sys/arch/i486/kernel/FloppyCtrlr.cxx
Index: FloppyCtrlr.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/FloppyCtrlr.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- FloppyCtrlr.cxx 2001/01/10 13:16:41 1.33
+++ FloppyCtrlr.cxx 2001/11/26 01:05:37 1.34
@@ -243,7 +243,7 @@
{
assert(DMA::alloc(FloppyDmaChan) == FloppyDmaChan);
- MsgLog::printf("Starting floppy controller... Thread 0x%08x\n", this);
+ printf("Starting floppy controller... Thread 0x%08x\n", this);
/* Unit status is initially unknown. Make sure all drives are spun
* down, consistent with initial state of the DiskUnit structures:
@@ -316,7 +316,7 @@
/* Now committed to at least one operation on curUnit. */
while(curUnit->opq) {
- MsgLog::printf("FloppyCtrl found request(s) on unit %d\n", u);
+ printf("FloppyCtrl found request(s) on unit %d\n", u);
/* get nest request */
UnitIoReq *uior = curUnit->opq;
@@ -425,7 +425,7 @@
}
}
- MsgLog::printf("FloppyCtrlr going idle\n");
+ printf("FloppyCtrlr going idle\n");
WakeUpAtTick(wakeTime);
SleepOn(IdleQ, Thread::Stall);
Yield(true);
@@ -490,7 +490,7 @@
/* controller is hosed - resetting it should restart the requests. */
Reset();
- MsgLog::fatal("FDC::seek_intr(): Floppy not responding");
+ fatal("FDC::seek_intr(): Floppy not responding");
return;
}
@@ -545,7 +545,7 @@
if (GetResults() != 7) {
/* controller is hosed - resetting it should restart the requests. */
Reset();
- MsgLog::fatal("FDC::rw_intr(): Floppy not responding");
+ fatal("FDC::rw_intr(): Floppy not responding");
/* exit function */
return;
@@ -576,7 +576,7 @@
/* FIX: Seeking is probably panicworthy. */
if (sr0 & (SR0::EquipChk | SR0::SeekEnd | SR0::IC))
- MsgLog::fatal("FDC: Unexpected seek\n");
+ fatal("FDC: Unexpected seek\n");
uint8_t sr1 = results[1];
@@ -590,7 +590,7 @@
*/
if (DMA::get_residue(DMAC::FLOPPY) ||
(sr1 & (SR1::Overrun | SR1::CylEnd)))
- MsgLog::fatal(0,"DMA Overrun by fd%d\n", unit);
+ fatal(0,"DMA Overrun by fd%d\n", unit);
#endif
tries++; }
@@ -608,7 +608,7 @@
void FloppyCtrlr::OutFloppyCtrlr(uint8_t b)
{
#ifdef FDCIODEBUG
- MsgLog::printf("FDC::OutFDC(%x)\n", b);
+ printf("FDC::OutFDC(%x)\n", b);
#endif
uint8_t r = 0;
for (int i = 0; i < 10000; i++) {
@@ -621,7 +621,7 @@
}
}
- MsgLog::fatal("FDC::OutFDC() failed. Status Reg = %x\n", r);
+ fatal("FDC::OutFDC() failed. Status Reg = %x\n", r);
}
int FloppyCtrlr::GetResults()
@@ -638,24 +638,24 @@
}
if (r == (STATUS::Master|STATUS::ReqRead|STATUS::CmdBusy)) {
if (n >= 8) {
- MsgLog::fatal("FDC::GetResults(): too many answers\n");
+ fatal("FDC::GetResults(): too many answers\n");
break;
}
results[n] = inb(NECREG::DATA);
#ifdef FDCIODEBUG
- MsgLog::printf("results[%d] = 0x%x\n", n, results[n]);
+ printf("results[%d] = 0x%x\n", n, results[n]);
#endif
n++;
}
}
- MsgLog::fatal("FDC::getStatus(): couldn't get status\n");
+ fatal("FDC::getStatus(): couldn't get status\n");
return -1;
}
void FloppyCtrlr::Reset(/* unit */)
{
- MsgLog::fatal("FloppyCtrlr::Reset(): Drive in unknown state, reset");
+ fatal("FloppyCtrlr::Reset(): Drive in unknown state, reset");
} /* reset the drive. */
@@ -663,11 +663,11 @@
void FloppyCtrlr::StartMotor(uint32_t unit)
{
- MsgLog::printf("Time to start motor, unit %d\n", unit);
+ printf("Time to start motor, unit %d\n", unit);
}
void FloppyCtrlr::StopMotor(uint32_t unit)
{
- MsgLog::printf("Time to stop motor, unit %d\n", unit);
+ printf("Time to stop motor, unit %d\n", unit);
}
#endif
1.12 +4 -5 eros/src/base/sys/arch/i486/kernel/FpuTrap.cxx
Index: FpuTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/FpuTrap.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FpuTrap.cxx 2001/06/19 19:00:36 1.11
+++ FpuTrap.cxx 2001/11/26 01:05:37 1.12
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/AutoConf.hxx>
@@ -35,7 +34,7 @@
DeviceNotAvailException(fixregs_t *sa)
{
if (sa_IsKernel(sa)) {
- MsgLog::dprintf(true, "Kernel floating point error\n");
+ dprintf(true, "Kernel floating point error\n");
DumpFixRegs(sa);
halt('f');
}
@@ -56,13 +55,13 @@
__asm__ __volatile__("smsw %0\n\t" : "=r" (msw));
- MsgLog::dprintf(false, "Active context 0x%08x fp fault pc=0x%08x"
+ dprintf(false, "Active context 0x%08x fp fault pc=0x%08x"
" msw=0x%04x\n",
Thread::CurContext(), sa->EIP, msw);
Thread::CurContext()->SaveFPU();
Thread::CurContext()->DumpFloatRegs();
- MsgLog::dprintf(true, "Pausing...\n");
+ dprintf(true, "Pausing...\n");
#endif
if (Thread::CurContext())
@@ -71,7 +70,7 @@
}
else {
#if 0
- MsgLog::dprintf(false, "Forcing numerics load for ctxt 0x%08x...\n",
+ dprintf(false, "Forcing numerics load for ctxt 0x%08x...\n",
Thread::CurContext());
#endif
Thread::CurContext()->ForceNumericsLoad();
1.30 +0 -1 eros/src/base/sys/arch/i486/kernel/GDT.cxx
Index: GDT.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/GDT.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- GDT.cxx 2001/08/08 22:24:31 1.29
+++ GDT.cxx 2001/11/26 01:05:37 1.30
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include "GDT.hxx"
#include "TSS.hxx"
1.73 +11 -12 eros/src/base/sys/arch/i486/kernel/GPFault.cxx
Index: GPFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/GPFault.cxx,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- GPFault.cxx 2001/08/08 22:24:31 1.72
+++ GPFault.cxx 2001/11/26 01:05:37 1.73
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
@@ -37,33 +36,33 @@
GPFault(fixregs_t *sa)
{
if ( sa_IsKernel(sa) ) {
- MsgLog::printf("Kernel GP fault. curctxt=0x%08x error=0x%x eip=0x%08x\n",
+ printf("Kernel GP fault. curctxt=0x%08x error=0x%x eip=0x%08x\n",
Thread::CurContext(),
sa->Error, sa->EIP);
#if 0
- MsgLog::printf("domRoot=0x%08x, keyRegs=0x%08x\n",
+ printf("domRoot=0x%08x, keyRegs=0x%08x\n",
Thread::CurContext()
? ((ArchContext*)Thread::CurContext())->procRoot
: 0,
Thread::CurContext()
? ((ArchContext*)Thread::CurContext())->keyRegs
: 0);
- MsgLog::printf("0x%x Ctxt hzrd=0x%08x 0x%x hzrd rlu=0x%08x\n",
+ printf("0x%x Ctxt hzrd=0x%08x 0x%x hzrd rlu=0x%08x\n",
sa->EDX,
((ArchContext*) sa->EDX)->hazards,
sa->EDI,
((ArchContext*) sa->EDI)->hazards);
- MsgLog::printf("0x%x Ctxt rlu=0x%08x 0x%x ctxt rlu=0x%08x\n",
+ printf("0x%x Ctxt rlu=0x%08x 0x%x ctxt rlu=0x%08x\n",
sa->EDX,
((ArchContext*) sa->EDX)->fixRegs.ReloadUnits,
sa->EDI,
((ArchContext*) sa->EDI)->fixRegs.ReloadUnits);
- MsgLog::printf("0x%x Ctxt keys=0x%08x 0x%x ctxt keys=0x%08x\n",
+ printf("0x%x Ctxt keys=0x%08x 0x%x ctxt keys=0x%08x\n",
sa->EDX,
((ArchContext*) sa->EDX)->keyRegs,
sa->EDI,
((ArchContext*) sa->EDI)->keyRegs);
- MsgLog::printf("0x%x Ctxt EDX=0x%08x (offset %u)\n",
+ printf("0x%x Ctxt EDX=0x%08x (offset %u)\n",
sa->EDX,
((ArchContext*) sa->EDX)->fixRegs.EDX,
& ((ArchContext*) 0)->fixRegs.EDX );
@@ -89,7 +88,7 @@
Thread::CurContext()->fixRegs.EFLAGS |= MASK_EFLAGS_IOPL;
#if 0
- MsgLog::dprintf(true, "IO privileges now esclated. EFLAGS=0x%x\n", Thread::CurContext()->fixRegs.EFLAGS);
+ dprintf(true, "IO privileges now esclated. EFLAGS=0x%x\n", Thread::CurContext()->fixRegs.EFLAGS);
#endif
return false;
}
@@ -102,7 +101,7 @@
#ifdef OPTION_SMALL_SPACES
if (Thread::CurContext()->smallPTE) {
#if 0
- MsgLog::dprintf(true, "Small Space domain takes GP fault\n");
+ dprintf(true, "Small Space domain takes GP fault\n");
#endif
Thread::CurContext()->SwitchToLargeSpace();
return false;
@@ -110,9 +109,9 @@
#endif
Node *domRoot = ((Process*) Thread::CurContext())->procRoot;
- MsgLog::printf("Domain ");
- MsgLog::print(domRoot->ob.oid);
- MsgLog::printf(" takes GP fault. error=0x%x eip=0x%08x\n",
+ printf("Domain ");
+ printOid(domRoot->ob.oid);
+ printf(" takes GP fault. error=0x%x eip=0x%08x\n",
sa->Error, sa->EIP);
#if 0
1.57 +2 -3 eros/src/base/sys/arch/i486/kernel/HardClock.cxx
Index: HardClock.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/HardClock.cxx,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- HardClock.cxx 2001/06/18 18:51:08 1.56
+++ HardClock.cxx 2001/11/26 01:05:37 1.57
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/SysTimer.hxx>
@@ -193,7 +192,7 @@
* microsecond spin multiplier.
*/
- MsgLog::printf("Calibrating SpinWait... ");
+ printf("Calibrating SpinWait... ");
uint64_t ticks = MillisecondsToTicks(11);
uint64_t calibrateDone = SysTimer::Now() + ticks;
@@ -206,7 +205,7 @@
}
}
- MsgLog::printf("done\n");
+ printf("done\n");
}
#endif /* GNU_INLINE_ASM */
1.95 +4 -7 eros/src/base/sys/arch/i486/kernel/IDT.cxx
Index: IDT.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/IDT.cxx,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- IDT.cxx 2001/06/18 18:51:08 1.94
+++ IDT.cxx 2001/11/26 01:05:37 1.95
@@ -19,13 +19,10 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/util.h>
#include <kerninc/Debug.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Task.hxx>
#include <kerninc/Process.hxx>
@@ -303,14 +300,14 @@
IDT::UnboundVector(fixregs_t *saveArea)
{
#if 0
- MsgLog::fatal(
+ fatal(
"** Unbound vector 0x%x EIP = 0x%x FVA=0x%08x Code=0x%x\n"
" Trap Depth = %d pic1 = 0x%02x pic2 = 0x%02x\n",
saveArea->ExceptionNo, saveArea->EIP,
saveArea->ExceptionAddr, saveArea->Error,
TrapDepth, pic1_cache, pic2_cache);
#else
- MsgLog::fatal(
+ fatal(
"** Unbound vector 0x%x EIP = 0x%x FVA=0x%08x Code=0x%x\n",
saveArea->ExceptNo, saveArea->EIP,
saveArea->ExceptAddr, saveArea->Error);
@@ -341,7 +338,7 @@
void
IRQ::SetHandler(uint32_t irq, void (*pf)(fixregs_t *sa))
{
- MsgLog::printf("Setting irq %d\n", irq);
+ printf("Setting irq %d\n", irq);
IDT::WireVector(IntVec::IRQ0 + irq, pf);
}
@@ -356,6 +353,6 @@
{
assert (irq >= 0 && irq <= 15);
- MsgLog::printf("Unsetting irq %d\n", irq);
+ printf("Unsetting irq %d\n", irq);
IDT::WireVector(IntVec::IRQ0 + irq, IRQ::UnboundInterrupt);
}
1.22 +2 -3 eros/src/base/sys/arch/i486/kernel/IRQ386.cxx
Index: IRQ386.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/IRQ386.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- IRQ386.cxx 2001/06/18 20:40:00 1.21
+++ IRQ386.cxx 2001/11/26 01:05:37 1.22
@@ -20,7 +20,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/IRQ.hxx>
-#include <kerninc/MsgLog.hxx>
#include "IDT.hxx"
#include <eros/i486/io.h>
@@ -75,7 +74,7 @@
if (irq == 1) {
uint8_t truemask = in8(0x21);
- MsgLog::printf("Enable IRQ line %d true=0x%x pic=0x%x\n", irq,
+ printf("Enable IRQ line %d true=0x%x pic=0x%x\n", irq,
truemask, pic1_mask);
}
#endif
@@ -100,7 +99,7 @@
}
#ifdef INTRDEBUG
- if (irq == 1) MsgLog::printf("Disable IRQ line %d\n", irq);
+ if (irq == 1) printf("Disable IRQ line %d\n", irq);
#endif
IRQ::ENABLE();
1.49 +10 -13 eros/src/base/sys/arch/i486/kernel/IntTrap.cxx
Index: IntTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/IntTrap.cxx,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- IntTrap.cxx 2001/07/25 04:45:42 1.48
+++ IntTrap.cxx 2001/11/26 01:05:37 1.49
@@ -30,15 +30,12 @@
#define IPC_INLINES
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/util.h>
#include <kerninc/Debug.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Process.hxx>
#include <eros/SysTraceKey.h>
@@ -147,10 +144,10 @@
if ( ( (uint32_t) &stack < (uint32_t) &InterruptStackBottom ) ||
( (uint32_t) &stack > (uint32_t) &InterruptStackTop ) ) {
halt('b');
- MsgLog::printf("Interrupt 0x%x, stack is 0x%08x pc is 0x%08x\n",
+ printf("Interrupt 0x%x, stack is 0x%08x pc is 0x%08x\n",
vecNumber, &stack, saveArea->EIP);
if (vecNumber == 0xe)
- MsgLog::printf("fva=0x%08x ESI=0x%08x ECX=0x%08x ctxt ESI=0x%08x\n"
+ printf("fva=0x%08x ESI=0x%08x ECX=0x%08x ctxt ESI=0x%08x\n"
"ctxt EBX=0x%08x ctxt EDX=0x%08x\n",
saveArea->ExceptAddr, saveArea->ESI,
saveArea->ECX,
@@ -169,7 +166,7 @@
if ( saveArea == 0 ||
( sa_IsKernel(saveArea) && !ValidEIP(saveArea->EIP) ) ) {
/* halt('e'); */
- MsgLog::fatal("Bogus save area 0x%08x vecno %d\n"
+ fatal("Bogus save area 0x%08x vecno %d\n"
" EIP=0x%08x CurThread = %s ctxt=0x%08x\n",
saveArea, vecNumber,
saveArea ? saveArea->EIP : 0,
@@ -191,11 +188,11 @@
fixregs_t *oldsa = Thread::CurContext()->UnsafeSaveArea();
if ( oldsa != saveArea ) {
- MsgLog::printf("ex=0x%x err=0x%x, eip=0x%08x\n",
+ printf("ex=0x%x err=0x%x, eip=0x%08x\n",
saveArea->ExceptNo,
saveArea->Error,
saveArea->EIP);
- MsgLog::fatal("in: CurThread is 0x%08x old saveArea 0x%08x, "
+ fatal("in: CurThread is 0x%08x old saveArea 0x%08x, "
"saveArea = 0x%08x\n",
curThread, oldsa, saveArea);
}
@@ -287,25 +284,25 @@
#endif
#if 0
- MsgLog::printf("Return from resched\n");
+ printf("Return from resched\n");
#endif
assert ( Thread::Current() );
saveArea = Thread::CurContext()->UnsafeSaveArea();
if (saveArea == 0)
- MsgLog::fatal("Thread 0x%08x is not runnable (no saveArea)\n",
- Thread::Current());
+ fatal("Thread 0x%08x is not runnable (no saveArea)\n",
+ Thread::Current());
}
assert( IRQ::DISABLE_DEPTH() == 1 || vecNumber < IntVec::IRQ0 );
#ifndef NDEBUG
if ( saveArea == 0 ) {
- MsgLog::printf("Restore from invalid save area 0x%08x\n"
+ printf("Restore from invalid save area 0x%08x\n"
" EIP=0x%08x nRun=%d CurThread = %s ctxt=0x%08x\n",
saveArea, saveArea ? saveArea->EIP : 0,
Thread::Current()->nRun, Thread::Current()->Name(),
Thread::CurContext());
- MsgLog::printf(" CS=0x%02x, int#=0x%x, err=0x%x, flg=0x%08x\n",
+ printf(" CS=0x%02x, int#=0x%x, err=0x%x, flg=0x%08x\n",
saveArea->CS,
saveArea->ExceptNo,
saveArea->Error,
1.23 +19 -20 eros/src/base/sys/arch/i486/kernel/Invoke.cxx
Index: Invoke.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/Invoke.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Invoke.cxx 2001/05/25 23:49:47 1.22
+++ Invoke.cxx 2001/11/26 01:05:37 1.23
@@ -25,7 +25,6 @@
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/IRQ.hxx>
-#include <kerninc/MsgLog.hxx>
#include <arch-kerninc/PTE.hxx>
#include <eros/Invoke.h>
@@ -58,7 +57,7 @@
register Msg* sndMsg = (Msg*) sa;
uint32_t invSlot = sndMsg->invokedKey;
- MsgLog::printf("invTy %d sndContext: 0x%08x sndArea: 0x%08x, sa: 0x%08x\n",
+ printf("invTy %d sndContext: 0x%08x sndArea: 0x%08x, sa: 0x%08x\n",
sndMsg->invocationType, sndContext, sndMsg, sa);
Key& invKey = sndKeyRegs[invSlot];
@@ -66,7 +65,7 @@
if (invSlot == 0)
goto slowpath;
- MsgLog::printf(".");
+ printf(".");
if (sndMsg->invocationType > IT_Fork || invSlot > 15)
goto slowpath;
@@ -75,21 +74,21 @@
if (invKey.kt.prepared == 0)
goto slowpath;
- MsgLog::printf(".");
+ printf(".");
if (invKey.kt.keyType > LAST_GATE_KEYTYPE)
goto slowpath;
- MsgLog::printf(" pOt = 0x%08x ", invKey.ok.pOT);
+ printf(" pOt = 0x%08x ", invKey.ok.pOT);
if (invKey.ok.pOT->allocStatus.removed == 1)
goto slowpath;
- MsgLog::printf(".");
+ printf(".");
invKey.Prepare();
- MsgLog::printf(".");
+ printf(".");
if (invKey.kt.keyType > LAST_GATE_KEYTYPE)
goto slowpath;
@@ -97,20 +96,20 @@
if (invKey.kt.keyType == KT_Resume && invKey.subType == KstRestart)
goto slowpath;
- MsgLog::printf(".");
+ printf(".");
recipDomRoot = (Node *) invKey.ok.pOT->pObject;
- MsgLog::printf(" recipDomRoot=0x%08x ", recipDomRoot);
+ printf(" recipDomRoot=0x%08x ", recipDomRoot);
if (recipDomRoot->obType != ObType::NtDomainRoot)
goto slowpath;
- MsgLog::printf(".");
+ printf(".");
rcvContext = (ArchContext*) recipDomRoot->context;
- MsgLog::printf(".");
+ printf(".");
/* If recipient domain is uncached, forget it: */
if (rcvContext == 0)
@@ -125,7 +124,7 @@
rcvArea = rcvContext->UnsafeSaveArea();
- MsgLog::printf(".\n");
+ printf(".\n");
if (oldThread != Thread::Current())
halt();
@@ -248,7 +247,7 @@
goto slowpath;
newThread->Wakeup();
- MsgLog::printf("IT_Fork invocation?? \n");
+ printf("IT_Fork invocation?? \n");
halt();
}
@@ -312,7 +311,7 @@
if (oldThread != Thread::Current())
halt();
- MsgLog::printf("Copying from uva=0x%08x to kva=0x%08x len=0x%08x\n",
+ printf("Copying from uva=0x%08x to kva=0x%08x len=0x%08x\n",
sndString, rcvString, rcvMsg->rcvLen);
/* Copy the string, blowing away the data cache in all likelihood: */
@@ -330,24 +329,24 @@
switch (sndMsg->invocationType) {
case IT_Reply:
sndContext->runState = RS_Available;
- MsgLog::printf("Migrate to ctxt=0x%08x\n", rcvContext);
+ printf("Migrate to ctxt=0x%08x\n", rcvContext);
Thread::Current()->MigrateTo(rcvContext);
break;
case IT_Call:
sndContext->runState = RS_Waiting;
- MsgLog::printf("Migrate to ctxt=0x%08x\n", rcvContext);
+ printf("Migrate to ctxt=0x%08x\n", rcvContext);
Thread::Current()->MigrateTo(rcvContext);
break;
/* Sender state is unchanged */
case IT_Fork:
sndContext->runState = RS_Running;
- MsgLog::printf("IT_Fork invocation?? \n");
+ printf("IT_Fork invocation?? \n");
halt();
/* Don't migrate -- already done! */
break;
}
- MsgLog::printf("rcvContext: 0x%08x rcvArea: 0x%08x\n",
+ printf("rcvContext: 0x%08x rcvArea: 0x%08x\n",
rcvContext, rcvArea);
if (oldThread != Thread::Current())
halt();
@@ -356,14 +355,14 @@
if (invKey.kt.keyType == KT_Resume)
rcvContext->procRoot->callCount++;
- MsgLog::printf("Thread::Current() is: 0x%08x context: 0x%08x\n",
+ printf("Thread::Current() is: 0x%08x context: 0x%08x\n",
Thread::Current(), Thread::CurContext());
if (rcvContext != Thread::CurContext())
halt();
#if 0
- MsgLog::printf("Made it!\n");
+ printf("Made it!\n");
halt();
#endif
1.42 +0 -3 eros/src/base/sys/arch/i486/kernel/IpcTrap.cxx
Index: IpcTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/IpcTrap.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- IpcTrap.cxx 2001/06/18 18:51:08 1.41
+++ IpcTrap.cxx 2001/11/26 01:05:37 1.42
@@ -34,15 +34,12 @@
#define IPC_INLINES
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/util.h>
#include <kerninc/Debug.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Process.hxx>
#include <eros/SysTraceKey.h>
1.48 +5 -6 eros/src/base/sys/arch/i486/kernel/KernContext.cxx
Index: KernContext.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/KernContext.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- KernContext.cxx 2001/06/10 19:41:48 1.47
+++ KernContext.cxx 2001/11/26 01:05:37 1.48
@@ -22,7 +22,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include "Segment.hxx"
#include "lostart.hxx"
@@ -159,7 +158,7 @@
void
KernContext::DoPrepare()
{
- MsgLog::fatal("Kernel contexts should never be deprepared\n");
+ fatal("Kernel contexts should never be deprepared\n");
}
#endif
@@ -174,7 +173,7 @@
* machine also believes itself to be at trapDepth 0, even though it
* hasn't quite returned from the last trap.
*
- * Calling MsgLog::printf() will re-enable interrupts. The timer
+ * Calling printf() will re-enable interrupts. The timer
* interrupt is likely to go off halfway through the restore, creating
* obscure and unreproducible symptoms.
*
@@ -190,17 +189,17 @@
{
#ifndef NDEBUG
if ( Thread::CurContext() != this )
- MsgLog::fatal("Thread context 0x%08x not me 0x%08x\n",
+ fatal("Thread context 0x%08x not me 0x%08x\n",
Thread::CurContext(), this);
if ( ((uint32_t) saveArea < (uint32_t) stackBottom) ||
((uint32_t) saveArea > (uint32_t) stackTop) )
- MsgLog::fatal("Bogus save area! 0x%08x stack [0x%08x,0x%08x)\n",
+ fatal("Bogus save area! 0x%08x stack [0x%08x,0x%08x)\n",
saveArea, stackBottom, stackTop);
#if 0
/* Kernel threads do not make use of the numerics unit. */ */
if (saveArea->ReloadUnits & CpuUnit::Numeric)
- MsgLog::fatal("Don't know how to reload numeric coprocessor yet\n");
+ fatal("Don't know how to reload numeric coprocessor yet\n");
#endif
#endif
1.56 +18 -51 eros/src/base/sys/arch/i486/kernel/Keyboard.cxx
Index: Keyboard.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/Keyboard.cxx,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- Keyboard.cxx 2001/10/16 18:41:00 1.55
+++ Keyboard.cxx 2001/11/26 01:05:37 1.56
@@ -28,7 +28,6 @@
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/Console.hxx>
#include <eros/i486/io.h>
#include "IDT.hxx"
@@ -62,35 +61,6 @@
int kbd_polling = 0;
-#if defined(OPTION_KBD) || defined(OPTION_DDB)
-uint8_t
-Console::Get()
-{
- extern int GetCharFromKbd();
- return GetCharFromKbd();
-}
-
-void
-Console::SetPoll(bool onoff)
-{
- extern int kbd_polling;
- if (onoff) {
- kbd_polling++;
- // FIX: drain the keyboard here prior to handing it to debugger.
- }
- else {
- kbd_polling--;
-#ifdef OPTION_KBD
- IRQ::Enable(IRQ386::Keyboard);
-#else
- // FIX: Put keyboard in recognizable loopback state here so
- // user-mode driver can recognize that we took over.
-#endif
- }
-
-}
-#endif
-
struct KeyCmd {
enum {
SetLed = 0xedu,
@@ -151,7 +121,7 @@
}
#if 0
- MsgLog::printf("KbdWait fails\n");
+ printf("KbdWait fails\n");
#endif
}
@@ -189,7 +159,7 @@
}
} while (retry--);
- MsgLog::printf("KbdCmd fails\n");
+ printf("KbdCmd fails\n");
}
static bool
@@ -389,10 +359,10 @@
uint8_t scanCode = 0;
while ( ReadKbd(scanCode) ) {
- /* MsgLog::printf("<kc = %x>", scanCode); */
+ /* printf("<kc = %x>", scanCode); */
if (AsciiMode == false) {
if (kbdBufferTop == KbdBufferSz)
- MsgLog::fatal("Keyboard buffer overflow\n");
+ fatal("Keyboard buffer overflow\n");
else
kbdBuffer[kbdBufferTop++] = scanCode;
}
@@ -409,7 +379,7 @@
switch (esc_code) {
case 0x0:
{
- /* MsgLog::printf("esc_code==0\n"); */
+ /* printf("esc_code==0\n"); */
switch (scanCode) {
case 0xe0:
case 0xe1:
@@ -417,7 +387,7 @@
continue;
default:
if (keyCode >= num_scan) {
- MsgLog::printf("<? 0x0 \\x%x>", keyCode);
+ printf("<? 0x0 \\x%x>", keyCode);
return;
}
}
@@ -454,7 +424,7 @@
esc_code = 0;
return;
default:
- MsgLog::printf("<? 0xe0 \\x%x>", scanCode);
+ printf("<? 0xe0 \\x%x>", scanCode);
esc_code = 0;
return;
}
@@ -469,7 +439,7 @@
}
else {
esc_code = 0;
- MsgLog::printf("<? 0xe1 \\x%x>", scanCode);
+ printf("<? 0xe1 \\x%x>", scanCode);
return;
}
break;
@@ -482,21 +452,21 @@
return;
}
else {
- MsgLog::printf("<? 0x1d \\x%x>", scanCode);
+ printf("<? 0x1d \\x%x>", scanCode);
esc_code = 0;
return;
}
break;
}
default:
- MsgLog::printf("Unknown escape 0x%x\n", esc_code);
+ printf("Unknown escape 0x%x\n", esc_code);
break;
}
- /* MsgLog::printf("Key code is %d (0x%x)\n", keyCode, keyCode); */
+ /* printf("Key code is %d (0x%x)\n", keyCode, keyCode); */
KeyInfo& ki = key_table[keyCode];
- /* MsgLog::printf("<kf=\\x%x,0x%x>", keyCode, ki.flags); */
+ /* printf("<kf=\\x%x,0x%x>", keyCode, ki.flags); */
if ( (ki.flags & KeyMod::IsAlpha) &&
(ShiftState & KeyMod::AlphaLock) )
@@ -541,7 +511,7 @@
#if 1
if (kbdBufferTop == KbdBufferSz)
- MsgLog::fatal("Keyboard buffer overflow\n");
+ fatal("Keyboard buffer overflow\n");
else
kbdBuffer[kbdBufferTop++] = ascii;
@@ -551,11 +521,11 @@
* print the hex of it:
*/
if (ascii == '\r')
- MsgLog::printf("\n");
+ printf("\n");
else if (ascii >= ' ' && ascii < 127)
- MsgLog::printf("%c", ascii);
+ printf("%c", ascii);
else
- MsgLog::printf("\\x%x", ascii);
+ printf("\\x%x", ascii);
#endif
}
}
@@ -601,9 +571,9 @@
{
#ifdef OPTION_KBD
IRQ::SetHandler(IRQ386::Keyboard, KeyboardInterrupt);
- MsgLog::printf("Set up keyboard interrupt handler!\n");
+ printf("Set up keyboard interrupt handler!\n");
#else
- MsgLog::printf("Keyboard included for debugger; handler is unbound!\n");
+ printf("Keyboard included for debugger; handler is unbound!\n");
#endif
return true;
@@ -617,9 +587,6 @@
UpdateKbdLeds();
#endif
-#ifdef OPTION_KBD
- IRQ::Enable(IRQ386::Keyboard);
-#endif
return true;
}
1.129 +37 -37 eros/src/base/sys/arch/i486/kernel/Machine.cxx
Index: Machine.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/Machine.cxx,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- Machine.cxx 2001/09/07 05:15:14 1.128
+++ Machine.cxx 2001/11/26 01:05:37 1.129
@@ -19,14 +19,13 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/KernStream.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/dma.h>
#include <kerninc/Thread.hxx>
#include <kerninc/util.h>
#include <kerninc/PhysMem.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/SysTimer.hxx>
#include <disk/DiskKey.hxx>
#include <kerninc/BootInfo.h>
@@ -90,14 +89,11 @@
{
/* Set up the boot console by hand so that we can do kernel
* diagnostics during startup. Note that the boot console is output
- * only, so it does not interact at all with the autoconfiguration
- * mechanism.
+ * only unless a kernel debugger is present, and we will enable
+ * debugger input later after interrupts have been initialized.
*/
-#ifdef OPTION_CONSFB
- Console::InitVESA() || Console::InitSVGA() ||
-#endif /* OPTION_CONSFB */
- Console::InitTextMode();
-
+ KernStream::InitStreams();
+
/* On the 386, this can be done before enabling VM, which
* is helpful.
*/
@@ -117,7 +113,7 @@
(void) Machine::SetMappingTable(KERNPAGEDIR); /* Well known address! */
(void) Machine::EnableVirtualMapping();
- MsgLog::printf("FB updated -- now virtual\n");
+ printf("FB updated -- now virtual\n");
if (BootInfoPtr->useGraphicsFB) {
#if defined(OPTION_CONSFB) && 0
@@ -132,14 +128,14 @@
Machine::frameBuffer = KVTOL(Machine::mappedFrameBuffer);
#if defined(OPTION_CONSFB) && 0
- MsgLog::printf("Redraw at KVTOL(fb-vp)\n");
+ printf("Redraw at KVTOL(fb-vp)\n");
animate();
redrawLogos();
#endif
}
- MsgLog::printf("About to load GDT\n");
+ printf("About to load GDT\n");
GDT::Init();
@@ -158,53 +154,53 @@
}
if (BootInfoPtr->consInfo)
- MsgLog::printf("FB at 0x%08x\n", (unsigned long) BootInfoPtr->consInfo->frameBuffer);
+ printf("FB at 0x%08x\n", (unsigned long) BootInfoPtr->consInfo->frameBuffer);
else
- MsgLog::printf("No FB console found.");
+ printf("No FB console found.");
#if defined(OPTION_CONSFB) && 0
if (BootInfoPtr->useGraphicsFB)
pause();
#endif
- /* MsgLog::printf("main(): loaded GDT\n");
+ /* printf("main(): loaded GDT\n");
* Commented out to avoid missing symbol complaints
*/
IDT::Init();
-/* MsgLog::printf("main(): loaded IDT\n"); */
+/* printf("main(): loaded IDT\n"); */
TSS::Init();
-/* MsgLog::printf("main(): loaded TSS\n"); */
+/* printf("main(): loaded TSS\n"); */
#if 0
/* Enable the following when you dork the process structure to
* recompute the important offsets.
*/
- MsgLog::printf("PROCESS_FIXREGS_OFFSET = %d\n",
+ printf("PROCESS_FIXREGS_OFFSET = %d\n",
offsetof(Process, fixRegs));
- MsgLog::printf("PROCESS_MAPTABLE_OFFSET = %d\n",
+ printf("PROCESS_MAPTABLE_OFFSET = %d\n",
offsetof(Process, fixRegs.MappingTable));
- MsgLog::printf("PROCESS_V86_FIXREGS_TOP = %d\n",
+ printf("PROCESS_V86_FIXREGS_TOP = %d\n",
offsetof(Process, fixRegs) + offsetof(fixregs_t, sndPtr));
- MsgLog::fatal("PROCESS_FIXREGS_TOP = %d\n",
+ fatal("PROCESS_FIXREGS_TOP = %d\n",
offsetof(Process, fixRegs) + offsetof(fixregs_t, ES));
#endif
switch(BusArchitecture()) {
case bt_Unknown:
- MsgLog::printf("Unknown bus type!\n");
+ printf("Unknown bus type!\n");
halt('u');
case bt_ISA:
- MsgLog::printf("ISA bus\n");
+ printf("ISA bus\n");
break;
case bt_MCA:
- MsgLog::printf("MCA bus -- get a real machine!\n");
+ printf("MCA bus -- get a real machine!\n");
break;
case bt_PCI:
- MsgLog::printf("PCI bus\n");
+ printf("PCI bus\n");
break;
}
@@ -224,9 +220,9 @@
assert(IRQ_FROM_EXCEPTION(IntVec::IRQ0) == 0);
- /* MsgLog::printf("Kernel is mapped. CR0 = 0x%x\n", flags); */
+ /* printf("Kernel is mapped. CR0 = 0x%x\n", flags); */
- /* MsgLog::printf("Pre enable: intdepth=%d\n", IDT::intdepth); */
+ /* printf("Pre enable: intdepth=%d\n", IDT::intdepth); */
/* We enable interrupts on the processor here. Note that at this
* point all of the hardware interrupts are disabled. We need to
@@ -254,12 +250,12 @@
#if 0
if (BootInfoPtr->ramdiskSz) {
- MsgLog::printf("Machine::init(): %d sector ramdisk found at 0x%x\n",
+ printf("Machine::init(): %d sector ramdisk found at 0x%x\n",
SysConfig.ramdiskSz,
SysConfig.ramdiskAddress);
}
else {
- MsgLog::printf("Machine::init(): no ramdisk\n",
+ printf("Machine::init(): no ramdisk\n",
SysConfig.ramdiskSz,
SysConfig.ramdiskAddress);
}
@@ -273,7 +269,11 @@
Machine::InitHardClock();
- MsgLog::printf("Motherboard interrupts initialized\n");
+#ifdef OPTION_DDB
+ KernStream::dbg_stream->EnableDebuggerInput();
+#endif
+
+ printf("Motherboard interrupts initialized\n");
#if defined(OPTION_CONSFB) && 0
if (BootInfoPtr->useGraphicsFB) {
@@ -377,7 +377,7 @@
/* pageTab = ::new PTE[NPTE_PER_PAGE]; */
#if 0
- MsgLog::printf("Allocated new page table at 0x%x, dirndx 0x%x\n",
+ printf("Allocated new page table at 0x%x, dirndx 0x%x\n",
pageTab, dirndx);
#endif
@@ -418,7 +418,7 @@
*/
uint32_t physPages = PhysMem::TotalPhysicalPages();
- /* MsgLog::printf("pageDir: 0x%x\n", pageDir); */
+ /* printf("pageDir: 0x%x\n", pageDir); */
/* Computation of the virtual address must user paddr + KVA
* because we are using segmentation tricks to make kernel segment
@@ -538,7 +538,7 @@
extern kva_t heap_defined;
extern kva_t heap_bound;
- MsgLog::printf("Last physpage at 0x%08x\n", EROS_PAGE_SIZE * physPages);
+ printf("Last physpage at 0x%08x\n", EROS_PAGE_SIZE * physPages);
heap_start = PTOV(EROS_PAGE_SIZE * heap_first_page);
heap_end = heap_start;
@@ -590,7 +590,7 @@
assert((heap_start % EROS_PAGE_SIZE) == 0);
unsigned nPages = (heap_bound / EROS_PAGE_SIZE);
- MsgLog::printf("Heap contains %d pages\n", nPages);
+ printf("Heap contains %d pages\n", nPages);
heap_bound += heap_start;
@@ -641,7 +641,7 @@
Machine::mappedFrameBuffer = fb_start + (pbase & EROS_PAGE_MASK);
}
- MsgLog::printf("Framebuffer (ci = 0x%08x pa = 0x%08x) mapped at "
+ printf("Framebuffer (ci = 0x%08x pa = 0x%08x) mapped at "
"0x%08x (linear 0x%08x), len 0x%08x\n",
ci, (unsigned long) ci->frameBuffer,
Machine::mappedFrameBuffer,
@@ -693,7 +693,7 @@
#endif
#if 0
- MsgLog::printf("Built Kernel Page Map!\n");
+ printf("Built Kernel Page Map!\n");
#endif
}
@@ -834,7 +834,7 @@
pageTbl = (PTE*) PTOV( (pageTbl[ndx0].AsWord() & ~EROS_PAGE_MASK) );
#ifdef MSGDEBUG
- MsgLog::printf("MapBuffer: pg tb = 0x%08x p0=0x%08x\n",
+ printf("MapBuffer: pg tb = 0x%08x p0=0x%08x\n",
pageTbl, p0);
#endif
1.189 +23 -24 eros/src/base/sys/arch/i486/kernel/PageFault.cxx
Index: PageFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/PageFault.cxx,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- PageFault.cxx 2001/10/21 17:12:17 1.188
+++ PageFault.cxx 2001/11/26 01:05:37 1.189
@@ -25,7 +25,6 @@
#include <eros/memory.h>
#include <eros/SysTraceKey.h>
#include <kerninc/Check.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/ObjectCache.hxx>
@@ -108,7 +107,7 @@
char attrs[64];
char *nxtAttr = attrs;
- db_printf("Pg Frame 0x%08x [", PageFrame());
+ printf("Pg Frame 0x%08x [", PageFrame());
#define ADDATTR(s) do { const char *sp = (s); *nxtAttr++ = ','; while (*sp) *nxtAttr++ = *sp++; } while (0)
@@ -135,7 +134,7 @@
#undef ADDATTR
*nxtAttr++ = 0;
- db_printf("%s]\n", attrs);
+ printf("%s]\n", attrs);
}
#endif
@@ -151,7 +150,7 @@
*/
#if 0
- MsgLog::dprintf(true, "NAILING product 0x%08x\n", page);
+ dprintf(true, "NAILING product 0x%08x\n", page);
#endif
assert (page->obType == ObType::PtMappingPage);
@@ -164,7 +163,7 @@
kpa_t curmap = Machine::GetMappingTable();
if (mp_pa == curmap) {
#if 0
- MsgLog::dprintf(true, "Nailing active mapping table!\n");
+ dprintf(true, "Nailing active mapping table!\n");
#endif
Machine::SetMappingTable(KERNPAGEDIR);
}
@@ -196,7 +195,7 @@
for (unsigned i = 0; i < nFrames * NPTE_PER_PAGE; i++) {
if ((pte[i].w_value & (PTE_FRAMEBITS|PTE_W)) == kvaw) {
- MsgLog::dprintf(true,
+ dprintf(true,
"Checking pobj 0x%x with frame at 0x%x\n"
"Pg hdr 0x%x retains writable small PTE at 0x%x\n",
pObj, kvaw,
@@ -220,7 +219,7 @@
for (uint32_t ent = 0; ent < limit; ent++) {
if ((ptepg[ent].w_value & (PTE_FRAMEBITS|PTE_W)) == kvaw) {
- MsgLog::dprintf(true,
+ dprintf(true,
"Checking pobj 0x%x with frame at 0x%x\n"
"Page hdr 0x%x retains writable PTE at 0x%x\n",
pObj, kvaw,
@@ -290,7 +289,7 @@
#if 0
if ( (sa->EIP == (uint32_t) ipc_probe_start)
|| (sa->EIP == (uint32_t) ipc_probe_top) ) {
- MsgLog::printf("Send mapping fault 0\n");
+ printf("Send mapping fault 0\n");
sa->EAX = 1;
sa->EIP = (uint32_t) ipc_probe_end;
return;
@@ -300,7 +299,7 @@
#if 0
sa->Dump();
#endif
- MsgLog::fatal("Kernel page fault\n"
+ fatal("Kernel page fault\n"
" SaveArea = 0x%08x EIP = 0x%08x\n"
" Fault address = 0x%08x Code = 0x%08x\n"
" CS = 0x%08x\n",
@@ -363,7 +362,7 @@
bool prompt)
{
#if 0
- MsgLog::dprintf(true, "SmallPgFlt w/ la=0x%08x, bias=0x%08x,"
+ dprintf(true, "SmallPgFlt w/ la=0x%08x, bias=0x%08x,"
" limit=0x%08x\n", la, p->bias, p->limit);
#endif
@@ -441,7 +440,7 @@
if (va >= p->limit) {
#if 0
- MsgLog::dprintf(true, "!! la=0x%08x va=0x%08x\n"
+ dprintf(true, "!! la=0x%08x va=0x%08x\n"
"Switching process 0x%X to large space\n",
la, va,
procRoot->ob.oid);
@@ -483,7 +482,7 @@
#endif
#if 0
- MsgLog::dprintf(true, "Built PTE at 0x%08x\n", &thePTE);
+ dprintf(true, "Built PTE at 0x%08x\n", &thePTE);
#endif
if (needInvalidate)
@@ -556,7 +555,7 @@
DoPageFault_CallCounter++;
DEBUG(pgflt) {
- MsgLog::printf("DoPageFault: ctxt=0x%08x EIP 0x%08x la=0x%08x, isWrite=%c prompt=%c\n",
+ printf("DoPageFault: ctxt=0x%08x EIP 0x%08x la=0x%08x, isWrite=%c prompt=%c\n",
p,
p->fixRegs.EIP,
la,
@@ -572,7 +571,7 @@
/* If LA is simply out of range, then forget the whole thing: */
if ( la >= KVA ) {
- MsgLog::dprintf(true, "Domain accessed kernel or small space la\n");
+ dprintf(true, "Domain accessed kernel or small space la\n");
p->SetFault(FC_InvalidAddr, va, false);
return false;
}
@@ -584,7 +583,7 @@
/* If LA is simply out of range, then forget the whole thing: */
if ( la >= UMSGTOP ) {
- MsgLog::dprintf(true, "Large domain accessed small space la\n");
+ dprintf(true, "Large domain accessed small space la\n");
p->SetFault(FC_InvalidAddr, va, false);
return false;
}
@@ -617,7 +616,7 @@
PTE *pTable = (PTE *) (PTOV(p->fixRegs.MappingTable) & ~EROS_PAGE_MASK);
#ifdef WALK_LOUD
- MsgLog::dprintf(false, "pTable is 0x%x\n", pTable);
+ dprintf(false, "pTable is 0x%x\n", pTable);
#endif
if (pTable == 0)
@@ -627,7 +626,7 @@
ObjectHeader *pTableHdr = ObjectCache::PhysPageToObHdr(PtoKPA(pTable));
if (isWrite && !pTableHdr->rwProduct) {
- MsgLog::dprintf(true, "DoPageFault(): isWrite && !pTableHdr->rwProduct hdr 0x%x\n", pTableHdr);
+ dprintf(true, "DoPageFault(): isWrite && !pTableHdr->rwProduct hdr 0x%x\n", pTableHdr);
goto access_fault;
}
@@ -673,7 +672,7 @@
#if 0
if (wi.redSeg && wi.offset != wi.redSegOffset) {
- MsgLog::dprintf(false, "pdr proc_WalkSeg: wi.producer 0x%x, wi.prodBlss %d wi.isRed %d\n"
+ dprintf(false, "pdr proc_WalkSeg: wi.producer 0x%x, wi.prodBlss %d wi.isRed %d\n"
"wi.vaddr 0x%x wi.offset 0x%X flt %d wa %d segKey 0x%x\n"
"canCall %d canWrite %d\n"
"redSeg 0x%x redOffset 0x%X\n",
@@ -683,7 +682,7 @@
wi.canCall, wi.canWrite,
wi.redSeg, wi.redSegOffset);
- MsgLog::dprintf(true, "Found pg dir. Offset 0x%X RedSegOffset 0x%X spanBlss %d\n",
+ dprintf(true, "Found pg dir. Offset 0x%X RedSegOffset 0x%X spanBlss %d\n",
wi.offset, wi.redSegOffset, wi.redSpanBlss);
}
#endif
@@ -694,7 +693,7 @@
* segment.
*/
#ifdef WALK_LOUD
- MsgLog::dprintf(false, "have_good_pde\n");
+ dprintf(false, "have_good_pde\n");
#endif
goto have_good_pde;
}
@@ -719,7 +718,7 @@
wi.canWrite = pTableHdr->rwProduct ? true : false;
#ifdef WALK_LOUD
- MsgLog::dprintf(false, "have_pgdir\n");
+ dprintf(false, "have_pgdir\n");
#endif
goto have_pgdir;
}
@@ -894,7 +893,7 @@
pageAddr = VTOP(ObjectCache::ObHdrToPage(wi.segObj));
if (pageAddr == 0)
- MsgLog::dprintf(true, "wi.segObj 0x%08x at addr 0x%08x!! (wi=0x%08x)\n",
+ dprintf(true, "wi.segObj 0x%08x at addr 0x%08x!! (wi=0x%08x)\n",
wi.segObj, pageAddr, &wi);
assert ((pageAddr & EROS_PAGE_MASK) == 0);
@@ -934,7 +933,7 @@
fault_exit:
#ifdef WALK_LOUD
- MsgLog::dprintf(true, "flt proc_WalkSeg: wi.producer 0x%x, wi.prodBlss %d wi.isRed %d\n"
+ dprintf(true, "flt proc_WalkSeg: wi.producer 0x%x, wi.prodBlss %d wi.isRed %d\n"
"wi.vaddr 0x%x wi.offset 0x%X flt %d wa %d\n"
"canCall %d canWrite %d\n",
wi.segObj, wi.segBlss, wi.segObjIsRed,
@@ -1011,7 +1010,7 @@
bzero((void *)tableAddr, EROS_PAGE_SIZE);
#if 0
- MsgLog::printf("0x%08x->MkPgTbl(blss=%d,ndx=%d,rw=%c,ca=%c,"
+ printf("0x%08x->MkPgTbl(blss=%d,ndx=%d,rw=%c,ca=%c,"
"producerTy=%d) => 0x%08x\n",
wi.segObj,
wi.segBlss, ndx, 'y', 'y', wi.segObj->obType,
1.19 +0 -1 eros/src/base/sys/arch/i486/kernel/PseudoInstr.cxx
Index: PseudoInstr.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/PseudoInstr.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- PseudoInstr.cxx 2001/06/18 18:51:08 1.18
+++ PseudoInstr.cxx 2001/11/26 01:05:37 1.19
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
1.32 +1 -2 eros/src/base/sys/arch/i486/kernel/ReservedFault.cxx
Index: ReservedFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/ReservedFault.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ReservedFault.cxx 2001/06/18 18:51:08 1.31
+++ ReservedFault.cxx 2001/11/26 01:05:37 1.32
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/AutoConf.hxx>
@@ -32,7 +31,7 @@
bool
ReservedException(fixregs_t *sa)
{
- MsgLog::fatal("Kernel error: Interrupt on reserved interrupt vector %d.\n",
+ fatal("Kernel error: Interrupt on reserved interrupt vector %d.\n",
sa->ExceptNo);
return false;
1.36 +1 -2 eros/src/base/sys/arch/i486/kernel/SSFault.cxx
Index: SSFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/SSFault.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- SSFault.cxx 2001/06/18 18:51:08 1.35
+++ SSFault.cxx 2001/11/26 01:05:37 1.36
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/AutoConf.hxx>
@@ -47,7 +46,7 @@
#ifdef OPTION_SMALL_SPACES
if (Thread::CurContext()->smallPTE) {
#if 0
- MsgLog::dprintf(true, "Small Space domain takes SS fault\n");
+ dprintf(true, "Small Space domain takes SS fault\n");
#endif
Thread::CurContext()->SwitchToLargeSpace();
return false;
1.33 +0 -1 eros/src/base/sys/arch/i486/kernel/SegPresFault.cxx
Index: SegPresFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/SegPresFault.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- SegPresFault.cxx 2001/06/18 18:51:08 1.32
+++ SegPresFault.cxx 2001/11/26 01:05:37 1.33
@@ -22,7 +22,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/AutoConf.hxx>
1.64 +7 -8 eros/src/base/sys/arch/i486/kernel/Thread386.cxx
Index: Thread386.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/Thread386.cxx,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Thread386.cxx 2001/06/18 18:51:08 1.63
+++ Thread386.cxx 2001/11/26 01:05:37 1.64
@@ -22,7 +22,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/util.h>
#include <kerninc/ObjectHeader.hxx>
#include <kerninc/ObjectCache.hxx>
@@ -51,7 +50,7 @@
assert ( IsUser() == false );
if (verbose)
- MsgLog::printf("Thread 0x%x yields state %d\n", this, state);
+ printf("Thread 0x%x yields state %d\n", this, state);
extern Thread *pIdleThread;
if (Thread::Current() == pIdleThread)
@@ -59,7 +58,7 @@
(Thread::Current()->state == Thread::Ready) );
if (Thread::Current() != this)
- MsgLog::fatal("Bad current thread! Thread::Current()=0x%08x, this=0x%08x\n",
+ fatal("Bad current thread! Thread::Current()=0x%08x, this=0x%08x\n",
Thread::Current(), this);
/* Cannot verify interrupts disabled here -- might be preemption. */
@@ -68,8 +67,8 @@
{
extern bool ddb_uyield_debug;
if ( ddb_uyield_debug )
- MsgLog::dprintf(true, "User thread 0x%08x yields\n",
- Thread::Current());
+ dprintf(true, "User thread 0x%08x yields\n",
+ Thread::Current());
}
#endif
@@ -79,14 +78,14 @@
#endif
#ifdef THREAD386DEBUG
- MsgLog::printf("Process 0x%08x yields -- longjmp to 0x%08x\n",
+ printf("Process 0x%08x yields -- longjmp to 0x%08x\n",
this, UserThreadRecoveryBlock[0].pc);
#endif
__asm__("int $0x30");
if (verbose)
- MsgLog::printf("Thread 0x%x resumes\n", this);
+ printf("Thread 0x%x resumes\n", this);
}
void
@@ -119,7 +118,7 @@
{
extern bool ddb_uyield_debug;
if ( ddb_uyield_debug )
- MsgLog::dprintf(true, "Thread 0x%08x yields\n",
+ dprintf(true, "Thread 0x%08x yields\n",
Thread::Current());
}
#endif
1.277 +38 -39 eros/src/base/sys/arch/i486/kernel/UserContext.cxx
Index: UserContext.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/UserContext.cxx,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -r1.276 -r1.277
--- UserContext.cxx 2001/11/14 13:22:03 1.276
+++ UserContext.cxx 2001/11/26 01:05:37 1.277
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/Depend.hxx>
@@ -99,7 +98,7 @@
Process::ContextCache[i].name[7] = 0;
}
- MsgLog::printf("Allocated User Contexts: 0x%x at 0x%08x\n",
+ printf("Allocated User Contexts: 0x%x at 0x%08x\n",
sizeof(Process[KTUNE_NCONTEXT]),
Process::ContextCache);
}
@@ -138,13 +137,13 @@
#endif
if (p->procRoot && p->procRoot->IsFree()) {
- MsgLog::dprintf(true, "Context 0x%08x has free process root 0x%08x\n",
+ dprintf(true, "Context 0x%08x has free process root 0x%08x\n",
p, p->procRoot);
result = false;
}
if (p->keysNode && p->keysNode->IsFree()) {
- MsgLog::dprintf(true, "Context 0x%08x has free keys node 0x%08x\n",
+ dprintf(true, "Context 0x%08x has free keys node 0x%08x\n",
p, p->keysNode);
result = false;
}
@@ -243,7 +242,7 @@
Process::DumpFixRegs()
{
if (saveArea == 0)
- MsgLog::printf("Note: context is NOT runnable\n");
+ printf("Note: context is NOT runnable\n");
::DumpFixRegs(&fixRegs);
}
@@ -251,12 +250,12 @@
void
Process::DumpFloatRegs()
{
- MsgLog::printf("fctrl: 0x%04x fstatus: 0x%04x ftag: 0x%04x fopcode 0x%04x\n",
+ printf("fctrl: 0x%04x fstatus: 0x%04x ftag: 0x%04x fopcode 0x%04x\n",
fpuRegs.f_ctrl,
fpuRegs.f_status,
fpuRegs.f_tag,
fpuRegs.f_opcode);
- MsgLog::printf("fcs: 0x%04x fip: 0x%08x fds: 0x%04x fdp: 0x%08x\n",
+ printf("fcs: 0x%04x fip: 0x%08x fds: 0x%04x fdp: 0x%08x\n",
fpuRegs.f_cs,
fpuRegs.f_ip,
fpuRegs.f_ds,
@@ -276,17 +275,17 @@
#if 0
if ( sa_IsProcess(fx) )
- MsgLog::printf("Process Savearea 0x%08x (cip 0x%08x)\n", fx, cip);
+ printf("Process Savearea 0x%08x (cip 0x%08x)\n", fx, cip);
else
- MsgLog::printf("Kernel Savearea 0x%08x (cip 0x%08x)\n", fx, cip);
+ printf("Kernel Savearea 0x%08x (cip 0x%08x)\n", fx, cip);
#else
if ( sa_IsProcess(fx) )
- MsgLog::printf("Process Savearea 0x%08x\n", fx);
+ printf("Process Savearea 0x%08x\n", fx);
else
- MsgLog::printf("Kernel Savearea 0x%08x\n", fx);
+ printf("Kernel Savearea 0x%08x\n", fx);
#endif
- MsgLog::printf(
+ printf(
"Units = 0x%08x ASID = 0x%08x EFLAGS = 0x%08x\n"
"EAX = 0x%08x EBX = 0x%08x ECX = 0x%08x\n"
"EDX = 0x%08x EDI = 0x%08x ESI = 0x%08x\n"
@@ -303,12 +302,12 @@
/* user save area: */
const fixregs_t* sa = fx;
- MsgLog::printf(
+ printf(
"invTy = %d invKey = 0x%x sndPtr = 0x%08x sndLen= %5d sndKeys=0x%08x rcvKeys=0x%08x\n",
sa->invType, sa->invKey, sa->sndPtr, sa->sndLen,
sa->sndKeys, sa->rcvKeys);
- MsgLog::printf(
+ printf(
"SS = 0x%08x ESP = 0x%08x\n"
"DS = 0x%04x ES = 0x%04x FS = 0x%04x"
" GS = 0x%04x\n",
@@ -337,7 +336,7 @@
__asm__ __volatile__ ("mov %%gs, %0"
: "=r" (gs)
: /* no input */);
- MsgLog::printf(
+ printf(
"SS = 0x%08x ESP = 0x%08x\n"
"DS = 0x%04x ES = 0x%04x FS = 0x%04x GS = 0x%04x\n",
@@ -386,7 +385,7 @@
Process* pContext = 0;
#if 0
- MsgLog::printf("Begin Process::Load\n");
+ printf("Begin Process::Load\n");
#endif
do {
@@ -418,13 +417,13 @@
/* wipe out current contents, if any */
#if 0
- MsgLog::printf(" Unload old context\n");
+ printf(" Unload old context\n");
#endif
cc.Unload();
#if 0
- MsgLog::printf(" unloaded\n");
+ printf(" unloaded\n");
#endif
assert(procRoot->obType == ObType::NtProcessRoot);
@@ -445,7 +444,7 @@
cc.smallPTE = &smallSpaces[SMALL_SPACE_PAGES * ndx];
#if 0
- MsgLog::dprintf(true, "Loading small space process 0x%X bias 0x%x "
+ dprintf(true, "Loading small space process 0x%X bias 0x%x "
"limit 0x%x\n",
procRoot->oid, cc.bias, cc.limit);
#endif
@@ -471,7 +470,7 @@
procRoot->context = &cc;
procRoot->obType = ObType::NtProcessRoot;
#if 0
- MsgLog::printf("End Process::Load\n");
+ printf("End Process::Load\n");
#endif
}
@@ -563,7 +562,7 @@
#if 0
if (faultCode)
- MsgLog::printf("Bad register values\n");
+ printf("Bad register values\n");
#endif
return;
}
@@ -608,7 +607,7 @@
processFlags = pDomRegs->flags;
if (faultCode)
- MsgLog::printf("Fault code already set\n");
+ printf("Fault code already set\n");
fixRegs.EDX = pDomRegs->edx;
fixRegs.EDI = pDomRegs->edi;
@@ -650,7 +649,7 @@
hazards &= ~hz::DomRoot;
#if 0
- MsgLog::dprintf(true, "Process root oid=0x%x to ctxt 0x%08x, eip 0x%08x hz 0x%08x\n",
+ dprintf(true, "Process root oid=0x%x to ctxt 0x%08x, eip 0x%08x hz 0x%08x\n",
(uint32_t) procRoot->oid, this, fixRegs.EIP, hazards);
#endif
}
@@ -686,7 +685,7 @@
#if 0
{
Key& k = procRoot->slot[ProcGenKeys];
- MsgLog::printf("Preparing nd oid 0x%08x%08x\n",
+ printf("Preparing nd oid 0x%08x%08x\n",
(uint32_t) (k.GetKeyOid() >> 32),
(uint32_t) (k.GetKeyOid()));
}
@@ -708,7 +707,7 @@
for (uint32_t k = 0; k < EROS_NODE_SIZE; k++) {
if ( (*kn)[k].IsHazard() )
- MsgLog::dprintf(true, "Key register slot %d is hazarded in node 0x%08x%08x\n",
+ dprintf(true, "Key register slot %d is hazarded in node 0x%08x%08x\n",
k,
(uint32_t) (kn->ob.oid >> 32), (uint32_t) kn->ob.oid);
@@ -718,11 +717,11 @@
* but check here just in case:
*/
if ( keyReg[k].IsHazard() )
- MsgLog::dprintf(true, "Key register %d is hazarded in Process 0x%08x\n",
+ dprintf(true, "Key register %d is hazarded in Process 0x%08x\n",
k, this);
if ( keyReg[k].IsUnprepared() == false )
- MsgLog::dprintf(true, "Key register %d is prepared in Process 0x%08x\n",
+ dprintf(true, "Key register %d is prepared in Process 0x%08x\n",
k, this);
#endif
@@ -887,9 +886,9 @@
assert ( keysNode->Validate() );
#if 0
- MsgLog::printf("Flushing key regs on ctxt=0x%08x\n", this);
+ printf("Flushing key regs on ctxt=0x%08x\n", this);
if (inv.IsActive() && inv.invokee == this)
- MsgLog::dprintf(true,"THAT WAS INVOKEE!\n");
+ dprintf(true,"THAT WAS INVOKEE!\n");
#endif
for (uint32_t k = 0; k < EROS_NODE_SIZE; k++) {
@@ -956,15 +955,15 @@
shouldStop = true;
}
- MsgLog::dprintf(shouldStop, "Unloading %s ctxt 0x%08x\n", descrip, this);
+ dprintf(shouldStop, "Unloading %s ctxt 0x%08x\n", descrip, this);
}
#endif
#if 0
if (hazards & hz::DomRoot)
- MsgLog::dprintf(false, "Calling Context::Unload() on 0x%08x, eip=???\n", this);
+ dprintf(false, "Calling Context::Unload() on 0x%08x, eip=???\n", this);
else
- MsgLog::dprintf(false, "Calling Context::Unload() on 0x%08x, eip=0x%08x\n",
+ dprintf(false, "Calling Context::Unload() on 0x%08x, eip=0x%08x\n",
this, fixRegs.EIP);
#endif
@@ -1151,7 +1150,7 @@
= (hazards & (hz::DomRoot | hz::FloatRegs | hz::KeyRegs));
#if 0
- MsgLog::printf("Enter Process::DoPrepare()\n");
+ printf("Enter Process::DoPrepare()\n");
#endif
/* The order in which these are tested is important, because
* sometimes satisfying one condition imposes another (e.g. floating
@@ -1243,7 +1242,7 @@
Registers regs;
#if 0
- MsgLog::dprintf(false, "Fetching register values for InvokeProcessKeeper()\n");
+ dprintf(false, "Fetching register values for InvokeProcessKeeper()\n");
#endif
GetRegs32(regs);
@@ -1252,7 +1251,7 @@
regs.domState = RS_Waiting;
#if 0
- MsgLog::dprintf(false, " ExNo: 0x%08x, Error: 0x%08x Info: 0x%08x FVA 0x%08x\n",
+ dprintf(false, " ExNo: 0x%08x, Error: 0x%08x Info: 0x%08x FVA 0x%08x\n",
fixRegs.ExceptNo,
fixRegs.Error,
faultInfo,
@@ -1342,7 +1341,7 @@
#endif
#if 0
- MsgLog::printf("Fault code set to %d info=0x%x\n", code, info);
+ printf("Fault code set to %d info=0x%x\n", code, info);
#endif
#if 0
@@ -1407,13 +1406,13 @@
Process::SetRegs32(Registers& regs)
{
#if 0
- MsgLog::dprintf(true, "ctxt=0x%08x: Call to SetRegs32\n", this);
+ dprintf(true, "ctxt=0x%08x: Call to SetRegs32\n", this);
#endif
assert (IsRunnable());
if (hazards & hz::DomRoot) {
- MsgLog::dprintf(true, "ctxt=0x%08x: No root regs\n", this);
+ dprintf(true, "ctxt=0x%08x: No root regs\n", this);
return false;
}
@@ -1444,7 +1443,7 @@
fixRegs.GS = regs.GS;
#if 0
- MsgLog::dprintf(true, "SetRegs(): ctxt=0x%08x: EFLAGS now 0x%08x\n", this, fixRegs.EFLAGS);
+ dprintf(true, "SetRegs(): ctxt=0x%08x: EFLAGS now 0x%08x\n", this, fixRegs.EFLAGS);
#endif
NeedRevalidate();
1.51 +8 -9 eros/src/base/sys/arch/i486/kernel/UserContextIPC.cxx
Index: UserContextIPC.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/UserContextIPC.cxx,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- UserContextIPC.cxx 2001/08/08 22:24:31 1.50
+++ UserContextIPC.cxx 2001/11/26 01:05:37 1.51
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/Thread.hxx>
@@ -57,32 +56,32 @@
Process::Resume()
{
#if 0
- MsgLog::printf("Resume user thread 0x%08x\n", thread);
+ printf("Resume user thread 0x%08x\n", thread);
#endif
#ifndef NDEBUG
if ( curThread != Thread::Current() )
- MsgLog::fatal("Context 0x%08x (%d) not for current thread 0x%08x (%d)\n",
+ fatal("Context 0x%08x (%d) not for current thread 0x%08x (%d)\n",
this, this - Process::ContextCache,
Thread::Current(),
Thread::Current() - Thread::ThreadTable);
if ( Thread::CurContext() != this )
- MsgLog::fatal("Thread context 0x%08x not me 0x%08x\n",
+ fatal("Thread context 0x%08x not me 0x%08x\n",
Thread::CurContext(), this);
#endif
#if 0
if (fixRegs.ReloadUnits) {
- MsgLog::printf("Don't know how to reload fpu regs yet\n");
- MsgLog::printf("ctxt = 0x%08x\n", this);
+ printf("Don't know how to reload fpu regs yet\n");
+ printf("ctxt = 0x%08x\n", this);
fixRegs.Dump();
halt();
}
#endif
#if 0
- MsgLog::printf("Resume user thread savearea 0x%08x\n", saveArea);
+ printf("Resume user thread savearea 0x%08x\n", saveArea);
#endif
/* Need to have a valid directory or the machine reboots. It's
@@ -166,12 +165,12 @@
PTE* pte = proc_TranslatePage(p, ula, PTE_V|PTE_USER, writeAccess);
#if 0
- MsgLog::dprintf(true, "Resulting PTE* is 0x%08x\n", pte);
+ dprintf(true, "Resulting PTE* is 0x%08x\n", pte);
#endif
if (pte)
return pte;
}
- MsgLog::fatal("Too many retries\n");
+ fatal("Too many retries\n");
return 0;
}
1.88 +0 -1 eros/src/base/sys/arch/i486/kernel/UserContextInvoke.cxx
Index: UserContextInvoke.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/UserContextInvoke.cxx,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- UserContextInvoke.cxx 2001/06/10 19:41:48 1.87
+++ UserContextInvoke.cxx 2001/11/26 01:05:37 1.88
@@ -20,7 +20,6 @@
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/Node.hxx>
1.70 +0 -2 eros/src/base/sys/ddb/db_command.cxx
Index: db_command.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_command.cxx,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- db_command.cxx 2001/11/14 17:57:06 1.69
+++ db_command.cxx 2001/11/26 01:05:38 1.70
@@ -465,7 +465,6 @@
#endif
extern void db_eros_mesg_allinv_cmd(db_expr_t, int, db_expr_t, char*);
-extern void db_eros_mesg_debug_cmd(db_expr_t, int, db_expr_t, char*);
extern void db_eros_mesg_gate_cmd(db_expr_t, int, db_expr_t, char*);
extern void db_eros_mesg_keyerr_cmd(db_expr_t, int, db_expr_t, char*);
extern void db_eros_mesg_keeper_cmd(db_expr_t, int, db_expr_t, char*);
@@ -478,7 +477,6 @@
struct db_command db_mesg_cmds[] = {
{ "allinv", db_eros_mesg_allinv_cmd, 0, 0 },
- { "debug", db_eros_mesg_debug_cmd, 0, 0 },
{ "gate", db_eros_mesg_gate_cmd, 0, 0 },
{ "keyerr", db_eros_mesg_keyerr_cmd, 0, 0 },
{ "keeper", db_eros_mesg_keeper_cmd, 0, 0 },
1.157 +2 -18 eros/src/base/sys/ddb/db_eros.cxx
Index: db_eros.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_eros.cxx,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- db_eros.cxx 2001/11/14 13:22:03 1.156
+++ db_eros.cxx 2001/11/26 01:05:38 1.157
@@ -31,7 +31,7 @@
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/KernStream.hxx>
#include <kerninc/SymNames.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/IoRequest.hxx>
@@ -242,7 +242,7 @@
for (uint32_t i = 0; i < len; i++) {
uint8_t c = data[i];
- if (IsPrint(c) || c == '\n')
+ if (KernStream::IsPrint(c) || c == '\n')
db_printf("%c", c);
else
db_printf("\\x%02x", c);
@@ -438,20 +438,6 @@
}
#endif
-void
-db_eros_mesg_debug_cmd(db_expr_t /* addr */, int /* have_addr */,
- db_expr_t /* count */, char * /* modif */)
-{
- if (MsgLog::SuppressDebug) {
- MsgLog::SuppressDebug = false;
- db_printf("ddb will NOT stop for kernel dprintf(true, ...)\n");
- }
- else {
- MsgLog::SuppressDebug = true;
- db_printf("ddb will stop for kernel dprintf(true, ...)\n");
- }
-}
-
bool ddb_thread_uqueue_debug = false;
void
db_eros_mesg_uqueue_cmd(db_expr_t /* addr */, int /* have_addr */,
@@ -598,8 +584,6 @@
db_expr_t /* count */, char * /* modif */)
{
db_printf("Stopping on");
- if (MsgLog::SuppressDebug)
- db_printf(" dprintf()");
if(ddb_segwalk_debug)
db_printf(" segwalk");
if (ddb_thread_uqueue_debug)
1.8 +1 -2 eros/src/base/sys/ddb/db_examine.cxx
Index: db_examine.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_examine.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- db_examine.cxx 2001/01/10 13:16:42 1.7
+++ db_examine.cxx 2001/11/26 01:05:38 1.8
@@ -40,7 +40,6 @@
#include <ddb/db_examine.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
char db_examine_format[TOK_STRING_SIZE] = "x";
@@ -89,7 +88,7 @@
int space;
char * fp;
- MsgLog::printf("Examining 0x%08x\n", addr);
+ printf("Examining 0x%08x\n", addr);
while (--count >= 0) {
fp = fmt;
size = 4;
1.6 +3 -51 eros/src/base/sys/ddb/db_input.cxx
Index: db_input.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_input.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- db_input.cxx 2001/10/18 06:47:45 1.5
+++ db_input.cxx 2001/11/26 01:05:38 1.6
@@ -31,15 +31,11 @@
#include <arch-kerninc/db_machdep.hxx>
-#include <kerninc/Console.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/KernStream.hxx>
#include <ddb/db_output.hxx>
#include <ddb/db_command.hxx>
-/* added by MCH */
-#include <eros/i486/io.h>
-
extern int db_inputchar(int c);
extern void db_putchar(int c);
@@ -62,8 +58,8 @@
#define BLANK ' '
#define BACKUP '\b'
-#define cnputc(c) MsgLog::nlputc((c))
-#define cngetc() Console::Get()
+#define cnputc(c) KernStream::nl_putc(c)
+#define cngetc() KernStream::dbg_stream->Get()
int cnmaygetc ()
{
@@ -202,13 +198,6 @@
int
db_readline(char *lstart, int lsize)
{
- /* added by MCH */
- /* MCHTAG */
-#define COMDEBUGINPUT 0
-
- /* note: BOTH is still buggy; see notes below */
-#define BOTH 0
-
char c;
c = c;
/* */
@@ -220,45 +209,8 @@
db_lc = lstart;
db_le = lstart;
- /* modified by MCH */
-#if COMDEBUGINPUT
-#define COMBASE 0x3f8
-
-#if BOTH
- /* attempt to accept input from both COM and keyboard */
- while(1)
- {
- c = 0;
- if(inb(COMBASE + 2) & 0x4) /* has COM received something? */
- {
- c = inb(COMBASE); /* grab char from COM */
- if(db_inputchar(c))
- break;
- else
- continue;
- }
-
- c = cngetc(); /* problem: cngetc() blocks, so loop
- * doesn't continue until key is pressed */
- if(c)
- {
- if(db_inputchar(c))
- break;
- else
- continue;
- }
- }
-#else
- /* ignore keyboard in debugger; use only COM input */
- while ((inb(COMBASE + 2) & 0x4) ? !db_inputchar(inb(COMBASE)) : 1)
- continue;
-#endif
-
-#else /* original code follows */
while(!db_inputchar(cngetc()))
continue;
-#endif
- /* */
db_putchar('\n'); /* synch output position */
db_putchar('\r'); /* synch output position */
1.7 +1 -5 eros/src/base/sys/ddb/db_lex.cxx
Index: db_lex.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_lex.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- db_lex.cxx 2000/11/26 22:18:24 1.6
+++ db_lex.cxx 2001/11/26 01:05:38 1.7
@@ -43,11 +43,7 @@
long long db_tok_number;
#define TOK_STRING_SIZE 120
char db_tok_string[TOK_STRING_SIZE];
-#if 0
-long db_radix = 16;
-#else
-long db_radix = 10;
-#endif
+extern long db_radix;
extern int db_readline(char *lstart, int lsize);
int db_lex();
1.10 +1 -2 eros/src/base/sys/ddb/db_nmhack.cxx
Index: db_nmhack.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_nmhack.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- db_nmhack.cxx 2001/01/10 13:16:42 1.9
+++ db_nmhack.cxx 2001/11/26 01:05:38 1.10
@@ -25,7 +25,6 @@
#include <ddb/db_sym.hxx>
#include <ddb/db_output.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/SymNames.hxx>
/*
@@ -143,7 +142,7 @@
*valuep = 0;
}
- /* MsgLog::printf("sym value \"%s\" @ 0x%08x\n", sn->name, sn->address); */
+ /* printf("sym value \"%s\" @ 0x%08x\n", sn->name, sn->address); */
*namep = sn->name;
*valuep = sn->address;
1.3 +2 -1 eros/src/base/sys/ddb/db_output.hxx
Index: db_output.hxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_output.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- db_output.hxx 1996/10/13 19:32:43 1.2
+++ db_output.hxx 2001/11/26 01:05:38 1.3
@@ -35,4 +35,5 @@
void db_force_whitespace (void);
int db_print_position (void);
void db_end_line (void);
-void db_printf (const char *, ...);
+void printf (const char *, ...);
+#define db_printf printf
1.8 +6 -6 eros/src/base/sys/ddb/db_run.cxx
Index: db_run.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_run.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- db_run.cxx 2001/06/20 17:01:11 1.7
+++ db_run.cxx 2001/11/26 01:05:38 1.8
@@ -70,7 +70,7 @@
register db_breakpoint_t bkpt;
#ifdef DB_DEBUG
- MsgLog::printf("stop at pc 0x%08x, is_bpt='%c'\n",
+ printf("stop at pc 0x%08x, is_bpt='%c'\n",
PC_REGS(regs), (*is_breakpoint ? 'y' : 'n'));
#endif
@@ -90,7 +90,7 @@
FIXUP_PC_AFTER_BREAK
pc = PC_REGS(regs);
#ifdef DB_DEBUG
- MsgLog::printf("Fixup bpt pc to 0x%08x\n", pc);
+ printf("Fixup bpt pc to 0x%08x\n", pc);
#endif
}
#endif
@@ -101,7 +101,7 @@
bkpt = db_find_breakpoint_here(pc);
if (bkpt) {
#ifdef DB_DEBUG
- MsgLog::printf("Really a bpt here\n");
+ printf("Really a bpt here\n");
#endif
if (--bkpt->count == 0) {
bkpt->count = bkpt->init_count;
@@ -112,7 +112,7 @@
PC_REGS(regs) += BKPT_SIZE;
pc = PC_REGS(regs);
#ifdef DB_DEBUG
- MsgLog::printf("Adjust pc to point past bpt, pc to 0x%08x\n", pc);
+ printf("Adjust pc to point past bpt, pc to 0x%08x\n", pc);
#endif
}
@@ -210,7 +210,7 @@
* Step over breakpoint/watchpoint.
*/
#ifdef DB_DEBUG
- MsgLog::printf("stepping over bpt @ 0x%08x\n", pc);
+ printf("stepping over bpt @ 0x%08x\n", pc);
#endif
db_run_mode = STEP_INVISIBLE;
db_set_single_step(regs);
@@ -222,7 +222,7 @@
}
} else {
#ifdef DB_DEBUG
- MsgLog::printf("db_restart setting single step bit, pc 0x%08x\n",
+ printf("db_restart setting single step bit, pc 0x%08x\n",
PC_REGS(regs));
#endif
db_set_single_step(regs);
1.7 +3 -3 eros/src/base/sys/ddb/db_sym.cxx
Index: db_sym.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/ddb/db_sym.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- db_sym.cxx 2001/01/08 20:57:51 1.6
+++ db_sym.cxx 2001/11/26 01:05:38 1.7
@@ -28,7 +28,7 @@
#include <arch-kerninc/db_machdep.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/util.h>
#include <ddb/db_sym.hxx>
#include <ddb/db_command.hxx>
@@ -106,7 +106,7 @@
break;
}
if (slot >= MAXNOSYMTABS) {
- MsgLog::printf ("No slots left for %s symbol table", name);
+ printf ("No slots left for %s symbol table", name);
return(-1);
}
@@ -132,7 +132,7 @@
break;
}
if (slot >= MAXNOSYMTABS) {
- MsgLog::printf ("Unable to find symbol table slot for %s.", name);
+ printf ("Unable to find symbol table slot for %s.", name);
return;
}
1.19 +4 -5 eros/src/base/sys/kernel/kern_AutoConf.cxx
Index: kern_AutoConf.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_AutoConf.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- kern_AutoConf.cxx 1999/10/13 22:43:50 1.18
+++ kern_AutoConf.cxx 2001/11/26 01:05:38 1.19
@@ -20,24 +20,23 @@
#include <kerninc/kernel.hxx>
#include <kerninc/AutoConf.hxx>
-#include <kerninc/MsgLog.hxx>
void AutoConf::Configure()
{
- MsgLog::printf("Probing devices...\n");
+ printf("Probing devices...\n");
for (uint32_t i = 0; i < AutoConf::MaxConfig; i++) {
#ifdef CONFIGDEBUG
- MsgLog::dprintf(true, "Probing %s\n", ConfigTable[i]->name);
+ dprintf(true, "Probing %s\n", ConfigTable[i]->name);
#endif
if (ConfigTable[i].driver->probe(&ConfigTable[i])) {
#ifdef CONFIGDEBUG
- MsgLog::dprintf(true, "Attaching %s\n", ConfigTable[i]->name);
+ dprintf(true, "Attaching %s\n", ConfigTable[i]->name);
#endif
ConfigTable[i].driver->attach(&ConfigTable[i]);
}
}
- MsgLog::printf("Autoconf complete!\n");
+ printf("Autoconf complete!\n");
}
1.31 +15 -21 eros/src/base/sys/kernel/kern_Check.cxx
Index: kern_Check.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Check.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- kern_Check.cxx 2001/11/20 04:25:38 1.30
+++ kern_Check.cxx 2001/11/26 01:05:38 1.31
@@ -21,11 +21,9 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/IRQ.hxx>
-#include <kerninc/MsgLog.hxx>
void
Check::Consistency(const char *msg)
@@ -60,17 +58,17 @@
KernThread* kt = (KernThread *) Thread::Current();
if ((uint32_t) &msg < (uint32_t) kt->procContext.stackBottom)
- MsgLog::fatal("Kernel stack overflow\n");
+ fatal("Kernel stack overflow\n");
if ((uint32_t) &msg >= (uint32_t) kt->procContext.stackTop)
- MsgLog::fatal("Kernel stack underflow\n");
+ fatal("Kernel stack underflow\n");
}
else {
if ((uint32_t) &msg < (uint32_t) &InterruptStackLimit)
- MsgLog::fatal("User stack overflow\n");
+ fatal("User stack overflow\n");
if ((uint32_t) &msg >= (uint32_t) &InterruptStackTop)
- MsgLog::fatal("User stack underflow\n");
+ fatal("User stack underflow\n");
}
#endif
@@ -79,7 +77,7 @@
|| !Check::Nodes()
|| !Check::Contexts("from checkcnsist")
)
- MsgLog::fatal("ChkConsistency() fails:\n"
+ fatal("ChkConsistency() fails:\n"
"\twhere: %s\n"
"\tlast: %s\n",
msg, lastMsg);
@@ -94,9 +92,7 @@
IRQ::DISABLE();
for (uint32_t nd = 0; nd < ObjectCache::NumCoreNodeFrames(); nd++) {
- Console::Twiddle(7);
-
- /* MsgLog::printf("CheckNode(%d)\n", frame); */
+ /* printf("CheckNode(%d)\n", frame); */
Node *pNode = ObjectCache::GetCoreNodeFrame(nd);
if (pNode->Validate() == false)
@@ -119,9 +115,7 @@
IRQ::DISABLE();
for (uint32_t pg = 0; pg < ObjectCache::NumCorePageFrames(); pg++) {
- Console::Twiddle(7);
-
- /* MsgLog::printf("CheckPage(%d)\n", frame); */
+ /* printf("CheckPage(%d)\n", frame); */
ObjectHeader *pPage = ObjectCache::GetCorePageFrame(pg);
if (pPage->IsFree())
@@ -141,14 +135,14 @@
if (!pPage->GetFlags(OFLG_DIRTY)) {
assert (pPage->GetFlags(OFLG_DIRTY) == 0);
if (pPage->GetFlags(OFLG_REDIRTY))
- MsgLog::printf("Frame %d ty=%d, flg=0x%02x redirty but not dirty!!\n",
+ printf("Frame %d ty=%d, flg=0x%02x redirty but not dirty!!\n",
pg, pPage->obType, pPage->flags);
assert (pPage->GetFlags(OFLG_DIRTY) == 0);
uint32_t chk = pPage->CalcCheck();
if (pPage->GetFlags(OFLG_DIRTY) != 0)
- MsgLog::printf("Frame %d Chk=0x%x CalcCheck=0x%x flgs=0x%02x ty=%d on pgHdr 0x%08x\n",
+ printf("Frame %d Chk=0x%x CalcCheck=0x%x flgs=0x%02x ty=%d on pgHdr 0x%08x\n",
pg, pPage->ob.check, chk, pPage->flags,
pPage->obType, pPage);
@@ -156,11 +150,11 @@
assert (pPage->GetFlags(OFLG_DIRTY) == 0);
if ( pPage->ob.check != chk ) {
- MsgLog::printf("Frame %d Chk=0x%x CalcCheck=0x%x flgs=0x%02x ty=%d on pg ",
+ printf("Frame %d Chk=0x%x CalcCheck=0x%x flgs=0x%02x ty=%d on pg ",
pg, pPage->ob.check, chk, pPage->flags, pPage->obType);
- MsgLog::print(pPage->ob.oid);
- MsgLog::printf("\n");
- MsgLog::printf(" pPage 0x%08x dirty: %c reDirty: %c\n",
+ printOid(pPage->ob.oid);
+ printf("\n");
+ printf(" pPage 0x%08x dirty: %c reDirty: %c\n",
pPage,
(pPage->GetFlags(OFLG_DIRTY) ? 'y' : 'n'),
(pPage->GetFlags(OFLG_REDIRTY) ? 'y' : 'n'));
@@ -209,7 +203,7 @@
ObjectHeader *thePageHdr = ObjectCache::PhysPageToObHdr(pageFrame);
if (thePageHdr->GetFlags(OFLG_CKPT)) {
- MsgLog::printf("Writable PTE=0x%08x (map page 0x%08x), ckpt pg"
+ printf("Writable PTE=0x%08x (map page 0x%08x), ckpt pg"
" 0x%08x%08x\n",
thePTE.AsWord(), pte,
(uint32_t) (thePageHdr->ob.oid >> 32),
@@ -218,7 +212,7 @@
return false;
}
if (!thePageHdr->IsDirty()) {
- MsgLog::printf("Writable PTE=0x%08x (map page 0x%08x), clean pg"
+ printf("Writable PTE=0x%08x (map page 0x%08x), clean pg"
" 0x%08x%08x\n",
thePTE.AsWord(), pte,
(uint32_t) (thePageHdr->ob.oid >> 32),
1.61 +3 -7 eros/src/base/sys/kernel/kern_Checker.cxx
Index: kern_Checker.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Checker.cxx,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- kern_Checker.cxx 2001/01/08 20:57:51 1.60
+++ kern_Checker.cxx 2001/11/26 01:05:38 1.61
@@ -30,8 +30,6 @@
#include <kerninc/AutoConf.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Node.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/IRQ.hxx>
static bool Probe(AutoConf *);
@@ -87,7 +85,7 @@
{
TheCheckThread.Wakeup(); /* let it initialize itself... */
- MsgLog::printf("%s (no vector)\n", ac->name);
+ printf("%s (no vector)\n", ac->name);
return true;
}
@@ -102,7 +100,7 @@
CheckThread::Start()
{
int stack;
- MsgLog::printf("Start CheckThread (thread 0x%x,context 0x%x,stack 0x%x)\n",
+ printf("Start CheckThread (thread 0x%x,context 0x%x,stack 0x%x)\n",
&TheCheckThread, TheCheckThread.context, &stack);
for(;;) {
@@ -122,15 +120,13 @@
IRQ::DISABLE();
TheCheckThread.WakeUpIn(DELAY);
- /* MsgLog::printf("Checkthread pass %d state %d\n", pass, Thread::state); */
+ /* printf("Checkthread pass %d state %d\n", pass, Thread::state); */
assert(TheCheckThread.state == Thread::Running);
TheCheckThread.SleepOn(IdlePile);
IRQ::ENABLE();
TheCheckThread.DirectedYield();
-
- Console::Twiddle(2);
}
/* We will never wake up again... */
1.30 +0 -1 eros/src/base/sys/kernel/kern_Context.cxx
Index: kern_Context.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Context.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- kern_Context.cxx 2001/01/10 13:16:42 1.29
+++ kern_Context.cxx 2001/11/26 01:05:38 1.30
@@ -24,7 +24,6 @@
#include <kerninc/ObjectHeader.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Node.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/util.h>
/* Note protected constructor!! */
1.45 +14 -15 eros/src/base/sys/kernel/kern_CoreObHash.cxx
Index: kern_CoreObHash.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_CoreObHash.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- kern_CoreObHash.cxx 2001/07/25 04:50:08 1.44
+++ kern_CoreObHash.cxx 2001/11/26 01:05:38 1.45
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/ObjectHeader.hxx>
@@ -63,14 +62,14 @@
extern void db_printf(const char *fmt, ...);
#ifdef OPTION_KERN_STATS
- db_printf("Usage counts for object buckets:\n");
+ printf("Usage counts for object buckets:\n");
for (uint32_t i = 0; i < KTUNE_NOBBUCKETS; i++)
- db_printf("Bucket %d: uses 0x%08x%08x\n", i,
+ printf("Bucket %d: uses 0x%08x%08x\n", i,
(uint32_t) (useCount[i]>>32),
(uint32_t) (useCount[i])
);
#else
- db_printf("No kernel usage statistics collected\n");
+ printf("No kernel usage statistics collected\n");
#endif
}
@@ -84,7 +83,7 @@
for (i = 0, ob = ObBucket[bucket];
ob->hashChainNext; ob = ob->hashChainNext, i++) {
- db_printf("%3x ", i);
+ printf("%3x ", i);
ob->ddb_dump();
}
}
@@ -99,7 +98,7 @@
uint32_t ndx = bucket_ndx(ob.oid);
#ifdef OBHASHDEBUG
- MsgLog::printf("Interning obhdr 0x%08x\n", this);
+ printf("Interning obhdr 0x%08x\n", this);
#endif
assert(ObBucket[ndx] != this);
@@ -144,9 +143,9 @@
ObjectHeader::Lookup(ObType::Type ty, OID oid)
{
#ifdef OBHASHDEBUG
- MsgLog::printf("Lookup ty=%d oid=", ty);
- MsgLog::print(oid);
- MsgLog::printf("\n");
+ printf("Lookup ty=%d oid=", ty);
+ print(oid);
+ printf("\n");
#endif
uint32_t ndx = bucket_ndx(oid);
@@ -155,9 +154,9 @@
for (pOb = ObBucket[ndx]; pOb; pOb = pOb->hashChainNext) {
#ifdef OBHASHDEBUG
- MsgLog::printf("ObHdr is 0x%08x ty %d oid is ", pOb, pOb->obType);
- MsgLog::print(pOb->ob.oid);
- MsgLog::printf("\n", pOb);
+ printf("ObHdr is 0x%08x ty %d oid is ", pOb, pOb->obType);
+ print(pOb->ob.oid);
+ printf("\n", pOb);
#endif
if (pOb->ob.oid != oid)
@@ -185,21 +184,21 @@
pOb->age = Age::NewBorn;
#endif
#if 0
- MsgLog::dprintf(true, "Rejuvenate oid 0x%08x%08x\n",
+ dprintf(true, "Rejuvenate oid 0x%08x%08x\n",
(uint32_t) (oid>>32),
(uint32_t) oid);
#endif
pOb->age = Age::NewBorn;
#ifdef OBHASHDEBUG
- MsgLog::printf("Found it\n");
+ printf("Found it\n");
#endif
return pOb;
}
}
#ifdef OBHASHDEBUG
- MsgLog::printf("Not found\n");
+ printf("Not found\n");
#endif
return 0;
}
1.22 +0 -1 eros/src/base/sys/kernel/kern_CoreObSleep.cxx
Index: kern_CoreObSleep.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_CoreObSleep.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- kern_CoreObSleep.cxx 2001/01/08 20:57:51 1.21
+++ kern_CoreObSleep.cxx 2001/11/26 01:05:38 1.22
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/ObjectHeader.hxx>
#include <kerninc/Thread.hxx>
1.18 +4 -4 eros/src/base/sys/kernel/kern_CoreObject.cxx
Index: kern_CoreObject.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_CoreObject.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- kern_CoreObject.cxx 2001/01/10 13:16:42 1.17
+++ kern_CoreObject.cxx 2001/11/26 01:05:38 1.18
@@ -39,7 +39,7 @@
CoreObject::reset()
{
#ifdef LOCKDEBUG
- MsgLog::printf("Reset CTE 0x%x\n", this);
+ printf("Reset CTE 0x%x\n", this);
#endif
bzero(this, sizeof(CoreObject));
}
@@ -78,7 +78,7 @@
{
int r = ((flags & FlLocked) != 0);
#ifdef LOCKDEBUG
- MsgLog::printf("CTE 0x%x is locked.\n", this);
+ printf("CTE 0x%x is locked.\n", this);
#endif
return r;
}
@@ -104,7 +104,7 @@
Machine::splx(cpl);
#ifdef LOCKDEBUG
- MsgLog::printf("Locked CTE 0x%x\n", this);
+ printf("Locked CTE 0x%x\n", this);
#endif
return result;
@@ -119,7 +119,7 @@
Machine::splx(cpl);
#ifdef LOCKDEBUG
- MsgLog::printf("Unlocked CTE 0x%x\n", this);
+ printf("Unlocked CTE 0x%x\n", this);
#endif
}
1.31 +6 -7 eros/src/base/sys/kernel/kern_CpuReserve.cxx
Index: kern_CpuReserve.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_CpuReserve.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- kern_CpuReserve.cxx 2001/11/14 13:22:03 1.30
+++ kern_CpuReserve.cxx 2001/11/26 01:05:38 1.31
@@ -26,7 +26,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/PhysMem.hxx>
#include <arch-kerninc/KernTune.hxx>
@@ -75,13 +74,13 @@
void
CpuReserve::OnQuantaExpiration()
{
- /* MsgLog::dprintf(false, "Quanta expired on cpu reserve 0x%08x\n", this); */
+ /* dprintf(false, "Quanta expired on cpu reserve 0x%08x\n", this); */
Thread::Current()->Preempt();
#if 0
if (!Thread::Current()->CAN_PREEMPT()) {
- MsgLog::printf("CpuReserve::OnQuantaExpiration(): 0x%08x Quanta expires in NOPREEMPT, state %d.\n",
+ printf("CpuReserve::OnQuantaExpiration(): 0x%08x Quanta expires in NOPREEMPT, state %d.\n",
Thread::Current(), Thread::Current()->state);
}
#endif
@@ -123,7 +122,7 @@
void
CpuReserve::Deplenish()
{
- /* MsgLog::dprintf(false, "Deplenishing CpuReserve 0x%08x\n", this); */
+ /* dprintf(false, "Deplenishing CpuReserve 0x%08x\n", this); */
active = false;
@@ -133,7 +132,7 @@
void
CpuReserve::Replenish()
{
- /* MsgLog::dprintf(false, "Replenishing CpuReserve 0x%08x\n", this); */
+ /* dprintf(false, "Replenishing CpuReserve 0x%08x\n", this); */
/* If a thread under this reserve happens to be currently running,
* it gets an extra boost via quanta extension.
@@ -221,7 +220,7 @@
#if 0
if (t->IsUser())
- MsgLog::dprintf(true, "Add user thrd 0x%08x to rsrv 0x%08x\n", t,
+ dprintf(true, "Add user thrd 0x%08x to rsrv 0x%08x\n", t,
this);
else {
assert (reserveLinkage.next == 0);
@@ -251,7 +250,7 @@
CpuReserveTable[i].AdjustCurPrio(i);
}
- MsgLog::printf("Allocated CPU Reserves: 0x%x at 0x%08x\n",
+ printf("Allocated CPU Reserves: 0x%x at 0x%08x\n",
sizeof(CpuReserve[MAX_CPU_RESERVE]), CpuReserveTable);
}
1.65 +22 -23 eros/src/base/sys/kernel/kern_Depend.cxx
Index: kern_Depend.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Depend.cxx,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- kern_Depend.cxx 2001/11/20 03:22:52 1.64
+++ kern_Depend.cxx 2001/11/26 01:05:39 1.65
@@ -25,7 +25,6 @@
#include <kerninc/Depend.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/ObjectCache.hxx>
@@ -89,13 +88,13 @@
KeyDependStats = new (0) uint64_t[KeyBuckets];
DEBUG(alloc)
- MsgLog::printf("Allocated KeyDependLRU: 0x%x at 0x%08x\n",
+ printf("Allocated KeyDependLRU: 0x%x at 0x%08x\n",
sizeof(uint32_t[KeyBuckets]), KeyDependLRU);
KeyDependTable = new (0) KeyDependEntry[nEntries];
DEBUG(alloc)
- MsgLog::printf("Allocated KeyDependTable: 0x%x at 0x%08x\n",
+ printf("Allocated KeyDependTable: 0x%x at 0x%08x\n",
sizeof(KeyDependEntry[nEntries]), KeyDependTable);
}
@@ -118,13 +117,13 @@
bool reallyAllowMerge = pMappingPage ? true : false;
if (reallyAllowMerge != allowMerge)
- MsgLog::fatal("pPTE=0x%08x pObj=0x%08x -- merge bug!\n", pte, pMappingPage);
+ fatal("pPTE=0x%08x pObj=0x%08x -- merge bug!\n", pte, pMappingPage);
#endif
assert(reallyAllowMerge == allowMerge);
#ifdef DEPEND_DEBUG
- MsgLog::printf("Add slot depend entry for slot=0x%08x pte=0x%08x: ",
+ printf("Add slot depend entry for slot=0x%08x pte=0x%08x: ",
pKey, pte);
#endif
@@ -157,7 +156,7 @@
/* otherwise falls within existing range -- do nothing */
#ifdef DEPEND_DEBUG
- MsgLog::printf("merged\n");
+ printf("merged\n");
#endif
#ifdef DBG_WILD_PTR
if (dbg_wild_ptr)
@@ -168,7 +167,7 @@
}
}
#ifdef DEPEND_DEBUG
- MsgLog::printf("new\n");
+ printf("new\n");
#endif
#ifdef DBG_WILD_PTR
@@ -195,7 +194,7 @@
DEBUG(reuse)
if (entry->start)
- MsgLog::dprintf(true, "Reusing depend entry at 0x%08x\n"
+ dprintf(true, "Reusing depend entry at 0x%08x\n"
"start = 0x%08x count= 0x%08x\n",
entry, entry->start, entry->pteCount);
@@ -231,7 +230,7 @@
KernStats.nDepInval++;
#ifdef DEPEND_DEBUG
- MsgLog::printf("Invalidating key entries start=0x%08x, count=%d\n",
+ printf("Invalidating key entries start=0x%08x, count=%d\n",
kde->start, kde->pteCount);
#endif
@@ -271,7 +270,7 @@
to = min(to, (UMSGTOP >> 22));
#if 0
- MsgLog::printf("Invalidating PTE (hdr 0x%08x) from 0x%08x to 0x%08x\n",
+ printf("Invalidating PTE (hdr 0x%08x) from 0x%08x to 0x%08x\n",
pMappingPage, &ptePage[from], &ptePage[to]);
#endif
@@ -301,7 +300,7 @@
*/
for (uint32_t i = (UMSGTOP >> 22); i < (KVA >> 22); i++) {
if (ptePage[i] != kpgdir[i])
- MsgLog::dprintf(true,
+ dprintf(true,
"uPDE 0x%08x (at 0x%08x) != "
"kPDE 0x%08x (at 0x%08x) uObHdr 0x%08x\n",
ptePage[i].w_value, ptePage + i,
@@ -324,7 +323,7 @@
bool didZap = false;
#ifdef DEPEND_DEBUG
- MsgLog::printf("Invalidating depend entries for key=0x%08x\n", pKey);
+ printf("Invalidating depend entries for key=0x%08x\n", pKey);
#endif
uint32_t whichBucket = keybucket_ndx(pKey);
@@ -345,7 +344,7 @@
#ifdef DBG_WILD_PTR
if (dbg_wild_ptr) {
if (Check::Contexts("after zap") == false) {
- MsgLog::printf("Depend start 0x%08x, count 0x%x\n",
+ printf("Depend start 0x%08x, count 0x%x\n",
bucket[i].start, bucket[i].pteCount);
halt('b');
}
@@ -366,11 +365,11 @@
{
extern void db_printf(const char *fmt, ...);
- db_printf("Usage counts for depend buckets:\n");
+ printf("Usage counts for depend buckets:\n");
for (uint32_t i = 0; i < KeyBuckets; i++)
- db_printf("Bucket %d: uses 0x%08x%08x\n", i,
- (uint32_t) (KeyDependStats[i]>>32),
- (uint32_t) (KeyDependStats[i]));
+ printf("Bucket %d: uses 0x%08x%08x\n", i,
+ (uint32_t) (KeyDependStats[i]>>32),
+ (uint32_t) (KeyDependStats[i]));
}
void
@@ -379,7 +378,7 @@
extern void db_printf(const char *fmt, ...);
if (ndx >= KeyBuckets) {
- db_printf("No such bucket.\n");
+ printf("No such bucket.\n");
}
else {
KeyDependEntry* bucket
@@ -387,11 +386,11 @@
for (uint32_t i = 0; i < KeyBucketSize; i++) {
if (bucket[i].start)
- db_printf("%3d: PTE=0x%08x count=%4d tag=0x%x\n",
- i,
- bucket[i].start,
- bucket[i].pteCount,
- bucket[i].slotTag);
+ printf("%3d: PTE=0x%08x count=%4d tag=0x%x\n",
+ i,
+ bucket[i].start,
+ bucket[i].pteCount,
+ bucket[i].slotTag);
}
}
}
1.26 +0 -1 eros/src/base/sys/kernel/kern_IRQ.cxx
Index: kern_IRQ.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_IRQ.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- kern_IRQ.cxx 2001/06/18 18:51:10 1.25
+++ kern_IRQ.cxx 2001/11/26 01:05:39 1.26
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Task.hxx>
1.38 +2 -4 eros/src/base/sys/kernel/kern_IdleThread.cxx
Index: kern_IdleThread.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_IdleThread.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- kern_IdleThread.cxx 2001/01/08 20:57:51 1.37
+++ kern_IdleThread.cxx 2001/11/26 01:05:39 1.38
@@ -22,8 +22,6 @@
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
#include <kerninc/AutoConf.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/Machine.hxx>
static bool Probe(AutoConf *);
@@ -69,7 +67,7 @@
{
TheIdleThread.Wakeup(); /* let it initialize itself... */
- MsgLog::printf("%s (no vector)\n", ac->name);
+ printf("%s (no vector)\n", ac->name);
return true;
}
@@ -80,7 +78,7 @@
IdleThread::Start()
{
int stack;
- MsgLog::printf("Start IdleThread (thread 0x%x,context 0x%x,stack 0x%x)\n",
+ printf("Start IdleThread (thread 0x%x,context 0x%x,stack 0x%x)\n",
&TheIdleThread, TheIdleThread.context, &stack);
for(;;) {
1.226 +64 -65 eros/src/base/sys/kernel/kern_Invoke.cxx
Index: kern_Invoke.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Invoke.cxx,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -r1.225 -r1.226
--- kern_Invoke.cxx 2001/11/14 13:22:03 1.225
+++ kern_Invoke.cxx 2001/11/26 01:05:39 1.226
@@ -21,7 +21,6 @@
/* Driver for key invocation */
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Check.hxx>
@@ -64,14 +63,14 @@
UnknownKey(Invocation& inv)
{
inv.key->Print();
- MsgLog::fatal("Invocation of unknown primary key type 0x%x\n",
+ fatal("Invocation of unknown primary key type 0x%x\n",
inv.key->GetType());
}
static void
UnimplementedKey(Invocation& inv)
{
- MsgLog::fatal("Invocation of unimplemented primary key type 0x%x\n",
+ fatal("Invocation of unimplemented primary key type 0x%x\n",
inv.key->GetType());
}
@@ -394,7 +393,7 @@
#ifndef NDEBUG
if (!kr.IsValid(this))
- MsgLog::dprintf(true, "Key ring screwed up\n");
+ fatal("Key ring screwed up\n");
#endif
/* not hazarded because it is an invocation key */
@@ -408,25 +407,25 @@
kr.prev = (KeyRing*) &resumeKey;
resumeKey.gk.prev->next = (KeyRing *) &resumeKey;
#if 0
- MsgLog::printf("Dumping key ring (context=0x%08x, resumeKey=0x%08x):\n"
+ printf("Dumping key ring (context=0x%08x, resumeKey=0x%08x):\n"
"kr.prev=0x%08x kr.next=0x%08x\n",
this, &resumeKey, kr.prev, kr.next);
KeyRing *pkr=kr.prev;
int count=0;
while (pkr!=&kr)
{
- MsgLog::printf("pkr->prev=0x%08x pkr->next=0x%08x\n",
+ printf("pkr->prev=0x%08x pkr->next=0x%08x\n",
pkr->prev, pkr->next);
((Key *)pkr)->Print();
pkr=pkr->prev;
count++;
}
if (count>1)
- MsgLog::dprintf(true, "Multiple keys in key ring\n");
+ dprintf(true, "Multiple keys in key ring\n");
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Crafted resume key\n");
+ dprintf(GATEDEBUG>2, "Crafted resume key\n");
#endif
}
@@ -630,7 +629,7 @@
Thread::Current()->MigrateTo(inv.invokee);
#ifdef OPTION_DDB
if (inv.invokee->cpuReserve == &CpuReserve::InactiveReserve)
- MsgLog::dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
+ dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
inv.invokee);
#endif
}
@@ -711,7 +710,7 @@
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Populated entry block\n");
+ dprintf(true, "Populated entry block\n");
#endif
assert(inv.key->IsPrepared());
@@ -785,7 +784,7 @@
&& inv.key->IsReadOnly() == false
&& inv.key->IsNoCall() == false
&& inv.key->IsWeak() == false ) {
- /* MsgLog::dprintf(false, "It's a red segment key\n"); */
+ /* dprintf(false, "It's a red segment key\n"); */
Node *redSegNode = (Node *) inv.key->GetObjectPtr();
Key& fmtKey = redSegNode->slot[RedSegFormat];
@@ -823,10 +822,10 @@
inv.entry.w1 = fmtKey.nk.value[1];
}
else
- MsgLog::dprintf(true, "Keeper not gate key or no keeper\n");
+ dprintf(true, "Keeper not gate key or no keeper\n");
}
else
- MsgLog::dprintf(true, "Format key is bad\n");
+ dprintf(true, "Format key is bad\n");
}
#endif
@@ -859,13 +858,13 @@
inv.invokee = this;
inv.entry.key[3] = &Key::VoidKey;
#ifndef NDEBUG
- MsgLog::printf("Jumpee malformed\n");
+ printf("Jumpee malformed\n");
#endif
}
#ifndef NDEBUG
else if (inv.keyType == KT_Resume &&
p->runState != RS_Waiting) {
- MsgLog::fatal("Resume key to wrong-state context\n");
+ fatal("Resume key to wrong-state context\n");
}
#endif
else if (inv.keyType == KT_Start && p->runState != RS_Available) {
@@ -959,7 +958,7 @@
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>3, "Checked for well-formed recipient\n");
+ dprintf(GATEDEBUG>3, "Checked for well-formed recipient\n");
#endif
if (inv.invokee && inv.invokee->IsWellFormed() == false)
@@ -968,7 +967,7 @@
assert(inv.key->IsPrepared());
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Invokee now valid\n");
+ dprintf(GATEDEBUG>2, "Invokee now valid\n");
#endif
assert(inv.invokee == 0 || inv.invokee->IsRunnable());
@@ -983,12 +982,12 @@
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Populated exit block\n");
+ dprintf(GATEDEBUG>2, "Populated exit block\n");
#endif
#ifdef GATEDEBUG
if (inv.suppressXfer)
- MsgLog::dprintf(true, "xfer is suppressed\n");
+ dprintf(true, "xfer is suppressed\n");
#endif
/* Identify the thread that will migrate to the recipient. Normally
@@ -1016,7 +1015,7 @@
threadToRelease = threadToMigrate;
threadToMigrate->state = Thread::Ready;
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Built new thread for fork\n");
+ dprintf(true, "Built new thread for fork\n");
#endif
}
else
@@ -1043,7 +1042,7 @@
( (processFlags & PF_DDB) ||
(inv.invokee && inv.invokee->processFlags & PF_DDB) ))
)
- MsgLog::dprintf(true, "About to invoke key handler (inv.ty=%d) ic=%d\n",
+ dprintf(true, "About to invoke key handler (inv.ty=%d) ic=%d\n",
inv.keyType, KernStats.nInvoke);
#endif
@@ -1092,7 +1091,7 @@
(inv.keyType != KT_Returner) &&
(inv.keyType != KT_Void) &&
(inv.exit.code != RC_OK) ) )
- MsgLog::dprintf(true, "Before DeliverResult() (invokee=0x%08x)\n",
+ dprintf(true, "Before DeliverResult() (invokee=0x%08x)\n",
inv.invokee);
#endif
@@ -1137,11 +1136,11 @@
/* Clean up the invocation block: */
inv.Cleanup();
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
+ dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Updated invokee runstate\n");
+ dprintf(GATEDEBUG>2, "Updated invokee runstate\n");
#endif
if (threadToMigrate) {
@@ -1149,21 +1148,21 @@
#ifdef OPTION_DDB
if (inv.invokee->cpuReserve == &CpuReserve::InactiveReserve)
- MsgLog::dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
+ dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
inv.invokee);
#endif
if (inv.invType == IT_Send && inv.invokee) {
threadToMigrate->Wakeup();
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Woke up forkee\n");
+ dprintf(true, "Woke up forkee\n");
#endif
}
}
if (wakeRoot) {
#if 0
- MsgLog::dprintf(false, "Wake up all of the losers sleeping on dr=0x%08x\n", wakeRoot);
+ dprintf(false, "Wake up all of the losers sleeping on dr=0x%08x\n", wakeRoot);
#endif
wakeRoot->stallQ.WakeAll();
}
@@ -1176,11 +1175,11 @@
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Migrated the thread\n");
+ dprintf(GATEDEBUG>2, "Migrated the thread\n");
#else
#if 0
if ( invoked_gate_key )
- MsgLog::dprintf(true, "Migrated the thread\n");
+ dprintf(true, "Migrated the thread\n");
#endif
#endif
@@ -1243,13 +1242,13 @@
AdjustInvocationPC();
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Reset gate PC\n");
+ dprintf(GATEDEBUG>2, "Reset gate PC\n");
#endif
threadToRelease = 0;
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>3, "Built recovery block\n");
+ dprintf(GATEDEBUG>3, "Built recovery block\n");
#endif
#ifdef DBG_WILD_PTR
@@ -1264,7 +1263,7 @@
SetupEntryBlock(inv);
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Populated entry block\n");
+ dprintf(true, "Populated entry block\n");
#endif
assert(inv.key->IsPrepared());
@@ -1288,7 +1287,7 @@
&& inv.key->IsReadOnly() == false
&& inv.key->IsNoCall() == false
&& inv.key->IsWeak() == false ) {
- /* MsgLog::dprintf(false, "It's a red segment key\n"); */
+ /* dprintf(false, "It's a red segment key\n"); */
Node *redSegNode = (Node *) inv.key->GetObjectPtr();
Key& fmtKey = redSegNode->slot[RedSegFormat];
@@ -1327,10 +1326,10 @@
inv.entry.w2 = fmtKey.nk.value[2];
}
else
- MsgLog::dprintf(true, "Keeper not gate key or no keeper\n");
+ dprintf(true, "Keeper not gate key or no keeper\n");
}
else
- MsgLog::dprintf(true, "Format key is bad\n");
+ dprintf(true, "Format key is bad\n");
}
assert(inv.key->IsPrepared());
@@ -1364,13 +1363,13 @@
inv.invokee = this;
inv.entry.key[3] = &Key::VoidKey;
#ifndef NDEBUG
- MsgLog::printf("Jumpee malformed\n");
+ printf("Jumpee malformed\n");
#endif
}
#ifndef NDEBUG
else if (inv.keyType == KT_Resume &&
p->runState != RS_Waiting) {
- MsgLog::fatal("Resume key to wrong-state context\n");
+ fatal("Resume key to wrong-state context\n");
}
#endif
else if (inv.keyType == KT_Start &&
@@ -1454,7 +1453,7 @@
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>3, "Checked for well-formed recipient\n");
+ dprintf(GATEDEBUG>3, "Checked for well-formed recipient\n");
#endif
if (inv.invokee && inv.invokee->IsWellFormed() == false)
@@ -1463,7 +1462,7 @@
assert(inv.key->IsPrepared());
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Invokee now valid\n");
+ dprintf(GATEDEBUG>2, "Invokee now valid\n");
#endif
assert(inv.invokee == 0 || inv.invokee->IsRunnable());
@@ -1474,12 +1473,12 @@
inv.invokee->SetupExitBlock(inv);
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Populated exit block\n");
+ dprintf(GATEDEBUG>2, "Populated exit block\n");
#endif
#ifdef GATEDEBUG
if (inv.suppressXfer)
- MsgLog::dprintf(true, "xfer is suppressed\n");
+ dprintf(true, "xfer is suppressed\n");
#endif
/* Identify the thread that will migrate to the recipient. Normally
@@ -1495,7 +1494,7 @@
threadToRelease = threadToMigrate;
threadToMigrate->state = Thread::Ready;
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Built new thread for fork\n");
+ dprintf(true, "Built new thread for fork\n");
#endif
}
else
@@ -1516,7 +1515,7 @@
if ( ddb_inv_message ||
(ddb_gate_message && invoked_gate_key) ||
(ddb_keeper_message && inv.suppressXfer) )
- MsgLog::dprintf(true, "About to invoke key handler (inv.ty=%d)\n", inv.keyType);
+ dprintf(true, "About to invoke key handler (inv.ty=%d)\n", inv.keyType);
#endif
keyHandler[inv.keyType](inv);
@@ -1545,7 +1544,7 @@
( (inv.key->subType != MKT_Returner) &&
(inv.key->subType != MKT_Void) ) ) &&
(inv.exit.code != RC_OK) ) )
- MsgLog::dprintf(true, "Before DeliverResult() (invokee=0x%08x)\n",
+ dprintf(true, "Before DeliverResult() (invokee=0x%08x)\n",
inv.invokee);
#endif
@@ -1585,11 +1584,11 @@
/* Clean up the invocation block: */
inv.Cleanup();
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
+ dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Updated invokee runstate\n");
+ dprintf(GATEDEBUG>2, "Updated invokee runstate\n");
#endif
if (threadToMigrate) {
@@ -1597,21 +1596,21 @@
#ifdef OPTION_DDB
if (inv.invoke->cpuReserve == &CpuReserve::InactiveReserve)
- MsgLog::dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
+ dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
inv.invokee);
#endif
if (inv.invType == IT_Send && inv.invokee) {
threadToMigrate->Wakeup();
#ifdef GATEDEBUG
- MsgLog::dprintf(true, "Woke up forkee\n");
+ dprintf(true, "Woke up forkee\n");
#endif
}
}
if (wakeRoot) {
#if 0
- MsgLog::dprintf(false, "Wake up all of the losers sleeping on dr=0x%08x\n", wakeRoot);
+ dprintf(false, "Wake up all of the losers sleeping on dr=0x%08x\n", wakeRoot);
#endif
wakeRoot->stallQ.WakeAll();
}
@@ -1624,11 +1623,11 @@
#endif
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Migrated the thread\n");
+ dprintf(GATEDEBUG>2, "Migrated the thread\n");
#else
#if 0
if ( invoked_gate_key )
- MsgLog::dprintf(true, "Migrated the thread\n");
+ dprintf(true, "Migrated the thread\n");
#endif
#endif
@@ -1687,7 +1686,7 @@
KernStats.nInvKpr++;
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Enter InvokeMyKeeper\n");
+ dprintf(true, "Enter InvokeMyKeeper\n");
#endif
bool canInvoke = true;
@@ -1707,7 +1706,7 @@
canInvoke = false;
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Kpr key is gate key? '%c'\n", canInvoke ? 'y' : 'n');
+ dprintf(true, "Kpr key is gate key? '%c'\n", canInvoke ? 'y' : 'n');
#endif
/* A recovery context has already been established, either by a call
@@ -1724,12 +1723,12 @@
inv.nextPC = GetPC();
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Populated invocation block\n");
+ dprintf(true, "Populated invocation block\n");
#endif
if (keeperKey->IsType(KT_Resume) && keeperKey->keyData == KsitFault) {
inv.suppressXfer = true;
- MsgLog::printf("Suppress xfer -- key is restart key\n");
+ printf("Suppress xfer -- key is restart key\n");
}
Process * const invokee = canInvoke ? keeperKey->gk.pContext : 0;
@@ -1738,21 +1737,21 @@
inv.invokee = invokee;
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Prepare invokee\n");
+ dprintf(true, "Prepare invokee\n");
#endif
/* Make sure invokee is valid */
invokee->Prepare();
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Invokee prepare completed\n");
+ dprintf(true, "Invokee prepare completed\n");
#endif
if ( invokee->IsWellFormed() == false )
canInvoke = false;
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Have good keeper, ctxt=0x%08x\n", invokee);
+ dprintf(true, "Have good keeper, ctxt=0x%08x\n", invokee);
#endif
#ifndef NDEBUG
@@ -1772,7 +1771,7 @@
if (canInvoke) {
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Keeper in right state\n");
+ dprintf(true, "Keeper in right state\n");
#endif
/* Now have valid invokee in proper state. Build exit block: */
@@ -1781,7 +1780,7 @@
invokee->SetupExitString(inv, len);
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Populated exit block\n");
+ dprintf(true, "Populated exit block\n");
#endif
COMMIT_POINT();
@@ -1826,30 +1825,30 @@
inv.Cleanup();
#ifdef GATEDEBUG
- MsgLog::dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
+ dprintf(GATEDEBUG>2, "Cleaned up invocation\n");
#endif
Thread::Current()->MigrateTo(invokee);
#ifdef OPTION_DDB
if (invokee->cpuReserve == &CpuReserve::InactiveReserve)
- MsgLog::dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
+ dprintf(true, "Thread now in ctxt 0x%08x w/ bad schedule\n",
invokee);
#endif
#ifdef KPRDEBUG
- MsgLog::dprintf(true, "Thread %s has migrated\n", Thread::Current()->Name());
+ dprintf(true, "Thread %s has migrated\n", Thread::Current()->Name());
#endif
inv.invokee = 0;
}
else {
#ifndef NDEBUG
OID oid = Thread::CurContext()->procRoot->ob.oid;
- MsgLog::printf("No keeper for OID 0x%08x%08x, FC %d FINFO 0x%08x\n",
+ printf("No keeper for OID 0x%08x%08x, FC %d FINFO 0x%08x\n",
(uint32_t) (oid >> 32),
(uint32_t) oid,
((Process *)Thread::CurContext())->faultCode,
((Process *)Thread::CurContext())->faultInfo);
- MsgLog::dprintf(true,"Dead context was 0x%08x\n", Thread::CurContext());
+ dprintf(true,"Dead context was 0x%08x\n", Thread::CurContext());
#endif
/* Just retire the thread, leaving the domain in the running
* state.
1.18 +2 -3 eros/src/base/sys/kernel/kern_IoRegion.cxx
Index: kern_IoRegion.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_IoRegion.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- kern_IoRegion.cxx 2000/11/26 22:18:25 1.17
+++ kern_IoRegion.cxx 2001/11/26 01:05:39 1.18
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <arch-kerninc/KernTune.hxx>
#include <kerninc/IoRegion.hxx>
-#include <kerninc/MsgLog.hxx>
static IoRegion regionList[KTUNE_NIOREGION];
@@ -62,7 +61,7 @@
}
}
- MsgLog::fatal("Region list exhausted!\n");
+ fatal("Region list exhausted!\n");
return false;
}
@@ -85,6 +84,6 @@
}
}
- MsgLog::fatal("Freeing unallocated region!\n");
+ fatal("Freeing unallocated region!\n");
}
1.126 +31 -32 eros/src/base/sys/kernel/kern_Key.cxx
Index: kern_Key.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Key.cxx,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- kern_Key.cxx 2001/06/10 19:41:50 1.125
+++ kern_Key.cxx 2001/11/26 01:05:39 1.126
@@ -20,7 +20,6 @@
#include <kerninc/kernel.hxx>
#include <disk/DiskKey.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/Thread.hxx>
@@ -119,7 +118,7 @@
if (pNode == 0) {
DEBUG(prepare)
- MsgLog::printf("Voiding invalid gate key\n");
+ printf("Voiding invalid gate key\n");
assert ( IsHazard() == false );
assert ( IsUnprepared() );
/* key was not prepared, so cannot be hazarded */
@@ -133,7 +132,7 @@
context = pNode->GetDomainContext();
if (! context ) /* malformed domain */
- MsgLog::fatal("Preparing gate key to malformed domain\n");
+ fatal("Preparing gate key to malformed domain\n");
/* Okay, we prepared successfully. */
gk.pContext = context;
@@ -157,7 +156,7 @@
SetPrepared();
#if 0
- MsgLog::printf("Prepared key ");
+ printf("Prepared key ");
Print();
#endif
@@ -201,7 +200,7 @@
if (pObj == 0) {
DEBUG(prepare)
- MsgLog::dprintf(true, "Voiding invalid key\n");
+ dprintf(true, "Voiding invalid key\n");
assert ( IsHazard() == false );
assert ( IsUnprepared() );
@@ -230,7 +229,7 @@
SetPrepared();
#if 0
- MsgLog::printf("Prepared key ");
+ printf("Prepared key ");
Print();
#endif
#ifdef DBG_WILD_PTR
@@ -266,11 +265,11 @@
#endif
assert (InvocationCommitted == false);
- /* MsgLog::printf("Key::Prepare(ty) -- want ty %d\n", ty); */
+ /* printf("Key::Prepare(ty) -- want ty %d\n", ty); */
if (IsType(ty) == false) {
Print();
- MsgLog::fatal("Key::Prepare(kt) -- wrong keytype 0x%x (wanted 0x%x)\n",
+ fatal("Key::Prepare(kt) -- wrong keytype 0x%x (wanted 0x%x)\n",
GetType(), ty);
return false;
}
@@ -282,7 +281,7 @@
ok.pObj->TransLock();
if (IsType(KT_Number) && (ty != KT_Number)) {
- MsgLog::printf("Key::Prepare(ty) -- number key. Key rescinded?\n");
+ printf("Key::Prepare(ty) -- number key. Key rescinded?\n");
return false;
}
@@ -341,7 +340,7 @@
Check::Consistency("Top Key::NH_Unprepare()");
#endif
- /* MsgLog::fatal("Unprepare() called\n"); */
+ /* fatal("Unprepare() called\n"); */
assert(IsHazard() == false);
if ( IsUnprepared() )
@@ -354,7 +353,7 @@
#ifndef NDEBUG
extern bool ValidCtxtPtr(const Process *);
if (ValidCtxtPtr(gk.pContext) == false)
- MsgLog::fatal("Key 0x%08x Kt %d, 0x%08x not valid ctxt ptr\n",
+ fatal("Key 0x%08x Kt %d, 0x%08x not valid ctxt ptr\n",
this, GetType(), gk.pContext);
#endif
pObj = gk.pContext->procRoot;
@@ -363,12 +362,12 @@
#ifndef NDEBUG
if ( IsType(KT_Page) ) {
if ( ObjectCache::ValidPagePtr(pObj) == false )
- MsgLog::fatal("Key 0x%08x Kt %d, 0x%08x not valid page ptr\n",
+ fatal("Key 0x%08x Kt %d, 0x%08x not valid page ptr\n",
this, GetType(), pObj);
}
else {
if ( ObjectCache::ValidNodePtr((Node *)pObj) == false )
- MsgLog::fatal("Key 0x%08x Kt %d, 0x%08x not valid node ptr\n",
+ fatal("Key 0x%08x Kt %d, 0x%08x not valid node ptr\n",
this, GetType(), pObj);
}
#endif
@@ -392,7 +391,7 @@
#endif
#if 0
- MsgLog::printf("Deprepared key ");
+ printf("Deprepared key ");
Print();
#endif
}
@@ -409,7 +408,7 @@
#ifndef NDEBUG
extern bool ValidCtxtPtr(const Process *);
if (ValidCtxtPtr(k.gk.pContext) == false)
- MsgLog::fatal("Kt %d, 0x%08x not valid ctxt ptr\n",
+ fatal("Kt %d, 0x%08x not valid ctxt ptr\n",
k.GetType(),
k.gk.pContext);
#endif
@@ -419,12 +418,12 @@
#ifndef NDEBUG
if ( k.IsType(KT_Page) ) {
if ( ObjectCache::ValidPagePtr(pObj) == false )
- MsgLog::fatal("Kt %d, 0x%08x not valid page ptr\n", k.GetType(),
+ fatal("Kt %d, 0x%08x not valid page ptr\n", k.GetType(),
pObj);
}
else {
if ( ObjectCache::ValidNodePtr((Node *)pObj) == false )
- MsgLog::fatal("Kt %d, 0x%08x not valid node ptr\n", k.GetType(),
+ fatal("Kt %d, 0x%08x not valid node ptr\n", k.GetType(),
pObj);
}
#endif
@@ -468,12 +467,12 @@
if (IsType(KT_Resume)) {
#if 0
- MsgLog::printf("rsm 0x%08x 0x%08x 0x%08x 0x%08x (obj=0x%08x)\n",
+ printf("rsm 0x%08x 0x%08x 0x%08x 0x%08x (obj=0x%08x)\n",
pWKey[0], ((Node *)pObj)->callCount,
pOID[0], pOID[1], pObj);
#else
- MsgLog::printf("0x%08x rsm 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ printf("0x%08x rsm 0x%08x 0x%08x 0x%08x 0x%08x\n",
this,
pWKey[0], ((Node *)pObj)->callCount,
pOID[0], pOID[1]);
@@ -481,11 +480,11 @@
}
else {
#if 0
- MsgLog::printf("pob 0x%08x 0x%08x 0x%08x 0x%08x (obj=0x%08x)\n",
+ printf("pob 0x%08x 0x%08x 0x%08x 0x%08x (obj=0x%08x)\n",
pWKey[0], ok.pObj->allocCount,
pOID[0], pOID[1], pObj);
#else
- MsgLog::printf("0x%08x pob 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ printf("0x%08x pob 0x%08x 0x%08x 0x%08x 0x%08x\n",
this,
pWKey[0], ((Node *)pObj)->ob.allocCount,
pOID[0], pOID[1]);
@@ -494,10 +493,10 @@
}
else {
#if 0
- MsgLog::printf("ukt 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ printf("ukt 0x%08x 0x%08x 0x%08x 0x%08x\n",
pWKey[0], pWKey[1], pWKey[2], pWKey[3]);
#else
- MsgLog::printf("0x%08x ukt 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ printf("0x%08x ukt 0x%08x 0x%08x 0x%08x 0x%08x\n",
this,
pWKey[0], pWKey[1], pWKey[2], pWKey[3]);
#endif
@@ -588,7 +587,7 @@
if (IsObjectKey() && GetKeyOid() > 0x100000000llu) {
OID oid = GetKeyOid();
- MsgLog::printf("Key 0x%08x has invalid OID 0x%08x%08x\n",
+ printf("Key 0x%08x has invalid OID 0x%08x%08x\n",
this, (uint32_t) (oid>>32), (uint32_t) oid);
}
#endif
@@ -607,13 +606,13 @@
ObjectHeader *pObject = ok.pObj;
if ( ObjectCache::ValidPagePtr(pObject) == false ) {
Print();
- MsgLog::printf("Key 0x%08x has invalid pObject 0x%08x\n",
+ printf("Key 0x%08x has invalid pObject 0x%08x\n",
this, pObject);
return false;
}
if ( pObject->IsFree() ) {
Print();
- MsgLog::printf("Prepared key 0x%08x names free pObject 0x%08x\n",
+ printf("Prepared key 0x%08x names free pObject 0x%08x\n",
this, pObject);
return false;
}
@@ -622,12 +621,12 @@
assertex (this, IsObjectKey() );
Node *pNode = (Node *) ok.pObj;
if ( ObjectCache::ValidNodePtr(pNode) == false ) {
- MsgLog::printf("0x%x is not a valid node ptr\n", pNode);
+ printf("0x%x is not a valid node ptr\n", pNode);
return false;
}
if ( pNode->IsFree() ) {
Print();
- MsgLog::printf("Prepared key 0x%08x names free pObject 0x%08x\n",
+ printf("Prepared key 0x%08x names free pObject 0x%08x\n",
this, pNode);
return false;
}
@@ -646,7 +645,7 @@
ObjectCache::ValidPagePtr((ObjectHeader*) krn) ||
ObjectCache::ValidNodePtr((Node *) krn) ||
ValidCtxtKeyRingPtr(krn) ) ) {
- MsgLog::printf("key 0x%x nxt key 0x%x bogus\n", this, krn);
+ printf("key 0x%x nxt key 0x%x bogus\n", this, krn);
return false;
}
@@ -654,18 +653,18 @@
ObjectCache::ValidPagePtr((ObjectHeader *) krp) ||
ObjectCache::ValidNodePtr((Node *) krp) ||
ValidCtxtKeyRingPtr(krp) ) ) {
- MsgLog::printf("key 0x%x prv key 0x%x bogus\n", this, krp);
+ printf("key 0x%x prv key 0x%x bogus\n", this, krp);
return false;
}
/* Prev and next pointers must be linked properly: */
if (krp->next != (KeyRing *) this) {
- MsgLog::printf("Prepared key 0x%08x bad keyring links to prev\n",
+ printf("Prepared key 0x%08x bad keyring links to prev\n",
this);
return false;
}
if (krn->prev != (KeyRing *) this) {
- MsgLog::printf("Prepared key 0x%08x bad keyring links to next\n",
+ printf("Prepared key 0x%08x bad keyring links to next\n",
this);
return false;
}
1.64 +13 -14 eros/src/base/sys/kernel/kern_KeyRing.cxx
Index: kern_KeyRing.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_KeyRing.cxx,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- kern_KeyRing.cxx 2001/06/10 19:41:50 1.63
+++ kern_KeyRing.cxx 2001/11/26 01:05:39 1.64
@@ -20,7 +20,6 @@
#include <kerninc/kernel.hxx>
#include <disk/KeyRing.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Node.hxx>
@@ -38,7 +37,7 @@
#ifndef NDEBUG
if (IsValid(this) == false)
- MsgLog::dprintf(true, "Keyring 0x%08x is invalid\n");
+ dprintf(true, "Keyring 0x%08x is invalid\n");
#endif
while (next != (KeyRing*) this) {
@@ -47,7 +46,7 @@
#ifndef NDEBUG
if ( ObjectCache::ValidKeyPtr(pKey) == false ) {
pKey->Print();
- MsgLog::fatal("Invalid keyring ptr. Ring=0x%08x pKey=0x%08x\n",
+ fatal("Invalid keyring ptr. Ring=0x%08x pKey=0x%08x\n",
this, pKey);
}
@@ -244,37 +243,37 @@
assert ( (Key *) nxt );
if ( ! ObjectCache::ValidKeyPtr((Key *) nxt) ) {
- MsgLog::dprintf(true, "Key 0x%08x is not valid in keyring 0x%08x\n",
+ dprintf(true, "Key 0x%08x is not valid in keyring 0x%08x\n",
nxt, this);
return false;
}
if ( ((Key*)nxt)->IsUnprepared() ) {
- MsgLog::dprintf(true, "Key 0x%08x is unprepared in keyring 0x%08x (cur 0x%08x)\n",
+ dprintf(true, "Key 0x%08x is unprepared in keyring 0x%08x (cur 0x%08x)\n",
nxt, this, cur);
return false;
}
if ( ((Key*)nxt)->IsPreparedObjectKey() == false) {
- MsgLog::dprintf(true, "Key 0x%08x is not object key in keyring 0x%08x\n",
+ dprintf(true, "Key 0x%08x is not object key in keyring 0x%08x\n",
nxt, this);
return false;
}
if (nxt->prev != cur) {
- MsgLog::dprintf(true, "Prev of key 0x%08x is not cur in keyring 0x%08x (cur=0x%08x\n",
+ dprintf(true, "Prev of key 0x%08x is not cur in keyring 0x%08x (cur=0x%08x\n",
nxt, this, cur);
return false;
}
if (cur->next != nxt) {
- MsgLog::dprintf(true, "Next of key 0x%08x is not nxt in keyring 0x%08x\n",
+ dprintf(true, "Next of key 0x%08x is not nxt in keyring 0x%08x\n",
nxt, this);
return false;
}
if (((Key *)nxt)->ok.pObj!=pObj) {
- MsgLog::dprintf(false,
+ dprintf(false,
"nxt->ok.pObj=0x%08x pObj=0x%08x nxt=0x%08x\n",
((Key *)nxt)->ok.pObj, pObj, nxt);
return false;
@@ -366,7 +365,7 @@
{
#ifndef NDEBUG
if (IsValid(this) == false)
- MsgLog::dprintf(true, "Keyring 0x%08x is invalid\n");
+ dprintf(true, "Keyring 0x%08x is invalid\n");
#endif
while (next != (KeyRing*) this) {
@@ -375,7 +374,7 @@
#ifndef NDEBUG
if ( ObjectCache::ValidKeyPtr(pKey) == false ) {
pKey->Print();
- MsgLog::fatal("Invalid keyring ptr. Ring=0x%08x pKey=0x%08x\n",
+ fatal("Invalid keyring ptr. Ring=0x%08x pKey=0x%08x\n",
this, pKey);
}
@@ -390,7 +389,7 @@
KeyRing *nxt = pKey->ok.next;
#endif
#if 0
- MsgLog::printf("UnprepareAll kr=0x%08x pKey=0x%08x *pKey=0x%08x\n",
+ printf("UnprepareAll kr=0x%08x pKey=0x%08x *pKey=0x%08x\n",
this, pKey, *((Word*) pKey));
#endif
@@ -424,7 +423,7 @@
#ifndef NDEBUG
if ( pKey->ok.next != this &&
ObjectCache::ValidKeyPtr((Key*)pKey->ok.next) == false )
- MsgLog::fatal("keyring 0x%08x: pKey 0x%08x w/ bad next ptr 0x%08x\n",
+ fatal("keyring 0x%08x: pKey 0x%08x w/ bad next ptr 0x%08x\n",
this, pKey, pKey->ok.next);
#endif
@@ -432,7 +431,7 @@
#ifndef NDEBUG
if (nxt != next)
- MsgLog::fatal("Depreparing key 0x%08x. nxt was 0x%08x next now 0x%08x\n",
+ fatal("Depreparing key 0x%08x. nxt was 0x%08x next now 0x%08x\n",
pKey, nxt, next);
#endif
assert (nxt == next);
1.145 +25 -26 eros/src/base/sys/kernel/kern_Node.cxx
Index: kern_Node.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Node.cxx,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- kern_Node.cxx 2001/11/20 04:27:21 1.144
+++ kern_Node.cxx 2001/11/26 01:05:39 1.145
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/util.h>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/ObjectHeader.hxx>
@@ -57,13 +56,13 @@
/* If this is read hazard, the world is in a very very
* inconsistent state.
*/
- MsgLog::fatal("Unprepared Node 0x%08x%08x Corrupted (slot %d).\n",
+ fatal("Unprepared Node 0x%08x%08x Corrupted (slot %d).\n",
(uint32_t) (ob.oid>>32), (uint32_t) ob.oid, ndx);
break;
case ObType::NtSegment:
if ( slot[ndx].IsRdHazard() )
- MsgLog::fatal("Segment Node Corrupted!\n");
+ fatal("Segment Node Corrupted!\n");
Depend_InvalidateKey(&slot[ndx]);
slot[ndx].UnHazard();
@@ -103,12 +102,12 @@
}
break;
default:
- MsgLog::fatal("Clear hazard on unknown type\n");
+ fatal("Clear hazard on unknown type\n");
break;
}
if (slot[ndx].IsHazard() != false)
- MsgLog::fatal("Error. Node ty=%d slot=%d still hazarded\n",
+ fatal("Error. Node ty=%d slot=%d still hazarded\n",
obType, ndx);
}
@@ -262,7 +261,7 @@
Process::Load(this);
#if 0
- MsgLog::printf("return ctxt 0x%08x\n", context);
+ printf("return ctxt 0x%08x\n", context);
#endif
return context;
}
@@ -311,7 +310,7 @@
assert(IsDirty());
#if 0
- MsgLog::dprintf(false, "Preparing OID=0x%08x%08x as domsubnode ty %d\n",
+ dprintf(false, "Preparing OID=0x%08x%08x as domsubnode ty %d\n",
(uint32_t) (oid>>32), (uint32_t) oid, nt);
#endif
@@ -365,16 +364,16 @@
return true;
#if 0
- MsgLog::printf("Preparing oid=");
- MsgLog::print(oid);
- MsgLog::printf(" as segment node\n");
+ printf("Preparing oid=");
+ print(oid);
+ printf(" as segment node\n");
#endif
uint8_t ot = obType;
if(!Unprepare(false)) {
/* FIX: this is temporary! */
- MsgLog::fatal("Couldn't unprepare oid 0x%08x%08x. Was ot=%d\n",
+ fatal("Couldn't unprepare oid 0x%08x%08x. Was ot=%d\n",
(uint32_t) (ob.oid>>32), (uint32_t) ob.oid, ot);
return false;
}
@@ -412,7 +411,7 @@
* shouldn't.
*/
if (zapMe == false && IsCurrentDomain()) {
- MsgLog::dprintf(true, "(0x%08x) Domroot 0x%08x%08x no zapme\n",
+ dprintf(true, "(0x%08x) Domroot 0x%08x%08x no zapme\n",
this,
(uint32_t) (ob.oid >> 32), (uint32_t) ob.oid);
return false;
@@ -425,7 +424,7 @@
context->Unload();
#if 0
- MsgLog::printf("Returned okay\n");
+ printf("Returned okay\n");
#endif
assert (context == 0);
}
@@ -435,13 +434,13 @@
*/
#if 1
if (context && inv.IsActive() && context == inv.invokee) {
- MsgLog::dprintf(true, "zapping keys/annex of invokee nd=0x%08x"
+ dprintf(true, "zapping keys/annex of invokee nd=0x%08x"
" ctxt=0x%08x\n", this, context);
}
#endif
if (zapMe == false && IsCurrentDomain()) {
- MsgLog::dprintf(true, "(0x%08x) keys/annex 0x%08x%08x no zapme\n",
+ dprintf(true, "(0x%08x) keys/annex 0x%08x%08x no zapme\n",
this,
(uint32_t) (ob.oid >> 32), (uint32_t) ob.oid);
return false;
@@ -479,7 +478,7 @@
obType = ObType::NtUnprepared;
#if 0
- MsgLog::dprintf(true, "Node deprepared okay\n");
+ dprintf(true, "Node deprepared okay\n");
#endif
return true;
}
@@ -494,7 +493,7 @@
for (uint32_t i = 0; i < EROS_NODE_SIZE; i++) {
#ifdef DBG_WILD_PTR
if (other.Validate() == false) {
- MsgLog::printf("Prior to unhazarding key %d\n", i);
+ printf("Prior to unhazarding key %d\n", i);
Debugger();
}
#endif
@@ -504,7 +503,7 @@
#ifdef DBG_WILD_PTR
if (other.Validate() == false) {
- MsgLog::printf("Prior to setting key %d\n", i);
+ printf("Prior to setting key %d\n", i);
Debugger();
}
#endif
@@ -513,7 +512,7 @@
#ifdef DBG_WILD_PTR
if (other.Validate() == false) {
- MsgLog::printf("After setting key %d\n", i);
+ printf("After setting key %d\n", i);
Debugger();
}
#endif
@@ -550,7 +549,7 @@
Node::Validate() const
{
if ( obType > ObType::NtLAST_NODE_TYPE) {
- MsgLog::printf("Node 0x%08x has bad object type\n", this);
+ printf("Node 0x%08x has bad object type\n", this);
return false;
}
assert (obType <= ObType::NtLAST_NODE_TYPE);
@@ -558,7 +557,7 @@
if (IsFree()) {
for (uint32_t i = 0; i < EROS_NODE_SIZE; i++) {
if (slot[i].IsUnprepared() == false) {
- MsgLog::dprintf(true, "Free node 0x%08x has prepared slot %d\n",
+ dprintf(true, "Free node 0x%08x has prepared slot %d\n",
this, i);
return false;
}
@@ -577,10 +576,10 @@
uint32_t chk = CalcCheck();
if ( ob.check != chk ) {
- MsgLog::printf("Invalid Frame 0x%08x Chk=0x%x CalcCheck=0x%x on node ",
+ printf("Invalid Frame 0x%08x Chk=0x%x CalcCheck=0x%x on node ",
this, ob.check, chk);
- MsgLog::print(ob.oid);
- MsgLog::printf("\n");
+ printOid(ob.oid);
+ printf("\n");
#if 0
for (uint32_t i = 0; i < EROS_NODE_SIZE; i++)
@@ -597,14 +596,14 @@
#ifndef NDEBUG
if (key.IsValid() == false) {
- MsgLog::printf("Key %d is bad in node 0x%x\n", k, this);
+ printf("Key %d is bad in node 0x%x\n", k, this);
key.Print();
return false;
}
#endif
if (key.IsHazard() && obType == ObType::NtUnprepared) {
- MsgLog::printf("Unprepared node contains hazarded key\n");
+ printf("Unprepared node contains hazarded key\n");
return false;
}
1.130 +70 -71 eros/src/base/sys/kernel/kern_ObjectCache.cxx
Index: kern_ObjectCache.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_ObjectCache.cxx,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- kern_ObjectCache.cxx 2001/08/21 21:19:33 1.129
+++ kern_ObjectCache.cxx 2001/11/26 01:05:39 1.130
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Node.hxx>
@@ -85,7 +84,7 @@
uint32_t availBytes = PhysMem::AvailBytes(&PhysMem::any);
DEBUG(cachealloc)
- MsgLog::printf("%d bytes of available storage.\n", availBytes);
+ printf("%d bytes of available storage.\n", availBytes);
uint32_t allocQuanta =
sizeof(Node) + EROS_PAGE_SIZE + sizeof(ObjectHeader);
@@ -101,7 +100,7 @@
nodeTable = ::new (0) Node[nNodes];
DEBUG(ndalloc)
- MsgLog::printf("Allocated Nodes: 0x%x at 0x%08x\n",
+ printf("Allocated Nodes: 0x%x at 0x%08x\n",
sizeof(Node[nNodes]), nodeTable);
/* Drop all the nodes on the free node list: */
@@ -119,12 +118,12 @@
Depend_InitKeyDependTable(nNodes);
DEBUG(cachealloc)
- MsgLog::printf("%d bytes of available storage after key dep tbl alloc.\n", availBytes);
+ printf("%d bytes of available storage after key dep tbl alloc.\n", availBytes);
AllocateUserPages();
DEBUG(cachealloc)
- MsgLog::printf("%d cached domains, %d nodes, %d pages\n",
+ printf("%d cached domains, %d nodes, %d pages\n",
KTUNE_NCONTEXT,
nNodes, nPages);
@@ -163,7 +162,7 @@
assert(coreTable);
DEBUG(pgalloc)
- MsgLog::printf("Allocated Page Headers: 0x%x at 0x%08x\n",
+ printf("Allocated Page Headers: 0x%x at 0x%08x\n",
sizeof(ObjectHeader[nPages]), coreTable);
/* Block the pages by class, allocate them, and recompute nPages.
@@ -207,7 +206,7 @@
}
#if 0
- MsgLog::printf("nPages = %d (0x%x)\n", nPages, nPages);
+ printf("nPages = %d (0x%x)\n", nPages, nPages);
halt();
#endif
@@ -275,7 +274,7 @@
ObjectCache::OIDtoObHdr(uint32_t /*cdaLo*/, uint16_t /*cdaHi*/)
{
/* FIX: implement me */
- MsgLog::fatal("OIDtoObHdr unimplemented!\n");
+ fatal("OIDtoObHdr unimplemented!\n");
return 0;
}
@@ -432,9 +431,9 @@
if (pObj->IsUserPinned() || pObj->IsKernelPinned()) {
if (pObj->IsUserPinned())
userPins++;
- db_printf("node 0x%08x%08x\n",
- (uint32_t) (pObj->ob.oid >> 32),
- (uint32_t) pObj->ob.oid);
+ printf("node 0x%08x%08x\n",
+ (uint32_t) (pObj->ob.oid >> 32),
+ (uint32_t) pObj->ob.oid);
}
}
@@ -443,17 +442,17 @@
if (pObj->IsUserPinned() || pObj->IsKernelPinned()) {
if (pObj->IsUserPinned())
userPins++;
- db_printf("page 0x%08x%08x\n",
- (uint32_t) (pObj->ob.oid >> 32),
- (uint32_t) pObj->ob.oid);
+ printf("page 0x%08x%08x\n",
+ (uint32_t) (pObj->ob.oid >> 32),
+ (uint32_t) pObj->ob.oid);
}
}
#ifdef OLD_PIN
- db_printf("User pins found: %d official count: %d\n", userPins,
- ObjectHeader::PinnedObjectCount);
+ printf("User pins found: %d official count: %d\n", userPins,
+ ObjectHeader::PinnedObjectCount);
#else
- db_printf("User pins found: %d \n", userPins);
+ printf("User pins found: %d \n", userPins);
#endif
}
@@ -491,23 +490,23 @@
#else
char goodSum = '?';
#endif
- db_printf("%02d: %s oid %c0x%08x%08x up:%c cr:%c ck:%c drt:%c%c io:%c sm:%c dc:%c\n",
- pg,
- ObType::ddb_name(pObj->obType),
- producerType,
- (uint32_t) (pObj->ob.oid >> 32),
- (uint32_t) (pObj->ob.oid),
- pObj->IsUserPinned() ? 'y' : 'n',
- pObj->GetFlags(OFLG_CURRENT) ? 'y' : 'n',
- pObj->GetFlags(OFLG_CKPT) ? 'y' : 'n',
- pObj->GetFlags(OFLG_DIRTY) ? 'y' : 'n',
- pObj->GetFlags(OFLG_REDIRTY) ? 'y' : 'n',
- pObj->GetFlags(OFLG_IO) ? 'y' : 'n',
- goodSum,
- pObj->GetFlags(OFLG_DISKCAPS) ? 'y' : 'n');
+ printf("%02d: %s oid %c0x%08x%08x up:%c cr:%c ck:%c drt:%c%c io:%c sm:%c dc:%c\n",
+ pg,
+ ObType::ddb_name(pObj->obType),
+ producerType,
+ (uint32_t) (pObj->ob.oid >> 32),
+ (uint32_t) (pObj->ob.oid),
+ pObj->IsUserPinned() ? 'y' : 'n',
+ pObj->GetFlags(OFLG_CURRENT) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_CKPT) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_DIRTY) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_REDIRTY) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_IO) ? 'y' : 'n',
+ goodSum,
+ pObj->GetFlags(OFLG_DISKCAPS) ? 'y' : 'n');
}
- db_printf("Total of %d pages, of which %d are free\n", nPages, nFree);
+ printf("Total of %d pages, of which %d are free\n", nPages, nFree);
}
void
@@ -526,7 +525,7 @@
}
if (pObj->obType > ObType::NtLAST_NODE_TYPE)
- MsgLog::fatal("Node @0x%08x: object type %d is broken\n", pObj,
+ fatal("Node @0x%08x: object type %d is broken\n", pObj,
pObj->obType);
#ifdef OPTION_OB_MOD_CHECK
@@ -534,22 +533,22 @@
#else
char goodSum = '?';
#endif
- db_printf("%02d: %s oid 0x%08x%08x up:%c cr:%c ck:%c drt:%c%c io:%c sm:%d dc:%c\n",
- nd,
- ObType::ddb_name(pObj->obType),
- (uint32_t) (pObj->ob.oid >> 32),
- (uint32_t) (pObj->ob.oid),
- pObj->IsUserPinned() ? 'y' : 'n',
- pObj->GetFlags(OFLG_CURRENT) ? 'y' : 'n',
- pObj->GetFlags(OFLG_CKPT) ? 'y' : 'n',
- pObj->GetFlags(OFLG_DIRTY) ? 'y' : 'n',
- pObj->GetFlags(OFLG_REDIRTY) ? 'y' : 'n',
- pObj->GetFlags(OFLG_IO) ? 'y' : 'n',
- goodSum,
- pObj->GetFlags(OFLG_DISKCAPS) ? 'y' : 'n');
+ printf("%02d: %s oid 0x%08x%08x up:%c cr:%c ck:%c drt:%c%c io:%c sm:%d dc:%c\n",
+ nd,
+ ObType::ddb_name(pObj->obType),
+ (uint32_t) (pObj->ob.oid >> 32),
+ (uint32_t) (pObj->ob.oid),
+ pObj->IsUserPinned() ? 'y' : 'n',
+ pObj->GetFlags(OFLG_CURRENT) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_CKPT) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_DIRTY) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_REDIRTY) ? 'y' : 'n',
+ pObj->GetFlags(OFLG_IO) ? 'y' : 'n',
+ goodSum,
+ pObj->GetFlags(OFLG_DISKCAPS) ? 'y' : 'n');
}
- db_printf("Total of %d nodes, of which %d are free\n", nNodes, nFree);
+ printf("Total of %d nodes, of which %d are free\n", nNodes, nFree);
}
#endif
@@ -665,7 +664,7 @@
}
DEBUG(ckpt)
- MsgLog::dprintf(false, "Ageing out node=0x%08x oty=%d dirty=%c oid=0x%08x%08x\n",
+ dprintf(false, "Ageing out node=0x%08x oty=%d dirty=%c oid=0x%08x%08x\n",
pObj, pObj->obType,
(pObj->IsDirty() ? 'y' : 'n'),
(uint32_t) (pObj->ob.oid >> 32),
@@ -687,7 +686,7 @@
ReleaseFrame(pObj);
#if defined(TESTING_AGEING) && 0
- MsgLog::dprintf(true, "AgeNodeFrame(): Object evicted\n");
+ dprintf(true, "AgeNodeFrame(): Object evicted\n");
#endif
#ifdef DBG_WILD_PTR
if (dbg_wild_ptr)
@@ -698,7 +697,7 @@
}
}
- MsgLog::fatal("%d stuck nodes of which %d are pinned\n",
+ fatal("%d stuck nodes of which %d are pinned\n",
nStuck, nPinned);
}
@@ -735,10 +734,10 @@
if (pObj->obType == ObType::PtMappingPage) {
kva_t pgva = ObjectCache::ObHdrToPage(pObj);
DEBUG(map)
- MsgLog::printf("Blasting mapping page at 0x%08x\n", pgva);
+ printf("Blasting mapping page at 0x%08x\n", pgva);
#if defined(OPTION_SMALL_SPACES) && 0
if (pObj->producerNdx == EROS_NODE_LGSIZE)
- MsgLog::printf("Blasting pg dir 0x%08x\n", pgva);
+ printf("Blasting pg dir 0x%08x\n", pgva);
#endif
PTE::ZapMappingPage(pgva);
}
@@ -893,7 +892,7 @@
*/
DEBUG(ckpt)
- MsgLog::dprintf(true, "ty %d oid 0x%08x%08x slq=0x%08x\n",
+ dprintf(true, "ty %d oid 0x%08x%08x slq=0x%08x\n",
pObj->obType,
(uint32_t) (pObj->ob.oid >> 32),
(uint32_t) pObj->ob.oid,
@@ -1136,14 +1135,14 @@
#ifndef NDEBUG
for (uint32_t i = 0; i < EROS_NODE_SIZE; i++) {
if (pNode->slot[i].IsUnprepared() == false)
- MsgLog::dprintf(true, "Virgin node 0x%08x had prepared slot %d\n",
+ dprintf(true, "Virgin node 0x%08x had prepared slot %d\n",
pNode, i);
}
#endif
assert(ObjectCache::ValidNodePtr(pNode));
DEBUG(ndalloc)
- MsgLog::printf("Allocated node=0x%08x nfree=%d\n", pNode, nFreeNodeFrames);
+ printf("Allocated node=0x%08x nfree=%d\n", pNode, nFreeNodeFrames);
}
else if (pObj->obType == ObType::PtFreeFrame) {
if (pObj == firstFreePage) {
@@ -1306,10 +1305,10 @@
ObjectCache::AddSource(ObjectSource *source)
{
if (nSource == MAX_SOURCE)
- MsgLog::fatal("Limit on total object sources exceeded\n");
+ fatal("Limit on total object sources exceeded\n");
DEBUG(obsrc)
- MsgLog::printf("New source: \"%s\" [0x%08x%08x,0x%08x%08x)\n",
+ printf("New source: \"%s\" [0x%08x%08x,0x%08x%08x)\n",
source->name,
(unsigned) (source->start >> 32),
(unsigned) (source->start),
@@ -1325,7 +1324,7 @@
continue;
if (source->start >= sources[i]->end)
continue;
- MsgLog::dprintf(true, "New source 0x%x overlaps existing source 0x%x\n",
+ dprintf(true, "New source 0x%x overlaps existing source 0x%x\n",
source, sources[i]);
return false;
}
@@ -1355,7 +1354,7 @@
ObjectHeader *pObj = 0;
if (!ObjectCache::HaveSource(oid)) {
- MsgLog::dprintf(true, "No source for OID 0x%08x%08x...\n",
+ dprintf(true, "No source for OID 0x%08x%08x...\n",
(unsigned long) (oid >> 32),
(unsigned long) (oid));
ObjectCache::WaitForSource();
@@ -1380,7 +1379,7 @@
inv.MaybeDecommit();
- MsgLog::fatal("ObjecCache::GetObject(): oid 0x%08x%08x not found\n",
+ fatal("ObjecCache::GetObject(): oid 0x%08x%08x not found\n",
(unsigned) (oid >> 32),
(unsigned) oid);
@@ -1435,7 +1434,7 @@
subEnd = ~0llu;
DEBUG(findfirst)
- MsgLog::printf("ObCache::FindFirstSubrange(): limStart 0x%08x%08x, "
+ printf("ObCache::FindFirstSubrange(): limStart 0x%08x%08x, "
"limEnd 0x%08x%08x nSource %d\n",
(unsigned long) (limStart >> 32),
(unsigned long) (limStart),
@@ -1451,7 +1450,7 @@
/* Check if the requested range and the source overlap: */
if (sources[i]->end <= limStart) {
DEBUG(findfirst)
- MsgLog::printf("Reject %d: end 0x%08x%08x <= limStart\n",
+ printf("Reject %d: end 0x%08x%08x <= limStart\n",
i,
(unsigned long) (sources[i]->end >> 32),
(unsigned long) (sources[i]->end));
@@ -1460,7 +1459,7 @@
if (sources[i]->start >= limEnd) {
DEBUG(findfirst)
- MsgLog::printf("Reject %d: start 0x%08x%08x >= limStart\n",
+ printf("Reject %d: start 0x%08x%08x >= limStart\n",
i,
(unsigned long) (sources[i]->start >> 32),
(unsigned long) (sources[i]->start));
@@ -1471,7 +1470,7 @@
* already have, ask the source: */
if (sources[i]->start < subStart) {
DEBUG(findfirst)
- MsgLog::printf("Consulting source %d for [0x%08x%08x, 0x%08x%08x)\n",
+ printf("Consulting source %d for [0x%08x%08x, 0x%08x%08x)\n",
i,
(unsigned long) (sources[i]->start >> 32),
(unsigned long) (sources[i]->start),
@@ -1490,15 +1489,15 @@
for (unsigned i = 0; i < nSource; i++) {
ObjectSource *src = sources[i];
- db_printf("[0x%08x%08x,0x%08x%08x): %s\n",
- (unsigned) (src->start >> 32),
- (unsigned) src->start,
- (unsigned) (src->end >> 32),
- (unsigned) src->end,
- src->name);
+ printf("[0x%08x%08x,0x%08x%08x): %s\n",
+ (unsigned) (src->start >> 32),
+ (unsigned) src->start,
+ (unsigned) (src->end >> 32),
+ (unsigned) src->end,
+ src->name);
}
if (nSource == 0)
- db_printf("No object sources.\n");
+ printf("No object sources.\n");
}
#endif
1.125 +50 -51 eros/src/base/sys/kernel/kern_ObjectHeader.cxx
Index: kern_ObjectHeader.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_ObjectHeader.cxx,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- kern_ObjectHeader.cxx 2001/10/05 16:25:05 1.124
+++ kern_ObjectHeader.cxx 2001/11/26 01:05:39 1.125
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/ObjectHeader.hxx>
#include <kerninc/ObjectCache.hxx>
@@ -99,7 +98,7 @@
uint32_t blss = wi.segBlss;
#if 0
- MsgLog::printf("Search for product blss=%d ndx=%d, rw=%c producerTy=%d\n",
+ printf("Search for product blss=%d ndx=%d, rw=%c producerTy=%d\n",
blss, ndx, rw ? 'y' : 'n', obType);
#endif
@@ -110,13 +109,13 @@
for (product = products; product; product = product->next) {
if ((uint32_t) product->producerBlss != blss) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("Producer BLSS not match\n");
+ printf("Producer BLSS not match\n");
#endif
continue;
}
if (product->mp.redSeg != wi.redSeg) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("Red seg not match\n");
+ printf("Red seg not match\n");
#endif
continue;
}
@@ -124,21 +123,21 @@
#ifdef KT_Wrapper
if (product->mp.wrapperProducer != wi.segObjIsWrapper) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("redProducer not match\n");
+ printf("redProducer not match\n");
#endif
continue;
}
#else
if (product->mp.redProducer != wi.segObjIsRed) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("redProducer not match\n");
+ printf("redProducer not match\n");
#endif
continue;
}
#endif
if (product->mp.redSpanBlss != wi.redSpanBlss) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("redSpanBlss not match: prod %d wi %d\n",
+ printf("redSpanBlss not match: prod %d wi %d\n",
product->mp.redSpanBlss, wi.redSpanBlss);
#endif
continue;
@@ -146,19 +145,19 @@
}
if ((uint32_t) product->producerNdx != ndx) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("producerNdx not match\n");
+ printf("producerNdx not match\n");
#endif
continue;
}
if (product->rwProduct != (rw ? 1 : 0)) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("rwProduct not match\n");
+ printf("rwProduct not match\n");
#endif
continue;
}
if (product->caProduct != (ca ? 1 : 0)) {
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("caProduct not match\n");
+ printf("caProduct not match\n");
#endif
continue;
}
@@ -175,12 +174,12 @@
#if 0
if (wi.segBlss != wi.pSegKey->GetBlss())
- MsgLog::dprintf(true, "Found product 0x%x segBlss %d prodKey 0x%x keyBlss %d\n",
+ dprintf(true, "Found product 0x%x segBlss %d prodKey 0x%x keyBlss %d\n",
product, wi.segBlss, wi.pSegKey, wi.pSegKey->GetBlss());
#endif
#ifdef FINDPRODUCT_VERBOSE
- MsgLog::printf("0x%08x->FindProduct(blss=%d,ndx=%d,rw=%c,ca=%c,"
+ printf("0x%08x->FindProduct(blss=%d,ndx=%d,rw=%c,ca=%c,"
"producerTy=%d) => 0x%08x\n",
this,
blss, ndx, rw ? 'y' : 'n', ca ? 'y' : 'n', obType,
@@ -227,7 +226,7 @@
{
assert (obType > ObType::NtLAST_NODE_TYPE);
#if 0
- MsgLog::dprintf(true,
+ dprintf(true,
"Trying copy on write, ty %d oid 0x%08x%08x "
"hdr 0x%08x\n",
obType, (uint32_t) (oid >> 32), (uint32_t) (oid), this);
@@ -286,7 +285,7 @@
pObj->SetFlags(OFLG_CURRENT);
pObj->ClearFlags(OFLG_CKPT|OFLG_IO|OFLG_DIRTY|OFLG_REDIRTY|OFLG_PIN);
#ifdef DBG_CLEAN
- MsgLog::printf("Object 0x%08x ty %d oid=0x%08x%08x COW copy cleaned\n",
+ printf("Object 0x%08x ty %d oid=0x%08x%08x COW copy cleaned\n",
pObj, pObj->obType,
(uint32_t) (pObj->oid >> 32),
(uint32_t) pObj->oid);
@@ -374,7 +373,7 @@
#ifdef OPTION_OB_MOD_CHECK
if (IsDirty() == 0 && ob.check != CalcCheck())
- MsgLog::fatal("MakeObjectDirty(0x%08x): not dirty and bad checksum!\n",
+ fatal("MakeObjectDirty(0x%08x): not dirty and bad checksum!\n",
this);
#endif
@@ -407,7 +406,7 @@
#endif
#ifdef DBG_CLEAN
- MsgLog::dprintf(true,
+ dprintf(true,
"Marked pObj=0x%08x oid=0x%08x%08x dirty. dirty: %c chk: %c\n",
this,
(uint32_t) (oid >> 32), (uint32_t) (oid),
@@ -422,9 +421,9 @@
#if 0
uint32_t ocpl = IRQ::splhigh()
- MsgLog::printf("** Object ");
- MsgLog::print(oid);
- MsgLog::printf(" marked dirty.\n");
+ printf("** Object ");
+ print(oid);
+ printf(" marked dirty.\n");
IRQ::splx(ocpl);
#endif
}
@@ -433,7 +432,7 @@
ObjectHeader::Rescind()
{
DEBUG(rescind)
- MsgLog::dprintf(true, "Rescinding ot=%d oid=0x%08x%08x\n",
+ dprintf(true, "Rescinding ot=%d oid=0x%08x%08x\n",
obType, (uint32_t) (ob.oid >> 32), (uint32_t) ob.oid);
assert (IsDirty() && GetFlags(OFLG_IO|OFLG_CKPT) == 0);
@@ -441,7 +440,7 @@
#ifndef NDEBUG
if (!kr.IsValid(this))
- MsgLog::dprintf(true, "Keyring of oid 0x%08x%08x invalid!\n",
+ dprintf(true, "Keyring of oid 0x%08x%08x invalid!\n",
(uint32_t)(ob.oid>>32), (uint32_t)ob.oid);
#endif
@@ -450,7 +449,7 @@
kr.RescindAll(hasCaps);
DEBUG(rescind)
- MsgLog::dprintf(true, "After 'RescindAll()'\n");
+ dprintf(true, "After 'RescindAll()'\n");
/* If object has on-disk keys, must dirty the new object to ensure
* that it gets written.
@@ -462,7 +461,7 @@
ClearFlags(OFLG_DISKCAPS);
DEBUG(rescind)
- MsgLog::dprintf(true, "After bump alloc count\n");
+ dprintf(true, "After bump alloc count\n");
}
/* FIX: Explicitly zeroing defeats the sever operation. */
@@ -479,16 +478,16 @@
bzero((void*)pPage, EROS_PAGE_SIZE);
}
else if (obType == ObType::PtDevicePage) {
- MsgLog::fatal("Rescind of device pages not tested -- see shap!\n");
+ fatal("Rescind of device pages not tested -- see shap!\n");
InvalidateProducts();
/* Do not explicitly zero device pages -- might be microcode! */
}
else
- MsgLog::fatal("Rescind of non-object!\n");
+ fatal("Rescind of non-object!\n");
DEBUG(rescind)
- MsgLog::dprintf(true, "After zero object\n");
+ dprintf(true, "After zero object\n");
}
void
@@ -507,8 +506,8 @@
uint8_t oflags = flags;
#endif
#if 0
- MsgLog::printf("Calculating cksum for 0x%08x\n", this);
- MsgLog::printf("OID is 0x%08x%08x, ty %d\n", (uint32_t) (oid>>32),
+ printf("Calculating cksum for 0x%08x\n", this);
+ printf("OID is 0x%08x%08x, ty %d\n", (uint32_t) (oid>>32),
(uint32_t) oid, obType);
#endif
@@ -572,47 +571,47 @@
extern void db_printf(const char *fmt, ...);
#ifdef OPTION_OB_MOD_CHECK
- db_printf("Object Header 0x%08x (%s) calcCheck 0x%08x:\n", this,
- ObType::ddb_name(obType),
- /* CalcCheck() */ 0);
- db_printf(" oid=0x%08x%08x ac=0x%08x check=0x%08x\n",
- (uint32_t) (ob.oid >> 32), (uint32_t) ob.oid,
- ob.allocCount, ob.check);
+ printf("Object Header 0x%08x (%s) calcCheck 0x%08x:\n", this,
+ ObType::ddb_name(obType),
+ /* CalcCheck() */ 0);
+ printf(" oid=0x%08x%08x ac=0x%08x check=0x%08x\n",
+ (uint32_t) (ob.oid >> 32), (uint32_t) ob.oid,
+ ob.allocCount, ob.check);
#else
- db_printf("Object Header 0x%08x (%s) oid=0x%016X ac=0x%08x\n", this,
- ObType::ddb_name(obType),
- ob.oid, ob.allocCount);
-#endif
- db_printf(" ioCount=0x%08x next=0x%08x flags=0x%02x obType=0x%02x age=0x%02x\n",
- ob.ioCount, next, flags, obType, age);
- db_printf(" prodNdx=%d prodBlss=%d rwProd=%c usrPin=%d kernPin=%d\n",
- producerNdx, producerBlss, rwProduct ? 'y' : 'n', userPin,
- kernPin);
+ printf("Object Header 0x%08x (%s) oid=0x%016X ac=0x%08x\n", this,
+ ObType::ddb_name(obType),
+ ob.oid, ob.allocCount);
+#endif
+ printf(" ioCount=0x%08x next=0x%08x flags=0x%02x obType=0x%02x age=0x%02x\n",
+ ob.ioCount, next, flags, obType, age);
+ printf(" prodNdx=%d prodBlss=%d rwProd=%c usrPin=%d kernPin=%d\n",
+ producerNdx, producerBlss, rwProduct ? 'y' : 'n', userPin,
+ kernPin);
switch(obType) {
case ObType::PtMappingPage:
- db_printf(" producer=0x%08x\n", producer);
+ printf(" producer=0x%08x\n", producer);
break;
case ObType::PtDataPage:
case ObType::PtDevicePage:
case ObType::NtSegment:
{
ObjectHeader *oh = products;
- db_printf(" products= ", products);
+ printf(" products= ", products);
while (oh) {
- db_printf(" 0x%08x", oh);
+ printf(" 0x%08x", oh);
oh = oh->next;
}
- db_printf("\n", products);
+ printf("\n", products);
break;
}
case ObType::NtProcessRoot:
case ObType::NtKeyRegs:
case ObType::NtRegAnnex:
- db_printf(" context=0x%08x\n", context);
+ printf(" context=0x%08x\n", context);
break;
}
- db_printf(" pageAddr=0x%08x\n", pageAddr);
+ printf(" pageAddr=0x%08x\n", pageAddr);
}
#endif
@@ -625,7 +624,7 @@
ObjectHeader::TransLock() /* lock for current transaction */
{
#ifdef PIN_DEBUG
- MsgLog::printf("Pinning obhdr 0x%08x\n", this);
+ printf("Pinning obhdr 0x%08x\n", this);
#endif
userPin = CurrentTransaction;
}
@@ -634,7 +633,7 @@
ObjectHeader::TransUnlock()
{
#ifdef PIN_DEBUG
- MsgLog::printf("Un-pinning obhdr 0x%08x\n", this);
+ printf("Un-pinning obhdr 0x%08x\n", this);
#endif
userPin = 0;
}
1.2 +1 -2 eros/src/base/sys/kernel/kern_ObjectSource.cxx
Index: kern_ObjectSource.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_ObjectSource.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- kern_ObjectSource.cxx 2001/06/10 19:41:50 1.1
+++ kern_ObjectSource.cxx 2001/11/26 01:05:39 1.2
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <disk/DiskKey.hxx>
#include <disk/LowVolume.hxx>
#include <kerninc/BootInfo.h>
@@ -66,7 +65,7 @@
bool
ObCacheSource::Detach()
{
- MsgLog::fatal("ObCacheSource::Detach(): cannot detach object cache!\n");
+ fatal("ObCacheSource::Detach(): cannot detach object cache!\n");
return false;
}
1.138 +54 -54 eros/src/base/sys/kernel/kern_Persist.cxx
Index: kern_Persist.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Persist.cxx,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- kern_Persist.cxx 2001/06/10 19:41:50 1.137
+++ kern_Persist.cxx 2001/11/26 01:05:39 1.138
@@ -94,7 +94,7 @@
case dt_Spare:
/* These are silently ignored */
#if 1
- MsgLog::printf("Divsn on %s%d-%d, secs [%d,%d) (%s) skipped\n",
+ printf("Divsn on %s%d-%d, secs [%d,%d) (%s) skipped\n",
part->ctrlr->name,
part->unit, part->ndx,
d.start, d.end,
@@ -114,7 +114,7 @@
coreDivTbl[i].startOid == d.startOid &&
coreDivTbl[i].endOid == d.endOid) {
isDuplex = true;
- MsgLog::printf("It's a duplex\n");
+ printf("It's a duplex\n");
}
}
@@ -128,19 +128,19 @@
Checkpoint::AttachRange(d.startOid, d.endOid);
if (!cd)
- MsgLog::fatal("Out of core divisions\n");
+ fatal("Out of core divisions\n");
#if 1
- MsgLog::printf("Divsn on %s%d-%d, secs [%d,%d)"
+ printf("Divsn on %s%d-%d, secs [%d,%d)"
" %s [",
part->ctrlr->name,
part->unit, part->ndx,
cd->start, cd->end,
(cd->type == dt_Log) ? "lid" : "oid");
- MsgLog::print(cd->startOid);
- MsgLog::printf(",");
- MsgLog::print(cd->endOid);
- MsgLog::printf(") (%s)\n", div_TypeName(d.type));
+ print(cd->startOid);
+ printf(",");
+ print(cd->endOid);
+ printf(") (%s)\n", div_TypeName(d.type));
#endif
return;
@@ -221,20 +221,20 @@
ObType::Type obty, OID oid,
ObCount count)
{
- DEBUG(io) MsgLog::dprintf(true, "Reserving I/O frame...\n");
+ DEBUG(io) dprintf(true, "Reserving I/O frame...\n");
/* First make sure the I/O won't block: */
ObjectCache::ReserveIoPageFrame();
- DEBUG(io) MsgLog::dprintf(true, "Reserving Requests...\n");
+ DEBUG(io) dprintf(true, "Reserving Requests...\n");
Request::Require(KTUNE_MAXDUPLEX);
- DEBUG(io) MsgLog::dprintf(true, "Grabbing DIO...\n");
+ DEBUG(io) dprintf(true, "Grabbing DIO...\n");
DuplexedIO *dio = DuplexedIO::Grab(oid, IoCmd::Read);
ObjectCache::CommitIoPageFrame();
- DEBUG(io) MsgLog::dprintf(true, "Setting up request (dt=%s)...\n",
+ DEBUG(io) dprintf(true, "Setting up request (dt=%s)...\n",
div_TypeName(pcd->type));
dio->allocCount = count;
@@ -257,7 +257,7 @@
DEBUG(div)
if (cd->type != dt_Unused)
- MsgLog::dprintf(true, "Check cd %d (type %s) start=0x%x, end=0x%x\n",
+ dprintf(true, "Check cd %d (type %s) start=0x%x, end=0x%x\n",
i,
div_TypeName(cd->type),
(uint32_t) cd->startOid,
@@ -281,7 +281,7 @@
assert(req);
- DEBUG(io) MsgLog::dprintf(true, "Insert request on %s%d-%d\n",
+ DEBUG(io) dprintf(true, "Insert request on %s%d-%d\n",
part->ctrlr->name,
part->unit,
part->ndx);
@@ -289,7 +289,7 @@
part->InsertRequest(req);
}
- DEBUG(io) MsgLog::dprintf(true, "Post-setup DIO release\n");
+ DEBUG(io) dprintf(true, "Post-setup DIO release\n");
dio->Release();
@@ -345,7 +345,7 @@
relTagFrame++; /* add one for seq no */
#if 0
- MsgLog::dprintf(false, " OID=0x%08x%08x frmOid=0x%08x%08x tagOid=0x%08x%08x\n"
+ dprintf(false, " OID=0x%08x%08x frmOid=0x%08x%08x tagOid=0x%08x%08x\n"
" relFrm 0x%08x clusNo 0x%08x tagEnt 0x%08x tagFrame 0x%08x\n",
(uint32_t) (oid >> 32),
(uint32_t) (oid),
@@ -392,7 +392,7 @@
#endif
if (fi.cd == 0)
- MsgLog::fatal("Bad oid 0x%08x%08x to GetObjectPot()\n",
+ fatal("Bad oid 0x%08x%08x to GetObjectPot()\n",
(fi.oid >> 32), fi.oid);
ObjectHeader *obPotHdr =
@@ -422,7 +422,7 @@
#endif
if (fi.cd == 0)
- MsgLog::fatal("Bad oid 0x%08x%08x to GetTagPot()\n",
+ fatal("Bad oid 0x%08x%08x to GetTagPot()\n",
(fi.oid >> 32), fi.oid);
ObjectHeader *tagPotHdr =
@@ -447,7 +447,7 @@
Persist::CopyDiskNode(FrameInfo &fi, DiskNode *nodePot)
{
if (nodePot[fi.obFrameNdx].oid != fi.oid)
- MsgLog::dprintf(false, "oid=0x%08x%08x, potOid=0x%08x%08x ndOid=0x%08x%08x\n",
+ dprintf(false, "oid=0x%08x%08x, potOid=0x%08x%08x ndOid=0x%08x%08x\n",
(uint32_t) (fi.oid >> 32),
(uint32_t) fi.oid,
(uint32_t) (fi.obFrameOid >> 32),
@@ -474,7 +474,7 @@
#endif
pNode->ClearFlags(OFLG_CKPT|OFLG_DIRTY|OFLG_REDIRTY|OFLG_IO);
#ifdef DBG_CLEAN
- MsgLog::printf("Object ty %d oid=0x%08x%08x loaded clean\n",
+ printf("Object ty %d oid=0x%08x%08x loaded clean\n",
pNode->obType,
(uint32_t) (pNode->oid >> 32),
(uint32_t) pNode->oid);
@@ -512,7 +512,7 @@
FrameInfo fi(oid);
if (fi.cd == 0) {
- MsgLog::fatal("nd oid= 0x%08x%08x. Should sleep on mountwait queue here\n",
+ fatal("nd oid= 0x%08x%08x. Should sleep on mountwait queue here\n",
(uint32_t)(oid>>32), (uint32_t) oid);
return 0;
}
@@ -522,13 +522,13 @@
Check::Consistency("Top GetNode()");
#endif
- DEBUG(req) MsgLog::printf("Doing lookup on node 0x%08x%08x\n",
+ DEBUG(req) printf("Doing lookup on node 0x%08x%08x\n",
(uint32_t) (oid >> 32),
(uint32_t) oid);
assert (InvocationCommitted == false);
- DEBUG(req) MsgLog::printf("Loading node from ckpt area\n");
+ DEBUG(req) printf("Loading node from ckpt area\n");
CoreDirent* cde = Checkpoint::FindObject(oid, ObType::NtUnprepared,
Checkpoint::current);
@@ -552,7 +552,7 @@
if (pp->type[fi.tagEntry] != FRM_TYPE_NODE)
return 0;
- DEBUG(req) MsgLog::printf("Loading node from home loc area\n");
+ DEBUG(req) printf("Loading node from home loc area\n");
ObjectHeader *nodePotHdr = GetObjectPot(fi);
assert(nodePotHdr);
@@ -584,7 +584,7 @@
bool stop=false;
DEBUG(req)
- MsgLog::dprintf(stop, "Doing lookup on page oid=0x%08x%08x\n",
+ dprintf(stop, "Doing lookup on page oid=0x%08x%08x\n",
(uint32_t) (oid >> 32), (uint32_t) oid);
ObjectHeader *pPage;
@@ -604,7 +604,7 @@
FrameInfo fi(oid);
if (fi.cd == 0) {
- MsgLog::fatal("pg oid= 0x%08x%08x. Should sleep on mountwait queue here\n",
+ fatal("pg oid= 0x%08x%08x. Should sleep on mountwait queue here\n",
(uint32_t)(oid>>32), (uint32_t) oid);
return 0;
}
@@ -612,12 +612,12 @@
assert (InvocationCommitted == false);
DEBUG(req)
- MsgLog::dprintf(stop, "Page lookup failed\n");
+ dprintf(stop, "Page lookup failed\n");
CoreDirent* cde = Checkpoint::FindObject(oid, ObType::PtDataPage, Checkpoint::current);
if (cde == 0) {
DEBUG(req)
- MsgLog::dprintf(true, "Wrong tag type\n");
+ dprintf(true, "Wrong tag type\n");
return 0;
}
@@ -629,14 +629,14 @@
}
DEBUG(req)
- MsgLog::dprintf(stop, "Loading home location of page\n");
+ dprintf(stop, "Loading home location of page\n");
ObjectHeader *pPot = GetTagPot(fi);
assert (pPot);
PagePot *pp = (PagePot *) ObjectCache::ObHdrToPage(pPot);
DEBUG(req)
- MsgLog::dprintf(stop, "rel tag frame %d gives tag %d\n",
+ dprintf(stop, "rel tag frame %d gives tag %d\n",
fi.relTagFrame, pp->type[fi.tagEntry]);
switch (pp->type[fi.tagEntry]) {
@@ -655,7 +655,7 @@
#endif
pPage->ClearFlags(OFLG_CKPT|OFLG_DIRTY|OFLG_REDIRTY|OFLG_IO);
#ifdef DBG_CLEAN
- MsgLog::printf("Object ty %d oid=0x%08x%08x loaded clean\n",
+ printf("Object ty %d oid=0x%08x%08x loaded clean\n",
pPage->obType,
(uint32_t) (pPage->oid >> 32),
(uint32_t) pPage->oid);
@@ -687,9 +687,9 @@
/* If all of the above fail, page is for an out of range OID. */
- MsgLog::printf("Out of range page OID ");
- MsgLog::print(oid);
- MsgLog::fatal("\n");
+ printf("Out of range page OID ");
+ print(oid);
+ fatal("\n");
return 0;
}
@@ -741,7 +741,7 @@
assert(pLogPageHdr);
- DEBUG(req) MsgLog::printf("GetCkPage: pLogPageHdr = 0x%08x\n",
+ DEBUG(req) printf("GetCkPage: pLogPageHdr = 0x%08x\n",
pLogPageHdr);
assert (pLogPageHdr);
@@ -763,7 +763,7 @@
pObj->ClearFlags(OFLG_CKPT|OFLG_IO);
pObj->SetFlags(OFLG_DIRTY|OFLG_REDIRTY);
#ifdef DBG_CLEAN
- MsgLog::printf("Object ty %d oid=0x%08x%08x loaded clean\n",
+ printf("Object ty %d oid=0x%08x%08x loaded clean\n",
pObj->obType,
(uint32_t) (pObj->oid >> 32),
(uint32_t) pObj->oid);
@@ -787,7 +787,7 @@
{
lid = EROS_FRAME_FROM_OID(lid);
- DEBUG(req) MsgLog::printf("GetCkPage: lid = 0x%x\n", lid);
+ DEBUG(req) printf("GetCkPage: lid = 0x%x\n", lid);
CoreDivision *pcd = FindDivision(dt_Log, lid);
@@ -797,7 +797,7 @@
ObjectHeader * pLogPageHdr =
ObjectHeader::Lookup(ObType::PtLogPage, lid);
- DEBUG(req) MsgLog::printf("GetCkPage: pLogPageHdr = 0x%08x\n",
+ DEBUG(req) printf("GetCkPage: pLogPageHdr = 0x%08x\n",
pLogPageHdr);
if (pLogPageHdr)
@@ -805,7 +805,7 @@
assert (InvocationCommitted == false);
- DEBUG(req) MsgLog::printf("GetCkPage: Reading page...\n");
+ DEBUG(req) printf("GetCkPage: Reading page...\n");
/* If an I/O is already pending, wait for it. If there are live
* objects in the frame, fetch it. Otherwise, allocate a new zero
@@ -814,9 +814,9 @@
DuplexedIO *pDio = DuplexedIO::FindPendingIO(lid, ObType::PtLogPage);
if (pDio) {
- DEBUG(req) MsgLog::printf("Thread 0x%08x Sleeps because I/O is "
+ DEBUG(req) printf("Thread 0x%08x Sleeps because I/O is "
"already in progress\n");
- DEBUG(req) MsgLog::dprintf(true, "DIO [0x%08x]: status %d nReq %d pObHdr=0x%08x\n",
+ DEBUG(req) dprintf(true, "DIO [0x%08x]: status %d nReq %d pObHdr=0x%08x\n",
pDio, pDio->status, pDio->nRequest, pDio->pObHdr);
Thread::Current()->SleepOn(pDio->stallQ);
Thread::Current()->Yield();
@@ -843,7 +843,7 @@
{
DEBUG(div)
if (cd->type != dt_Unused)
- MsgLog::dprintf(true, "Check cd %d (type %s) start=0x%x, end=0x%x\n",
+ dprintf(true, "Check cd %d (type %s) start=0x%x, end=0x%x\n",
cd - coreDivTbl,
div_TypeName(cd->type),
(uint32_t) cd->startOid,
@@ -867,7 +867,7 @@
/* This must not be done lazily: */
DuplexedIO *dio = DuplexedIO::Grab(0, IoCmd::Write);
- DEBUG(io) MsgLog::dprintf(true, "Setting up request (dt=ALL)...\n");
+ DEBUG(io) dprintf(true, "Setting up request (dt=ALL)...\n");
dio->pObHdr = pObj;
dio->completionCallBack = 0;
@@ -896,7 +896,7 @@
assert(req);
- DEBUG(io) MsgLog::dprintf(true, "Insert request on %s%d-%d\n",
+ DEBUG(io) dprintf(true, "Insert request on %s%d-%d\n",
part->ctrlr->name,
part->unit,
part->ndx);
@@ -910,7 +910,7 @@
#endif
#if 0
- MsgLog::dprintf(true, "Write dt=%s DIO 0x%08x pOb 0x%08x data 0x%08x ready to run\n",
+ dprintf(true, "Write dt=%s DIO 0x%08x pOb 0x%08x data 0x%08x ready to run\n",
pcd->TypeName(), &dio, dio.pObHdr, dio.ioaddr);
#endif
@@ -954,7 +954,7 @@
DuplexedIO *dio = DuplexedIO::Grab(pObj->ob.oid, IoCmd::Write);
- DEBUG(io) MsgLog::dprintf(true, "Setting up request (dt=%s)...\n",
+ DEBUG(io) dprintf(true, "Setting up request (dt=%s)...\n",
div_TypeName(pcd->type));
dio->pObHdr = pObj;
@@ -986,7 +986,7 @@
assert(req);
- DEBUG(io) MsgLog::dprintf(true, "Insert request on %s%d-%d\n",
+ DEBUG(io) dprintf(true, "Insert request on %s%d-%d\n",
part->ctrlr->name,
part->unit,
part->ndx);
@@ -997,7 +997,7 @@
Thread::Current()->SleepOn(dio->stallQ);
#if 0
- MsgLog::dprintf(true, "Write dt=%s DIO 0x%08x pOb 0x%08x data 0x%08x ready to run\n",
+ dprintf(true, "Write dt=%s DIO 0x%08x pOb 0x%08x data 0x%08x ready to run\n",
pcd->TypeName(), dio, dio->pObHdr, dio->ioaddr);
#endif
dio->Release();
@@ -1019,7 +1019,7 @@
FrameInfo fi(oid);
if (fi.cd == 0)
- MsgLog::fatal("Writing object to nonexistent range\n");
+ fatal("Writing object to nonexistent range\n");
WritePageTo(pObj, fi.cd, fi.relObFrame * EROS_PAGE_SECTORS);
}
@@ -1039,7 +1039,7 @@
#ifndef NDEBUG
if ( pObj->obType == ObType::PtLogPage && pObj->IsDirty() == false )
- MsgLog::dprintf(true, "Object (hdr=0x%08x) is not dirty in WritePageToLog()\n",
+ dprintf(true, "Object (hdr=0x%08x) is not dirty in WritePageToLog()\n",
pObj);
assert(pObj->obType == ObType::PtDriverPage || pObj->IsDirty());
#endif
@@ -1107,7 +1107,7 @@
FrameInfo fi(pObj->ob.oid);
if (fi.cd == 0)
- MsgLog::fatal("Writing object to nonexistent range\n");
+ fatal("Writing object to nonexistent range\n");
relativePage = fi.relTagFrame;
cd = fi.cd;
@@ -1123,7 +1123,7 @@
FrameInfo fi(pObj->ob.oid);
if (fi.cd == 0)
- MsgLog::fatal("Writing object to nonexistent range\n");
+ fatal("Writing object to nonexistent range\n");
relativePage = fi.relObFrame;
cd = fi.cd;
@@ -1142,7 +1142,7 @@
pObj->ClearFlags(OFLG_IO|OFLG_DIRTY|OFLG_REDIRTY);
#ifdef DBG_CLEAN
- MsgLog::printf("Object ty %d oid=0x%08x%08x written zero\n",
+ printf("Object ty %d oid=0x%08x%08x written zero\n",
pObj->obType,
(uint32_t) (pObj->oid >> 32),
(uint32_t) pObj->oid);
@@ -1190,7 +1190,7 @@
break;
}
default:
- MsgLog::fatal("Don't know how to write obtype=%d\n", pObj->obType);
+ fatal("Don't know how to write obtype=%d\n", pObj->obType);
break;
}
1.38 +25 -26 eros/src/base/sys/kernel/kern_PhysMem.cxx
Index: kern_PhysMem.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_PhysMem.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- kern_PhysMem.cxx 2001/08/14 19:13:30 1.37
+++ kern_PhysMem.cxx 2001/11/26 01:05:39 1.38
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/util.h>
#include <kerninc/PhysMem.hxx>
#include <disk/DiskKey.hxx>
@@ -166,7 +165,7 @@
}
DEBUG(avail) {
- MsgLog::printf("%d units of %d %% %d %s bytes available\n",
+ printf("%d units of %d %% %d %s bytes available\n",
nUnits, unitSize, mc->align,
contiguous ? "contiguous" : "total");
}
@@ -230,7 +229,7 @@
assert(((unsigned)nBytes & (mc->align - 1)) == 0);
DEBUG(alloc)
- MsgLog::printf("PhysMem::Alloc: nBytes=0x%x, "
+ printf("PhysMem::Alloc: nBytes=0x%x, "
"mc->base=0x%x, mc->bound=0x%x, mc->align=0x%x\n",
(unsigned)nBytes, (unsigned)mc->base,
(unsigned)mc->bound, mc->align);
@@ -263,18 +262,18 @@
where = allocTargetBaseAligned;
allocTarget->allocBase = where + nBytes;
} else {
- MsgLog::printf("0x%x 0x%x 0x%x 0x%x\n",
+ printf("0x%x 0x%x 0x%x 0x%x\n",
(unsigned)allocTarget->allocBase,
(unsigned)allocTarget->allocBound,
(unsigned)mc->base, (unsigned)mc->bound );
- MsgLog::fatal("Physical memory allocator will not split memory regions\n");
+ fatal("Physical memory allocator will not split memory regions\n");
}
assert(where >= base);
assert(where + nBytes <= bound);
DEBUG(alloc)
- MsgLog::printf("Alloc %u %% %u at 0x%08x. "
+ printf("Alloc %u %% %u at 0x%08x. "
"Rgn 0x%08x now [0x%08x,0x%08x)\n",
(uint32_t) nBytes, mc->align, (uint32_t) where,
allocTarget,
@@ -299,23 +298,23 @@
kpa_t base = kmi->allocBase;
kpa_t bound = kmi->allocBound;
- db_printf("Rgn 0x%08x ty=%d: [0x%08x,0x%08x) %u bytes unallocated\n",
- kmi,
- kmi->type,
- (unsigned) kmi->base,
- (unsigned) kmi->bound,
- (unsigned) bound - base);
+ printf("Rgn 0x%08x ty=%d: [0x%08x,0x%08x) %u bytes unallocated\n",
+ kmi,
+ kmi->type,
+ (unsigned) kmi->base,
+ (unsigned) kmi->bound,
+ (unsigned) bound - base);
if (kmi->firstObHdr) {
- db_printf(" allocBase 0x%08x%08x allocBound 0x%08x%08x\n",
- (unsigned) (kmi->allocBase >> 32),
- (unsigned) (kmi->allocBase),
- (unsigned) (kmi->allocBound >> 32),
- (unsigned) (kmi->allocBound));
- db_printf(" nPages 0x%08x (%d) basepa 0x%08x firstObHdr 0x%08x\n",
- kmi->nPages,
- kmi->nPages,
- kmi->basepa,
- kmi->firstObHdr);
+ printf(" allocBase 0x%08x%08x allocBound 0x%08x%08x\n",
+ (unsigned) (kmi->allocBase >> 32),
+ (unsigned) (kmi->allocBase),
+ (unsigned) (kmi->allocBound >> 32),
+ (unsigned) (kmi->allocBound));
+ printf(" nPages 0x%08x (%d) basepa 0x%08x firstObHdr 0x%08x\n",
+ kmi->nPages,
+ kmi->nPages,
+ kmi->basepa,
+ kmi->firstObHdr);
}
}
}
@@ -335,7 +334,7 @@
v = malloc(sz);
DEBUG(new)
- MsgLog::dprintf(NEW_STOP, "placement vec new grabs "
+ dprintf(NEW_STOP, "placement vec new grabs "
"0x%x (%d) at 0x%08x\n", sz,
sz, v);
@@ -353,7 +352,7 @@
v = malloc(sz);
DEBUG(new)
- MsgLog::dprintf(NEW_STOP, "placement new grabs "
+ dprintf(NEW_STOP, "placement new grabs "
"0x%x (%d) at 0x%08x\n", sz,
sz, v);
@@ -363,7 +362,7 @@
void *
operator new(size_t sz)
{
- MsgLog::fatal("Inappropriate call to non-placement operator new\n");
+ fatal("Inappropriate call to non-placement operator new\n");
return KPAtoP(void *, PhysMem::Alloc(sz, &PhysMem::any));
}
@@ -371,6 +370,6 @@
void *
operator new [](size_t sz)
{
- MsgLog::fatal("Inappropriate call to non-placement operator vector new\n");
+ fatal("Inappropriate call to non-placement operator vector new\n");
return KPAtoP(void *, PhysMem::Alloc(sz, &PhysMem::any));
}
1.4 +7 -8 eros/src/base/sys/kernel/kern_PhysPageSource.cxx
Index: kern_PhysPageSource.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_PhysPageSource.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- kern_PhysPageSource.cxx 2001/07/25 04:50:08 1.3
+++ kern_PhysPageSource.cxx 2001/11/26 01:05:39 1.4
@@ -21,7 +21,6 @@
/* ObjectRange driver for preloaded ram ranges */
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/AutoConf.hxx>
@@ -95,7 +94,7 @@
pgFrame *= EROS_PAGE_SIZE;
if (!ValidPhysPage(pmi, pgFrame)) {
- MsgLog::dprintf(true, "OID 0x%08x%08x invalid\n",
+ dprintf(true, "OID 0x%08x%08x invalid\n",
(unsigned long) (oid >> 32),
(unsigned long) (oid));
return 0;
@@ -103,7 +102,7 @@
ObjectHeader *pObj = ObjectCache::PhysPageToObHdr(pgFrame);
if (pObj == 0) {
- MsgLog::dprintf(true, "PhysPageSource::GetObject(): No header!\n");
+ dprintf(true, "PhysPageSource::GetObject(): No header!\n");
return pObj;
}
@@ -137,7 +136,7 @@
pObj->ResetKeyRing();
pObj->Intern();
- MsgLog::printf("PhysPageSource::GetObject() untested!\n");
+ printf("PhysPageSource::GetObject() untested!\n");
return pObj;
}
@@ -145,7 +144,7 @@
PhysPageSource::Invalidate(ObjectHeader *pObj)
{
if (pObj->obType == ObType::PtDevicePage) {
- MsgLog::fatal("PhysPageSource::Invalidate(PtDevicePage) is nonsense\n");
+ fatal("PhysPageSource::Invalidate(PtDevicePage) is nonsense\n");
}
else {
assert(pObj->obType == ObType::PtDataPage);
@@ -170,7 +169,7 @@
PhysPageAllocCount ++;
- MsgLog::fatal("PhysPageSource::Invalidate() unimplemented\n");
+ fatal("PhysPageSource::Invalidate() unimplemented\n");
}
return false;
@@ -179,7 +178,7 @@
bool
PhysPageSource::Detach()
{
- MsgLog::fatal("PhysPageSource::Detach() unimplemented\n");
+ fatal("PhysPageSource::Detach() unimplemented\n");
return false;
}
@@ -187,7 +186,7 @@
bool
PhysPageSource::WriteBack(ObjectHeader *, bool)
{
- MsgLog::fatal("PhysPageSource::WriteBack() unimplemented\n");
+ fatal("PhysPageSource::WriteBack() unimplemented\n");
return false;
}
1.2 +3 -4 eros/src/base/sys/kernel/kern_PreloadObSource.cxx
Index: kern_PreloadObSource.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_PreloadObSource.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- kern_PreloadObSource.cxx 2001/06/10 19:41:50 1.1
+++ kern_PreloadObSource.cxx 2001/11/26 01:05:39 1.2
@@ -21,7 +21,6 @@
/* ObjectRange driver for preloaded ram ranges */
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/AutoConf.hxx>
@@ -236,7 +235,7 @@
bool
PreloadObSource::Invalidate(ObjectHeader *)
{
- MsgLog::fatal("PreloadObSource::Evict() unimplemented\n");
+ fatal("PreloadObSource::Evict() unimplemented\n");
return false;
}
@@ -244,7 +243,7 @@
bool
PreloadObSource::Detach()
{
- MsgLog::fatal("PreloadObSource::Detach() unimplemented\n");
+ fatal("PreloadObSource::Detach() unimplemented\n");
return false;
}
@@ -252,7 +251,7 @@
bool
PreloadObSource::WriteBack(ObjectHeader *, bool)
{
- MsgLog::fatal("PreloadObSource::Write() unimplemented\n");
+ fatal("PreloadObSource::Write() unimplemented\n");
return false;
}
1.58 +6 -6 eros/src/base/sys/kernel/kern_RamDisk.cxx
Index: kern_RamDisk.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_RamDisk.cxx,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- kern_RamDisk.cxx 2001/01/10 13:16:42 1.57
+++ kern_RamDisk.cxx 2001/11/26 01:05:39 1.58
@@ -67,7 +67,7 @@
return true;
else
- MsgLog::printf("No ramdisk found\n");
+ printf("No ramdisk found\n");
return false;
}
@@ -141,7 +141,7 @@
Request *r = rq.GetNextRequest();
DEBUG(ramio)
- MsgLog::printf("Ramdisk found request: start %d nsec %d\n",
+ printf("Ramdisk found request: start %d nsec %d\n",
r->req_start, r->req_nsec);
if (r->Commit(this, this) == false) {
@@ -155,14 +155,14 @@
#endif
if ((r->req_start + r->req_nsec) > nSecs)
- MsgLog::fatal("IO Range error - start %d nsec %d\n",
+ fatal("IO Range error - start %d nsec %d\n",
r->req_start, r->req_nsec);
switch (r->cmd) {
case IoCmd::Read:
if ( ! r->IsCompleted() ) {
DEBUG(ramio)
- MsgLog::printf("Ramdisk: READ %d bytes from sector %d to addr 0x%x\n",
+ printf("Ramdisk: READ %d bytes from sector %d to addr 0x%x\n",
r->req_nsec * EROS_SECTOR_SIZE,
r->req_start, r->req_ioaddr);
@@ -172,7 +172,7 @@
case IoCmd::Write:
DEBUG(ramio)
- MsgLog::printf("Ramdisk: WRITE %d bytes to sector %d from addr 0x%x\n",
+ printf("Ramdisk: WRITE %d bytes to sector %d from addr 0x%x\n",
r->req_nsec * EROS_SECTOR_SIZE,
r->req_start, r->req_ioaddr);
@@ -180,7 +180,7 @@
break;
case IoCmd::Plug:
DEBUG(ramio)
- MsgLog::printf("Ramdisk: PLUG passes\n");
+ printf("Ramdisk: PLUG passes\n");
break;
}
1.22 +4 -5 eros/src/base/sys/kernel/kern_Segment.cxx
Index: kern_Segment.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Segment.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- kern_Segment.cxx 2001/10/21 17:12:17 1.21
+++ kern_Segment.cxx 2001/11/26 01:05:39 1.22
@@ -22,7 +22,6 @@
#include <eros/SysTraceKey.h>
#include <kerninc/Process.hxx>
#include <kerninc/SegWalk.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Depend.hxx>
#include <kerninc/Thread.hxx>
@@ -139,7 +138,7 @@
#ifdef OPTION_DDB
# ifdef KT_Wrapper
#define WALK_DBG_MSG(prefix) \
- if (ddb_segwalk_debug) MsgLog::dprintf(true, prefix \
+ if (ddb_segwalk_debug) dprintf(true, prefix \
" proc_WalkSeg: wi.producer 0x%x, wi.segBlss %d wi.isWrap %d\n" \
"wi.vaddr 0x%x wi.offset 0x%X flt %d wa %d segKey 0x%x\n" \
"canCall %d canWrite %d stopBlss %d\n" \
@@ -150,7 +149,7 @@
wi.redSeg, wi.redSpanBlss, wi.redSegOffset);
# else
#define WALK_DBG_MSG(prefix) \
- if (ddb_segwalk_debug) MsgLog::dprintf(true, prefix \
+ if (ddb_segwalk_debug) dprintf(true, prefix \
" proc_WalkSeg: wi.producer 0x%x, wi.segBlss %d wi.isRed %d\n" \
"wi.vaddr 0x%x wi.offset 0x%X flt %d wa %d segKey 0x%x\n" \
"canCall %d canWrite %d stopBlss %d\n" \
@@ -199,7 +198,7 @@
#ifndef NDEBUG
if (wi.segObj->obType == ObType::NtUnprepared)
- MsgLog::fatal("Some node unprepare did not work at kern_Segment.cxx:%d\n",
+ fatal("Some node unprepare did not work at kern_Segment.cxx:%d\n",
__LINE__);
#endif
@@ -581,7 +580,7 @@
if (ddb_segwalk_debug) {
static uint64_t last_offset = 0x0ll;
if (wi.redSegOffset != last_offset) {
- MsgLog::dprintf(true, "Invoking segment keeper. redseg 0x%x"
+ dprintf(true, "Invoking segment keeper. redseg 0x%x"
" base 0x%X last 0x%X\n",
wi.redSeg, wi.redSegOffset, last_offset);
last_offset = wi.redSegOffset;
1.47 +10 -11 eros/src/base/sys/kernel/kern_SysTimer.cxx
Index: kern_SysTimer.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_SysTimer.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- kern_SysTimer.cxx 2001/06/18 18:51:10 1.46
+++ kern_SysTimer.cxx 2001/11/26 01:05:39 1.47
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/SysTimer.hxx>
@@ -90,12 +89,12 @@
#if 0
extern intDepth;
- MsgLog::printf("Wakeup() at intDepth %d, sleepers? %c\n",
+ printf("Wakeup() at intDepth %d, sleepers? %c\n",
intDepth, ThreadChain ? 'y' : 'n');
#endif
#if 0
- MsgLog::printf("SysTimer::Tick() resets waketime at %d\n", (long) now);
+ printf("SysTimer::Tick() resets waketime at %d\n", (long) now);
#endif
wakeup = ~(0llu); /* essentially never */
@@ -111,7 +110,7 @@
ThreadChain = ThreadChain->nextTimedThread;
#if 0
if ( t->IsUser() )
- MsgLog::printf("wake sleeper; now %u waketime %u nextwake %u\n",
+ printf("wake sleeper; now %u waketime %u nextwake %u\n",
(uint32_t) now, (uint32_t)t->wakeTime,
(uint32_t) wakeup);
#endif
@@ -167,7 +166,7 @@
#if 0
if ( t.IsUser() )
- MsgLog::printf("added sleeper; now %u waketime %u nextwake %u\n",
+ printf("added sleeper; now %u waketime %u nextwake %u\n",
(uint32_t) now, (uint32_t)t.wakeTime,
(uint32_t) wakeup);
#endif
@@ -181,7 +180,7 @@
IRQ::DISABLE();
#if 0
- MsgLog::printf("Canceling alarm on thread 0x%x\n", &t);
+ printf("Canceling alarm on thread 0x%x\n", &t);
#endif
if (ThreadChain == &t) {
@@ -209,7 +208,7 @@
if (TimerChain == 0 || t.wakeTime < TimerChain->wakeTime) {
#if 0
- MsgLog::printf("Insert first timer. nxt=0x%08x tnxt=0x%08x\n",
+ printf("Insert first timer. nxt=0x%08x tnxt=0x%08x\n",
TimerChain, t.nextTimer);
#endif
t.nextTimer = TimerChain;
@@ -241,7 +240,7 @@
#endif
#if 0
- MsgLog::printf("added timer; now %u waketime %u nextwake %u\n",
+ printf("added timer; now %u waketime %u nextwake %u\n",
(uint32_t) now, (uint32_t)t.wakeTime,
(uint32_t) wakeup);
#endif
@@ -260,12 +259,12 @@
}
#if 0
- MsgLog::printf("Canceling alarm on timer 0x%x\n", &t);
+ printf("Canceling alarm on timer 0x%x\n", &t);
#endif
if (TimerChain == &t) {
#if 0
- MsgLog::printf("Remove first timer. nxt=0x%08x\n", t.nextTimer);
+ printf("Remove first timer. nxt=0x%08x\n", t.nextTimer);
#endif
TimerChain = t.nextTimer;
ResetWakeTime();
@@ -364,7 +363,7 @@
void
SysTimer::InitTimePage()
{
- MsgLog::printf("Fabricating TOD Page\n");
+ printf("Fabricating TOD Page\n");
TimePageHdr = ObjectCache::GrabPageFrame();
1.17 +1 -2 eros/src/base/sys/kernel/kern_Task.cxx
Index: kern_Task.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Task.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- kern_Task.cxx 2001/01/08 20:57:52 1.16
+++ kern_Task.cxx 2001/11/26 01:05:39 1.17
@@ -22,7 +22,6 @@
#include <kerninc/SysTimer.hxx>
#include <kerninc/Task.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
TaskVec Task::activeTasks;
@@ -41,7 +40,7 @@
}
}
- MsgLog::fatal("Task table exhausted\n");
+ fatal("Task table exhausted\n");
return 0;
}
1.133 +34 -35 eros/src/base/sys/kernel/kern_Thread.cxx
Index: kern_Thread.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Thread.cxx,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- kern_Thread.cxx 2001/06/10 19:41:50 1.132
+++ kern_Thread.cxx 2001/11/26 01:05:39 1.133
@@ -24,7 +24,6 @@
#include <kerninc/Thread.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/CpuReserve.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/SysTimer.hxx>
@@ -119,7 +118,7 @@
delete t;
}
- MsgLog::printf("Allocated User Threads: 0x%x at 0x%08x\n",
+ printf("Allocated User Threads: 0x%x at 0x%08x\n",
sizeof(Thread[KTUNE_NTHREAD]), ThreadTable);
}
@@ -134,7 +133,7 @@
return t;
}
- MsgLog::fatal("Threads exhausted\n");
+ fatal("Threads exhausted\n");
return 0;
}
@@ -142,14 +141,14 @@
Thread::operator delete(void *v)
{
Thread *t = (Thread *) v;
- /* MsgLog::dprintf(true, "Deleting thread 0x%08x\n", t); */
+ /* dprintf(true, "Deleting thread 0x%08x\n", t); */
/* not hazarded because thread key */
t->processKey.NH_VoidKey();
t->reserveLinkage.Unlink();
t->state = Thread::Free;
if (curThread == t) {
#if 0
- MsgLog::printf("curthread 0x%08x is deleted\n", t);
+ printf("curthread 0x%08x is deleted\n", t);
#endif
curThread = 0;
}
@@ -186,7 +185,7 @@
#endif
if (state != Running && prev)
- MsgLog::fatal("Thread 0x%08x (%s) REqueues q=0x%08x lastq=0x%08x state=%d\n",
+ fatal("Thread 0x%08x (%s) REqueues q=0x%08x lastq=0x%08x state=%d\n",
this, Name(), &p, lastq, state);
Thread::DO_NOT_PREEMPT();
@@ -210,7 +209,7 @@
{
extern bool ddb_thread_uqueue_debug;
if (IsUser() && ddb_thread_uqueue_debug)
- MsgLog::dprintf(true, "Thread 0x%08x sleeps on queue 0x%08x\n",
+ dprintf(true, "Thread 0x%08x sleeps on queue 0x%08x\n",
this, &p);
}
#endif
@@ -279,7 +278,7 @@
{
extern bool ddb_thread_uqueue_debug;
if (IsUser() && ddb_thread_uqueue_debug)
- MsgLog::dprintf(true, "Thread 0x%08x sleeps on queue 0x%08x (ProcessorQueue)\n",
+ dprintf(true, "Thread 0x%08x sleeps on queue 0x%08x (ProcessorQueue)\n",
this, &ProcessorQueue);
}
#endif
@@ -307,7 +306,7 @@
*/
if (curThread && cpuReserve->curPrio > curThread->cpuReserve->curPrio) {
#if 0
- MsgLog::printf("Wake 0x%08x Cur thread should yield. canPreempt=%c\n",
+ printf("Wake 0x%08x Cur thread should yield. canPreempt=%c\n",
this, canPreempt ? 'y' : 'n');
#endif
curThread->Preempt();
@@ -335,7 +334,7 @@
#if 0
if (!CAN_PREEMPT()) {
- MsgLog::printf("0x%08x Quanta expires in NOPREEMPT, state %d.\n",
+ printf("0x%08x Quanta expires in NOPREEMPT, state %d.\n",
curThread, curThread->state);
}
#endif
@@ -403,7 +402,7 @@
*/
if (yieldState == (ys_ShouldYield | ys_NoPreempt)) {
- MsgLog::printf("0x%08x Preempt suppressed, state=%d\n",
+ printf("0x%08x Preempt suppressed, state=%d\n",
curThread, curThread->state);
return;
}
@@ -424,7 +423,7 @@
curThread->Wakeup(); /* perverse, but correct. */
#ifdef THREADDEBUG
if ( curThread->IsUser() )
- MsgLog::printf("Active thread goes to end of run queue\n");
+ printf("Active thread goes to end of run queue\n");
#endif
}
@@ -440,7 +439,7 @@
Check::Consistency("In DoReschedule() loop");
#endif
#if 0
- MsgLog::printf("schedloop: curThread 0x%08x ctxt 0x%08x fc 0x%x\n",
+ printf("schedloop: curThread 0x%08x ctxt 0x%08x fc 0x%x\n",
curThread, curThread->context,
curThread->context ? curThread->context->faultCode
: 0);
@@ -457,7 +456,7 @@
assert( curThread->IsUser() );
/* We shouldn't be having this happen YET */
- MsgLog::fatal("Current thread no longer runnable\n");
+ fatal("Current thread no longer runnable\n");
delete curThread;
assert (curThread == 0);
@@ -485,7 +484,7 @@
count++;
if (count % 100 == 0) {
count = 0;
- MsgLog::printf("schedloop: curThread 0x%08x ctxt 0x%08x (%s) run?"
+ printf("schedloop: curThread 0x%08x ctxt 0x%08x (%s) run?"
" %c st %d fc 0x%x\n",
curThread,
curThread->context,
@@ -511,23 +510,23 @@
assert (cpuReserve == CurContext()->cpuReserve);
#ifdef PREEMPTION
- /* MsgLog::printf("Disarming expiration timer\n");
+ /* printf("Disarming expiration timer\n");
* QuantaTimer.Disarm();
*/
assert( IRQ::DISABLE_DEPTH() == 1 );
yieldState = 0; /* until proven otherwise */
- /* MsgLog::printf("Setting expiration timer\n");
+ /* printf("Setting expiration timer\n");
* QuantaTimer.WakeupIn(SCHED_QUANTA, Expired);
*/
/* SysTimer::SetQuanta(Machine::MillisecondsToTicks(SCHED_QUANTA));
- * MsgLog::dprintf(true,"Set quanta to %d\n", (uint32_t) (cpuReserve->residQuanta));
+ * dprintf(true,"Set quanta to %d\n", (uint32_t) (cpuReserve->residQuanta));
*/
CpuReserve::Current = cpuReserve;
assert( IRQ::DISABLE_DEPTH() == 1 );
- /* MsgLog::printf("It's set...\n"); */
+ /* printf("It's set...\n"); */
#endif
assert(Thread::Current() == curThread);
@@ -558,14 +557,14 @@
{
extern bool ddb_thread_uqueue_debug;
if (ddb_thread_uqueue_debug && thread->IsUser() )
- MsgLog::dprintf(true, "Waking up thread 0x%08x (%s)\n",
+ dprintf(true, "Waking up thread 0x%08x (%s)\n",
thread, thread->Name());
}
#endif
#if 0
if (verbose)
- MsgLog::printf("Waking up thread 0x%08x (%s)\n",
+ printf("Waking up thread 0x%08x (%s)\n",
next, ((struct Thread *) next)->Name());
#endif
@@ -588,14 +587,14 @@
{
extern bool ddb_thread_uqueue_debug;
if (ddb_thread_uqueue_debug && thread->IsUser() )
- MsgLog::dprintf(true, "Waking up thread 0x%08x (%s)\n",
+ dprintf(true, "Waking up thread 0x%08x (%s)\n",
thread, thread->Name());
}
#endif
#if 0
if (verbose)
- MsgLog::printf("Waking up thread 0x%08x (%s)\n",
+ printf("Waking up thread 0x%08x (%s)\n",
next, ((struct Thread *) next)->Name());
#endif
@@ -639,19 +638,19 @@
uint32_t wtbl = (uint32_t) ThreadTable;
if (wthis < wtbl)
- MsgLog::fatal("Thread 'this' pointer too low\n");
+ fatal("Thread 'this' pointer too low\n");
wthis -= wtbl;
if (wthis % sizeof(Thread))
- MsgLog::fatal("Thread 'this' pointer not valid.\n");
+ fatal("Thread 'this' pointer not valid.\n");
if ((wthis / sizeof(Thread)) >= KTUNE_NTHREAD)
- MsgLog::fatal("Thread 'this' pointer too high.\n");
+ fatal("Thread 'this' pointer too high.\n");
if (!context && processKey.GetType() != KT_Process &&
! processKey.IsVoidKey())
- MsgLog::fatal("Thread 0x%08x has bad key type.\n", this);
+ fatal("Thread 0x%08x has bad key type.\n", this);
}
#endif
@@ -742,21 +741,21 @@
/* Try to prepare this thread to run: */
#ifdef THREADDEBUG
- MsgLog::printf("Preparing user thread\n");
+ printf("Preparing user thread\n");
#endif
if ( context == 0 ) {
/* Domain root may have been rescinded.... */
#if 0
- MsgLog::printf("prepping dom key ");
+ printf("prepping dom key ");
processKey.Print();
#endif
processKey.Prepare();
if (processKey.IsType(KT_Process) == false) {
- MsgLog::fatal("Rescinded thread!\n");
+ fatal("Rescinded thread!\n");
return false;
}
@@ -771,7 +770,7 @@
}
#ifdef THREADDEBUG
- MsgLog::printf("Preparing context 0x%08x..\n", context);
+ printf("Preparing context 0x%08x..\n", context);
#endif
context->Prepare();
@@ -799,19 +798,19 @@
*/
#if 1
- MsgLog::printf("Invoking domain keeper on Thread 0x%08x pfcount=%d\n",
+ printf("Invoking domain keeper on Thread 0x%08x pfcount=%d\n",
this, ((DomainContext*)context)->pfCount);
#endif
((ArchContext *)context)->InvokeDomainKeeper();
#ifdef THREADDEBUG
- MsgLog::dprintf(true, "After kpr invoke, ctxt=0x%08x, svArea=0x%08x\n",
+ dprintf(true, "After kpr invoke, ctxt=0x%08x, svArea=0x%08x\n",
context, context->saveArea);
#endif
#if 0
- MsgLog::printf("User thread is prepared!\n");
+ printf("User thread is prepared!\n");
/* startThread->Wakeup(); */
#endif
@@ -823,7 +822,7 @@
#endif
}
- MsgLog::dprintf(true, "Thread start loop exceeded\n");
+ dprintf(true, "Thread start loop exceeded\n");
return false;
}
1.37 +3 -6 eros/src/base/sys/kernel/kern_Twiddler.cxx
Index: kern_Twiddler.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Twiddler.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- kern_Twiddler.cxx 2001/07/24 03:59:30 1.36
+++ kern_Twiddler.cxx 2001/11/26 01:05:39 1.37
@@ -19,8 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
#include <kerninc/SysTimer.hxx>
@@ -71,7 +69,7 @@
{
TheTwiddler.Wakeup(); /* let it initialize itself... */
- MsgLog::printf("%s (no vector)\n", ac->name);
+ printf("%s (no vector)\n", ac->name);
return true;
}
@@ -83,7 +81,7 @@
void Twiddler::Start()
{
int stack;
- MsgLog::printf("Start Twiddler (thread 0x%x,context 0x%x,stack 0x%x)\n",
+ printf("Start Twiddler (thread 0x%x,context 0x%x,stack 0x%x)\n",
&TheTwiddler, TheTwiddler.context, &stack);
assert(IRQ::INTERRUPTS_ENABLED());
@@ -94,8 +92,7 @@
for(;;) {
ms += 250ll;
- Console::Twiddle(4);
-
+
assert(IRQ::INTERRUPTS_ENABLED());
uint64_t wakeTick = startTick + Machine::MillisecondsToTicks(ms);
IRQ::DISABLE();
1.8 +6 -7 eros/src/base/sys/kernel/kern_heap.cxx
Index: kern_heap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_heap.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- kern_heap.cxx 2001/08/14 19:13:30 1.7
+++ kern_heap.cxx 2001/11/26 01:05:39 1.8
@@ -21,7 +21,6 @@
/* Implementation of kernel malloc for EROS. */
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/util.h>
#include <kerninc/PhysMem.hxx>
#include <kerninc/ObjectCache.hxx>
@@ -60,7 +59,7 @@
{
/* Physical memory initialization grabbed to the end of the last
* page, so the heap is valid to that point. */
- MsgLog::printf("heap_start, heap_bound = 0x%08x, 0x%08x\n",
+ printf("heap_start, heap_bound = 0x%08x, 0x%08x\n",
(unsigned)heap_start, (unsigned) heap_bound);
}
@@ -71,7 +70,7 @@
return PhysMem::Alloc(EROS_PAGE_SIZE, &PhysMem::pages);
}
else {
- MsgLog::printf("Trying to allocate from object heap.\n");
+ printf("Trying to allocate from object heap.\n");
ObjectHeader *pHdr = ObjectCache::GrabPageFrame();
kpa_t pa = VTOP(ObjectCache::ObHdrToPage(pHdr));
@@ -87,7 +86,7 @@
void
grow_heap(kva_t target)
{
- MsgLog::printf("Growing the heap...\n");
+ printf("Growing the heap...\n");
assert((heap_defined & EROS_PAGE_MASK) == 0);
while (heap_defined < target) {
@@ -112,13 +111,13 @@
malloc(size_t nBytes)
{
DEBUG(alloc)
- MsgLog::printf("malloc: heap_end, heap_def, heap_limit now 0x%08x 0x%08x 0x%08x\n",
+ printf("malloc: heap_end, heap_def, heap_limit now 0x%08x 0x%08x 0x%08x\n",
(unsigned) heap_end,
(unsigned) heap_defined,
(unsigned) heap_bound);
if (heap_bound - heap_end < nBytes)
- MsgLog::fatal("Heap space exhausted. %d wanted %d avail\n", nBytes, heap_bound - heap_end);
+ fatal("Heap space exhausted. %d wanted %d avail\n", nBytes, heap_bound - heap_end);
if (heap_defined - heap_end < nBytes)
grow_heap(heap_end + nBytes);
@@ -133,7 +132,7 @@
heap_end = align_up(heap_end, 4);
DEBUG(alloc)
- MsgLog::dprintf(false,
+ dprintf(false,
"malloc() returns nBytes=%d at 0x%08x\n", nBytes,
vp);
1.81 +17 -18 eros/src/base/sys/kernel/kern_main.cxx
Index: kern_main.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_main.cxx,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- kern_main.cxx 2001/11/14 13:22:03 1.80
+++ kern_main.cxx 2001/11/26 01:05:39 1.81
@@ -30,9 +30,8 @@
/* currently, no arguments to the EROS kernel: */
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
-#include <kerninc/Console.hxx>
/* #include "lostart.hxx" */
+#include <kerninc/KernStream.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/util.h>
@@ -101,7 +100,7 @@
void
main_thread_entry()
{
- MsgLog::printf("Continuing from main thread...\n");
+ printf("Continuing from main thread...\n");
#if 0
Debugger();
@@ -111,7 +110,7 @@
AutoConf::ArchConfigure();
AutoConf::Configure();
- MsgLog::printf("After AutoConfigure()\n");
+ printf("After AutoConfigure()\n");
#if 0
{
@@ -123,7 +122,7 @@
(void) malloc(1025*EROS_PAGE_SIZE);
}
- MsgLog::dprintf(true, "After malloc()\n");
+ dprintf(true, "After malloc()\n");
#endif
/* Allocate all of the boot-time allocated structures: */
@@ -140,12 +139,12 @@
in-core nodes, pages, and the CoreTable: */
ObjectCache::Init();
- MsgLog::printf("Object cache initialized...\n");
+ printf("Object cache initialized...\n");
- MsgLog::printf("main() thread is 0x%x\n", &InitialThread);
+ printf("main() thread is 0x%x\n", &InitialThread);
#if 0
- MsgLog::dprintf(true, "main() thread: about to call RunMountDaemon...\n");
+ dprintf(true, "main() thread: about to call RunMountDaemon...\n");
#endif
/* Following should be done before any possibility of a time key
@@ -158,7 +157,7 @@
*/
#if 0
- MsgLog::dprintf(true, "Mount daemon ran to completion\n");
+ dprintf(true, "Mount daemon ran to completion\n");
#endif
/* halt(); */
@@ -176,10 +175,8 @@
assert( thread->processKey.IsHazard() == false );
#ifdef OPTION_DDB
- if ( Machine::IsDebugBoot() ) {
- MsgLog::printf("Stopping before waking up IPL thread.\n");
- Debugger();
- }
+ if ( Machine::IsDebugBoot() )
+ dprintf(true, "Stopping before waking up IPL thread.\n");
#endif
/* Forge a domain key for this thread: */
@@ -191,7 +188,7 @@
k.unprep.count = BootInfoPtr->iplKey.unprep.count;
}
else {
- MsgLog::printf("No IPL key!\n");
+ printf("No IPL key!\n");
}
/* The process prepare logic will appropriately adjust this priority
@@ -199,10 +196,12 @@
the thread scheduled. */
CpuReserve::GetHighestReserve().AddUserThread(thread);
+ KernStream::BeginUserThreads();
+
thread->Wakeup();
#ifdef OPTION_TEST_PROCS
- MsgLog::printf(
+ printf(
"\n"
"- The rapidly moving twiddle is caused by the idle thread, which\n"
" is in an infinite loop calling Yield().\n"
@@ -210,7 +209,7 @@
"- The timer is obvious.\n"
"- The slowest twiddle is me ticking every 10 seconds or so.\n");
- MsgLog::printf("\nYour cpu type is %d (%s)\n",
+ printf("\nYour cpu type is %d (%s)\n",
Machine::GetCpuType(),
Machine::GetCpuVendor());
@@ -254,9 +253,9 @@
* up here is the wall clock thread.
*/
- MsgLog::printf("Somehow halted\n");
+ printf("Somehow halted\n");
halt('m');
- MsgLog::printf("main(): exit\n");
+ printf("main(): exit\n");
}
1.36 +5 -41 eros/src/base/sys/kernel/kern_util.cxx
Index: kern_util.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_util.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- kern_util.cxx 2001/06/20 17:01:11 1.35
+++ kern_util.cxx 2001/11/26 01:05:39 1.36
@@ -19,27 +19,27 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/util.h>
int
__assert(const char *expression, const char *file, int line)
{
- MsgLog::fatal("%s:%d: failed assertion `%s'\n", file, line, expression);
+ fatal("%s:%d: failed assertion `%s'\n", file, line, expression);
return 0;
}
int
__assertex(const void *ptr, const char *expression, const char *file, int line)
{
- MsgLog::printf("Ptr 0x%08x\n", ptr);
- MsgLog::fatal("%s:%d: failed assertion `%s'\n", file, line, expression);
+ printf("Ptr 0x%08x\n", ptr);
+ fatal("%s:%d: failed assertion `%s'\n", file, line, expression);
return 0;
}
void
__require(const char *expression, const char *file, int line)
{
- MsgLog::dprintf(true, "%s:%d: failed rqt `%s'\n", file, line, expression);
+ dprintf(true, "%s:%d: failed rqt `%s'\n", file, line, expression);
}
static char hexdigits[16] = {
@@ -53,40 +53,6 @@
return hexdigits[b];
}
-bool
-IsPrint(uint8_t c)
-{
- if (c > 127)
- return false;
-
- static uint8_t isPrint[16] = { /* really a bitmask! */
- 0x00, /* BEL ACK ENQ EOT ETX STX SOH NUL */
- 0x00, /* SI SO CR FF VT LF TAB BS */
- 0x00, /* ETB SYN NAK DC4 DC3 DC2 DC1 DLE */
- 0x00, /* US RS GS FS ESC SUB EM CAN */
- 0xff, /* ' & % $ # " ! SPC */
- 0xff, /* / . - , + * ) ( */
- 0xff, /* 7 6 5 4 3 2 1 0 */
- 0xff, /* ? > = < ; : 9 8 */
- 0xff, /* G F E D C B A @ */
- 0xff, /* O N M L K J I H */
- 0xff, /* W V U T S R Q P */
- 0xff, /* _ ^ ] \ [ Z Y X */
- 0xff, /* g f e d c b a ` */
- 0xff, /* o n m l k j i h */
- 0xff, /* w v u t s r q p */
- 0x7f, /* DEL ~ } | { z y x */
- } ;
-
- uint8_t mask = isPrint[(c >> 3)];
- c &= 0x7u;
- if (c)
- mask >>= c;
- if (mask & 1)
- return true;
- return false;
-}
-
int
strcmp(const char *p1, const char *p2)
{
@@ -121,7 +87,6 @@
return dest;
}
-#ifdef OPTION_DDB
size_t
strlen(const char *s)
{
@@ -132,7 +97,6 @@
return end - s;
}
-#endif
kpa_t
align_up(kpa_t addr, uint32_t alignment)
1.26 +19 -0 eros/src/base/sys/kerninc/kernel.hxx
Index: kernel.hxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kerninc/kernel.hxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- kernel.hxx 2001/06/10 19:41:51 1.25
+++ kernel.hxx 2001/11/26 01:05:40 1.26
@@ -21,6 +21,7 @@
*/
#include <eros/target.h>
+#include <disk/ErosTypes.h>
#ifdef __cplusplus
#define BEGIN_CDECL extern "C" {
@@ -46,10 +47,28 @@
#endif
END_CDECL
+BEGIN_CDECL
+
+/* fatal() and printf() are implemented in kernel/kern_printf.cxx */
+#ifdef OPTION_DDB
+extern void fatal(const char* msg, ...);
+#else
+extern void fatal(const char* msg, ...) NORETURN;
+#endif
+
+extern void dprintf(unsigned shouldStop, const char* msg, ...);
+extern void printf(const char* msg, ...);
+extern void printOid(OID oid);
+extern void printCount(ObCount count);
+
+END_CDECL
+
#ifdef NDEBUG
+
#define assert(ignore) ((void) 0)
#define assertex(ptr, ignore) ((void) 0)
#define REQUIRE(ignore) ((void) 0)
+
#else
BEGIN_CDECL
1.4 +0 -3 eros/src/base/sys/kerninc/util.h
Index: util.h
===================================================================
RCS file: /cvs/eros/src/base/sys/kerninc/util.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- util.h 2001/06/20 17:01:11 1.3
+++ util.h 2001/11/26 01:05:40 1.4
@@ -33,11 +33,8 @@
kpa_t align_up(kpa_t addr, uint32_t alignment); /* alignment must be power of 2 */
kpa_t align_down(kpa_t addr, uint32_t alignment); /* alignment must be power of 2 */
-bool IsPrint(uint8_t c);
-#ifdef OPTION_DDB
size_t strlen(const char *c1);
-#endif
int strcmp(const char *c1, const char *c2);
char *strcpy(char *c1, const char *c2);
1.22 +0 -1 eros/src/base/sys/key/mk_Checkpoint.cxx
Index: mk_Checkpoint.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_Checkpoint.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mk_Checkpoint.cxx 2001/06/10 19:41:52 1.21
+++ mk_Checkpoint.cxx 2001/11/26 01:05:40 1.22
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.4 +3 -8 eros/src/base/sys/key/mk_Console.cxx
Index: mk_Console.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_Console.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mk_Console.cxx 2001/06/10 19:41:52 1.3
+++ mk_Console.cxx 2001/11/26 01:05:40 1.4
@@ -22,7 +22,7 @@
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/Process.hxx>
-#include <kerninc/MsgLog.hxx>
+#include <kerninc/KernStream.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
@@ -47,16 +47,11 @@
}
if (inv.entry.len) {
- MsgLog::putbuf(inv.entry.data, inv.entry.len);
+ KernStream::PutBuf(inv.entry.data, inv.entry.len);
if (inv.entry.data[inv.entry.len-1] != '\n')
- MsgLog::printf("\n");
+ printf("\n");
}
-
-#if 0
- for (uint32_t i = 0; i < inv.entry.len; i++)
- Console::Put(inv.entry.data[i]);
-#endif
inv.exit.code = RC_OK;
return;
}
1.15 +5 -6 eros/src/base/sys/key/mk_DevicePrivs.cxx
Index: mk_DevicePrivs.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_DevicePrivs.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mk_DevicePrivs.cxx 2001/08/14 19:13:31 1.14
+++ mk_DevicePrivs.cxx 2001/11/26 01:05:40 1.15
@@ -24,7 +24,6 @@
#include <kerninc/Thread.hxx>
#include <kerninc/ThreadPile.hxx>
#include <kerninc/IRQ.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/PhysMem.hxx>
#include <disk/DiskKey.hxx>
#include <kerninc/BootInfo.h>
@@ -68,7 +67,7 @@
assert(IRQ::GetHandler(irq) == DoUsermodeInterrupt);
DEBUG(wakeup)
- MsgLog::printf("Waking sleepers for IRQ %d\n", irq);
+ printf("Waking sleepers for IRQ %d\n", irq);
uirq.isPending = true;
uirq.sleepers.WakeAll();
@@ -91,7 +90,7 @@
case OC_DevPrivs_AllocIRQ:
{
DEBUG(alloc)
- MsgLog::printf("DevPrivs: Allocating IRQ %d\n", irq);
+ printf("DevPrivs: Allocating IRQ %d\n", irq);
if (irq >= NUM_HW_INTERRUPT) {
inv.exit.code = RC_RequestError;
@@ -182,7 +181,7 @@
if (irq < NUM_HW_INTERRUPT && !uirq.isPending) {
DEBUG(sleep)
- MsgLog::printf("DevPrivs: Sleeping for IRQ %d\n", irq);
+ printf("DevPrivs: Sleeping for IRQ %d\n", irq);
Thread::Current()->SleepOn(uirq.sleepers);
IRQ::ENABLE();
@@ -194,14 +193,14 @@
if (irq >= NUM_HW_INTERRUPT) {
DEBUG(error)
- MsgLog::printf("IRQ %d is invalid, bogon\n", irq);
+ printf("IRQ %d is invalid, bogon\n", irq);
inv.exit.code = RC_RequestError;
break;
}
assert(uirq.isPending);
DEBUG(sleep)
- MsgLog::printf("IRQ %d was pending already\n", irq);
+ printf("IRQ %d was pending already\n", irq);
IRQ::DISABLE();
uirq.isPending = false;
1.33 +0 -1 eros/src/base/sys/key/mk_Discrim.cxx
Index: mk_Discrim.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_Discrim.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mk_Discrim.cxx 2001/08/30 01:59:53 1.32
+++ mk_Discrim.cxx 2001/11/26 01:05:40 1.33
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.43 +0 -1 eros/src/base/sys/key/mk_KeyBits.cxx
Index: mk_KeyBits.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_KeyBits.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- mk_KeyBits.cxx 2001/06/10 19:41:52 1.42
+++ mk_KeyBits.cxx 2001/11/26 01:05:40 1.43
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.60 +4 -5 eros/src/base/sys/key/mk_ProcessTool.cxx
Index: mk_ProcessTool.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_ProcessTool.cxx,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- mk_ProcessTool.cxx 2001/05/29 06:16:38 1.59
+++ mk_ProcessTool.cxx 2001/11/26 01:05:40 1.60
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Key.h>
@@ -160,21 +159,21 @@
if (inv.entry.key[0]->IsType(KT_Node) == false) {
#if 0
- MsgLog::dprintf(true, "domtool: entry key is not node key\n");
+ dprintf(true, "domtool: entry key is not node key\n");
#endif
return;
}
if ( inv.entry.key[0]->IsReadOnly() ) {
#if 0
- MsgLog::printf("domtool: entry key is read only\n");
+ printf("domtool: entry key is read only\n");
#endif
return;
}
if ( inv.entry.key[0]->IsNoCall() ) {
#if 0
- MsgLog::printf("domtool: entry key is no-call\n");
+ printf("domtool: entry key is no-call\n");
#endif
return;
}
@@ -278,7 +277,7 @@
#if 0
extern void db_eros_print_key(Key&);
db_eros_print_key(fmtKey);
- MsgLog::dprintf(true, "Bad format key!\n");
+ dprintf(true, "Bad format key!\n");
#endif
COMMIT_POINT();
return;
1.33 +1 -2 eros/src/base/sys/key/mk_Returner.cxx
Index: mk_Returner.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_Returner.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mk_Returner.cxx 2001/06/10 19:41:52 1.32
+++ mk_Returner.cxx 2001/11/26 01:05:40 1.33
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/PhysMem.hxx>
#include <eros/Invoke.h>
@@ -33,7 +32,7 @@
void AllocReturnerBuffer()
{
ReturnerBuffer = ::new (0) uint8_t[EROS_MESSAGE_LIMIT];
- MsgLog::printf("Allocated returner buffer: 0x%x at 0x%08x\n",
+ printf("Allocated returner buffer: 0x%x at 0x%08x\n",
sizeof(uint8_t[EROS_MESSAGE_LIMIT]), ReturnerBuffer);
}
1.40 +0 -1 eros/src/base/sys/key/mk_SleepKey.cxx
Index: mk_SleepKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_SleepKey.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- mk_SleepKey.cxx 2001/05/29 00:55:12 1.39
+++ mk_SleepKey.cxx 2001/11/26 01:05:40 1.40
@@ -22,7 +22,6 @@
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/Process.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/IRQ.hxx>
1.59 +24 -26 eros/src/base/sys/key/mk_SysTrace.cxx
Index: mk_SysTrace.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_SysTrace.cxx,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- mk_SysTrace.cxx 2001/06/10 19:41:52 1.58
+++ mk_SysTrace.cxx 2001/11/26 01:05:40 1.59
@@ -22,8 +22,6 @@
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/Process.hxx>
-#include <kerninc/Console.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Thread.hxx>
@@ -205,7 +203,7 @@
#endif
#if 0
- MsgLog::printf("startcy 0x%x%08x endcy 0x%x%08x\n",
+ printf("startcy 0x%x%08x endcy 0x%x%08x\n",
(uint32_t) (startcy >> 32),
(uint32_t) (startcy),
(uint32_t) (endcy >> 32),
@@ -216,39 +214,39 @@
uint64_t cntr0 = Machine::ReadCounter(0);
uint64_t cntr1 = Machine::ReadCounter(1);
- MsgLog::printf("Cycles: %13U %-7s S: %13U U+S: %13U IC: %u\n",
+ printf("Cycles: %13U %-7s S: %13U U+S: %13U IC: %u\n",
cy,
modeName, cntr0, cntr1,
endInvoke);
#ifdef FAST_IPC_STATS
- MsgLog::printf("FstPth: %u FstFst %u FstNoStr %u FstEnd %u FstOK %u\n",
+ printf("FstPth: %u FstFst %u FstNoStr %u FstEnd %u FstOK %u\n",
nFastIpcPath, nFastIpcFast, nFastIpcNoString,
nFastIpcEnd, nFastIpcOK);
- MsgLog::printf("FstStr: %u FstSmallStr %u FstLrgStr %u FstRcvPf %u\n",
+ printf("FstStr: %u FstSmallStr %u FstLrgStr %u FstRcvPf %u\n",
nFastIpcString,
nFastIpcSmallString,
nFastIpcLargeString,
nFastIpcRcvPf);
- MsgLog::printf("FstRed: %u FstPrep %u\n",
+ printf("FstRed: %u FstPrep %u\n",
nFastIpcRedSeg,
nFastIpcPrepared);
#endif
#ifdef OPTION_KERN_TIMING_STATS
if (inv_delta_cy)
- MsgLog::printf("KeyInv: %13U KeyFn: %13U Kpr: %13U\n",
+ printf("KeyInv: %13U KeyFn: %13U Kpr: %13U\n",
inv_delta_cy, inv_handler_cy, kpr_delta_cy);
if (pf_delta_cy)
- MsgLog::printf("Pgflt: %13U\n",
+ printf("Pgflt: %13U\n",
pf_delta_cy, kpr_delta_cy);
#ifdef OPTION_KERN_EVENT_TRACING
if (pf_delta_cnt0)
- MsgLog::printf(Evt "KeyInv: %-7s S: %13U U+S: %13U\n",
+ printf(Evt "KeyInv: %-7s S: %13U U+S: %13U\n",
modeName, inv_delta_cnt0, inv_delta_cnt1);
if (pf_delta_cnt0)
- MsgLog::printf("Evt Pflt: %-7s S: %13U U+S: %13U\n",
+ printf("Evt Pflt: %-7s S: %13U U+S: %13U\n",
modeName, pf_delta_cnt0, pf_delta_cnt1);
if (kpr_delta_cnt0)
- MsgLog::printf("Evt Keeper: %-7s S: %13U U+S: %13U\n",
+ printf("Evt Keeper: %-7s S: %13U U+S: %13U\n",
v modeName, kpr_delta_cnt0, kpr_delta_cnt1);
#endif
#endif
@@ -266,20 +264,20 @@
Invocation::KeyHandlerCycles[i][IT_Reply] +
Invocation::KeyHandlerCycles[i][IT_Send];
if (keycount) {
- MsgLog::printf(" kt%02d: [%8U] %13U",
+ printf(" kt%02d: [%8U] %13U",
i,
keycount,
keycy);
count++;
}
if (count == 2) {
- MsgLog::printf("\n");
+ printf("\n");
count = 0;
}
}
if (count != 0)
- MsgLog::printf("\n");
+ printf("\n");
}
#endif
@@ -309,7 +307,7 @@
uint64_t dms = Machine::TicksToMilliseconds(dwticks);
uint32_t ms = (uint32_t) dms;
- MsgLog::printf("Cycles: %13U %-7s S: %13U U+S: %13U IC: %u\n",
+ printf("Cycles: %13U %-7s S: %13U U+S: %13U IC: %u\n",
cy,
modeName,
cntr0,
@@ -318,31 +316,31 @@
#ifdef OPTION_KERN_TIMING_STATS
if (inv_delta_cy)
- MsgLog::printf("KeyInv: %13U KeyFn: %13U Kpr: %13U\n",
+ printf("KeyInv: %13U KeyFn: %13U Kpr: %13U\n",
inv_delta_cy, inv_handler_cy, kpr_delta_cy);
if (pf_delta_cy)
- MsgLog::printf("Pgflt: %13U\n",
+ printf("Pgflt: %13U\n",
pf_delta_cy, kpr_delta_cy);
#ifdef OPTION_KERN_EVENT_TRACING
if (pf_delta_cnt0)
- MsgLog::printf(Evt "KeyInv: %-7s S: %13U U+S: %13U\n",
+ printf(Evt "KeyInv: %-7s S: %13U U+S: %13U\n",
modeName, inv_delta_cnt0, inv_delta_cnt1);
if (pf_delta_cnt0)
- MsgLog::printf("Evt Pflt: %-7s S: %13U U+S: %13U\n",
+ printf("Evt Pflt: %-7s S: %13U U+S: %13U\n",
modeName, pf_delta_cnt0, pf_delta_cnt1);
if (kpr_delta_cnt0)
- MsgLog::printf("Evt Keeper: %-7s S: %13U U+S: %13U\n",
+ printf("Evt Keeper: %-7s S: %13U U+S: %13U\n",
modeName, kpr_delta_cnt0, kpr_delta_cnt1);
#endif
#endif
- MsgLog::printf(" %u ticks %u ms %u stdInvoke: %U\n",
+ printf(" %u ticks %u ms %u stdInvoke: %U\n",
(uint32_t) ticks, ms, endInvoke);
- MsgLog::printf(" state %u fast %u str %u src %u dest %u copy %u move %u\n",
+ printf(" state %u fast %u str %u src %u dest %u copy %u move %u\n",
state_ok, fast_ok, move_string, src_ok, dest_ok,
copy_ok, totmov);
- MsgLog::printf(" bytes moved 0x%08x%08x\n",
+ printf(" bytes moved 0x%08x%08x\n",
(uint32_t) (bytes_moved>>32), (uint32_t) bytes_moved);
#ifdef OPTION_KERN_TIMING_STATS
@@ -358,14 +356,14 @@
Invocation::KeyHandlerCycles[i][IT_Reply] +
Invocation::KeyHandlerCycles[i][IT_Send];
if (keycount) {
- MsgLog::printf(" kt%02d: [%8U] %13U",
+ printf(" kt%02d: [%8U] %13U",
i,
keycount,
keycy);
count++;
}
if (count == 2) {
- MsgLog::printf("\n");
+ printf("\n");
count = 0;
}
}
1.31 +0 -1 eros/src/base/sys/key/mk_TimeOfDay.cxx
Index: mk_TimeOfDay.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_TimeOfDay.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- mk_TimeOfDay.cxx 2001/06/10 19:41:52 1.30
+++ mk_TimeOfDay.cxx 2001/11/26 01:05:40 1.31
@@ -27,7 +27,6 @@
#include <kerninc/Machine.hxx>
#include <eros/TimeOfDay.h>
#include <kerninc/SysTimer.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.19 +0 -1 eros/src/base/sys/key/mk_TimePage.cxx
Index: mk_TimePage.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_TimePage.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mk_TimePage.cxx 2001/08/08 21:17:46 1.18
+++ mk_TimePage.cxx 2001/11/26 01:05:40 1.19
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Thread.hxx>
1.4 +0 -1 eros/src/base/sys/key/mk_VoidKey.cxx
Index: mk_VoidKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_VoidKey.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mk_VoidKey.cxx 2001/06/10 19:41:52 1.3
+++ mk_VoidKey.cxx 2001/11/26 01:05:40 1.4
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Thread.hxx>
1.27 +0 -1 eros/src/base/sys/key/pk_DeviceKey.cxx
Index: pk_DeviceKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_DeviceKey.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- pk_DeviceKey.cxx 2001/05/26 18:11:56 1.26
+++ pk_DeviceKey.cxx 2001/11/26 01:05:40 1.27
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <eros/Device.h>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.40 +6 -7 eros/src/base/sys/key/pk_GateKey.cxx
Index: pk_GateKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_GateKey.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- pk_GateKey.cxx 2001/06/10 19:41:52 1.39
+++ pk_GateKey.cxx 2001/11/26 01:05:40 1.40
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/Thread.hxx>
#include <arch-kerninc/Process.hxx>
@@ -35,7 +34,7 @@
GateKey(Invocation& inv)
{
#ifdef GK_DEBUG
- MsgLog::printf("Enter GateKey(), invokedKey=0x%08x\n", inv.key);
+ printf("Enter GateKey(), invokedKey=0x%08x\n", inv.key);
#endif
Process *invokee = inv.invokee;
@@ -44,7 +43,7 @@
assert (invokee->runState == RS_Waiting);
#ifdef GK_DEBUG
- MsgLog::printf("Gate: Copying keys\n");
+ printf("Gate: Copying keys\n");
#endif
#ifndef OPTION_PURE_ENTRY_STRINGS
@@ -69,7 +68,7 @@
/* Transfer the data: */
#ifdef GK_DEBUG
- MsgLog::printf("Send %d bytes, Rcv %d bytes\n", inv.entry.len, inv.exit.len);
+ printf("Send %d bytes, Rcv %d bytes\n", inv.entry.len, inv.exit.len);
#endif
inv.CopyOut(inv.entry.len, inv.entry.data);
@@ -99,7 +98,7 @@
GateKey(Invocation& inv)
{
#ifdef GK_DEBUG
- MsgLog::printf("Enter GateKey(), invokedKey=0x%08x\n", inv.key);
+ printf("Enter GateKey(), invokedKey=0x%08x\n", inv.key);
#endif
Process *invokee = inv.invokee;
@@ -129,7 +128,7 @@
}
#ifdef GK_DEBUG
- MsgLog::printf("Gate: Copying keys\n");
+ printf("Gate: Copying keys\n");
#endif
#ifndef OPTION_PURE_ENTRY_STRINGS
@@ -144,7 +143,7 @@
/* Transfer the data: */
#ifdef GK_DEBUG
- MsgLog::printf("Send %d bytes, Rcv %d bytes\n", inv.entry.len, inv.exit.len);
+ printf("Send %d bytes, Rcv %d bytes\n", inv.entry.len, inv.exit.len);
#endif
inv.CopyOut(inv.entry.len, inv.entry.data);
1.91 +7 -8 eros/src/base/sys/key/pk_NodeKey.cxx
Index: pk_NodeKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_NodeKey.cxx,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- pk_NodeKey.cxx 2001/11/20 04:29:35 1.90
+++ pk_NodeKey.cxx 2001/11/26 01:05:40 1.91
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Process.hxx>
@@ -105,11 +104,11 @@
if (inv.invokee && theNode == inv.invokee->procRoot
&& OC_Node_Swap == inv.entry.code)
- MsgLog::dprintf(true, "Modifying invokee domain root\n");
+ dprintf(true, "Modifying invokee domain root\n");
if (inv.invokee && theNode == inv.invokee->keysNode
&& OC_Node_Swap == inv.entry.code)
- MsgLog::dprintf(true, "Modifying invokee keys node\n");
+ dprintf(true, "Modifying invokee keys node\n");
switch (inv.entry.code) {
case OC_KeyType:
@@ -143,7 +142,7 @@
inv.SetExitKey(0, theNode->slot[slot]);
#ifdef NODEKEYDEBUG
- MsgLog::dprintf(true, "Copied key to exit slot %d\n", slot);
+ dprintf(true, "Copied key to exit slot %d\n", slot);
#endif
if (isSense)
@@ -157,7 +156,7 @@
case OC_Node_Swap:
{
if (theNode == Thread::CurContext()->keysNode)
- MsgLog::dprintf(true, "Swap involving sender keys\n");
+ dprintf(true, "Swap involving sender keys\n");
if (isFetch) {
COMMIT_POINT();
@@ -212,7 +211,7 @@
theNode->slot[slot]);
#ifdef NODEKEYDEBUG
- MsgLog::dprintf(true, "Swapped key to slot %d\n", slot);
+ dprintf(true, "Swapped key to slot %d\n", slot);
#endif
Thread::Current()->Prepare();
inv.nextPC = ((Process *) Thread::CurContext())->GetPC();
@@ -249,7 +248,7 @@
COMMIT_POINT();
if ( result == false ) {
- MsgLog::fatal("Node tree traversal fails without keeper.!\n");
+ fatal("Node tree traversal fails without keeper.!\n");
inv.exit.code = RC_NoAccess;
inv.exit.w1 = wi.faultCode;
inv.exit.w2 = wi.vaddr;
@@ -317,7 +316,7 @@
if ( (w > EROS_KEYDATA_MAX) ) {
inv.exit.code = RC_RequestError;
- MsgLog::dprintf(true, "Value 0x%08x is out of range\n", w);
+ dprintf(true, "Value 0x%08x is out of range\n", w);
return;
}
1.32 +0 -1 eros/src/base/sys/key/pk_NumberKey.cxx
Index: pk_NumberKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_NumberKey.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- pk_NumberKey.cxx 2001/05/09 14:22:26 1.31
+++ pk_NumberKey.cxx 2001/11/26 01:05:40 1.32
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.5 +0 -1 eros/src/base/sys/key/pk_PageKey.cxx
Index: pk_PageKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_PageKey.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- pk_PageKey.cxx 2001/08/08 21:17:46 1.4
+++ pk_PageKey.cxx 2001/11/26 01:05:40 1.5
@@ -22,7 +22,6 @@
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/ObjectCache.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.83 +12 -13 eros/src/base/sys/key/pk_ProcessKey.cxx
Index: pk_ProcessKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_ProcessKey.cxx,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- pk_ProcessKey.cxx 2001/11/14 13:22:03 1.82
+++ pk_ProcessKey.cxx 2001/11/26 01:05:40 1.83
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/Process.hxx>
#include <kerninc/Thread.hxx>
@@ -48,7 +47,7 @@
Thread *pThrd = 0;
#ifdef DEBUG
- MsgLog::printf("Hunting down threads for cpuReserve %d (0x%08x)\n",
+ printf("Hunting down threads for cpuReserve %d (0x%08x)\n",
oldKey.subType, oldReserve);
#endif
Link *tlnk = oldReserve->threadChain.next;
@@ -56,7 +55,7 @@
Thread *lThrd = Thread::ThreadFromCpuReserveLinkage(tlnk);
#ifdef DEBUG
- MsgLog::printf("Examine thread 0x%08x (tlnk 0x%08x)\n", lThrd, tlnk);
+ printf("Examine thread 0x%08x (tlnk 0x%08x)\n", lThrd, tlnk);
#endif
if ( lThrd->IsUser() ) {
@@ -76,7 +75,7 @@
}
#ifdef DEBUG
- MsgLog::printf("Found thread 0x%08x\n", pThrd);
+ printf("Found thread 0x%08x\n", pThrd);
#endif
if (pThrd) {
if ( newKey.IsType(KT_Sched) ) {
@@ -100,11 +99,11 @@
&& OC_Process_Swap == inv.entry.code
&& inv.entry.w1 != 2
&& inv.entry.w1 != 4)
- MsgLog::dprintf(true, "Modifying invokee domain root\n");
+ dprintf(true, "Modifying invokee domain root\n");
if (inv.invokee && theNode == inv.invokee->keysNode
&& OC_Process_SwapKeyReg == inv.entry.code)
- MsgLog::dprintf(true, "Modifying invokee keys node\n");
+ dprintf(true, "Modifying invokee keys node\n");
switch (inv.entry.code) {
case OC_KeyType:
@@ -123,7 +122,7 @@
COMMIT_POINT();
if (slot >= EROS_NODE_SIZE)
- MsgLog::dprintf(true, "Copy slot out of range\n");
+ dprintf(true, "Copy slot out of range\n");
if (slot == ProcBrand || slot >= EROS_NODE_SIZE) {
inv.exit.code = RC_RequestError;
@@ -143,7 +142,7 @@
case OC_Process_Swap:
{
if (theNode == Thread::CurContext()->keysNode)
- MsgLog::dprintf(true, "Swap involving sender keys\n");
+ dprintf(true, "Swap involving sender keys\n");
uint32_t slot = inv.entry.w1;
@@ -215,7 +214,7 @@
case OC_Process_SwapKeyReg:
{
if (theNode == Thread::CurContext()->keysNode)
- MsgLog::dprintf(true, "Swap involving sender keys\n");
+ dprintf(true, "Swap involving sender keys\n");
Process* ac = theNode->GetDomainContext();
ac->Prepare();
@@ -236,7 +235,7 @@
ac->keyReg[slot].NH_Set(*inv.entry.key[0]);
#if 0
- MsgLog::printf("set key reg slot %d to \n", slot);
+ printf("set key reg slot %d to \n", slot);
inv.entry.key[0].Print();
#endif
}
@@ -274,7 +273,7 @@
assert( inv.invokee->IsRunnable() );
#if 0
- MsgLog::printf("GetRegs32: invokee is 0x%08x, IsActive? %c\n",
+ printf("GetRegs32: invokee is 0x%08x, IsActive? %c\n",
inv.invokee, inv.IsActive() ? 'y' : 'n');
#endif
@@ -405,7 +404,7 @@
if ( keyData > EROS_KEYDATA_MAX ) {
inv.exit.code = RC_RequestError;
- MsgLog::dprintf(true, "Value 0x%08x is out of range\n", keyData);
+ dprintf(true, "Value 0x%08x is out of range\n", keyData);
return;
}
@@ -469,7 +468,7 @@
case OC_Process_SetFloatRegs:
COMMIT_POINT();
- MsgLog::fatal("Domain key order %d ot yet implemented\n",
+ fatal("Domain key order %d ot yet implemented\n",
inv.entry.code);
default:
1.56 +3 -4 eros/src/base/sys/key/pk_RangeKey.cxx
Index: pk_RangeKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_RangeKey.cxx,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- pk_RangeKey.cxx 2001/07/03 04:34:18 1.55
+++ pk_RangeKey.cxx 2001/11/26 01:05:40 1.56
@@ -19,7 +19,6 @@
*/
#include <kerninc/kernel.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Check.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
@@ -285,7 +284,7 @@
OID oid = key.GetKeyOid();
#ifdef DEBUG_PAGERANGEKEY
- MsgLog::dprintf(true, "Rescinding page OID 0x%08x%08x\n",
+ dprintf(true, "Rescinding page OID 0x%08x%08x\n",
(uint32_t) (oid>>32),
(uint32_t) oid);
#endif
@@ -331,7 +330,7 @@
OID oid = start + offset;
if (oid > end) { /* comparing ranges: INclusive */
- MsgLog::dprintf(true, "oid 0x%X top 0x%X\n", oid, end);
+ dprintf(true, "oid 0x%X top 0x%X\n", oid, end);
inv.exit.code = RC_Range_RangeErr;
return;
}
@@ -428,7 +427,7 @@
}
#ifdef DEBUG_PAGERANGEKEY
- MsgLog::dprintf(true, "pObject is 0x%08x\n", pObj);
+ dprintf(true, "pObject is 0x%08x\n", pObj);
#endif
1.18 +0 -1 eros/src/base/sys/key/pk_SchedKey.cxx
Index: pk_SchedKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_SchedKey.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- pk_SchedKey.cxx 1999/10/13 22:45:46 1.17
+++ pk_SchedKey.cxx 2001/11/26 01:05:40 1.18
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.46 +0 -1 eros/src/base/sys/key/pk_SegmentKey.cxx
Index: pk_SegmentKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_SegmentKey.cxx,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- pk_SegmentKey.cxx 2001/05/29 06:16:38 1.45
+++ pk_SegmentKey.cxx 2001/11/26 01:05:40 1.46
@@ -23,7 +23,6 @@
#include <kerninc/Node.hxx>
#include <kerninc/Invocation.hxx>
#include <kerninc/Process.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Thread.hxx>
#include <eros/Invoke.h>
#include <eros/StdKeyType.h>
1.2 +0 -1 eros/src/base/sys/key/pk_WrapperKey.cxx
Index: pk_WrapperKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_WrapperKey.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pk_WrapperKey.cxx 2001/05/29 03:41:00 1.1
+++ pk_WrapperKey.cxx 2001/11/26 01:05:40 1.2
@@ -21,7 +21,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Key.hxx>
#include <kerninc/Invocation.hxx>
-#include <kerninc/MsgLog.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Process.hxx>