Ignore:
Timestamp:
Feb 1, 2005, 5:16:41 PM (16 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c60eccb
Parents:
891aa12e
Message:

Add some bootrom system calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c

    r891aa12e r7eab0f78  
    2727#include <rtems/libcsupport.h>
    2828#include <string.h>
     29#include <errno.h>
    2930 
    3031/*
     
    251252    return( (unsigned32)_CPUClockSpeed);
    252253}
     254
     255/*
     256 * Arcturus routines for getting value from bootloader
     257 */
     258#define __bsc_return(type, res) \
     259do { \
     260   if ((unsigned long)(res) >= (unsigned long)(-64)) { \
     261      errno = -(res); \
     262      res = -1; \
     263   } \
     264   return (type)(res); \
     265} while (0)
     266#define _bsc1(type,name,atype,a) \
     267type uC5282_##name(atype a) \
     268{ \
     269   long __res; \
     270   register long __a __asm__ ("%d1") = (long)a; \
     271   __asm__ __volatile__ ("move.l %0,%%d0\n\t"   \
     272                         "trap #2\n\t"          \
     273                         "move.l %%d0,%0"       \
     274                         : "=d" (__res)         \
     275                         : "0" (__BN_##name), "d" (__a) \
     276                         : "d0" ); \
     277   __bsc_return(type,__res); \
     278}
     279#define __BN_gethwaddr    12 /* get the hardware address of my interfaces */
     280#define __BN_getbenv      14 /* get a bootloader envvar */
     281#define __BN_setbenv      15 /* get a bootloader envvar */
     282_bsc1(unsigned const char *, gethwaddr, int, a)
     283_bsc1(char *, getbenv, const char *, a)
Note: See TracChangeset for help on using the changeset viewer.