git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/x86_64 - Debugging iret->CPL3 crash
[tpg/acess2.git]
/
Kernel
/
arch
/
x86_64
/
main.c
diff --git
a/Kernel/arch/x86_64/main.c
b/Kernel/arch/x86_64/main.c
index
f2a9229
..
77df362
100644
(file)
--- a/
Kernel/arch/x86_64/main.c
+++ b/
Kernel/arch/x86_64/main.c
@@
-3,18
+3,20
@@
*/
#include <acess.h>
#include <mboot.h>
*/
#include <acess.h>
#include <mboot.h>
+#include <init.h>
// === IMPORTS ===
extern void Desctab_Init(void);
extern void MM_InitVirt(void);
extern void Heap_Install(void);
extern void Threads_Init(void);
// === IMPORTS ===
extern void Desctab_Init(void);
extern void MM_InitVirt(void);
extern void Heap_Install(void);
extern void Threads_Init(void);
-
//extern void
Time_Setup(void);
+
extern int
Time_Setup(void);
extern void System_Init(char *Commandline);
extern void MM_InitPhys_Multiboot(tMBoot_Info *MBoot);
// === PROTOTYPES ===
extern void System_Init(char *Commandline);
extern void MM_InitPhys_Multiboot(tMBoot_Info *MBoot);
// === PROTOTYPES ===
+void kmain(Uint MbMagic, void *MbInfoPtr);
// === GLOBALS ==
char *gsBootCmdLine = NULL;
// === GLOBALS ==
char *gsBootCmdLine = NULL;
@@
-25,9
+27,9
@@
void kmain(Uint MbMagic, void *MbInfoPtr)
tMBoot_Info *mbInfo;
Desctab_Init();
tMBoot_Info *mbInfo;
Desctab_Init();
-
+
MM_InitVirt();
MM_InitVirt();
- *(Uint16*)(0xB8000) = 0x1F00|'C';
+ *(Uint16*)(
KERNEL_BASE|
0xB8000) = 0x1F00|'C';
switch(MbMagic)
{
switch(MbMagic)
{
@@
-35,7
+37,8
@@
void kmain(Uint MbMagic, void *MbInfoPtr)
case MULTIBOOT_MAGIC:
// Adjust Multiboot structure address
mbInfo = (void*)( (Uint)MbInfoPtr + KERNEL_BASE );
case MULTIBOOT_MAGIC:
// Adjust Multiboot structure address
mbInfo = (void*)( (Uint)MbInfoPtr + KERNEL_BASE );
- gsBootCmdLine = (char*)(mbInfo->CommandLine + KERNEL_BASE);
+ gsBootCmdLine = (char*)( (Uint)mbInfo->CommandLine + KERNEL_BASE);
+ Log("gsBootCmdLine = '%s'", gsBootCmdLine);
MM_InitPhys_Multiboot( mbInfo ); // Set up physical memory manager
break;
MM_InitPhys_Multiboot( mbInfo ); // Set up physical memory manager
break;
@@
-45,24
+48,23
@@
void kmain(Uint MbMagic, void *MbInfoPtr)
return ;
}
return ;
}
- *(Uint16*)(0xB8000) = 0x1F00|'D';
+ Log("gsBootCmdLine = '%s'", gsBootCmdLine);
+
+ *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'D';
Heap_Install();
Heap_Install();
- *(Uint16*)(0xB8000) = 0x1F00|'E';
+ *(Uint16*)(
KERNEL_BASE|
0xB8000) = 0x1F00|'E';
Log_Log("Arch", "Starting threading...");
Threads_Init();
Log_Log("Arch", "Starting threading...");
Threads_Init();
-
//
Time_Setup();
- *(Uint16*)(0xB8000) = 0x1F00|'F';
+ Time_Setup();
+ *(Uint16*)(
KERNEL_BASE|
0xB8000) = 0x1F00|'F';
Log_Log("Arch", "Starting VFS...");
// Load Virtual Filesystem
VFS_Init();
Log_Log("Arch", "Starting VFS...");
// Load Virtual Filesystem
VFS_Init();
- *(Uint16*)(0xB8000) = 0x1F00|'Z';
- *(Uint16*)(0xB8002) = 0x1F00|'Z';
- *(Uint16*)(0xB8004) = 0x1F00|'Z';
- *(Uint16*)(0xB8006) = 0x1F00|'Z';
+ *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'Z';
// Pass on to Independent Loader
Log_Log("Arch", "Starting system");
// Pass on to Independent Loader
Log_Log("Arch", "Starting system");
@@
-78,7
+80,7
@@
void Arch_LoadBootModules(void)
}
}
-void StartupPrint(char *String)
+void StartupPrint(c
onst c
har *String)
{
}
{
}
UCC
git Repository :: git.ucc.asn.au