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:
parent
6d1ec1085b
commit
a36a94da37
@ -1,17 +1,18 @@
|
||||
/*
|
||||
** Copyright 2002-2004, The Haiku Team. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
**
|
||||
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
* Copyright 2002-2005, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _KERNEL_CPU_H
|
||||
#define _KERNEL_CPU_H
|
||||
|
||||
|
||||
#include <smp.h>
|
||||
#include <timer.h>
|
||||
#include <boot/kernel_args.h>
|
||||
|
||||
struct kernel_args;
|
||||
|
||||
|
||||
/* CPU local data structure */
|
||||
@ -24,6 +25,7 @@ typedef union cpu_ent {
|
||||
int preempted;
|
||||
timer quantum_timer;
|
||||
} info;
|
||||
// ToDo: align manually on CPU cache lines if possible
|
||||
uint32 align[16];
|
||||
} cpu_ent;
|
||||
|
||||
@ -42,9 +44,10 @@ status_t cpu_init(struct kernel_args *args);
|
||||
status_t cpu_init_post_vm(struct kernel_args *args);
|
||||
|
||||
cpu_ent *get_cpu_struct(void);
|
||||
|
||||
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
|
||||
}
|
||||
#endif
|
||||
|
@ -271,6 +271,8 @@ extern area_id _kern_register_messaging_service(sem_id lockingSem,
|
||||
sem_id counterSem);
|
||||
extern status_t _kern_unregister_messaging_service();
|
||||
|
||||
extern void _kern_clear_caches(void *address, size_t length, uint32 flags);
|
||||
|
||||
#ifdef __INTEL__
|
||||
// our only x86 only syscall
|
||||
extern status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
@ -47,3 +47,21 @@ cpu_preboot_init(kernel_args *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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user