Changeset 5b61171 in mainline


Ignore:
Timestamp:
2018-03-13T21:08:52Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
948222e4
Parents:
b127e4af
Message:

Fix riscv64 build, and add a build config for it to prevent future breakage.

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/riscv64/src/main.c

    rb127e4af r5b61171  
    6464        bootinfo.memmap.zones[0].size = PHYSMEM_SIZE;
    6565
    66         printf("\nMemory statistics (total %lu MB, starting at %p)\n\n",
     66        printf("\nMemory statistics (total %llu MB, starting at %p)\n\n",
    6767            bootinfo.memmap.total >> 20, (void *) bootinfo.physmem_start);
    6868        printf(" %p: boot info structure\n", &bootinfo);
  • uspace/lib/c/arch/riscv64/include/libarch/fibril.h

    rb127e4af r5b61171  
    3737
    3838#include <stdint.h>
     39#include <libarch/fibril_context.h>
    3940
    4041#define SP_DELTA  0
     
    4445                (ctx)->pc = (uintptr_t) (_pc); \
    4546                (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \
    46                 (ctx)->fp = 0; \
    47                 (ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \
     47                (ctx)->x4 = ((uintptr_t) (ptls)) + sizeof(tcb_t); \
    4848        } while (0)
    49 
    50 /*
    51  * This stores the registers which need to be
    52  * preserved across function calls.
    53  */
    54 typedef struct {
    55         uintptr_t sp;
    56         uintptr_t fp;
    57         uintptr_t pc;
    58         uintptr_t tls;
    59 } context_t;
    6049
    6150static inline uintptr_t _context_get_fp(context_t *ctx)
    6251{
    63         /* This function returns the frame pointer. */
    64         return ctx->fp;
     52        // FIXME: No frame pointer in the standard ABI.
     53        return 0;
    6554}
    6655
  • uspace/lib/c/arch/riscv64/src/fibril.c

    rb127e4af r5b61171  
    3030 */
    3131
    32 #include <fibril.h>
     32#include <setjmp.h>
    3333#include <stdbool.h>
    3434
Note: See TracChangeset for help on using the changeset viewer.