* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <corax/types.h>
#include <debug.h>
#include <arch.h>
-#include "../arch/task.h"
void cpu_debug(void);
-u8_t _stack[1024];
-
-void _idle(void)
-{
- while(1) {
- asm volatile("hlt");
- }
-
- return;
-}
-
void _print_mptbl(void *tbl)
{
u32_t *pmcp;
}
}
*/
-/* void *ptr;*/
+#if 0
arch_init(mb_info);
- dbg_panic("fooooo", "baaaaar", __LINE__, "foobar");
+ {
+ u64_t capabilities = cpu_get_capabilities();
-/*
- u64_t capabilities = cpu_get_capabilities();
- dbg_printf("CPUID.01h = 0x%016llx\n", capabilities);
+ dbg_printf("CPUID.01h = 0x%016llx\n", capabilities);
+ }
+#endif
- if(capabilities & 0x20000000000L) {
- dbg_printf("This is cpu%u\n", cpu_get_id());
- }
-*/
#if 0
{
volatile register u64_t sysenter, sysexit;
dbg_printf("Syscall took %llu cycles\n", sysexit - sysenter);
}
#endif
-/*
- cpu_debug();
-*/
+
/*
for(ptr = (void*)0x9fc00; ptr < (void*)0x9fffc; ptr++) {
if(*(u32_t*)ptr == 0x5f504d5f) {
*/
dbg_printf("Switching pstate\n");
- asm volatile("int $0xcc");
- asm volatile("int $0xcc");
- /*
p = cpu_set_pstate(1);
dbg_printf("Entered P-state %u. (0x%x)\n", p & 0xffff, p);
- dbg_printf("Initialisation complete. Nothing to do.\n"); */
-/*
- struct task tsk;
+ dbg_printf("Initialisation complete. Nothing to do.\n");
- _task_prepare(&tsk, (u32_t)_idle, (u32_t)&_stack + sizeof(_stack));
-
- _task_switch(&tsk);
-*/
while(1) {
asm volatile("hlt");
}