minix/kernel/system/do_memset.c
Jorrit Herder f0594a9e6d - Fixed comments in various system call handlers. Work in progress on new
sys_privctl() call to dynamically start servers and drivers.

- Shutdown sequence slightly adjusted: called as watchdog timer to let the
  busy sys_abort() call from the PM return first.

- Changed umap_bios() to have more restrictive check: BIOS memory is now
  allowed in BIOS_MEM_BEGIN to END (interrupt vectors) and BASE_MEM_TOP
  to UPPER_MEM_END. Hopefully this keeps QEMU and Bochs happy.
2005-07-21 18:36:40 +00:00

30 lines
844 B
C

/* The system call implemented in this file:
* m_type: SYS_MEMSET
*
* The parameters for this system call are:
* m1_p1: MEM_PTR (virtual address)
* m1_i1: MEM_COUNT (returns physical address)
* m1_i2: MEM_PATTERN (size of datastructure)
*/
#include "../system.h"
#if USE_MEMSET
/*===========================================================================*
* do_memset *
*===========================================================================*/
PUBLIC int do_memset(m_ptr)
register message *m_ptr;
{
/* Handle sys_memset(). This writes a pattern into the specified memory. */
unsigned long p;
unsigned char c = m_ptr->MEM_PATTERN;
p = c | (c << 8) | (c << 16) | (c << 24);
phys_memset((phys_bytes) m_ptr->MEM_PTR, p, (phys_bytes) m_ptr->MEM_COUNT);
return(OK);
}
#endif /* USE_MEMSET */