minor modification to test commands
This commit is contained in:
parent
3fe1a3cfec
commit
0fa7d46511
|
@ -166,7 +166,7 @@ void MmInitPaging(void)
|
|||
MmPT[index] = 0;
|
||||
}
|
||||
|
||||
KeFlushTlbSingle(curAddrPT);
|
||||
//KeFlushTlbSingle(curAddrPT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ error_t CmdDumpATASect(int argc, char **argv, char *cmdline)
|
|||
error_t CmdDumpMem(int argc, char **argv, char *cmdline)
|
||||
{
|
||||
char sector[1024] = {0};
|
||||
char *address = (char*)atol(argv[1]);
|
||||
char *address = (char*)strtoul(argv[1], NULL, 16);
|
||||
int nb = 1; //atoi(argv[2]);
|
||||
int x = 0;
|
||||
int step = 16;
|
||||
|
@ -193,7 +193,7 @@ error_t CmdPageTranslateVirtToPhy(int argc, char **argv, char *cmdline)
|
|||
{
|
||||
void *address = (void*)atoul(argv[1]);
|
||||
|
||||
if (!(void*)atoul(argv[1])) {
|
||||
if (!(void*)strtoul(argv[1], NULL, 16)) {
|
||||
KernLog("No argument : translating the userspace address\n");
|
||||
address = (void *)0x80000000;
|
||||
}
|
||||
|
@ -219,8 +219,8 @@ enum
|
|||
|
||||
error_t CmdPageMap(int argc, char **argv, char *cmdline)
|
||||
{
|
||||
void *virtual = (void*)atoul(argv[1]);
|
||||
void *physical = (void*)atoul(argv[2]);
|
||||
void *virtual = (void*)strtoul(argv[1], NULL, 16);
|
||||
void *physical = (void*)strtoul(argv[2], NULL, 16);
|
||||
|
||||
MmMapPage(virtual, physical, PRESENT | READWRITE);
|
||||
|
||||
|
@ -229,7 +229,7 @@ error_t CmdPageMap(int argc, char **argv, char *cmdline)
|
|||
|
||||
error_t CmdPageUnmap(int argc, char **argv, char *cmdline)
|
||||
{
|
||||
void *virtual = (void*)atoul(argv[1]);
|
||||
void *virtual = (void*)strtoul(argv[1], NULL, 16);
|
||||
|
||||
MmUnmapPage(virtual);
|
||||
|
||||
|
@ -238,7 +238,7 @@ error_t CmdPageUnmap(int argc, char **argv, char *cmdline)
|
|||
|
||||
error_t CmdPageTranslatePhyToVirt(int argc, char **argv, char *cmdline)
|
||||
{
|
||||
void *address = (void*)atoul(argv[1]);
|
||||
void *address = (void*)strtoul(argv[1], NULL, 16);
|
||||
|
||||
/* if (!(void*)atoul(argv[1])) { */
|
||||
/* address = (ulong *)0x80000000; */
|
||||
|
@ -252,7 +252,7 @@ error_t CmdPageTranslatePhyToVirt(int argc, char **argv, char *cmdline)
|
|||
|
||||
error_t CmdPF(int argc, char **argv, char *cmdline)
|
||||
{
|
||||
ulong *address = (ulong*)(ulong)atoul(argv[1]);
|
||||
ulong *address = (ulong*)(ulong)strtoul(argv[1], NULL, 16);
|
||||
|
||||
KernLog("Provoking Page Fault at %#x\n", address);
|
||||
|
||||
|
|
Loading…
Reference in New Issue