Changeset 72


Ignore:
Timestamp:
Jun 27, 2017, 10:56:25 AM (7 years ago)
Author:
max@…
Message:

start defining some remote functions, and use uint8_t instead of
char

Location:
trunk/hal
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_remote.h

    r69 r72  
    7878 * @ return read value
    7979 ****************************************************************************************/
    80 char hal_remote_lb( xptr_t  xp );
     80uint8_t hal_remote_lb( xptr_t  xp );
    8181
    8282/*****************************************************************************************
  • trunk/hal/tsar_mips32/core/hal_remote.c

    r62 r72  
    2727////////////////////////////////
    2828void hal_remote_sb( xptr_t   xp,
    29                     char     data )
     29                    uint8_t  data )
    3030{
    3131    uint32_t ptr = (uint32_t)GET_PTR( xp );
     
    9090
    9191////////////////////////////////
    92 char hal_remote_lb( xptr_t  xp )
     92uint8_t hal_remote_lb( xptr_t  xp )
    9393{
    9494        char     data;
  • trunk/hal/x86_64/core/hal_init.c

    r70 r72  
    2727#include <hal_lapic.h>
    2828#include <hal_internal.h>
     29#include <hal_remote.h>
    2930
    3031#include <memcpy.h>
     
    175176
    176177        x86_printf("-> mytest = %z\n", mytest);
     178
    177179        size_t *myptr = (void *)CLUSTER_MIN_VA(0) + XPTR(0, &mytest);
    178         *myptr = 1;
    179         x86_printf("-> mytest = %z\n", mytest);
     180        hal_remote_sb((xptr_t)myptr, 1);
     181        x86_printf("-> mytest = %z\n", hal_remote_lb((xptr_t)myptr));
    180182
    181183        init_bootinfo(&btinfo);
  • trunk/hal/x86_64/core/hal_remote.c

    r69 r72  
    2929                    uint8_t  data )
    3030{
    31         x86_panic((char *)__func__);
     31        *(uint8_t *)xp = data;
    3232}
    3333
     
    3535                    uint32_t  data )
    3636{
    37         x86_panic((char *)__func__);
     37        *(uint32_t *)xp = data;
    3838}
    3939
     
    4141                     uint64_t  data )
    4242{
    43         x86_panic((char *)__func__);
     43        *(uint64_t *)xp = data;
    4444}
    4545
     
    5050}
    5151
    52 char hal_remote_lb( xptr_t  xp )
     52uint8_t hal_remote_lb( xptr_t  xp )
    5353{
    54         x86_panic((char *)__func__);
    55         return 0;
     54        return *(uint8_t *)xp;
    5655}
    5756
    5857uint32_t hal_remote_lw( xptr_t  xp )
    5958{
    60         x86_panic((char *)__func__);
    61         return 0;
     59        return *(uint32_t *)xp;
    6260}
    6361
    6462uint64_t hal_remote_lwd( xptr_t  xp )
    6563{
    66         x86_panic((char *)__func__);
    67         return 0;
     64        return *(uint64_t *)xp;
    6865}
    6966
Note: See TracChangeset for help on using the changeset viewer.