2015-02-06 17:29:30 +01:00
|
|
|
/*
|
2015-03-13 09:20:28 +01:00
|
|
|
* \brief Class for kernel data that is needed to manage a specific CPU
|
|
|
|
* \author Reto Buerki
|
2016-01-11 11:02:52 +01:00
|
|
|
* \author Stefan Kalkowski
|
2015-03-13 09:20:28 +01:00
|
|
|
* \date 2015-02-09
|
2015-02-06 17:29:30 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
2015-02-06 17:29:30 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2015-02-06 17:29:30 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* core includes */
|
|
|
|
#include <kernel/cpu.h>
|
2015-03-02 14:36:06 +01:00
|
|
|
#include <kernel/kernel.h>
|
2015-02-06 17:29:30 +01:00
|
|
|
|
2018-11-26 11:18:57 +01:00
|
|
|
void Kernel::Cpu::_arch_init()
|
2015-12-09 12:02:00 +01:00
|
|
|
{
|
2017-11-10 14:44:42 +01:00
|
|
|
gdt.init((addr_t)&tss);
|
2016-11-16 11:50:57 +01:00
|
|
|
Idt::init();
|
|
|
|
Tss::init();
|
|
|
|
|
2015-12-09 12:02:00 +01:00
|
|
|
/* enable timer interrupt */
|
2018-11-26 11:18:57 +01:00
|
|
|
_pic.store_apic_id(id());
|
|
|
|
_pic.unmask(_timer.interrupt_id(), id());
|
2015-12-09 12:02:00 +01:00
|
|
|
}
|