From a790413138c83121cf57ec060d5573d5d7c5f48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 26 Oct 2007 14:28:54 +0000 Subject: [PATCH] More regs in m68k iframe. Removed DOS CR. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22735 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/arch/m68k/arch_cpu.h | 19 ++++- .../kernel/arch/m68k/arch_real_time_data.h | 72 +++++++++---------- .../kernel/arch/ppc/arch_real_time_data.h | 72 +++++++++---------- .../kernel/arch/x86/arch_real_time_data.h | 34 ++++----- 4 files changed, 106 insertions(+), 91 deletions(-) diff --git a/headers/private/kernel/arch/m68k/arch_cpu.h b/headers/private/kernel/arch/m68k/arch_cpu.h index 0ea7eca7c6..a70f3246f5 100644 --- a/headers/private/kernel/arch/m68k/arch_cpu.h +++ b/headers/private/kernel/arch/m68k/arch_cpu.h @@ -12,12 +12,27 @@ #define PAGE_SIZE 4096 +#warning M68K: check for missing regs/movem struct iframe { - uint32 d7; /* XXX: order depends on movem */ + uint32 d0; + uint32 d1; + uint32 d2; + uint32 d3; + uint32 d4; + uint32 d5; + uint32 d6; + uint32 d7; uint32 a0; + uint32 a1; + uint32 a2; + uint32 a3; + uint32 a4; + uint32 a5; + uint32 a6; + uint32 a7; /* 030 ex frame: */ - uint16 sr; + uint16 sr; /* contains ccr */ uint32 pc; uint16 vector; /* [12:15] frame type */ /* other stuff depending on frame type... do we really need that ? */ diff --git a/headers/private/kernel/arch/m68k/arch_real_time_data.h b/headers/private/kernel/arch/m68k/arch_real_time_data.h index d3d2f07d7c..eddda54dea 100644 --- a/headers/private/kernel/arch/m68k/arch_real_time_data.h +++ b/headers/private/kernel/arch/m68k/arch_real_time_data.h @@ -1,36 +1,36 @@ -/* - * Copyright 2006, Ingo Weinhold . - * All rights reserved. Distributed under the terms of the MIT License. - */ -#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H -#define _KERNEL_ARCH_REAL_TIME_DATA_H - -#include -#include - - -struct ppc_real_time_data { - vint64 system_time_offset; -}; - -struct arch_real_time_data { - struct ppc_real_time_data data[2]; - vint32 system_time_conversion_factor; - vint32 version; - // Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one - // that doesn't involve a syscall), we can't have just a single - // system_time_offset and set/get it atomically. - // That's why have our data twice. One set is current (indexed by - // version % 2). When setting the offset, we do that with disabled - // interrupts and protected by a spinlock. We write the new values - // into the other array element and increment the version. - // A reader first reads the version, then the date of interest, and - // finally rechecks the version. If it hasn't changed in the meantime, - // the read value is fine, otherwise it runs the whole procedure again. - // - // system_time_conversion_factor is currently consider constant, - // although that is not necessarily true. We simply don't support - // changing conversion factors at the moment. -}; - -#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */ +/* + * Copyright 2006, Ingo Weinhold . + * All rights reserved. Distributed under the terms of the MIT License. + */ +#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H +#define _KERNEL_ARCH_REAL_TIME_DATA_H + +#include +#include + +#warning M68K: fix system_time() +struct m68k_real_time_data { + vint64 system_time_offset; +}; + +struct arch_real_time_data { + struct m68k_real_time_data data[2]; + vint32 system_time_conversion_factor; + vint32 version; + // Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one + // that doesn't involve a syscall), we can't have just a single + // system_time_offset and set/get it atomically. + // That's why have our data twice. One set is current (indexed by + // version % 2). When setting the offset, we do that with disabled + // interrupts and protected by a spinlock. We write the new values + // into the other array element and increment the version. + // A reader first reads the version, then the date of interest, and + // finally rechecks the version. If it hasn't changed in the meantime, + // the read value is fine, otherwise it runs the whole procedure again. + // + // system_time_conversion_factor is currently consider constant, + // although that is not necessarily true. We simply don't support + // changing conversion factors at the moment. +}; + +#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */ diff --git a/headers/private/kernel/arch/ppc/arch_real_time_data.h b/headers/private/kernel/arch/ppc/arch_real_time_data.h index d3d2f07d7c..0488e1ed0d 100644 --- a/headers/private/kernel/arch/ppc/arch_real_time_data.h +++ b/headers/private/kernel/arch/ppc/arch_real_time_data.h @@ -1,36 +1,36 @@ -/* - * Copyright 2006, Ingo Weinhold . - * All rights reserved. Distributed under the terms of the MIT License. - */ -#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H -#define _KERNEL_ARCH_REAL_TIME_DATA_H - -#include -#include - - -struct ppc_real_time_data { - vint64 system_time_offset; -}; - -struct arch_real_time_data { - struct ppc_real_time_data data[2]; - vint32 system_time_conversion_factor; - vint32 version; - // Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one - // that doesn't involve a syscall), we can't have just a single - // system_time_offset and set/get it atomically. - // That's why have our data twice. One set is current (indexed by - // version % 2). When setting the offset, we do that with disabled - // interrupts and protected by a spinlock. We write the new values - // into the other array element and increment the version. - // A reader first reads the version, then the date of interest, and - // finally rechecks the version. If it hasn't changed in the meantime, - // the read value is fine, otherwise it runs the whole procedure again. - // - // system_time_conversion_factor is currently consider constant, - // although that is not necessarily true. We simply don't support - // changing conversion factors at the moment. -}; - -#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */ +/* + * Copyright 2006, Ingo Weinhold . + * All rights reserved. Distributed under the terms of the MIT License. + */ +#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H +#define _KERNEL_ARCH_REAL_TIME_DATA_H + +#include +#include + + +struct ppc_real_time_data { + vint64 system_time_offset; +}; + +struct arch_real_time_data { + struct ppc_real_time_data data[2]; + vint32 system_time_conversion_factor; + vint32 version; + // Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one + // that doesn't involve a syscall), we can't have just a single + // system_time_offset and set/get it atomically. + // That's why have our data twice. One set is current (indexed by + // version % 2). When setting the offset, we do that with disabled + // interrupts and protected by a spinlock. We write the new values + // into the other array element and increment the version. + // A reader first reads the version, then the date of interest, and + // finally rechecks the version. If it hasn't changed in the meantime, + // the read value is fine, otherwise it runs the whole procedure again. + // + // system_time_conversion_factor is currently consider constant, + // although that is not necessarily true. We simply don't support + // changing conversion factors at the moment. +}; + +#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */ diff --git a/headers/private/kernel/arch/x86/arch_real_time_data.h b/headers/private/kernel/arch/x86/arch_real_time_data.h index 9651676969..d6350c39f2 100644 --- a/headers/private/kernel/arch/x86/arch_real_time_data.h +++ b/headers/private/kernel/arch/x86/arch_real_time_data.h @@ -1,17 +1,17 @@ -/* - * Copyright 2006, Ingo Weinhold . - * All rights reserved. Distributed under the terms of the MIT License. - */ -#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H -#define _KERNEL_ARCH_REAL_TIME_DATA_H - -#include -#include - - -struct arch_real_time_data { - bigtime_t system_time_offset; - uint32 system_time_conversion_factor; -}; - -#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */ +/* + * Copyright 2006, Ingo Weinhold . + * All rights reserved. Distributed under the terms of the MIT License. + */ +#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H +#define _KERNEL_ARCH_REAL_TIME_DATA_H + +#include +#include + + +struct arch_real_time_data { + bigtime_t system_time_offset; + uint32 system_time_conversion_factor; +}; + +#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */