2005-07-14 17:12:12 +02:00
|
|
|
/* The system call implemented in this file:
|
|
|
|
* m_type: SYS_MEMSET
|
|
|
|
*
|
|
|
|
* The parameters for this system 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-08-05 11:41:15 +02:00
|
|
|
*
|
|
|
|
* Changes:
|
|
|
|
* Jun 21, 2005 created to speed up exec(2) (Ben J. Gras)
|
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 */
|
|
|
|
|
|
|
|
|