Download uCdimm™ ColdFire 5282 Hardware / Firmware Reference
Transcript
If flags contains none of PGM_EXEC_AFTER, PGM_RESET_AFTER, PGM_HALT_AFTER, this system call returns after the image is programmed. unsigned char *gethwaddr(int iface); Returns a pointer to the MAC address of the interface number iface. iface should always be 0 or 1. The MAC address pointed to is in binary format. char *getserialnum(); Returns a pointer to a string containing the serial number of this module. char *getbenv(char *var); Looks up the value of the bootloader environment variable with the name pointed to by var. Returns a pointer to a string containing the value of the variable or 0 if no environment variable with the correct permissions is found. This function checks the permissions. int setbenv(char *pair); Writes an environment variable pointed to by pair in the form NAME=value. If pair is of the form NAME, the environment variable with name NAME will be erased. This function checks permissions. int setpmask(unsigned short pmask); Sets the protection mask to the value pmask. pmask is the bitwise OR of the protection permissions listed in env.h char *readenv(int fcn); Reads environment variables in order. If fcn is 0, readenv() returns a pointer to the name of the first stored environment variable. If fcn is 1, readenv() returns a pointer to the name of the next stored environment variable. If readenv() is 2, a pointer to the value of the current environment variable is returned. This function checks permissions. int flash_chattr_range( unsigned short, *flashprt int start, int end, char andmask, char orfield); Changes the bootloader protection for a range of locations in the Flash device at base address flashptr. start and end are byte offsets. andmask is the bitwise OR of the protection values listed in flash.h and is bitwise ANDed with the present value to form the final value. orfield is the the bitwise OR of the protection values listed in flash.h and is ORed with the present value to form the final value. returns 0 on success. int flash_erase_range( int start, int end); © 2004 ARCTURUS NETWORKS INC volatile unsigned short *flashptr, - 39 - UC5282 REFERENCE GUIDE