Author: ros-arm-bringup
Date: Sun Jul 13 17:17:28 2008
New Revision: 34473
URL:
http://svn.reactos.org/svn/reactos?rev=34473&view=rev
Log:
- Now that KDCOM works for printing on the serial port, get rid of the arm_kprintf file,
function and hack,and use KdpSerialPrint instead (still a hack, but at least uses our
components)
Removed:
trunk/reactos/ntoskrnl/ke/arm/arm_kprintf.c
Modified:
trunk/reactos/ntoskrnl/ke/arm/kiinit.c
trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
Removed: trunk/reactos/ntoskrnl/ke/arm/arm_kprintf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/arm_kprint…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/arm_kprintf.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/arm_kprintf.c (removed)
@@ -1,84 +1,0 @@
-/*
- * PROJECT: ReactOS Kernel
- * LICENSE: BSD - See COPYING.ARM in the top level directory
- * FILE: ntoskrnl/ke/arm/arm_kprintf.c
- * PURPOSE: Early serial printf-style kernel debugging (ARM bringup)
- * PROGRAMMERS: ReactOS Portable Systems Group
- */
-
-/* INCLUDES *******************************************************************/
-
-#include <ntoskrnl.h>
-#define NDEBUG
-#include <debug.h>
-
-/* GLOBALS ********************************************************************/
-
-//
-// UART Registers
-//
-#define UART_BASE (void*)0xe00f1000 /* HACK: freeldr mapped it here */
-
-#define UART_PL01x_DR (UART_BASE + 0x00)
-#define UART_PL01x_RSR (UART_BASE + 0x04)
-#define UART_PL01x_ECR (UART_BASE + 0x04)
-#define UART_PL01x_FR (UART_BASE + 0x18)
-#define UART_PL011_IBRD (UART_BASE + 0x24)
-#define UART_PL011_FBRD (UART_BASE + 0x28)
-#define UART_PL011_LCRH (UART_BASE + 0x2C)
-#define UART_PL011_CR (UART_BASE + 0x30)
-#define UART_PL011_IMSC (UART_BASE + 0x38)
-
-//
-// LCR Values
-//
-#define UART_PL011_LCRH_WLEN_8 0x60
-#define UART_PL011_LCRH_FEN 0x10
-
-//
-// FCR Values
-//
-#define UART_PL011_CR_UARTEN 0x01
-#define UART_PL011_CR_TXE 0x100
-#define UART_PL011_CR_RXE 0x200
-
-//
-// LSR Values
-//
-#define UART_PL01x_FR_RXFE 0x10
-#define UART_PL01x_FR_TXFF 0x20
-
-#define READ_REGISTER_ULONG(r) (*(volatile ULONG * const)(r))
-#define WRITE_REGISTER_ULONG(r, v) (*(volatile ULONG *)(r) = (v))
-
-/* FUNCTIONS ******************************************************************/
-
-VOID
-ArmVersaPutChar(IN INT Char)
-{
- //
- // Properly support new-lines
- //
- if (Char == '\n') ArmVersaPutChar('\r');
-
- //
- // Wait for ready
- //
- while ((READ_REGISTER_ULONG(UART_PL01x_FR) & UART_PL01x_FR_TXFF) != 0);
-
- //
- // Send the character
- //
- WRITE_REGISTER_ULONG(UART_PL01x_DR, Char);
-}
-
-void arm_kprintf(const char *fmt, ...) {
- char buf[1024], *s;
- va_list args;
-
- va_start(args, fmt);
- _vsnprintf(buf,sizeof(buf),fmt,args);
- va_end(args);
- for (s = buf; *s; s++)
- ArmVersaPutChar(*s);
-}
Modified: trunk/reactos/ntoskrnl/ke/arm/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/kiinit.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] Sun Jul 13 17:17:28 2008
@@ -32,6 +32,11 @@
);
VOID
+STDCALL
+KdpSerialDebugPrint(LPSTR Message,
+ ULONG Length);
+
+VOID
DebugService(IN ULONG ServiceType,
IN PCHAR Buffer,
IN ULONG Length,
@@ -41,8 +46,7 @@
//
// FIXME: ARM Bring-up Hack
//
- void arm_kprintf(const char *fmt, ...);
- arm_kprintf("%s", Buffer);
+ KdpSerialDebugPrint(Buffer, Length);
}
VOID
@@ -51,10 +55,9 @@
IN ULONG Service)
{
//
- // FIXME: ARM Bring-up Hack
- //
- void arm_kprintf(const char *fmt, ...);
- arm_kprintf("Loading symbols for %Z...\n", (PCHAR)Arg1);
+ // FIXME: TODO
+ //
+ return;
}
VOID
@@ -79,8 +82,6 @@
LARGE_INTEGER PageDirectory;
PKPCR Pcr;
ULONG i;
- DPRINT1("[INIT] Process: %p Thread: %p Stack: %p PRCB: %p Number: %d
LoaderBlock: %p\n",
- InitProcess, InitThread, IdleStack, Prcb, Number, LoaderBlock);
//
// Initialize the platform
@@ -330,13 +331,6 @@
ARM_PTE Pte;
PKPCR Pcr;
ARM_CONTROL_REGISTER ControlRegister;
- DPRINT1("-----------------------------------------------------\n");
- DPRINT1("ReactOS-ARM "KERNEL_VERSION_STR" (Build
"KERNEL_VERSION_BUILD_STR")\n");
- DPRINT1("Command Line: %s\n", LoaderBlock->LoadOptions);
- DPRINT1("ARC Paths: %s %s %s %s\n", LoaderBlock->ArcBootDeviceName,
- LoaderBlock->NtHalPathName,
- LoaderBlock->ArcHalDeviceName,
- LoaderBlock->NtBootPathName);
//
// Detect ARM version (Architecture 6 is the ARMv5TE-J, go figure!)
Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Sun Jul 13 17:17:28 2008
@@ -61,7 +61,6 @@
<if property="ARCH" value="arm">
<directory name="arm">
<file first="true">boot.s</file>
- <file>arm_kprintf.c</file>
<file>cpu.c</file>
<file>ctxswtch.s</file>
<file>exp.c</file>