Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
bootstd.h File Reference

Go to the source code of this file.

Macros

#define NR_BSC   21 /* last used bootloader system call */
 
#define __BN_reset   0 /* reset and start the bootloader */
 
#define __BN_test   1 /* tests the system call interface */
 
#define __BN_exec   2 /* executes a bootloader image */
 
#define __BN_exit   3 /* terminates a bootloader image */
 
#define __BN_program   4 /* program FLASH from a chain */
 
#define __BN_erase   5 /* erase sector(s) of FLASH */
 
#define __BN_open   6
 
#define __BN_write   7
 
#define __BN_read   8
 
#define __BN_close   9
 
#define __BN_mmap   10 /* map a file descriptor into memory */
 
#define __BN_munmap   11 /* remove a file to memory mapping */
 
#define __BN_gethwaddr   12 /* get the hardware address of my interfaces */
 
#define __BN_getserialnum   13 /* get the serial number of this board */
 
#define __BN_getbenv   14 /* get a bootloader envvar */
 
#define __BN_setbenv   15 /* get a bootloader envvar */
 
#define __BN_setpmask   16 /* set the protection mask */
 
#define __BN_readenv   17 /* read environment variables */
 
#define __BN_flash_chattr_range   18
 
#define __BN_flash_erase_range   19
 
#define __BN_flash_write_range   20
 
#define __bsc_return(type, res)
 
#define _bsc0(type, name)
 
#define _bsc1(type, name, atype, a)
 
#define _bsc2(type, name, atype, a, btype, b)
 
#define _bsc3(type, name, atype, a, btype, b, ctype, c)
 
#define _bsc4(type, name, atype, a, btype, b, ctype, c, dtype, d)
 
#define _bsc5(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e)
 

Macro Definition Documentation

#define __BN_close   9

Definition at line 20 of file bootstd.h.

#define __BN_erase   5 /* erase sector(s) of FLASH */

Definition at line 16 of file bootstd.h.

#define __BN_exec   2 /* executes a bootloader image */

Definition at line 13 of file bootstd.h.

#define __BN_exit   3 /* terminates a bootloader image */

Definition at line 14 of file bootstd.h.

#define __BN_flash_chattr_range   18

Definition at line 29 of file bootstd.h.

#define __BN_flash_erase_range   19

Definition at line 30 of file bootstd.h.

#define __BN_flash_write_range   20

Definition at line 31 of file bootstd.h.

#define __BN_getbenv   14 /* get a bootloader envvar */

Definition at line 25 of file bootstd.h.

#define __BN_gethwaddr   12 /* get the hardware address of my interfaces */

Definition at line 23 of file bootstd.h.

#define __BN_getserialnum   13 /* get the serial number of this board */

Definition at line 24 of file bootstd.h.

#define __BN_mmap   10 /* map a file descriptor into memory */

Definition at line 21 of file bootstd.h.

#define __BN_munmap   11 /* remove a file to memory mapping */

Definition at line 22 of file bootstd.h.

#define __BN_open   6

Definition at line 17 of file bootstd.h.

#define __BN_program   4 /* program FLASH from a chain */

Definition at line 15 of file bootstd.h.

#define __BN_read   8

Definition at line 19 of file bootstd.h.

#define __BN_readenv   17 /* read environment variables */

Definition at line 28 of file bootstd.h.

#define __BN_reset   0 /* reset and start the bootloader */

Definition at line 11 of file bootstd.h.

#define __BN_setbenv   15 /* get a bootloader envvar */

Definition at line 26 of file bootstd.h.

#define __BN_setpmask   16 /* set the protection mask */

Definition at line 27 of file bootstd.h.

#define __BN_test   1 /* tests the system call interface */

Definition at line 12 of file bootstd.h.

#define __BN_write   7

Definition at line 18 of file bootstd.h.

#define __bsc_return (   type,
  res 
)
Value:
do { \
if ((unsigned long)(res) >= (unsigned long)(-64)) { \
/* let errno be a function, preserve res in %d0 */ \
int __err = -(res); \
errno = __err; \
res = -1; \
} \
return (type)(res); \
} while (0)

Definition at line 37 of file bootstd.h.

#define _bsc0 (   type,
  name 
)
Value:
type name(void) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res) \
); \
__bsc_return(type,__res); \
}

Definition at line 48 of file bootstd.h.

#define _bsc1 (   type,
  name,
  atype,
  a 
)
Value:
type name(atype a) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
register long __a __asm__ ("%d1") = (long)a; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res), "d" (__a) \
); \
__bsc_return(type,__res); \
}

Definition at line 59 of file bootstd.h.

#define _bsc2 (   type,
  name,
  atype,
  a,
  btype,
  b 
)
Value:
type name(atype a, btype b) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
register long __a __asm__ ("%d1") = (long)a; \
register long __b __asm__ ("%d2") = (long)b; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res), "d" (__a), "d" (__b) \
); \
__bsc_return(type,__res); \
}

Definition at line 71 of file bootstd.h.

#define _bsc3 (   type,
  name,
  atype,
  a,
  btype,
  b,
  ctype,
  c 
)
Value:
type name(atype a, btype b, ctype c) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
register long __a __asm__ ("%d1") = (long)a; \
register long __b __asm__ ("%d2") = (long)b; \
register long __c __asm__ ("%d3") = (long)c; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res), "d" (__a), "d" (__b), \
"d" (__c) \
); \
__bsc_return(type,__res); \
}

Definition at line 84 of file bootstd.h.

#define _bsc4 (   type,
  name,
  atype,
  a,
  btype,
  b,
  ctype,
  c,
  dtype,
  d 
)
Value:
type name(atype a, btype b, ctype c, dtype d) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
register long __a __asm__ ("%d1") = (long)a; \
register long __b __asm__ ("%d2") = (long)b; \
register long __c __asm__ ("%d3") = (long)c; \
register long __d __asm__ ("%d4") = (long)d; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res), "d" (__a), "d" (__b), \
"d" (__c), "d" (__d) \
); \
__bsc_return(type,__res); \
}

Definition at line 99 of file bootstd.h.

#define _bsc5 (   type,
  name,
  atype,
  a,
  btype,
  b,
  ctype,
  c,
  dtype,
  d,
  etype,
  e 
)
Value:
type name(atype a, btype b, ctype c, dtype d, etype e) \
{ \
register long __res __asm__ ("%d0") = __BN_##name; \
register long __a __asm__ ("%d1") = (long)a; \
register long __b __asm__ ("%d2") = (long)b; \
register long __c __asm__ ("%d3") = (long)c; \
register long __d __asm__ ("%d4") = (long)d; \
register long __e __asm__ ("%d5") = (long)e; \
__asm__ __volatile__ ("trap #2" \
: "=g" (__res) \
: "0" (__res), "d" (__a), "d" (__b), \
"d" (__c), "d" (__d), "d" (__e) \
); \
__bsc_return(type,__res); \
}

Definition at line 115 of file bootstd.h.

#define NR_BSC   21 /* last used bootloader system call */

Definition at line 9 of file bootstd.h.