diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..f0594c75363b66f4dd780677a096efa671669161 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "files.associations": { + "*.c": "c", + "syscall.h": "c", + "sysnum.h": "c" + } +} \ No newline at end of file diff --git a/kernel/include/initcode.h b/kernel/include/initcode.h index 1768fcfc00e84457768239505c293d08eb134094..3de4731f1d106710a0e8e13a8407cdd980207b0a 100644 --- a/kernel/include/initcode.h +++ b/kernel/include/initcode.h @@ -1,15 +1,15 @@ 0x01,0x11,0x06,0xec,0x22,0xe8,0x26,0xe4,0x00,0x10,0x01,0x46,0x85,0x45,0x09,0x45, -0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0x41,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80, -0x80,0x3d,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0xe0,0x3c,0x17,0x15,0x00,0x00, -0x13,0x05,0x45,0x8b,0x97,0x00,0x00,0x00,0xe7,0x80,0xc0,0x6e,0x97,0x00,0x00,0x00, +0x97,0x00,0x00,0x00,0xe7,0x80,0x40,0x41,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80, +0xa0,0x3d,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0x3d,0x17,0x15,0x00,0x00, +0x13,0x05,0x45,0x8b,0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0x6f,0x97,0x00,0x00,0x00, 0xe7,0x80,0xc0,0x34,0x63,0x4a,0x05,0x02,0xaa,0x84,0x21,0xc5,0x01,0x45,0x97,0x00, -0x00,0x00,0xe7,0x80,0xa0,0x34,0x63,0x87,0xa4,0x06,0xe3,0x59,0x05,0xfe,0x17,0x15, -0x00,0x00,0x13,0x05,0xa5,0x8c,0x97,0x00,0x00,0x00,0xe7,0x80,0xa0,0x6b,0x05,0x45, +0x00,0x00,0xe7,0x80,0xc0,0x34,0x63,0x87,0xa4,0x06,0xe3,0x59,0x05,0xfe,0x17,0x15, +0x00,0x00,0x13,0x05,0xa5,0x8c,0x97,0x00,0x00,0x00,0xe7,0x80,0xe0,0x6b,0x05,0x45, 0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0x32,0x17,0x15,0x00,0x00,0x13,0x05,0x05,0x88, -0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0x6a,0x05,0x45,0x97,0x00,0x00,0x00,0xe7,0x80, +0x97,0x00,0x00,0x00,0xe7,0x80,0x40,0x6a,0x05,0x45,0x97,0x00,0x00,0x00,0xe7,0x80, 0x60,0x30,0x97,0x15,0x00,0x00,0x93,0x85,0xe5,0xd2,0x17,0x15,0x00,0x00,0x03,0x35, -0xe5,0xd1,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0x32,0x17,0x15,0x00,0x00,0x13,0x05, -0x65,0x86,0x97,0x00,0x00,0x00,0xe7,0x80,0xe0,0x66,0x05,0x45,0x97,0x00,0x00,0x00, +0xe5,0xd1,0x97,0x00,0x00,0x00,0xe7,0x80,0xa0,0x32,0x17,0x15,0x00,0x00,0x13,0x05, +0x65,0x86,0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0x67,0x05,0x45,0x97,0x00,0x00,0x00, 0xe7,0x80,0x40,0x2d,0x93,0x08,0x20,0x0d,0x73,0x00,0x00,0x00,0x01,0x45,0xe2,0x60, 0x42,0x64,0xa2,0x64,0x05,0x61,0x82,0x80,0x41,0x11,0x22,0xe4,0x00,0x08,0xaa,0x87, 0x85,0x05,0x85,0x07,0x03,0xc7,0xf5,0xff,0xa3,0x8f,0xe7,0xfe,0x75,0xfb,0x22,0x64, @@ -29,14 +29,14 @@ 0x86,0xec,0xa2,0xe8,0xa6,0xe4,0xca,0xe0,0x4e,0xfc,0x52,0xf8,0x56,0xf4,0x5a,0xf0, 0x5e,0xec,0x62,0xe8,0x80,0x10,0xaa,0x8b,0x2e,0x8a,0x2a,0x89,0x81,0x44,0x93,0x0a, 0xf4,0xfa,0x29,0x4b,0x35,0x4c,0xa6,0x89,0x85,0x24,0x63,0xd7,0x44,0x03,0x05,0x46, -0xd6,0x85,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0x40,0x1b,0x63,0x5e,0xa0,0x00, +0xd6,0x85,0x01,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0x60,0x1b,0x63,0x5e,0xa0,0x00, 0x83,0x47,0xf4,0xfa,0x23,0x00,0xf9,0x00,0x63,0x87,0x67,0x01,0x05,0x09,0xe3,0x9c, 0x87,0xfd,0xa6,0x89,0x11,0xa0,0xa6,0x89,0xde,0x99,0x23,0x80,0x09,0x00,0x5e,0x85, 0xe6,0x60,0x46,0x64,0xa6,0x64,0x06,0x69,0xe2,0x79,0x42,0x7a,0xa2,0x7a,0x02,0x7b, 0xe2,0x6b,0x42,0x6c,0x25,0x61,0x82,0x80,0x01,0x11,0x06,0xec,0x22,0xe8,0x4a,0xe0, -0x00,0x10,0x2e,0x89,0x81,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0xc0,0x18,0x63,0x46, -0x05,0x02,0x26,0xe4,0xaa,0x84,0xca,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0x18, -0x2a,0x89,0x26,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x60,0x15,0xa2,0x64,0x4a,0x85, +0x00,0x10,0x2e,0x89,0x81,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0xe0,0x18,0x63,0x46, +0x05,0x02,0x26,0xe4,0xaa,0x84,0xca,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x40,0x18, +0x2a,0x89,0x26,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0x15,0xa2,0x64,0x4a,0x85, 0xe2,0x60,0x42,0x64,0x02,0x69,0x05,0x61,0x82,0x80,0x7d,0x59,0xcd,0xbf,0x41,0x11, 0x22,0xe4,0x00,0x08,0x03,0x47,0x05,0x00,0x93,0x07,0xd0,0x02,0x85,0x45,0x63,0x03, 0xf7,0x04,0x03,0x47,0x05,0x00,0x9b,0x07,0x07,0xfd,0x93,0xf7,0xf7,0x0f,0xa5,0x46, @@ -55,104 +55,104 @@ 0x19,0xa0,0x3b,0x85,0xe7,0x40,0x22,0x64,0x41,0x01,0x82,0x80,0x01,0x45,0xe5,0xbf, 0x41,0x11,0x06,0xe4,0x22,0xe0,0x00,0x08,0x97,0x00,0x00,0x00,0xe7,0x80,0x60,0xf6, 0xa2,0x60,0x02,0x64,0x41,0x01,0x82,0x80,0x85,0x48,0x73,0x00,0x00,0x00,0x82,0x80, -0x89,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x8d,0x48,0x73,0x00,0x00,0x00,0x82,0x80, -0x91,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x95,0x48,0x73,0x00,0x00,0x00,0x82,0x80, -0x93,0x08,0x00,0x04,0x73,0x00,0x00,0x00,0x82,0x80,0xd5,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0x99,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x9d,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xbd,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xa1,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xd1,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xa5,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xa9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xad,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xb1,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xb5,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xb9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xd9,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xdd,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xe1,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xe5,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xc5,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xc9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xcd,0x48,0x73,0x00,0x00,0x00, -0x82,0x80,0xe9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x01,0x11,0x06,0xec,0x22,0xe8, -0x00,0x10,0xa3,0x07,0xb4,0xfe,0x05,0x46,0x93,0x05,0xf4,0xfe,0x97,0x00,0x00,0x00, -0xe7,0x80,0x40,0xf4,0xe2,0x60,0x42,0x64,0x05,0x61,0x82,0x80,0x39,0x71,0x06,0xfc, -0x22,0xf8,0x26,0xf4,0x4e,0xec,0x80,0x00,0xaa,0x84,0x99,0xc2,0x63,0xc9,0x05,0x08, -0x81,0x25,0x81,0x48,0x93,0x09,0x04,0xfc,0xce,0x86,0x01,0x47,0x01,0x26,0x17,0x05, -0x00,0x00,0x13,0x05,0x25,0x51,0x3a,0x88,0x05,0x27,0xbb,0xf7,0xc5,0x02,0x82,0x17, -0x81,0x93,0xaa,0x97,0x83,0xc7,0x07,0x00,0x23,0x80,0xf6,0x00,0x9b,0x87,0x05,0x00, -0xbb,0xd5,0xc5,0x02,0x85,0x06,0xe3,0xf0,0xc7,0xfe,0x63,0x8c,0x08,0x00,0x93,0x07, -0x07,0xfd,0x33,0x87,0x87,0x00,0x93,0x07,0xd0,0x02,0x23,0x08,0xf7,0xfe,0x1b,0x07, -0x28,0x00,0x63,0x58,0xe0,0x02,0x4a,0xf0,0x13,0x09,0x04,0xfc,0x3a,0x99,0xfd,0x19, -0xba,0x99,0x7d,0x37,0x02,0x17,0x01,0x93,0xb3,0x89,0xe9,0x40,0x83,0x45,0xf9,0xff, -0x26,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xf5,0x7d,0x19,0xe3,0x18,0x39,0xff, -0x02,0x79,0xe2,0x70,0x42,0x74,0xa2,0x74,0xe2,0x69,0x21,0x61,0x82,0x80,0xbb,0x05, -0xb0,0x40,0x85,0x48,0x85,0xbf,0x5d,0x71,0x86,0xe4,0xa2,0xe0,0x4a,0xf8,0x80,0x08, -0x03,0xc9,0x05,0x00,0x63,0x0a,0x09,0x1a,0x26,0xfc,0x4e,0xf4,0x52,0xf0,0x56,0xec, -0x5a,0xe8,0x5e,0xe4,0xaa,0x8a,0xb2,0x8b,0x93,0x84,0x15,0x00,0x81,0x49,0x13,0x0a, -0x50,0x02,0x55,0x4b,0x39,0xa8,0xca,0x85,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80, -0x00,0xf0,0x19,0xa0,0x63,0x8d,0x49,0x01,0x85,0x04,0x03,0xc9,0xf4,0xff,0x63,0x07, -0x09,0x16,0xe3,0x99,0x09,0xfe,0xe3,0x10,0x49,0xff,0xd2,0x89,0xf5,0xb7,0x63,0x04, -0x49,0x13,0x9b,0x07,0xd9,0xf9,0x93,0xf7,0xf7,0x0f,0x63,0x67,0xfb,0x12,0x9b,0x07, -0xd9,0xf9,0x13,0xf7,0xf7,0x0f,0x63,0x61,0xeb,0x12,0x93,0x17,0x27,0x00,0x17,0x07, -0x00,0x00,0x13,0x07,0xa7,0x3b,0xba,0x97,0x9c,0x43,0xba,0x97,0x82,0x87,0x13,0x89, -0x8b,0x00,0x85,0x46,0x29,0x46,0x83,0xa5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00, -0xe7,0x80,0x00,0xec,0xca,0x8b,0x81,0x49,0x45,0xb7,0x13,0x89,0x8b,0x00,0x81,0x46, -0x29,0x46,0x83,0xa5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x40,0xea, -0xca,0x8b,0x81,0x49,0x51,0xb7,0x13,0x89,0x8b,0x00,0x81,0x46,0x41,0x46,0x83,0xa5, -0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xe8,0xca,0x8b,0x81,0x49, -0xa5,0xb7,0x62,0xe0,0x13,0x8c,0x8b,0x00,0x83,0xb9,0x0b,0x00,0x93,0x05,0x00,0x03, -0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xe4,0x93,0x05,0x80,0x07,0x56,0x85, -0x97,0x00,0x00,0x00,0xe7,0x80,0xa0,0xe3,0x41,0x49,0x97,0x0b,0x00,0x00,0x93,0x8b, -0x6b,0x38,0x93,0xd7,0xc9,0x03,0xde,0x97,0x83,0xc5,0x07,0x00,0x56,0x85,0x97,0x00, -0x00,0x00,0xe7,0x80,0xc0,0xe1,0x92,0x09,0x7d,0x39,0xe3,0x14,0x09,0xfe,0xe2,0x8b, -0x81,0x49,0x02,0x6c,0x11,0xbf,0x93,0x89,0x8b,0x00,0x03,0xb9,0x0b,0x00,0x63,0x01, -0x09,0x02,0x83,0x45,0x09,0x00,0xa5,0xc9,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80, -0x00,0xdf,0x05,0x09,0x83,0x45,0x09,0x00,0xe5,0xf9,0xce,0x8b,0x81,0x49,0xed,0xb5, -0x17,0x09,0x00,0x00,0x13,0x09,0x09,0x2d,0x93,0x05,0x80,0x02,0xf1,0xbf,0x13,0x89, -0x8b,0x00,0x83,0xc5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0xdc, -0xca,0x8b,0x81,0x49,0xd1,0xb5,0x93,0x05,0x50,0x02,0x56,0x85,0x97,0x00,0x00,0x00, -0xe7,0x80,0xe0,0xda,0x81,0x49,0x4d,0xbd,0x93,0x05,0x50,0x02,0x56,0x85,0x97,0x00, -0x00,0x00,0xe7,0x80,0xc0,0xd9,0xca,0x85,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80, -0x00,0xd9,0x81,0x49,0x51,0xbd,0xce,0x8b,0x81,0x49,0x79,0xb5,0xe2,0x74,0xa2,0x79, -0x02,0x7a,0xe2,0x6a,0x42,0x6b,0xa2,0x6b,0xa6,0x60,0x06,0x64,0x42,0x79,0x61,0x61, -0x82,0x80,0x5d,0x71,0x06,0xec,0x22,0xe8,0x00,0x10,0x10,0xe0,0x14,0xe4,0x18,0xe8, -0x1c,0xec,0x23,0x30,0x04,0x03,0x23,0x34,0x14,0x03,0x22,0x86,0x23,0x34,0x84,0xfe, -0x97,0x00,0x00,0x00,0xe7,0x80,0x60,0xe1,0xe2,0x60,0x42,0x64,0x61,0x61,0x82,0x80, -0x1d,0x71,0x06,0xec,0x22,0xe8,0x00,0x10,0x0c,0xe4,0x10,0xe8,0x14,0xec,0x18,0xf0, -0x1c,0xf4,0x23,0x38,0x04,0x03,0x23,0x3c,0x14,0x03,0x13,0x06,0x84,0x00,0x23,0x34, -0xc4,0xfe,0xaa,0x85,0x05,0x45,0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0xde,0xe2,0x60, -0x42,0x64,0x25,0x61,0x82,0x80,0x41,0x11,0x22,0xe4,0x00,0x08,0x93,0x06,0x05,0xff, -0x97,0x07,0x00,0x00,0x83,0xb7,0x87,0x66,0x2d,0xa0,0x18,0x46,0x2d,0x9f,0x23,0x2c, -0xe5,0xfe,0x98,0x63,0x10,0x63,0x3d,0xa8,0x03,0x27,0x85,0xff,0x31,0x9f,0x98,0xc7, -0x83,0x36,0x05,0xff,0x91,0xa0,0x98,0x63,0x63,0xe4,0xe7,0x00,0x63,0xea,0xe6,0x00, -0xba,0x87,0xe3,0xfa,0xd7,0xfe,0x98,0x63,0x63,0xe4,0xe6,0x00,0xe3,0xea,0xe7,0xfe, -0x83,0x25,0x85,0xff,0x90,0x63,0x13,0x98,0x05,0x02,0x13,0x57,0xc8,0x01,0x36,0x97, -0xe3,0x0d,0xe6,0xfa,0x23,0x38,0xc5,0xfe,0x90,0x47,0x93,0x15,0x06,0x02,0x13,0xd7, -0xc5,0x01,0x3e,0x97,0xe3,0x8a,0xe6,0xfa,0x94,0xe3,0x17,0x07,0x00,0x00,0x23,0x3f, -0xf7,0x5e,0x22,0x64,0x41,0x01,0x82,0x80,0x39,0x71,0x06,0xfc,0x22,0xf8,0x26,0xf4, -0x4e,0xec,0x80,0x00,0x93,0x14,0x05,0x02,0x81,0x90,0xbd,0x04,0x91,0x80,0x9b,0x89, -0x14,0x00,0x85,0x04,0x17,0x05,0x00,0x00,0x03,0x35,0x45,0x5d,0x15,0xc9,0x1c,0x61, -0x98,0x47,0x63,0x7f,0x97,0x08,0x4a,0xf0,0x52,0xe8,0x56,0xe4,0x5a,0xe0,0x4e,0x8a, -0x1b,0x87,0x09,0x00,0x85,0x66,0x63,0x73,0xd7,0x00,0x05,0x6a,0x1b,0x0b,0x0a,0x00, -0x1b,0x1a,0x4a,0x00,0x17,0x09,0x00,0x00,0x13,0x09,0x49,0x5a,0xfd,0x5a,0x99,0xa0, -0x4a,0xf0,0x52,0xe8,0x56,0xe4,0x5a,0xe0,0x17,0x07,0x00,0x00,0x13,0x07,0x07,0x59, -0x97,0x07,0x00,0x00,0x93,0x87,0x07,0x59,0x1c,0xe3,0x1c,0xe7,0x23,0x28,0x07,0x00, -0x7d,0xbf,0x98,0x63,0x18,0xe1,0x8d,0xa0,0x23,0x24,0x65,0x01,0x41,0x05,0x97,0x00, -0x00,0x00,0xe7,0x80,0x80,0xef,0x03,0x35,0x09,0x00,0x3d,0xc1,0x1c,0x61,0x98,0x47, -0x63,0x74,0x97,0x02,0x03,0x37,0x09,0x00,0x3e,0x85,0xe3,0x19,0xf7,0xfe,0x52,0x85, -0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0xb8,0xe3,0x18,0x55,0xfd,0x01,0x45,0x02,0x79, -0x42,0x6a,0xa2,0x6a,0x02,0x6b,0x3d,0xa0,0x02,0x79,0x42,0x6a,0xa2,0x6a,0x02,0x6b, -0xe3,0x89,0xe4,0xfa,0x3b,0x07,0x37,0x41,0x98,0xc7,0x93,0x16,0x07,0x02,0x13,0xd7, -0xc6,0x01,0xba,0x97,0x23,0xa4,0x37,0x01,0x17,0x07,0x00,0x00,0x23,0x38,0xa7,0x50, -0x13,0x85,0x07,0x01,0xe2,0x70,0x42,0x74,0xa2,0x74,0xe2,0x69,0x21,0x61,0x82,0x80, -0x02,0x79,0x42,0x6a,0xa2,0x6a,0x02,0x6b,0xf5,0xb7,0x00,0x00,0x00,0x00,0x00,0x00, +0x93,0x08,0xd0,0x05,0x73,0x00,0x00,0x00,0x82,0x80,0x8d,0x48,0x73,0x00,0x00,0x00, +0x82,0x80,0x91,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x95,0x48,0x73,0x00,0x00,0x00, +0x82,0x80,0x93,0x08,0x00,0x04,0x73,0x00,0x00,0x00,0x82,0x80,0xd5,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0x99,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x9d,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0xbd,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xa1,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0xd1,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xa5,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0xdd,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xad,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0xb1,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xb5,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0xb9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xd9,0x48,0x73,0x00, +0x00,0x00,0x82,0x80,0x93,0x08,0xb0,0x07,0x73,0x00,0x00,0x00,0x82,0x80,0xe1,0x48, +0x73,0x00,0x00,0x00,0x82,0x80,0xe5,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xc5,0x48, +0x73,0x00,0x00,0x00,0x82,0x80,0xc9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0xcd,0x48, +0x73,0x00,0x00,0x00,0x82,0x80,0xe9,0x48,0x73,0x00,0x00,0x00,0x82,0x80,0x01,0x11, +0x06,0xec,0x22,0xe8,0x00,0x10,0xa3,0x07,0xb4,0xfe,0x05,0x46,0x93,0x05,0xf4,0xfe, +0x97,0x00,0x00,0x00,0xe7,0x80,0x20,0xf4,0xe2,0x60,0x42,0x64,0x05,0x61,0x82,0x80, +0x39,0x71,0x06,0xfc,0x22,0xf8,0x26,0xf4,0x4e,0xec,0x80,0x00,0xaa,0x84,0x99,0xc2, +0x63,0xc9,0x05,0x08,0x81,0x25,0x81,0x48,0x93,0x09,0x04,0xfc,0xce,0x86,0x01,0x47, +0x01,0x26,0x17,0x05,0x00,0x00,0x13,0x05,0xe5,0x50,0x3a,0x88,0x05,0x27,0xbb,0xf7, +0xc5,0x02,0x82,0x17,0x81,0x93,0xaa,0x97,0x83,0xc7,0x07,0x00,0x23,0x80,0xf6,0x00, +0x9b,0x87,0x05,0x00,0xbb,0xd5,0xc5,0x02,0x85,0x06,0xe3,0xf0,0xc7,0xfe,0x63,0x8c, +0x08,0x00,0x93,0x07,0x07,0xfd,0x33,0x87,0x87,0x00,0x93,0x07,0xd0,0x02,0x23,0x08, +0xf7,0xfe,0x1b,0x07,0x28,0x00,0x63,0x58,0xe0,0x02,0x4a,0xf0,0x13,0x09,0x04,0xfc, +0x3a,0x99,0xfd,0x19,0xba,0x99,0x7d,0x37,0x02,0x17,0x01,0x93,0xb3,0x89,0xe9,0x40, +0x83,0x45,0xf9,0xff,0x26,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xf5,0x7d,0x19, +0xe3,0x18,0x39,0xff,0x02,0x79,0xe2,0x70,0x42,0x74,0xa2,0x74,0xe2,0x69,0x21,0x61, +0x82,0x80,0xbb,0x05,0xb0,0x40,0x85,0x48,0x85,0xbf,0x5d,0x71,0x86,0xe4,0xa2,0xe0, +0x4a,0xf8,0x80,0x08,0x03,0xc9,0x05,0x00,0x63,0x0a,0x09,0x1a,0x26,0xfc,0x4e,0xf4, +0x52,0xf0,0x56,0xec,0x5a,0xe8,0x5e,0xe4,0xaa,0x8a,0xb2,0x8b,0x93,0x84,0x15,0x00, +0x81,0x49,0x13,0x0a,0x50,0x02,0x55,0x4b,0x39,0xa8,0xca,0x85,0x56,0x85,0x97,0x00, +0x00,0x00,0xe7,0x80,0x00,0xf0,0x19,0xa0,0x63,0x8d,0x49,0x01,0x85,0x04,0x03,0xc9, +0xf4,0xff,0x63,0x07,0x09,0x16,0xe3,0x99,0x09,0xfe,0xe3,0x10,0x49,0xff,0xd2,0x89, +0xf5,0xb7,0x63,0x04,0x49,0x13,0x9b,0x07,0xd9,0xf9,0x93,0xf7,0xf7,0x0f,0x63,0x67, +0xfb,0x12,0x9b,0x07,0xd9,0xf9,0x13,0xf7,0xf7,0x0f,0x63,0x61,0xeb,0x12,0x93,0x17, +0x27,0x00,0x17,0x07,0x00,0x00,0x13,0x07,0x67,0x3b,0xba,0x97,0x9c,0x43,0xba,0x97, +0x82,0x87,0x13,0x89,0x8b,0x00,0x85,0x46,0x29,0x46,0x83,0xa5,0x0b,0x00,0x56,0x85, +0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0xec,0xca,0x8b,0x81,0x49,0x45,0xb7,0x13,0x89, +0x8b,0x00,0x81,0x46,0x29,0x46,0x83,0xa5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00, +0xe7,0x80,0x40,0xea,0xca,0x8b,0x81,0x49,0x51,0xb7,0x13,0x89,0x8b,0x00,0x81,0x46, +0x41,0x46,0x83,0xa5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xe8, +0xca,0x8b,0x81,0x49,0xa5,0xb7,0x62,0xe0,0x13,0x8c,0x8b,0x00,0x83,0xb9,0x0b,0x00, +0x93,0x05,0x00,0x03,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xe4,0x93,0x05, +0x80,0x07,0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0xa0,0xe3,0x41,0x49,0x97,0x0b, +0x00,0x00,0x93,0x8b,0x2b,0x38,0x93,0xd7,0xc9,0x03,0xde,0x97,0x83,0xc5,0x07,0x00, +0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0xc0,0xe1,0x92,0x09,0x7d,0x39,0xe3,0x14, +0x09,0xfe,0xe2,0x8b,0x81,0x49,0x02,0x6c,0x11,0xbf,0x93,0x89,0x8b,0x00,0x03,0xb9, +0x0b,0x00,0x63,0x01,0x09,0x02,0x83,0x45,0x09,0x00,0xa5,0xc9,0x56,0x85,0x97,0x00, +0x00,0x00,0xe7,0x80,0x00,0xdf,0x05,0x09,0x83,0x45,0x09,0x00,0xe5,0xf9,0xce,0x8b, +0x81,0x49,0xed,0xb5,0x17,0x09,0x00,0x00,0x13,0x09,0xc9,0x2c,0x93,0x05,0x80,0x02, +0xf1,0xbf,0x13,0x89,0x8b,0x00,0x83,0xc5,0x0b,0x00,0x56,0x85,0x97,0x00,0x00,0x00, +0xe7,0x80,0x20,0xdc,0xca,0x8b,0x81,0x49,0xd1,0xb5,0x93,0x05,0x50,0x02,0x56,0x85, +0x97,0x00,0x00,0x00,0xe7,0x80,0xe0,0xda,0x81,0x49,0x4d,0xbd,0x93,0x05,0x50,0x02, +0x56,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0xc0,0xd9,0xca,0x85,0x56,0x85,0x97,0x00, +0x00,0x00,0xe7,0x80,0x00,0xd9,0x81,0x49,0x51,0xbd,0xce,0x8b,0x81,0x49,0x79,0xb5, +0xe2,0x74,0xa2,0x79,0x02,0x7a,0xe2,0x6a,0x42,0x6b,0xa2,0x6b,0xa6,0x60,0x06,0x64, +0x42,0x79,0x61,0x61,0x82,0x80,0x5d,0x71,0x06,0xec,0x22,0xe8,0x00,0x10,0x10,0xe0, +0x14,0xe4,0x18,0xe8,0x1c,0xec,0x23,0x30,0x04,0x03,0x23,0x34,0x14,0x03,0x22,0x86, +0x23,0x34,0x84,0xfe,0x97,0x00,0x00,0x00,0xe7,0x80,0x60,0xe1,0xe2,0x60,0x42,0x64, +0x61,0x61,0x82,0x80,0x1d,0x71,0x06,0xec,0x22,0xe8,0x00,0x10,0x0c,0xe4,0x10,0xe8, +0x14,0xec,0x18,0xf0,0x1c,0xf4,0x23,0x38,0x04,0x03,0x23,0x3c,0x14,0x03,0x13,0x06, +0x84,0x00,0x23,0x34,0xc4,0xfe,0xaa,0x85,0x05,0x45,0x97,0x00,0x00,0x00,0xe7,0x80, +0x00,0xde,0xe2,0x60,0x42,0x64,0x25,0x61,0x82,0x80,0x41,0x11,0x22,0xe4,0x00,0x08, +0x93,0x06,0x05,0xff,0x97,0x07,0x00,0x00,0x83,0xb7,0x47,0x66,0x2d,0xa0,0x18,0x46, +0x2d,0x9f,0x23,0x2c,0xe5,0xfe,0x98,0x63,0x10,0x63,0x3d,0xa8,0x03,0x27,0x85,0xff, +0x31,0x9f,0x98,0xc7,0x83,0x36,0x05,0xff,0x91,0xa0,0x98,0x63,0x63,0xe4,0xe7,0x00, +0x63,0xea,0xe6,0x00,0xba,0x87,0xe3,0xfa,0xd7,0xfe,0x98,0x63,0x63,0xe4,0xe6,0x00, +0xe3,0xea,0xe7,0xfe,0x83,0x25,0x85,0xff,0x90,0x63,0x13,0x98,0x05,0x02,0x13,0x57, +0xc8,0x01,0x36,0x97,0xe3,0x0d,0xe6,0xfa,0x23,0x38,0xc5,0xfe,0x90,0x47,0x93,0x15, +0x06,0x02,0x13,0xd7,0xc5,0x01,0x3e,0x97,0xe3,0x8a,0xe6,0xfa,0x94,0xe3,0x17,0x07, +0x00,0x00,0x23,0x3d,0xf7,0x5e,0x22,0x64,0x41,0x01,0x82,0x80,0x39,0x71,0x06,0xfc, +0x22,0xf8,0x26,0xf4,0x4e,0xec,0x80,0x00,0x93,0x14,0x05,0x02,0x81,0x90,0xbd,0x04, +0x91,0x80,0x9b,0x89,0x14,0x00,0x85,0x04,0x17,0x05,0x00,0x00,0x03,0x35,0x05,0x5d, +0x15,0xc9,0x1c,0x61,0x98,0x47,0x63,0x7f,0x97,0x08,0x4a,0xf0,0x52,0xe8,0x56,0xe4, +0x5a,0xe0,0x4e,0x8a,0x1b,0x87,0x09,0x00,0x85,0x66,0x63,0x73,0xd7,0x00,0x05,0x6a, +0x1b,0x0b,0x0a,0x00,0x1b,0x1a,0x4a,0x00,0x17,0x09,0x00,0x00,0x13,0x09,0x09,0x5a, +0xfd,0x5a,0x99,0xa0,0x4a,0xf0,0x52,0xe8,0x56,0xe4,0x5a,0xe0,0x17,0x07,0x00,0x00, +0x13,0x07,0xc7,0x58,0x97,0x07,0x00,0x00,0x93,0x87,0xc7,0x58,0x1c,0xe3,0x1c,0xe7, +0x23,0x28,0x07,0x00,0x7d,0xbf,0x98,0x63,0x18,0xe1,0x8d,0xa0,0x23,0x24,0x65,0x01, +0x41,0x05,0x97,0x00,0x00,0x00,0xe7,0x80,0x80,0xef,0x03,0x35,0x09,0x00,0x3d,0xc1, +0x1c,0x61,0x98,0x47,0x63,0x74,0x97,0x02,0x03,0x37,0x09,0x00,0x3e,0x85,0xe3,0x19, +0xf7,0xfe,0x52,0x85,0x97,0x00,0x00,0x00,0xe7,0x80,0x00,0xb8,0xe3,0x18,0x55,0xfd, +0x01,0x45,0x02,0x79,0x42,0x6a,0xa2,0x6a,0x02,0x6b,0x3d,0xa0,0x02,0x79,0x42,0x6a, +0xa2,0x6a,0x02,0x6b,0xe3,0x89,0xe4,0xfa,0x3b,0x07,0x37,0x41,0x98,0xc7,0x93,0x16, +0x07,0x02,0x13,0xd7,0xc6,0x01,0xba,0x97,0x23,0xa4,0x37,0x01,0x17,0x07,0x00,0x00, +0x23,0x36,0xa7,0x50,0x13,0x85,0x07,0x01,0xe2,0x70,0x42,0x74,0xa2,0x74,0xe2,0x69, +0x21,0x61,0x82,0x80,0x02,0x79,0x42,0x6a,0xa2,0x6a,0x02,0x6b,0xf5,0xb7,0x00,0x00, 0x69,0x6e,0x69,0x74,0x3a,0x20,0x73,0x74,0x61,0x72,0x74,0x69,0x6e,0x67,0x20,0x73, 0x68,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6e,0x69,0x74,0x3a,0x20,0x66,0x6f, 0x72,0x6b,0x20,0x66,0x61,0x69,0x6c,0x65,0x64,0x0a,0x00,0x00,0x00,0x00,0x00,0x00, 0x69,0x6e,0x69,0x74,0x3a,0x20,0x65,0x78,0x65,0x63,0x20,0x73,0x68,0x20,0x66,0x61, 0x69,0x6c,0x65,0x64,0x0a,0x00,0x00,0x00,0x69,0x6e,0x69,0x74,0x3a,0x20,0x77,0x61, 0x69,0x74,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x61,0x6e,0x20,0x65, -0x72,0x72,0x6f,0x72,0x0a,0x00,0x00,0x00,0x62,0x72,0x6b,0x00,0x00,0x00,0x00,0x00, -0x28,0x6e,0x75,0x6c,0x6c,0x29,0x00,0x00,0x36,0xfd,0xff,0xff,0x56,0xfc,0xff,0xff, -0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff, -0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x72,0xfc,0xff,0xff, -0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0xaa,0xfc,0xff,0xff, -0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0xfe,0xfc,0xff,0xff,0x60,0xfd,0xff,0xff, -0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x60,0xfd,0xff,0xff,0x8e,0xfc,0xff,0xff, +0x72,0x72,0x6f,0x72,0x0a,0x00,0x00,0x00,0x64,0x75,0x70,0x00,0x00,0x00,0x00,0x00, +0x28,0x6e,0x75,0x6c,0x6c,0x29,0x00,0x00,0x3a,0xfd,0xff,0xff,0x5a,0xfc,0xff,0xff, +0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff, +0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x76,0xfc,0xff,0xff, +0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0xae,0xfc,0xff,0xff, +0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x02,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff, +0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x64,0xfd,0xff,0xff,0x92,0xfc,0xff,0xff, 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x7a,0x52,0x00,0x01,0x7c,0x01,0x01,0x1b,0x0d,0x02,0x00,0x28,0x00,0x00,0x00, @@ -191,25 +191,25 @@ 0x24,0x00,0x00,0x00,0x1c,0x02,0x00,0x00,0x88,0xf7,0xff,0xff,0x18,0x00,0x00,0x00, 0x00,0x42,0x0e,0x10,0x44,0x81,0x02,0x88,0x04,0x42,0x0c,0x08,0x00,0x4a,0xc1,0x42, 0xc8,0x0c,0x02,0x10,0x42,0x0e,0x00,0x00,0x24,0x00,0x00,0x00,0x44,0x02,0x00,0x00, -0x4a,0xf8,0xff,0xff,0x22,0x00,0x00,0x00,0x00,0x42,0x0e,0x20,0x44,0x81,0x02,0x88, +0x4e,0xf8,0xff,0xff,0x22,0x00,0x00,0x00,0x00,0x42,0x0e,0x20,0x44,0x81,0x02,0x88, 0x04,0x42,0x0c,0x08,0x00,0x54,0xc1,0x42,0xc8,0x0c,0x02,0x20,0x42,0x0e,0x00,0x00, -0x34,0x00,0x00,0x00,0x6c,0x02,0x00,0x00,0x44,0xf8,0xff,0xff,0xaa,0x00,0x00,0x00, +0x34,0x00,0x00,0x00,0x6c,0x02,0x00,0x00,0x48,0xf8,0xff,0xff,0xaa,0x00,0x00,0x00, 0x00,0x42,0x0e,0x40,0x48,0x81,0x02,0x88,0x04,0x89,0x06,0x93,0x0a,0x42,0x0c,0x08, 0x00,0x02,0x60,0x92,0x08,0x6a,0xd2,0x42,0x0a,0xc1,0x42,0xc8,0x0c,0x02,0x40,0x42, 0xc9,0x42,0xd3,0x42,0x0e,0x00,0x42,0x0b,0x48,0x00,0x00,0x00,0xa4,0x02,0x00,0x00, -0xb6,0xf8,0xff,0xff,0xcc,0x01,0x00,0x00,0x00,0x42,0x0e,0x50,0x46,0x81,0x02,0x88, +0xba,0xf8,0xff,0xff,0xcc,0x01,0x00,0x00,0x00,0x42,0x0e,0x50,0x46,0x81,0x02,0x88, 0x04,0x92,0x08,0x42,0x0c,0x08,0x00,0x54,0x89,0x06,0x93,0x0a,0x94,0x0c,0x95,0x0e, 0x96,0x10,0x97,0x12,0x02,0xc0,0x98,0x14,0x02,0x50,0xd8,0x02,0x8a,0xc9,0x42,0xd3, 0x42,0xd4,0x42,0xd5,0x42,0xd6,0x42,0xd7,0x42,0xc1,0x42,0xc8,0x0c,0x02,0x50,0x42, -0xd2,0x42,0x0e,0x00,0x24,0x00,0x00,0x00,0xf0,0x02,0x00,0x00,0x36,0xfa,0xff,0xff, +0xd2,0x42,0x0e,0x00,0x24,0x00,0x00,0x00,0xf0,0x02,0x00,0x00,0x3a,0xfa,0xff,0xff, 0x2e,0x00,0x00,0x00,0x00,0x42,0x0e,0x50,0x44,0x81,0x0e,0x88,0x10,0x42,0x0c,0x08, 0x30,0x60,0xc1,0x42,0xc8,0x0c,0x02,0x50,0x42,0x0e,0x00,0x00,0x28,0x00,0x00,0x00, -0x18,0x03,0x00,0x00,0x3c,0xfa,0xff,0xff,0x36,0x00,0x00,0x00,0x00,0x42,0x0e,0x60, +0x18,0x03,0x00,0x00,0x40,0xfa,0xff,0xff,0x36,0x00,0x00,0x00,0x00,0x42,0x0e,0x60, 0x44,0x81,0x12,0x88,0x14,0x42,0x0c,0x08,0x40,0x68,0xc1,0x42,0xc8,0x0c,0x02,0x60, 0x42,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x44,0x03,0x00,0x00, -0x46,0xfa,0xff,0xff,0x82,0x00,0x00,0x00,0x00,0x42,0x0e,0x10,0x42,0x88,0x02,0x42, +0x4a,0xfa,0xff,0xff,0x82,0x00,0x00,0x00,0x00,0x42,0x0e,0x10,0x42,0x88,0x02,0x42, 0x0c,0x08,0x00,0x02,0x78,0xc8,0x0c,0x02,0x10,0x42,0x0e,0x00,0x7c,0x00,0x00,0x00, -0x68,0x03,0x00,0x00,0xa4,0xfa,0xff,0xff,0x02,0x01,0x00,0x00,0x00,0x42,0x0e,0x40, +0x68,0x03,0x00,0x00,0xa8,0xfa,0xff,0xff,0x02,0x01,0x00,0x00,0x00,0x42,0x0e,0x40, 0x48,0x81,0x02,0x88,0x04,0x89,0x06,0x93,0x0a,0x42,0x0c,0x08,0x00,0x6a,0x92,0x08, 0x94,0x0c,0x95,0x0e,0x96,0x10,0x62,0xd2,0xd4,0xd5,0xd6,0x60,0x0a,0x92,0x08,0x94, 0x0c,0x95,0x0e,0x96,0x10,0x42,0x0b,0x46,0x92,0x08,0x94,0x0c,0x95,0x0e,0x96,0x10, diff --git a/kernel/include/sysnum.h b/kernel/include/sysnum.h index 6f5060b297a53bf51f909075fd270aebd4c20982..1fc3b6a8abaf3333ddf8bb9032d51986c8e7fde5 100644 --- a/kernel/include/sysnum.h +++ b/kernel/include/sysnum.h @@ -11,7 +11,7 @@ #define SYS_exec 7 #define SYS_fstat 8 #define SYS_chdir 9 -#define SYS_dup 10 +#define SYS_dup 23 #define SYS_getpid 11 #define SYS_sbrk 12 #define SYS_sleep 13 @@ -24,7 +24,7 @@ #define SYS_mkdir 20 #define SYS_close 21 #define SYS_test_proc 22 -#define SYS_dev 23 +#define SYS_dev 123 #define SYS_readdir 24 #define SYS_getcwd 25 #define SYS_rename 26 diff --git a/kernel/syscall.c b/kernel/syscall.c index d906609780e943c7983b65930e733a564e975512..5279d7a9e9a4fcb58c46c440f030ed84384da19b 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -144,6 +144,7 @@ static uint64 (*syscalls[])(void) = { [SYS_trace] sys_trace, [SYS_sysinfo] sys_sysinfo, [SYS_rename] sys_rename, + // [SYS_shutdown] sys_shutdown, }; static char *sysnames[] = { @@ -173,6 +174,7 @@ static char *sysnames[] = { [SYS_trace] "trace", [SYS_sysinfo] "sysinfo", [SYS_rename] "rename", + // [SYS_shutdown] "shutdown", }; void @@ -182,7 +184,8 @@ syscall(void) struct proc *p = myproc(); num = p->trapframe->a7; - if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { + // printf("num=%d name=%s\n", num, sysnames[num]); + if(num > 0 && syscalls[num]) { p->trapframe->a0 = syscalls[num](); // trace if ((p->tmask & (1 << num)) != 0) { diff --git a/oo b/oo index 1fbbae99d998cce77871d5f91526617ef21b4547..d9c8f4d61f0ac93d048ef227e9e384cca394b7d7 100755 Binary files a/oo and b/oo differ diff --git a/xv6-user/init.c b/xv6-user/init.c index 3f0db3f8a424716424c00006538758218a8009f9..6085a13799be243af147e14468d7abff53590e7c 100644 --- a/xv6-user/init.c +++ b/xv6-user/init.c @@ -24,10 +24,10 @@ char *argv[] = {0}; char *tests[] = { // "sh", - "brk", +// "brk", // "chdir", // "close", -// "dup", + "dup", // "exit", // "fork", // "fstat", @@ -44,7 +44,7 @@ char *tests[] = { // "write", // "sleep", // "clone", -}; +}; int counts = sizeof(tests) / sizeof((tests)[0]); int main(void) { int pid, wpid;