This page refers to the changes made in the 3.0.19 release of M-sim.
Release Date: Aug 4th 2010
- On fork, standard IO entries were not copied to the child thread. This is fixed (see copy_from: cur_entry.reserved & FE_STANDARD_IO).
- closing standard IO file descriptors is now allowed (see closer) as long as they aren't STDIN/STDOUT/STDERR that belong to the simulator.
- The FD_CLOEXEC flag is now handled (which also handles fcntl::getfd and fcntl::setfd).
- The method for getting the lowest available file descriptor terminated too early (and could result in duplicate simulated file descriptors).
- The file table now handles the determination of terminal (tty) status.
- dup and dup2 now copy the FE_STANDARD_IO flag (they probably shouldn't copy FD_CLOEXEC though).
- insert now returns the file descriptor provided (it used to always give the same one as asked for but this isn't always possible).
- ld_load_prog now returns an int (for errno or success). Programs that fail to launch through exec can still crash the simulator since exec flushes the memory pages too early. This will be fixed in a later release.
- The reduced environment set is now oriented towards user msimuser. This provides a consistent environment to run bash through M-Sim as a user.
- a passwd file is provided with msimuser as user 1000 (group 15)
- A value for a branch misprediction penalty is added to cmp.h and utilized by rollbackTo to impose a misprediction penalty.
- Out-of-bounds fetches will no longer cause fatal if the fetch is on a misspeculated path.
- gpid and gid added. More will probably be added too.
- FILE is now passed to all functions that output so that turning off the printout for power statistics actually works.
- mmap now ensures that length is on a quad_word boundary.
- updates to mmap to handle possible incomplete reads.
Process ID Handler
- Calls to wait can now return ECHILD when appropriate.
- -fastfwd 1 now properly uses the fast-forwarding value from the .arg file
- The branch misprediction is now set using "-bpred:penalty" and for multicore "-bpred:penalty_<core_num>"
- continue_fastfwd scans through all leftover contexts (to make to erase dead ones). Not doing this can cause deadlock in the fast-forward logic.
- OSF_SYS_send, OSF_SYS_setpgid, OSF_SYS_setitimer, OSF_SYS_getdtablesize, OSF_SYS_rmdir, OSF_SYS_fsync, OSF_SYS_getlogin are now implemented
- OSF_SYS_mvalid, OSF_SYS_audcntl are partially supported.
- fcntl support added (osf_flock provided) for F_GETFD, F_SETFD, F_GETFL, F_SETFL and F_SETLKW.
- Additional support for ioctl macros provided (OSF_IOC_INOUT and OSF_IOWR).
- Additional ioctl's supported: TIOCSWINSZ (set windowsize), TIOCSETA, TIOCSETAW, SIOCGIFCONF, FIONBIO, TIOCLGET. Partial support for TIOCSPGRP and TIOCGPGRP.
- TIOCISATTY now uses the file_table class to determine TTY status.
- Created an osf_termios class that can translate termios flags between Alpha and Linux
- Updated get_filename to handle double slashes that appear in the middle of a string.
- Updated OSF_SYS_read and OSF_SYS_write to handle incomplete actions.
- OSF_SYS_getdomainname now grabs info from the hardcoded uname value.
- Calls to open "/dev/tty" now call dup on STDOUT. This may not be the proper behavior.
- OSF_SYS_access now ignores flag 0x8 which causes it to fail on Linux.
- OSF_SYS_pipe no longer assumes that it can get the desired file descriptors (which could lead to duplicates). It tries to get them but uses whatever it is given.
- OSF_SYS_getpgrp now gets group information from the context.
- OSF_SYS_getgid now returns to both register V0 and A4. The wrapper code for this system call copies from A4 to V0.
- OSF_SYS_kill now handles pid 0 (by killing all, which isn't exactly what we want to do but is better than before).
- OSF_SYS_getsysinfo has support for GSI_MAX_UPROCS (using a hardcoded reasonable value).
- OSF_SYS_getdirentries has been rewritten.
- OSF_SYS_execve can return on an error (unless the error caused the program to start being loaded into memory - this will be fixed in a later revision).
- FD_CLOEXEC should be handled correctly now.