Changeset ab971bf5 in rtems


Ignore:
Timestamp:
Aug 13, 2018, 10:21:47 AM (16 months ago)
Author:
Amaan Cheval <amaan.cheval@…>
Branches:
master
Children:
6eccd0c
Parents:
382d653
git-author:
Amaan Cheval <amaan.cheval@…> (08/13/18 10:21:47)
git-committer:
Joel Sherrill <joel@…> (08/13/18 15:48:20)
Message:

bsps/x86_64: Reorganize header files and compile-options

Updates #2898.

Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • bsps/x86_64/amd64/config/amd64.cfg

    r382d653 rab971bf5  
    1212# larger than their optimized container sizes.
    1313CPU_CFLAGS += -mcmodel=large
     14CPU_CFLAGS += -Werror=return-type
     15
     16LDFLAGS = -Wl,--gc-sections
  • cpukit/score/cpu/x86_64/headers.am

    r382d653 rab971bf5  
    1212include_rtems_score_HEADERS =
    1313include_rtems_score_HEADERS += include/rtems/score/cpu.h
     14include_rtems_score_HEADERS += include/rtems/score/cpu_asm.h
    1415include_rtems_score_HEADERS += include/rtems/score/cpuatomic.h
    1516include_rtems_score_HEADERS += include/rtems/score/cpuimpl.h
  • cpukit/score/cpu/x86_64/include/rtems/asm.h

    r382d653 rab971bf5  
    8585#define r15 REG (r15)
    8686
     87/*
     88 * Order of register usage for function arguments as per the calling convention
     89 */
     90#define REG_ARG0 rdi
     91#define REG_ARG1 rsi
     92#define REG_ARG2 rdx
     93#define REG_ARG3 rcx
     94#define REG_ARG4 r8
     95#define REG_ARG5 r9
     96
    8797// XXX: eax, ax, etc., segment registers
    8898
  • cpukit/score/cpu/x86_64/include/rtems/score/cpu.h

    r382d653 rab971bf5  
    4141
    4242#include <rtems/score/basedefs.h>
     43#include <rtems/score/cpu_asm.h>
    4344#include <rtems/score/x86_64.h>
    4445
     
    5556#define CPU_STACK_GROWS_UP               FALSE
    5657
    57 #define CPU_STRUCTURE_ALIGNMENT __attribute__((aligned ( 64 )))
     58#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED(64)
    5859#define CPU_CACHE_LINE_BYTES 64
    5960#define CPU_MODES_INTERRUPT_MASK   0x00000001
     
    105106} CPU_Interrupt_frame;
    106107
    107 #endif /* ASM */
     108#endif /* !ASM */
    108109
    109110
  • cpukit/score/cpu/x86_64/include/rtems/score/cpuimpl.h

    r382d653 rab971bf5  
    2929#endif
    3030
    31 static inline uint8_t inport_byte(uint16_t port)
    32 {
    33   uint8_t ret;
    34   __asm__ volatile ( "inb %1, %0"
    35                      : "=a" (ret)
    36                      : "Nd" (port) );
    37   return ret;
    38 }
    39 
    40 static inline void outport_byte(uint16_t port, uint8_t val)
    41 {
    42   __asm__ volatile ( "outb %0, %1" : : "a" (val), "Nd" (port) );
    43 }
    44 
    4531RTEMS_INLINE_ROUTINE void _CPU_Context_volatile_clobber( uintptr_t pattern )
    4632{
     
    6955#endif
    7056
    71 #endif /* ASM */
     57#endif /* !ASM */
    7258
    7359#endif /* _RTEMS_SCORE_CPUIMPL_H */
  • cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h

    r382d653 rab971bf5  
    3333
    3434#define CPU_NAME "x86-64"
    35 #define CPU_MODEL_NAME "XXX: x86-64 generic"
     35#define CPU_MODEL_NAME "amd64"
    3636
    37 #define COM1_BASE_IO 0x3F8
     37#define COM1_BASE_IO    0x3F8
    3838#define COM1_CLOCK_RATE (115200 * 16)
     39
     40#define EFLAGS_INTR_ENABLE 0x200
     41
     42#if DEBUG
     43#define DBG_PRINTF(format, args...)             \
     44  printf(format, ## args)
     45#else
     46#define DBG_PRINTF(format, args...)
     47#endif
    3948
    4049#ifdef __cplusplus
  • cpukit/score/cpu/x86_64/x86_64-context-switch.S

    r382d653 rab971bf5  
    4747PUBLIC(_CPU_Context_switch)
    4848
    49 .set RUNCONTEXT_ARG,   rdi                   /* save context argument */
    50 .set HEIRCONTEXT_ARG,  rsi                   /* restore context argument */
     49/* save context argument */
     50.set RUNCONTEXT_ARG,   REG_ARG0
     51/* restore context argument */
     52.set HEIRCONTEXT_ARG,  REG_ARG1
    5153
    5254SYM(_CPU_Context_switch):
     
    8991PUBLIC(_CPU_Context_restore)
    9092
    91 .set NEWCONTEXT_ARG,   rdi       /* context to restore argument */
     93.set NEWCONTEXT_ARG,   REG_ARG0       /* context to restore argument */
    9294
    9395SYM(_CPU_Context_restore):
Note: See TracChangeset for help on using the changeset viewer.