Changeset 356b1b85 in rtems


Ignore:
Timestamp:
Sep 8, 2017, 6:10:26 AM (23 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
134fe56
Parents:
0d51c05b
git-author:
Sebastian Huber <sebastian.huber@…> (09/08/17 06:10:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/12/17 08:00:32)
Message:

bsp/qoriq: Port ePAPR hcall interface to RTEMS

Update #3085.

Location:
c/src/lib/libbsp/powerpc/qoriq
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/Makefile.am

    r0d51c05b r356b1b85  
    44
    55include_bspdir = $(includedir)/bsp
     6include_asmdir = $(includedir)/asm
     7include_uapi_asmdir = $(includedir)/uapi/asm
    68
    79dist_project_lib_DATA = bsp_specs
     
    3234        include/uart-bridge.h \
    3335        include/qoriq.h
     36
     37include_asm_HEADERS =
     38include_asm_HEADERS += include/asm/epapr_hcalls.h
     39include_asm_HEADERS += include/asm/fsl_hcalls.h
     40
     41include_uapi_asm_HEADERS =
     42include_uapi_asm_HEADERS += include/uapi/asm/epapr_hcalls.h
    3443
    3544noinst_LIBRARIES = libbspstart.a
     
    6574        ../shared/src/bsp-start-zero.S \
    6675        ../shared/startup/bspidle.c \
     76        startup/epapr_hcalls.S \
    6777        startup/l1cache.S \
    6878        startup/l2cache.S \
  • c/src/lib/libbsp/powerpc/qoriq/include/asm/epapr_hcalls.h

    r0d51c05b r356b1b85  
    5454
    5555#ifndef __ASSEMBLY__
    56 #include <linux/types.h>
    57 #include <linux/errno.h>
    58 #include <asm/byteorder.h>
     56#include <sys/endian.h>
    5957
    6058/*
     
    104102
    105103extern bool epapr_paravirt_enabled;
    106 extern u32 epapr_hypercall_start[];
     104extern uint32_t epapr_hypercall_start[];
    107105
    108106#ifdef CONFIG_EPAPR_PARAVIRT
     
    295293        r3 = handle;
    296294        r4 = *count;
    297         r5 = be32_to_cpu(p[0]);
    298         r6 = be32_to_cpu(p[1]);
    299         r7 = be32_to_cpu(p[2]);
    300         r8 = be32_to_cpu(p[3]);
     295        r5 = be32toh(p[0]);
     296        r6 = be32toh(p[1]);
     297        r7 = be32toh(p[2]);
     298        r8 = be32toh(p[3]);
    301299
    302300        asm volatile("bl        epapr_hypercall_start"
     
    346344
    347345        *count = r4;
    348         p[0] = cpu_to_be32(r5);
    349         p[1] = cpu_to_be32(r6);
    350         p[2] = cpu_to_be32(r7);
    351         p[3] = cpu_to_be32(r8);
     346        p[0] = htobe32(r5);
     347        p[1] = htobe32(r6);
     348        p[2] = htobe32(r7);
     349        p[3] = htobe32(r8);
    352350
    353351        return r3;
  • c/src/lib/libbsp/powerpc/qoriq/include/asm/fsl_hcalls.h

    r0d51c05b r356b1b85  
    4141#define _FSL_HCALLS_H
    4242
    43 #include <linux/types.h>
    44 #include <linux/errno.h>
    45 #include <asm/byteorder.h>
     43#include <stdint.h>
    4644#include <asm/epapr_hcalls.h>
    4745
     
    356354 */
    357355static inline unsigned int fh_partition_memcpy(unsigned int source,
    358         unsigned int target, phys_addr_t sg_list, unsigned int count)
     356        unsigned int target, uint64_t sg_list, unsigned int count)
    359357{
    360358        register uintptr_t r11 __asm__("r11");
  • c/src/lib/libbsp/powerpc/qoriq/preinstall.am

    r0d51c05b r356b1b85  
    3333        @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    3434PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     35
     36$(PROJECT_INCLUDE)/asm/$(dirstamp):
     37        @$(MKDIR_P) $(PROJECT_INCLUDE)/asm
     38        @: > $(PROJECT_INCLUDE)/asm/$(dirstamp)
     39PREINSTALL_DIRS += $(PROJECT_INCLUDE)/asm/$(dirstamp)
     40
     41$(PROJECT_INCLUDE)/uapi/asm/$(dirstamp):
     42        @$(MKDIR_P) $(PROJECT_INCLUDE)/uapi/asm
     43        @: > $(PROJECT_INCLUDE)/uapi/asm/$(dirstamp)
     44PREINSTALL_DIRS += $(PROJECT_INCLUDE)/uapi/asm/$(dirstamp)
    3545
    3646$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
     
    106116PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/qoriq.h
    107117
     118$(PROJECT_INCLUDE)/asm/epapr_hcalls.h: include/asm/epapr_hcalls.h $(PROJECT_INCLUDE)/asm/$(dirstamp)
     119        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/asm/epapr_hcalls.h
     120PREINSTALL_FILES += $(PROJECT_INCLUDE)/asm/epapr_hcalls.h
     121
     122$(PROJECT_INCLUDE)/asm/fsl_hcalls.h: include/asm/fsl_hcalls.h $(PROJECT_INCLUDE)/asm/$(dirstamp)
     123        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/asm/fsl_hcalls.h
     124PREINSTALL_FILES += $(PROJECT_INCLUDE)/asm/fsl_hcalls.h
     125
     126$(PROJECT_INCLUDE)/uapi/asm/epapr_hcalls.h: include/uapi/asm/epapr_hcalls.h $(PROJECT_INCLUDE)/uapi/asm/$(dirstamp)
     127        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/uapi/asm/epapr_hcalls.h
     128PREINSTALL_FILES += $(PROJECT_INCLUDE)/uapi/asm/epapr_hcalls.h
     129
    108130$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
    109131        $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
Note: See TracChangeset for help on using the changeset viewer.