Users Guide: Network Microcontroller Supplement User Manual
ROM REDIRECT FUNCTION TABLE
Since the socket interface is used by both NetBoot (from DS80C400 silicon software) and the user code (possibly running under a run-
time environment or operating system), the code must be flexible enough to support all types of memory managers, as well as task and
thread schedulers. Therefore, the DS80C400 silicon software socket interface code does not call these functions directly, but it makes
use of a function redirect table. During a NetBoot, the DS80C400 silicon software provides its own minimal implementations of these func-
tions. However, to use the socket layer from an application, users can substitute their own implementations for the functions in Table 23-1.
Table 23-1. ROM REDIRECT FUNCTIONS
Functions should be replaced in groups, e.g., if the user provides his/her own memory manager, all the memory manager functions
should be replaced. Note: All DS80C400 silicon software functions (including the exported functions) make heavy use of this table.
Therefore, it must always exist, either in its default state or modified by the user. The function redirect table that is contained in the
DS80C400 silicon software is copied to memory using the ROM_redirect_init function. NetBoot calls this function. If the user does not
use NetBoot, ROM_Redirect_Init must be called. ROM_Redirect_Init restores the function redirect table without altering any other
state.
FUNCTION
TABLE
OFFSET
DESCRIPTION
bootstate 00h Reserved for use by Maxim
kernelmalloc 03h See rom_kernelmalloc
kernelfree 06h See rom_kernelfree
malloc 09h See rom_malloc
free 0Ch See rom_free
mallocd irty 0Fh See rom_mallocdirty
deref 12h See rom_deref
MEMORY MANAGER
underef 54h Opposite of deref (12h)
getfreeram 15h See rom_getfreeram
gett imemillis 18h R eturns uptime since the system was initialized in mil li seconds
getthreadID 1Bh Returns thread ID
threadresume 1Eh Resumes thread
threadIOsleep 21h Sleeps, waiting for I/O
threadIOsleepNC 24h Sleeps, waiting for I/O (run fr om critical section)
threadsave 27h Saves thread
threadrestore 2Ah Restores thread
TASK MANAGER
sleep 2Dh Sleeps for a number of milliseconds
gettaskID 30h S ee task_getcurrent
infosendchar 33h Prints debug character to debug port
IPchecksum 36h Computes IP checksum
reserved 39h Reserved for use by Maxim
DHCPnotify 3Ch See rom_dhcp_notify
taskcreate 3Fh
See task_create
taskduplicate 42h See task_duplicate
taskdestroy 45h See task_destroy
TASK
MANAGER
(HOOKS)
taskswitchin 48h See rom_task_switch_in
taskswitchout 4Bh See rom_task_switch_out
getMACID 4Eh
Reads MAC ID from DS250 2 1-Wire device and IP/gatew ay/TFTP server
from other 1-Wire device
reserved 51h Reserved for use by Maxim
userIOpo ll 57h Called by scheduler
errornot ification 5Ah Called when out of memory or other error detected
High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
217
Maxim Integrated