From 991ae1e39553172a7dd6cd8c634aebfce892e261 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 4 Jan 2012 18:07:21 +0100 Subject: Create fimrware/asm directory for assembly optimized stuff. This dir is suitable for stuff that doesn't fit the target tree, e.g. because it also builds on hosted or otherwise. It also has a generic subfolder for fallback C implementations so that not all archs need to provide asm files. SOURCES should only contain "foo.c" where foo.c includes the specific /foo.c files from the subdirs using the preprocessor. This way automatic selection of asm versions or generic C verion is possible. For the start, the thread support files are moved, since ASM threads can be used on hosted platforms as well. Since core_sleep() remains platform specific it's moved to the corresponding system.h headers. Change-Id: Iebff272f3407a6eaafeb7656ceb0ae9eca3f7cb9 --- firmware/asm/m68k/thread.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 firmware/asm/m68k/thread.h (limited to 'firmware/asm/m68k/thread.h') diff --git a/firmware/asm/m68k/thread.h b/firmware/asm/m68k/thread.h new file mode 100644 index 0000000000..9bdbed0c3e --- /dev/null +++ b/firmware/asm/m68k/thread.h @@ -0,0 +1,31 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2002 by Ulf Ralberg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +struct regs +{ + uint32_t macsr; /* 0 - EMAC status register */ + uint32_t d[6]; /* 4-24 - d2-d7 */ + uint32_t a[5]; /* 28-44 - a2-a6 */ + uint32_t sp; /* 48 - Stack pointer (a7) */ + uint32_t start; /* 52 - Thread start address, or NULL when started */ +}; + +#define DEFAULT_STACK_SIZE 0x400 /* Bytes */ -- cgit v1.2.3