2005-10-14 10:58:59 +02:00
|
|
|
/* The kernel call implemented in this file:
|
2005-07-14 17:12:12 +02:00
|
|
|
* m_type: SYS_MEMSET
|
|
|
|
*
|
2005-10-14 10:58:59 +02:00
|
|
|
* The parameters for this kernel call are:
|
2005-07-29 17:26:23 +02:00
|
|
|
* m2_p1: MEM_PTR (virtual address)
|
|
|
|
* m2_l1: MEM_COUNT (returns physical address)
|
|
|
|
* m2_l2: MEM_PATTERN (size of datastructure)
|
2005-07-14 17:12:12 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "../system.h"
|
|
|
|
|
|
|
|
#if USE_MEMSET
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_memset *
|
|
|
|
*===========================================================================*/
|
|
|
|
PUBLIC int do_memset(m_ptr)
|
|
|
|
register message *m_ptr;
|
|
|
|
{
|
2005-07-21 20:36:40 +02:00
|
|
|
/* Handle sys_memset(). This writes a pattern into the specified memory. */
|
2005-07-20 17:25:38 +02:00
|
|
|
unsigned long p;
|
2005-07-21 20:36:40 +02:00
|
|
|
unsigned char c = m_ptr->MEM_PATTERN;
|
2005-07-20 17:25:38 +02:00
|
|
|
p = c | (c << 8) | (c << 16) | (c << 24);
|
|
|
|
phys_memset((phys_bytes) m_ptr->MEM_PTR, p, (phys_bytes) m_ptr->MEM_COUNT);
|
2005-07-14 17:12:12 +02:00
|
|
|
return(OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* USE_MEMSET */
|
|
|
|
|