2015-04-11 07:44:37 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-10-07 00:00:37 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
2015-12-04 23:09:39 +08:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief ARCv2 nano kernel structure member offset definition file
|
|
|
|
*
|
2015-10-21 00:42:33 +08:00
|
|
|
* This module is responsible for the generation of the absolute symbols whose
|
|
|
|
* value represents the member offsets for various ARCv2 nanokernel
|
|
|
|
* structures.
|
|
|
|
*
|
|
|
|
* All of the absolute symbols defined by this module will be present in the
|
|
|
|
* final microkernel or nanokernel ELF image (due to the linker's reference to
|
|
|
|
* the _OffsetAbsSyms symbol).
|
|
|
|
*
|
|
|
|
* INTERNAL
|
|
|
|
* It is NOT necessary to define the offset for every member of a structure.
|
|
|
|
* Typically, only those members that are accessed by assembly language routines
|
|
|
|
* are defined; however, it doesn't hurt to define all fields for the sake of
|
|
|
|
* completeness.
|
2015-07-02 05:22:39 +08:00
|
|
|
*/
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-06-20 02:14:59 +08:00
|
|
|
#include <gen_offset.h>
|
2015-06-19 23:07:02 +08:00
|
|
|
#include <nano_private.h>
|
2015-06-20 02:19:13 +08:00
|
|
|
#include <nano_offsets.h>
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-08-20 23:04:01 +08:00
|
|
|
/* ARCv2-specific tNANO structure member offsets */
|
2015-04-11 07:44:37 +08:00
|
|
|
GEN_OFFSET_SYM(tNANO, rirq_sp);
|
|
|
|
GEN_OFFSET_SYM(tNANO, firq_regs);
|
2016-03-19 07:43:40 +08:00
|
|
|
#ifdef CONFIG_SYS_POWER_MANAGEMENT
|
2015-04-11 07:44:37 +08:00
|
|
|
GEN_OFFSET_SYM(tNANO, idle);
|
2016-03-19 07:43:40 +08:00
|
|
|
#endif
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-08-20 23:04:01 +08:00
|
|
|
/* ARCv2-specific struct tcs structure member offsets */
|
|
|
|
GEN_OFFSET_SYM(tTCS, intlock_key);
|
|
|
|
GEN_OFFSET_SYM(tTCS, relinquish_cause);
|
|
|
|
GEN_OFFSET_SYM(tTCS, return_value);
|
2016-03-12 01:29:14 +08:00
|
|
|
#ifdef CONFIG_ARC_STACK_CHECKING
|
|
|
|
GEN_OFFSET_SYM(tTCS, stack_top);
|
|
|
|
#endif
|
2015-08-20 23:04:01 +08:00
|
|
|
#ifdef CONFIG_THREAD_CUSTOM_DATA
|
|
|
|
GEN_OFFSET_SYM(tTCS, custom_data);
|
2015-04-11 07:44:37 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* ARCv2-specific IRQ stack frame structure member offsets */
|
|
|
|
GEN_OFFSET_SYM(tISF, r0);
|
|
|
|
GEN_OFFSET_SYM(tISF, r1);
|
|
|
|
GEN_OFFSET_SYM(tISF, r2);
|
|
|
|
GEN_OFFSET_SYM(tISF, r3);
|
|
|
|
GEN_OFFSET_SYM(tISF, r4);
|
|
|
|
GEN_OFFSET_SYM(tISF, r5);
|
|
|
|
GEN_OFFSET_SYM(tISF, r6);
|
|
|
|
GEN_OFFSET_SYM(tISF, r7);
|
|
|
|
GEN_OFFSET_SYM(tISF, r8);
|
|
|
|
GEN_OFFSET_SYM(tISF, r9);
|
|
|
|
GEN_OFFSET_SYM(tISF, r10);
|
|
|
|
GEN_OFFSET_SYM(tISF, r11);
|
|
|
|
GEN_OFFSET_SYM(tISF, r12);
|
|
|
|
GEN_OFFSET_SYM(tISF, r13);
|
|
|
|
GEN_OFFSET_SYM(tISF, blink);
|
|
|
|
GEN_OFFSET_SYM(tISF, lp_end);
|
|
|
|
GEN_OFFSET_SYM(tISF, lp_start);
|
|
|
|
GEN_OFFSET_SYM(tISF, lp_count);
|
|
|
|
GEN_OFFSET_SYM(tISF, pc);
|
|
|
|
GEN_OFFSET_SYM(tISF, status32);
|
|
|
|
GEN_ABSOLUTE_SYM(__tISF_SIZEOF, sizeof(tISF));
|
|
|
|
|
|
|
|
/* ARCv2-specific preempt registers structure member offsets */
|
|
|
|
GEN_OFFSET_SYM(tPreempt, sp);
|
|
|
|
GEN_ABSOLUTE_SYM(__tPreempt_SIZEOF, sizeof(tPreempt));
|
|
|
|
|
|
|
|
/* ARCv2-specific callee-saved stack */
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r13);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r14);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r15);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r16);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r17);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r18);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r19);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r20);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r21);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r22);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r23);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r24);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r25);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r26);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, fp);
|
|
|
|
GEN_OFFSET_SYM(tCalleeSaved, r30);
|
|
|
|
GEN_ABSOLUTE_SYM(__tCalleeSaved_SIZEOF, sizeof(tCalleeSaved));
|
|
|
|
|
|
|
|
/* ARCv2-specific registers-saved-in-FIRQ structure member offsets */
|
|
|
|
GEN_OFFSET_SYM(tFirqRegs, lp_count);
|
|
|
|
GEN_OFFSET_SYM(tFirqRegs, lp_start);
|
|
|
|
GEN_OFFSET_SYM(tFirqRegs, lp_end);
|
|
|
|
GEN_ABSOLUTE_SYM(__tFirqRegs_SIZEOF, sizeof(tFirqRegs));
|
|
|
|
|
2015-08-20 23:04:01 +08:00
|
|
|
/* size of the struct tcs structure sans save area for floating point regs */
|
|
|
|
GEN_ABSOLUTE_SYM(__tTCS_NOFLOAT_SIZEOF, sizeof(tTCS));
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
GEN_ABS_SYM_END
|