Re: [uCsimm] questions about coldfire

From: Phil Wilshire (
Date: Tue May 29 2001 - 02:38:41 EDT

Getting the MAC address...

There is a call ready to go for this.

It is in the bootloader API

unsigned char * gethwaddr(int iface)


 unsigned char * myMAC = gethwaddr(0);

 myMAC is now a pointer to the binary MAC address.

 You may have to include the following lines near the top of your

#include <bootstd.h>

_bsc1 ( unsigned char *,gethwaddr,int,a1)

and if you cant find bootstd.h it is in src/boottools/include

The actual assembler code is in bootstd.h
but you should not have to worry about all that.

#define _bsc1(type,name,atype,a) \
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) \
                         : "%d0"); \
   __bsc_return(type,__res); \

BTW this is for the uCsimm and not coldfire I hope..


  Phil Wilshire

Joaquin Garay wrote:
> If I need the MAC address of the ucsimm, I can think of two ways of
> making it:
> - Find where is that address stored (in the registers of the cs8900 I
> think) and change the value asigned to the pointer
> - Access the MAC address through the bootloader API and the gethwaddr()
> call.
> I prefer doing it the second way, but I have no idea about how make it.
> The only information about it I've found is that coming with the ucsimm
> manual and have to say that I don't know what it's saying. Do I have to
> code in asembler in order to put the function number and args in the
> specified registers and take the results from another one? If anybody
> have accessed another function through the bootloader API, I would
> appreciate having a look to the way it's called.
> Any suggestions will be welcomed
> jokin
> This message resent by the list server
This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST