Author: fireball
Date: Mon Nov 26 01:33:50 2007
New Revision: 30764
URL:
http://svn.reactos.org/svn/reactos?rev=30764&view=rev
Log:
- Remove Ke386WbInvd() and use compatible __wbinvd() intrinsic, already existing in
ReactOS headers.
- Make i386-dis.c include ntoskrnl.h, remove all unneeded defines, fix function prototypes
to match declared in kdb.h.
Modified:
trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h
trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c
trunk/reactos/ntoskrnl/ke/i386/cpu.c
Modified: trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h Mon Nov 26 01:33:50 2007
@@ -79,8 +79,6 @@
#define Ke386HaltProcessor() __asm__("hlt\n\t");
#define Ke386FnInit() __asm__("fninit\n\t");
-
-#define Ke386WbInvd() __asm__("wbinvd\n\t");
//
Modified: trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/i386/i386-di…
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c (original)
+++ trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c Mon Nov 26 01:33:50 2007
@@ -8,7 +8,9 @@
* PROGRAMMERS: No programmer listed.
*/
-#include <stdarg.h>
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
/* ReactOS compatibility stuff. */
#define PARAMS(X) X
@@ -25,30 +27,19 @@
typedef unsigned char bfd_byte;
enum bfd_endian { BFD_ENDIAN_BIG, BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
typedef void* bfd;
-typedef void* FILE;
typedef signed int bfd_signed_vma;
-#define NULL 0
#define bfd_mach_x86_64_intel_syntax 0
#define bfd_mach_x86_64 1
#define bfd_mach_i386_i386_intel_syntax 2
#define bfd_mach_i386_i386 3
#define bfd_mach_i386_i8086 4
-#define abort() __asm__("int $3\n\t")
+#define abort() DbgBreakPoint();
#define _(X) X
#define ATTRIBUTE_UNUSED
-extern char* strcpy(char *dest, const char *src);
-extern unsigned int strlen(const char *s);
extern int sprintf(char *str, const char *format, ...);
-extern int vsprintf(char *buf, const char *format, va_list ap);
-extern void* memcpy(void *dest, const void *src, unsigned int length);
-extern void DbgPrint(const char *format, ...);
#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
#define _setjmp setjmp
-extern unsigned int KdbSymPrintAddress(void* address);
struct disassemble_info;
-
-extern long KdbpSafeReadMemory(void*, void*, unsigned int);
-
int
print_insn_i386 (bfd_vma pc, struct disassemble_info *info);
@@ -102,8 +93,8 @@
#include "dis-asm.h"
-long
-KdbpGetInstLength(unsigned int Address)
+LONG
+KdbpGetInstLength(IN ULONG Address)
{
disassemble_info info;
@@ -128,8 +119,8 @@
return(print_insn_i386(Address, &info));
}
-long
-KdbpDisassemble(unsigned int Address, unsigned long IntelSyntax)
+LONG
+KdbpDisassemble(IN ULONG Address, IN ULONG IntelSyntax)
{
disassemble_info info;
@@ -2164,7 +2155,7 @@
start_codep = priv.the_buffer;
codep = priv.the_buffer;
- if (setjmp (priv.bailout) != 0)
+ if (_setjmp (priv.bailout) != 0)
{
const char *name;
Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Mon Nov 26 01:33:50 2007
@@ -891,7 +891,7 @@
if (KeI386CpuType < 6) return FALSE;
/* Invalidate all caches */
- Ke386WbInvd();
+ __wbinvd();
return TRUE;
}