Added the missing clear_caches() function and syscall. Does not yet do anything (which
is perfectly okay on x86 anyway, but should be moved into the arch stuff). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11869 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2002-2004, The Haiku Team. All rights reserved.
|
* Copyright 2002-2005, Haiku Inc. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
**
|
*
|
||||||
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
#ifndef _KERNEL_CPU_H
|
#ifndef _KERNEL_CPU_H
|
||||||
#define _KERNEL_CPU_H
|
#define _KERNEL_CPU_H
|
||||||
|
|
||||||
|
|
||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
#include <timer.h>
|
#include <timer.h>
|
||||||
#include <boot/kernel_args.h>
|
|
||||||
|
struct kernel_args;
|
||||||
|
|
||||||
|
|
||||||
/* CPU local data structure */
|
/* CPU local data structure */
|
||||||
@@ -24,6 +25,7 @@ typedef union cpu_ent {
|
|||||||
int preempted;
|
int preempted;
|
||||||
timer quantum_timer;
|
timer quantum_timer;
|
||||||
} info;
|
} info;
|
||||||
|
// ToDo: align manually on CPU cache lines if possible
|
||||||
uint32 align[16];
|
uint32 align[16];
|
||||||
} cpu_ent;
|
} cpu_ent;
|
||||||
|
|
||||||
@@ -42,9 +44,10 @@ status_t cpu_init(struct kernel_args *args);
|
|||||||
status_t cpu_init_post_vm(struct kernel_args *args);
|
status_t cpu_init_post_vm(struct kernel_args *args);
|
||||||
|
|
||||||
cpu_ent *get_cpu_struct(void);
|
cpu_ent *get_cpu_struct(void);
|
||||||
|
|
||||||
extern inline cpu_ent *get_cpu_struct(void) { return &cpu[smp_get_current_cpu()]; }
|
extern inline cpu_ent *get_cpu_struct(void) { return &cpu[smp_get_current_cpu()]; }
|
||||||
|
|
||||||
|
void _user_clear_caches(void *address, size_t length, uint32 flags);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ extern area_id _kern_register_messaging_service(sem_id lockingSem,
|
|||||||
sem_id counterSem);
|
sem_id counterSem);
|
||||||
extern status_t _kern_unregister_messaging_service();
|
extern status_t _kern_unregister_messaging_service();
|
||||||
|
|
||||||
|
extern void _kern_clear_caches(void *address, size_t length, uint32 flags);
|
||||||
|
|
||||||
#ifdef __INTEL__
|
#ifdef __INTEL__
|
||||||
// our only x86 only syscall
|
// our only x86 only syscall
|
||||||
extern status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu);
|
extern status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu);
|
||||||
|
|||||||
+19
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2004, Axel Dörfler, [email protected].
|
* Copyright 2002-2005, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -47,3 +47,21 @@ cpu_preboot_init(kernel_args *args)
|
|||||||
{
|
{
|
||||||
return arch_cpu_preboot_init(args);
|
return arch_cpu_preboot_init(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
clear_caches(void *address, size_t length, uint32 flags)
|
||||||
|
{
|
||||||
|
// ToDo: implement me!
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_user_clear_caches(void *address, size_t length, uint32 flags)
|
||||||
|
{
|
||||||
|
clear_caches(address, length, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user