Compare commits

..

No commits in common. "641ebb302ad151e8f588079962b532f5c3077350" and "aacb2f8db25358e2526c82b4ef1814255111e96a" have entirely different histories.

9 changed files with 3 additions and 43 deletions

View file

@ -120,7 +120,6 @@ mkfs/mkfs: mkfs/mkfs.c $K/fs.h $K/param.h
UPROGS=\
$U/_cat\
$U/_echo\
$U/_hello\
$U/_forktest\
$U/_grep\
$U/_init\
@ -137,7 +136,6 @@ UPROGS=\
$U/_zombie\
$U/_clear\
$U/_halt\
$U/_reset\
fs.img: mkfs/mkfs README.md $(UPROGS)
mkfs/mkfs fs.img README.md $(UPROGS)

View file

@ -103,7 +103,6 @@ extern u64 sys_mkdir(void);
extern u64 sys_close(void);
extern u64 sys_trace(void);
extern u64 sys_halt(void);
extern u64 sys_reset(void);
// An array mapping syscall numbers from syscall.h
// to the function that handles the system call.
@ -113,7 +112,7 @@ static u64 (*syscalls[])(void) = {
[SYS_chdir] = sys_chdir, [SYS_dup] = sys_dup, [SYS_getpid] = sys_getpid, [SYS_sbrk] = sys_sbrk,
[SYS_sleep] = sys_sleep, [SYS_uptime] = sys_uptime, [SYS_open] = sys_open, [SYS_write] = sys_write,
[SYS_mknod] = sys_mknod, [SYS_unlink] = sys_unlink, [SYS_link] = sys_link, [SYS_mkdir] = sys_mkdir,
[SYS_close] = sys_close, [SYS_trace] = sys_trace, [SYS_halt] = sys_halt, [SYS_reset] = sys_reset,
[SYS_close] = sys_close, [SYS_trace] = sys_trace, [SYS_halt] = sys_halt,
};
void

View file

@ -24,4 +24,3 @@
#define SYS_close 21
#define SYS_trace 22
#define SYS_halt 23
#define SYS_reset 24

View file

@ -101,14 +101,5 @@ void
sys_halt(void)
{
(*(volatile u32 *)QEMU_POWER) = 0x5555;
panic("sys_halt");
}
void
sys_reset(void)
{
// TODO: Revisit and review
// asm volatile("j _entry");
(*(volatile u32 *)QEMU_POWER) = 0x3333;
panic("sys_reset");
panic("sys_poweroff");
}

View file

@ -1,13 +0,0 @@
#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"
int
main(int argc, char *argv[])
{
char hello[] = "Hello XV6!\n";
write(1, hello, sizeof(hello));
exit(0);
}

View file

@ -1,10 +0,0 @@
#include "user.h"
/** Reset the machine */
int
main(int argc, char *argv[])
{
printf("System resetting...\n");
reset();
return 0;
}

View file

@ -80,9 +80,6 @@ int trace(int);
/** halt */
void halt(void);
/** halt */
void reset(void);
/**
* Library functions (ulib.c)
*/

View file

@ -239,7 +239,7 @@ copyinstr3(char *s)
// See if the kernel refuses to read/write user memory that the
// application doesn't have anymore, because it returned it.
void
rwsbrk(char *unused)
rwsbrk()
{
int fd, n;

View file

@ -40,7 +40,6 @@ syscalls = [
"uptime",
"trace",
"halt",
"reset",
]
assembly = "\n\n".join(map(genstub, syscalls))