boot headers have been moved.
Some cleanup. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3159 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
#include <kerrors.h>
|
#include <kerrors.h>
|
||||||
#include <tls.h>
|
#include <tls.h>
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <arch/dbg_console.h>
|
#include <arch/dbg_console.h>
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include <arch/x86/interrupts.h>
|
#include <arch/x86/interrupts.h>
|
||||||
#include <arch/x86/faults.h>
|
#include <arch/x86/faults.h>
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <arch/x86/faults.h>
|
#include <arch/x86/faults.h>
|
||||||
#include <arch/x86/descriptors.h>
|
#include <arch/x86/descriptors.h>
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
** Distributed under the terms of the NewOS License.
|
** Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <vm.h>
|
#include <vm.h>
|
||||||
#include <memheap.h>
|
#include <memheap.h>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
** Distributed under the terms of the NewOS License.
|
** Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
|
|
||||||
#include <arch/int.h>
|
#include <arch/int.h>
|
||||||
@@ -23,7 +23,9 @@
|
|||||||
#define pit_clock_rate 1193180
|
#define pit_clock_rate 1193180
|
||||||
#define pit_max_timer_interval ((long long)0xffff * 1000000 / pit_clock_rate)
|
#define pit_max_timer_interval ((long long)0xffff * 1000000 / pit_clock_rate)
|
||||||
|
|
||||||
static void set_isa_hardware_timer(long long relative_timeout)
|
|
||||||
|
static void
|
||||||
|
set_isa_hardware_timer(long long relative_timeout)
|
||||||
{
|
{
|
||||||
unsigned short next_event_clocks;
|
unsigned short next_event_clocks;
|
||||||
|
|
||||||
@@ -39,37 +41,47 @@ static void set_isa_hardware_timer(long long relative_timeout)
|
|||||||
out8((next_event_clocks >> 8) & 0xff, 0x40);
|
out8((next_event_clocks >> 8) & 0xff, 0x40);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_isa_hardware_timer()
|
|
||||||
|
static void
|
||||||
|
clear_isa_hardware_timer(void)
|
||||||
{
|
{
|
||||||
// XXX do something here
|
// XXX do something here
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32 isa_timer_interrupt(void* data)
|
|
||||||
|
static int32
|
||||||
|
isa_timer_interrupt(void *data)
|
||||||
{
|
{
|
||||||
return timer_interrupt();
|
return timer_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
int apic_timer_interrupt()
|
|
||||||
|
int
|
||||||
|
apic_timer_interrupt(void)
|
||||||
{
|
{
|
||||||
return timer_interrupt();
|
return timer_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_timer_set_hardware_timer(bigtime_t timeout)
|
|
||||||
|
void
|
||||||
|
arch_timer_set_hardware_timer(bigtime_t timeout)
|
||||||
{
|
{
|
||||||
// try the apic timer first
|
// try the apic timer first
|
||||||
if(arch_smp_set_apic_timer(timeout) < 0) {
|
if (arch_smp_set_apic_timer(timeout) < 0)
|
||||||
set_isa_hardware_timer(timeout);
|
set_isa_hardware_timer(timeout);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_timer_clear_hardware_timer()
|
|
||||||
|
void
|
||||||
|
arch_timer_clear_hardware_timer(void)
|
||||||
{
|
{
|
||||||
if(arch_smp_clear_apic_timer() < 0) {
|
if (arch_smp_clear_apic_timer() < 0)
|
||||||
clear_isa_hardware_timer();
|
clear_isa_hardware_timer();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_init_timer(kernel_args *ka)
|
|
||||||
|
int
|
||||||
|
arch_init_timer(kernel_args *ka)
|
||||||
{
|
{
|
||||||
dprintf("arch_init_timer: entry\n");
|
dprintf("arch_init_timer: entry\n");
|
||||||
|
|
||||||
@@ -78,3 +90,4 @@ int arch_init_timer(kernel_args *ka)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include <queue.h>
|
#include <queue.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <Errors.h>
|
#include <Errors.h>
|
||||||
#include <kerrors.h>
|
#include <kerrors.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user