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)
|
2009-09-17 22:51:34 +02:00
|
|
|
* m2_l2: MEM_PATTERN (pattern byte to be written)
|
2005-07-14 17:12:12 +02:00
|
|
|
*/
|
|
|
|
|
2010-04-02 00:22:33 +02:00
|
|
|
#include "kernel/system.h"
|
2005-07-14 17:12:12 +02:00
|
|
|
|
|
|
|
#if USE_MEMSET
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_memset *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int do_memset(struct proc * caller, message * m_ptr)
|
2005-07-14 17:12:12 +02:00
|
|
|
{
|
2005-07-21 20:36:40 +02:00
|
|
|
/* Handle sys_memset(). This writes a pattern into the specified memory. */
|
|
|
|
unsigned char c = m_ptr->MEM_PATTERN;
|
2012-06-06 19:05:28 +02:00
|
|
|
vm_memset(m_ptr->MEM_PROCESS, (phys_bytes) m_ptr->MEM_PTR,
|
|
|
|
c, (phys_bytes) m_ptr->MEM_COUNT);
|
2005-07-14 17:12:12 +02:00
|
|
|
return(OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* USE_MEMSET */
|
|
|
|
|