Changeset 48947 in vbox
- Timestamp:
- Oct 7, 2013 9:41:00 PM (11 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r45305 r48947 1300 1300 { 0x0a, 1, 0, 3, "CLASS_SUB" }, 1301 1301 { 0x0b, 1, 0, 3, "CLASS_BASE" }, 1302 { 0x0c, 1, 1, 3, "CACHE_LINE_SIZE" }, 1303 { 0x0d, 1, 1, 3, "LATENCY_TIMER" }, 1302 { 0x0c, 1, 1, 3, "CACHE_LINE_SIZE" }, 1303 { 0x0d, 1, 1, 3, "LATENCY_TIMER" }, 1304 1304 { 0x0e, 1, 0, 3, "HEADER_TYPE" }, 1305 { 0x0f, 1, 1, 3, "BIST" }, 1305 { 0x0f, 1, 1, 3, "BIST" }, 1306 1306 { 0x10, 4, 1, 3, "BASE_ADDRESS_0" }, 1307 1307 { 0x14, 4, 1, 3, "BASE_ADDRESS_1" }, -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c
r48674 r48947 734 734 Reloc = (UINT16 *) ((CHAR8 *) RelocBase + sizeof (EFI_IMAGE_BASE_RELOCATION)); 735 735 RelocEnd = (UINT16 *) ((CHAR8 *) RelocBase + RelocBase->SizeOfBlock); 736 736 737 737 // 738 738 // Make sure RelocEnd is in the Image range. … … 755 755 Hdr.Te->StrippedSize 756 756 ); 757 } 757 } 758 758 759 759 // -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/Partition.c
r48730 r48947 824 824 replaced. 825 825 @param[in] Lba The starting Logical Block Address to read from. 826 @param[in, out] Token 826 @param[in, out] Token A pointer to the token associated with the transaction. 827 827 @param[in] BufferSize Size of Buffer, must be a multiple of device block size. 828 828 @param[out] Buffer A pointer to the destination buffer for the data. The -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h
r48674 r48947 499 499 #ifndef S_IRWXU 500 500 501 #define S_ISUID 0004000/* set user id on execution */502 #define S_ISGID 0002000/* set group id on execution */503 #define S_ISTXT 0001000/* sticky bit */504 505 #define S_IRWXU 0000700/* RWX mask for owner */506 #define S_IRUSR 0000400/* R for owner */507 #define S_IWUSR 0000200/* W for owner */508 #define S_IXUSR 0000100/* X for owner */509 510 #define S_IRWXG 0000070/* RWX mask for group */511 #define S_IRGRP 0000040/* R for group */512 #define S_IWGRP 0000020/* W for group */513 #define S_IXGRP 0000010/* X for group */514 515 #define S_IRWXO 0000007/* RWX mask for other */516 #define S_IROTH 0000004/* R for other */517 #define S_IWOTH 0000002/* W for other */518 #define S_IXOTH 0000001/* X for other */519 520 #define S_IFMT 0170000/* type of file mask */521 #define S_IFIFO 0010000/* named pipe (fifo) */522 #define S_IFCHR 0020000/* character special */523 #define S_IFDIR 0040000/* directory */524 #define S_IFBLK 0060000/* block special */525 #define S_IFREG 0100000/* regular */526 #define S_IFLNK 0120000/* symbolic link */527 #define S_IFSOCK 0140000/* socket */528 #define S_ISVTX 0001000/* save swapped text even after use */529 #define S_IFWHT 0160000/* whiteout */530 531 #define S_ISDIR(m) (((m) & 0170000) == 0040000)/* directory */532 #define S_ISCHR(m) (((m) & 0170000) == 0020000)/* char special */533 #define S_ISBLK(m) (((m) & 0170000) == 0060000)/* block special */534 #define S_ISREG(m) (((m) & 0170000) == 0100000)/* regular file */535 #define S_ISFIFO(m) (((m) & 0170000) == 0010000)/* fifo or socket */536 #define S_ISLNK(m) (((m) & 0170000) == 0120000)/* symbolic link */537 #define S_ISSOCK(m) (((m) & 0170000) == 0140000)/* socket */538 #define S_ISWHT(m) (((m) & 0170000) == 0160000)/* whiteout */539 540 #define S_BLKSIZE 512/* block size used in the stat struct */541 542 #endif 543 /*@}*/ 544 545 546 #endif 501 #define S_ISUID 0004000 /* set user id on execution */ 502 #define S_ISGID 0002000 /* set group id on execution */ 503 #define S_ISTXT 0001000 /* sticky bit */ 504 505 #define S_IRWXU 0000700 /* RWX mask for owner */ 506 #define S_IRUSR 0000400 /* R for owner */ 507 #define S_IWUSR 0000200 /* W for owner */ 508 #define S_IXUSR 0000100 /* X for owner */ 509 510 #define S_IRWXG 0000070 /* RWX mask for group */ 511 #define S_IRGRP 0000040 /* R for group */ 512 #define S_IWGRP 0000020 /* W for group */ 513 #define S_IXGRP 0000010 /* X for group */ 514 515 #define S_IRWXO 0000007 /* RWX mask for other */ 516 #define S_IROTH 0000004 /* R for other */ 517 #define S_IWOTH 0000002 /* W for other */ 518 #define S_IXOTH 0000001 /* X for other */ 519 520 #define S_IFMT 0170000 /* type of file mask */ 521 #define S_IFIFO 0010000 /* named pipe (fifo) */ 522 #define S_IFCHR 0020000 /* character special */ 523 #define S_IFDIR 0040000 /* directory */ 524 #define S_IFBLK 0060000 /* block special */ 525 #define S_IFREG 0100000 /* regular */ 526 #define S_IFLNK 0120000 /* symbolic link */ 527 #define S_IFSOCK 0140000 /* socket */ 528 #define S_ISVTX 0001000 /* save swapped text even after use */ 529 #define S_IFWHT 0160000 /* whiteout */ 530 531 #define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */ 532 #define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */ 533 #define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */ 534 #define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */ 535 #define S_ISFIFO(m) (((m) & 0170000) == 0010000) /* fifo or socket */ 536 #define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */ 537 #define S_ISSOCK(m) (((m) & 0170000) == 0140000) /* socket */ 538 #define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */ 539 540 #define S_BLKSIZE 512 /* block size used in the stat struct */ 541 542 #endif 543 /*@}*/ 544 545 546 #endif -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c
r48674 r48947 113 113 /* High-byte indices ( == 0 iff no case mapping and no ignorables ) */ 114 114 115 /* 0 */ 116 /* 1 */ 117 /* 2 */ 118 /* 3 */ 119 /* 4 */ 120 /* 5 */ 121 /* 6 */ 122 /* 7 */ 123 /* 8 */ 124 /* 9 */ 125 /* A */ 126 /* B */ 127 /* C */ 128 /* D */ 129 /* E */ 130 /* F */ 115 /* 0 */ 0x0000, 0x0100, 0x0000, 0x0200, 0x0300, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 116 /* 1 */ 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 117 /* 2 */ 0x0600, 0x0700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 118 /* 3 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 119 /* 4 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 120 /* 5 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 121 /* 6 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 122 /* 7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 123 /* 8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 124 /* 9 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 125 /* A */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 126 /* B */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 127 /* C */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 128 /* D */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 129 /* E */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 130 /* F */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0900, 131 131 132 132 /* Table 1 (for high byte 0x01) */ 133 133 134 /* 0 */ 135 /* 1 */ 136 /* 2 */ 137 /* 3 */ 138 /* 4 */ 139 /* 5 */ 140 /* 6 */ 141 /* 7 */ 142 /* 8 */ 143 /* 9 */ 144 /* A */ 145 /* B */ 146 /* C */ 147 /* D */ 148 /* E */ 149 /* F */ 134 /* 0 */ 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x010E, 0x010F, 135 /* 1 */ 0x0111, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F, 136 /* 2 */ 0x0120, 0x0121, 0x0122, 0x0123, 0x0124, 0x0125, 0x0127, 0x0127, 0x0128, 0x0129, 0x012A, 0x012B, 0x012C, 0x012D, 0x012E, 0x012F, 137 /* 3 */ 0x0130, 0x0131, 0x0133, 0x0133, 0x0134, 0x0135, 0x0136, 0x0137, 0x0138, 0x0139, 0x013A, 0x013B, 0x013C, 0x013D, 0x013E, 0x0140, 138 /* 4 */ 0x0140, 0x0142, 0x0142, 0x0143, 0x0144, 0x0145, 0x0146, 0x0147, 0x0148, 0x0149, 0x014B, 0x014B, 0x014C, 0x014D, 0x014E, 0x014F, 139 /* 5 */ 0x0150, 0x0151, 0x0153, 0x0153, 0x0154, 0x0155, 0x0156, 0x0157, 0x0158, 0x0159, 0x015A, 0x015B, 0x015C, 0x015D, 0x015E, 0x015F, 140 /* 6 */ 0x0160, 0x0161, 0x0162, 0x0163, 0x0164, 0x0165, 0x0167, 0x0167, 0x0168, 0x0169, 0x016A, 0x016B, 0x016C, 0x016D, 0x016E, 0x016F, 141 /* 7 */ 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0176, 0x0177, 0x0178, 0x0179, 0x017A, 0x017B, 0x017C, 0x017D, 0x017E, 0x017F, 142 /* 8 */ 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188, 0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259, 143 /* 9 */ 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268, 0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275, 144 /* A */ 0x01A0, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x01A6, 0x01A8, 0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01AF, 145 /* B */ 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292, 0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF, 146 /* C */ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9, 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC, 0x01CD, 0x01CE, 0x01CF, 147 /* D */ 0x01D0, 0x01D1, 0x01D2, 0x01D3, 0x01D4, 0x01D5, 0x01D6, 0x01D7, 0x01D8, 0x01D9, 0x01DA, 0x01DB, 0x01DC, 0x01DD, 0x01DE, 0x01DF, 148 /* E */ 0x01E0, 0x01E1, 0x01E2, 0x01E3, 0x01E5, 0x01E5, 0x01E6, 0x01E7, 0x01E8, 0x01E9, 0x01EA, 0x01EB, 0x01EC, 0x01ED, 0x01EE, 0x01EF, 149 /* F */ 0x01F0, 0x01F3, 0x01F3, 0x01F3, 0x01F4, 0x01F5, 0x01F6, 0x01F7, 0x01F8, 0x01F9, 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, 150 150 151 151 /* Table 2 (for high byte 0x03) */ 152 152 153 /* 0 */ 154 /* 1 */ 155 /* 2 */ 156 /* 3 */ 157 /* 4 */ 158 /* 5 */ 159 /* 6 */ 160 /* 7 */ 161 /* 8 */ 162 /* 9 */ 163 /* A */ 164 /* B */ 165 /* C */ 166 /* D */ 167 /* E */ 168 /* F */ 153 /* 0 */ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, 0x030F, 154 /* 1 */ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317, 0x0318, 0x0319, 0x031A, 0x031B, 0x031C, 0x031D, 0x031E, 0x031F, 155 /* 2 */ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327, 0x0328, 0x0329, 0x032A, 0x032B, 0x032C, 0x032D, 0x032E, 0x032F, 156 /* 3 */ 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337, 0x0338, 0x0339, 0x033A, 0x033B, 0x033C, 0x033D, 0x033E, 0x033F, 157 /* 4 */ 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x0345, 0x0346, 0x0347, 0x0348, 0x0349, 0x034A, 0x034B, 0x034C, 0x034D, 0x034E, 0x034F, 158 /* 5 */ 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357, 0x0358, 0x0359, 0x035A, 0x035B, 0x035C, 0x035D, 0x035E, 0x035F, 159 /* 6 */ 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367, 0x0368, 0x0369, 0x036A, 0x036B, 0x036C, 0x036D, 0x036E, 0x036F, 160 /* 7 */ 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377, 0x0378, 0x0379, 0x037A, 0x037B, 0x037C, 0x037D, 0x037E, 0x037F, 161 /* 8 */ 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, 0x0387, 0x0388, 0x0389, 0x038A, 0x038B, 0x038C, 0x038D, 0x038E, 0x038F, 162 /* 9 */ 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 163 /* A */ 0x03C0, 0x03C1, 0x03A2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, 164 /* B */ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 165 /* C */ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x03CF, 166 /* D */ 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7, 0x03D8, 0x03D9, 0x03DA, 0x03DB, 0x03DC, 0x03DD, 0x03DE, 0x03DF, 167 /* E */ 0x03E0, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF, 168 /* F */ 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03F4, 0x03F5, 0x03F6, 0x03F7, 0x03F8, 0x03F9, 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, 169 169 170 170 /* Table 3 (for high byte 0x04) */ 171 171 172 /* 0 */ 173 /* 1 */ 174 /* 2 */ 175 /* 3 */ 176 /* 4 */ 177 /* 5 */ 178 /* 6 */ 179 /* 7 */ 180 /* 8 */ 181 /* 9 */ 182 /* A */ 183 /* B */ 184 /* C */ 185 /* D */ 186 /* E */ 187 /* F */ 172 /* 0 */ 0x0400, 0x0401, 0x0452, 0x0403, 0x0454, 0x0455, 0x0456, 0x0407, 0x0458, 0x0459, 0x045A, 0x045B, 0x040C, 0x040D, 0x040E, 0x045F, 173 /* 1 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0419, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 174 /* 2 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, 175 /* 3 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 176 /* 4 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, 177 /* 5 */ 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x045D, 0x045E, 0x045F, 178 /* 6 */ 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, 0x046D, 0x046D, 0x046F, 0x046F, 179 /* 7 */ 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, 0x0476, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, 0x047D, 0x047D, 0x047F, 0x047F, 180 /* 8 */ 0x0481, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0488, 0x0489, 0x048A, 0x048B, 0x048C, 0x048D, 0x048E, 0x048F, 181 /* 9 */ 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, 0x049D, 0x049D, 0x049F, 0x049F, 182 /* A */ 0x04A1, 0x04A1, 0x04A3, 0x04A3, 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, 0x04AD, 0x04AD, 0x04AF, 0x04AF, 183 /* B */ 0x04B1, 0x04B1, 0x04B3, 0x04B3, 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, 0x04BD, 0x04BD, 0x04BF, 0x04BF, 184 /* C */ 0x04C0, 0x04C1, 0x04C2, 0x04C4, 0x04C4, 0x04C5, 0x04C6, 0x04C8, 0x04C8, 0x04C9, 0x04CA, 0x04CC, 0x04CC, 0x04CD, 0x04CE, 0x04CF, 185 /* D */ 0x04D0, 0x04D1, 0x04D2, 0x04D3, 0x04D4, 0x04D5, 0x04D6, 0x04D7, 0x04D8, 0x04D9, 0x04DA, 0x04DB, 0x04DC, 0x04DD, 0x04DE, 0x04DF, 186 /* E */ 0x04E0, 0x04E1, 0x04E2, 0x04E3, 0x04E4, 0x04E5, 0x04E6, 0x04E7, 0x04E8, 0x04E9, 0x04EA, 0x04EB, 0x04EC, 0x04ED, 0x04EE, 0x04EF, 187 /* F */ 0x04F0, 0x04F1, 0x04F2, 0x04F3, 0x04F4, 0x04F5, 0x04F6, 0x04F7, 0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF, 188 188 189 189 /* Table 4 (for high byte 0x05) */ 190 190 191 /* 0 */ 192 /* 1 */ 193 /* 2 */ 194 /* 3 */ 195 /* 4 */ 196 /* 5 */ 197 /* 6 */ 198 /* 7 */ 199 /* 8 */ 200 /* 9 */ 201 /* A */ 202 /* B */ 203 /* C */ 204 /* D */ 205 /* E */ 206 /* F */ 191 /* 0 */ 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x050E, 0x050F, 192 /* 1 */ 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517, 0x0518, 0x0519, 0x051A, 0x051B, 0x051C, 0x051D, 0x051E, 0x051F, 193 /* 2 */ 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527, 0x0528, 0x0529, 0x052A, 0x052B, 0x052C, 0x052D, 0x052E, 0x052F, 194 /* 3 */ 0x0530, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567, 0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F, 195 /* 4 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, 0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F, 196 /* 5 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0557, 0x0558, 0x0559, 0x055A, 0x055B, 0x055C, 0x055D, 0x055E, 0x055F, 197 /* 6 */ 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567, 0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F, 198 /* 7 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, 0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F, 199 /* 8 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587, 0x0588, 0x0589, 0x058A, 0x058B, 0x058C, 0x058D, 0x058E, 0x058F, 200 /* 9 */ 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597, 0x0598, 0x0599, 0x059A, 0x059B, 0x059C, 0x059D, 0x059E, 0x059F, 201 /* A */ 0x05A0, 0x05A1, 0x05A2, 0x05A3, 0x05A4, 0x05A5, 0x05A6, 0x05A7, 0x05A8, 0x05A9, 0x05AA, 0x05AB, 0x05AC, 0x05AD, 0x05AE, 0x05AF, 202 /* B */ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x05BA, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF, 203 /* C */ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05C4, 0x05C5, 0x05C6, 0x05C7, 0x05C8, 0x05C9, 0x05CA, 0x05CB, 0x05CC, 0x05CD, 0x05CE, 0x05CF, 204 /* D */ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 205 /* E */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x05EB, 0x05EC, 0x05ED, 0x05EE, 0x05EF, 206 /* F */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x05F5, 0x05F6, 0x05F7, 0x05F8, 0x05F9, 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, 207 207 208 208 /* Table 5 (for high byte 0x10) */ 209 209 210 /* 0 */ 211 /* 1 */ 212 /* 2 */ 213 /* 3 */ 214 /* 4 */ 215 /* 5 */ 216 /* 6 */ 217 /* 7 */ 218 /* 8 */ 219 /* 9 */ 220 /* A */ 221 /* B */ 222 /* C */ 223 /* D */ 224 /* E */ 225 /* F */ 210 /* 0 */ 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009, 0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F, 211 /* 1 */ 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017, 0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F, 212 /* 2 */ 0x1020, 0x1021, 0x1022, 0x1023, 0x1024, 0x1025, 0x1026, 0x1027, 0x1028, 0x1029, 0x102A, 0x102B, 0x102C, 0x102D, 0x102E, 0x102F, 213 /* 3 */ 0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1036, 0x1037, 0x1038, 0x1039, 0x103A, 0x103B, 0x103C, 0x103D, 0x103E, 0x103F, 214 /* 4 */ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049, 0x104A, 0x104B, 0x104C, 0x104D, 0x104E, 0x104F, 215 /* 5 */ 0x1050, 0x1051, 0x1052, 0x1053, 0x1054, 0x1055, 0x1056, 0x1057, 0x1058, 0x1059, 0x105A, 0x105B, 0x105C, 0x105D, 0x105E, 0x105F, 216 /* 6 */ 0x1060, 0x1061, 0x1062, 0x1063, 0x1064, 0x1065, 0x1066, 0x1067, 0x1068, 0x1069, 0x106A, 0x106B, 0x106C, 0x106D, 0x106E, 0x106F, 217 /* 7 */ 0x1070, 0x1071, 0x1072, 0x1073, 0x1074, 0x1075, 0x1076, 0x1077, 0x1078, 0x1079, 0x107A, 0x107B, 0x107C, 0x107D, 0x107E, 0x107F, 218 /* 8 */ 0x1080, 0x1081, 0x1082, 0x1083, 0x1084, 0x1085, 0x1086, 0x1087, 0x1088, 0x1089, 0x108A, 0x108B, 0x108C, 0x108D, 0x108E, 0x108F, 219 /* 9 */ 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095, 0x1096, 0x1097, 0x1098, 0x1099, 0x109A, 0x109B, 0x109C, 0x109D, 0x109E, 0x109F, 220 /* A */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7, 0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF, 221 /* B */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7, 0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF, 222 /* C */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10C6, 0x10C7, 0x10C8, 0x10C9, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF, 223 /* D */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7, 0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF, 224 /* E */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7, 0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF, 225 /* F */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10F6, 0x10F7, 0x10F8, 0x10F9, 0x10FA, 0x10FB, 0x10FC, 0x10FD, 0x10FE, 0x10FF, 226 226 227 227 /* Table 6 (for high byte 0x20) */ 228 228 229 /* 0 */ 230 /* 1 */ 231 /* 2 */ 232 /* 3 */ 233 /* 4 */ 234 /* 5 */ 235 /* 6 */ 236 /* 7 */ 237 /* 8 */ 238 /* 9 */ 239 /* A */ 240 /* B */ 241 /* C */ 242 /* D */ 243 /* E */ 244 /* F */ 229 /* 0 */ 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x200B, 0x0000, 0x0000, 0x0000, 0x0000, 230 /* 1 */ 0x2010, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, 0x2017, 0x2018, 0x2019, 0x201A, 0x201B, 0x201C, 0x201D, 0x201E, 0x201F, 231 /* 2 */ 0x2020, 0x2021, 0x2022, 0x2023, 0x2024, 0x2025, 0x2026, 0x2027, 0x2028, 0x2029, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x202F, 232 /* 3 */ 0x2030, 0x2031, 0x2032, 0x2033, 0x2034, 0x2035, 0x2036, 0x2037, 0x2038, 0x2039, 0x203A, 0x203B, 0x203C, 0x203D, 0x203E, 0x203F, 233 /* 4 */ 0x2040, 0x2041, 0x2042, 0x2043, 0x2044, 0x2045, 0x2046, 0x2047, 0x2048, 0x2049, 0x204A, 0x204B, 0x204C, 0x204D, 0x204E, 0x204F, 234 /* 5 */ 0x2050, 0x2051, 0x2052, 0x2053, 0x2054, 0x2055, 0x2056, 0x2057, 0x2058, 0x2059, 0x205A, 0x205B, 0x205C, 0x205D, 0x205E, 0x205F, 235 /* 6 */ 0x2060, 0x2061, 0x2062, 0x2063, 0x2064, 0x2065, 0x2066, 0x2067, 0x2068, 0x2069, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 236 /* 7 */ 0x2070, 0x2071, 0x2072, 0x2073, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079, 0x207A, 0x207B, 0x207C, 0x207D, 0x207E, 0x207F, 237 /* 8 */ 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087, 0x2088, 0x2089, 0x208A, 0x208B, 0x208C, 0x208D, 0x208E, 0x208F, 238 /* 9 */ 0x2090, 0x2091, 0x2092, 0x2093, 0x2094, 0x2095, 0x2096, 0x2097, 0x2098, 0x2099, 0x209A, 0x209B, 0x209C, 0x209D, 0x209E, 0x209F, 239 /* A */ 0x20A0, 0x20A1, 0x20A2, 0x20A3, 0x20A4, 0x20A5, 0x20A6, 0x20A7, 0x20A8, 0x20A9, 0x20AA, 0x20AB, 0x20AC, 0x20AD, 0x20AE, 0x20AF, 240 /* B */ 0x20B0, 0x20B1, 0x20B2, 0x20B3, 0x20B4, 0x20B5, 0x20B6, 0x20B7, 0x20B8, 0x20B9, 0x20BA, 0x20BB, 0x20BC, 0x20BD, 0x20BE, 0x20BF, 241 /* C */ 0x20C0, 0x20C1, 0x20C2, 0x20C3, 0x20C4, 0x20C5, 0x20C6, 0x20C7, 0x20C8, 0x20C9, 0x20CA, 0x20CB, 0x20CC, 0x20CD, 0x20CE, 0x20CF, 242 /* D */ 0x20D0, 0x20D1, 0x20D2, 0x20D3, 0x20D4, 0x20D5, 0x20D6, 0x20D7, 0x20D8, 0x20D9, 0x20DA, 0x20DB, 0x20DC, 0x20DD, 0x20DE, 0x20DF, 243 /* E */ 0x20E0, 0x20E1, 0x20E2, 0x20E3, 0x20E4, 0x20E5, 0x20E6, 0x20E7, 0x20E8, 0x20E9, 0x20EA, 0x20EB, 0x20EC, 0x20ED, 0x20EE, 0x20EF, 244 /* F */ 0x20F0, 0x20F1, 0x20F2, 0x20F3, 0x20F4, 0x20F5, 0x20F6, 0x20F7, 0x20F8, 0x20F9, 0x20FA, 0x20FB, 0x20FC, 0x20FD, 0x20FE, 0x20FF, 245 245 246 246 /* Table 7 (for high byte 0x21) */ 247 247 248 /* 0 */ 249 /* 1 */ 250 /* 2 */ 251 /* 3 */ 252 /* 4 */ 253 /* 5 */ 254 /* 6 */ 255 /* 7 */ 256 /* 8 */ 257 /* 9 */ 258 /* A */ 259 /* B */ 260 /* C */ 261 /* D */ 262 /* E */ 263 /* F */ 248 /* 0 */ 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107, 0x2108, 0x2109, 0x210A, 0x210B, 0x210C, 0x210D, 0x210E, 0x210F, 249 /* 1 */ 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117, 0x2118, 0x2119, 0x211A, 0x211B, 0x211C, 0x211D, 0x211E, 0x211F, 250 /* 2 */ 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x2126, 0x2127, 0x2128, 0x2129, 0x212A, 0x212B, 0x212C, 0x212D, 0x212E, 0x212F, 251 /* 3 */ 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137, 0x2138, 0x2139, 0x213A, 0x213B, 0x213C, 0x213D, 0x213E, 0x213F, 252 /* 4 */ 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147, 0x2148, 0x2149, 0x214A, 0x214B, 0x214C, 0x214D, 0x214E, 0x214F, 253 /* 5 */ 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215A, 0x215B, 0x215C, 0x215D, 0x215E, 0x215F, 254 /* 6 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 255 /* 7 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 256 /* 8 */ 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187, 0x2188, 0x2189, 0x218A, 0x218B, 0x218C, 0x218D, 0x218E, 0x218F, 257 /* 9 */ 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, 0x2199, 0x219A, 0x219B, 0x219C, 0x219D, 0x219E, 0x219F, 258 /* A */ 0x21A0, 0x21A1, 0x21A2, 0x21A3, 0x21A4, 0x21A5, 0x21A6, 0x21A7, 0x21A8, 0x21A9, 0x21AA, 0x21AB, 0x21AC, 0x21AD, 0x21AE, 0x21AF, 259 /* B */ 0x21B0, 0x21B1, 0x21B2, 0x21B3, 0x21B4, 0x21B5, 0x21B6, 0x21B7, 0x21B8, 0x21B9, 0x21BA, 0x21BB, 0x21BC, 0x21BD, 0x21BE, 0x21BF, 260 /* C */ 0x21C0, 0x21C1, 0x21C2, 0x21C3, 0x21C4, 0x21C5, 0x21C6, 0x21C7, 0x21C8, 0x21C9, 0x21CA, 0x21CB, 0x21CC, 0x21CD, 0x21CE, 0x21CF, 261 /* D */ 0x21D0, 0x21D1, 0x21D2, 0x21D3, 0x21D4, 0x21D5, 0x21D6, 0x21D7, 0x21D8, 0x21D9, 0x21DA, 0x21DB, 0x21DC, 0x21DD, 0x21DE, 0x21DF, 262 /* E */ 0x21E0, 0x21E1, 0x21E2, 0x21E3, 0x21E4, 0x21E5, 0x21E6, 0x21E7, 0x21E8, 0x21E9, 0x21EA, 0x21EB, 0x21EC, 0x21ED, 0x21EE, 0x21EF, 263 /* F */ 0x21F0, 0x21F1, 0x21F2, 0x21F3, 0x21F4, 0x21F5, 0x21F6, 0x21F7, 0x21F8, 0x21F9, 0x21FA, 0x21FB, 0x21FC, 0x21FD, 0x21FE, 0x21FF, 264 264 265 265 /* Table 8 (for high byte 0xFE) */ 266 266 267 /* 0 */ 268 /* 1 */ 269 /* 2 */ 270 /* 3 */ 271 /* 4 */ 272 /* 5 */ 273 /* 6 */ 274 /* 7 */ 275 /* 8 */ 276 /* 9 */ 277 /* A */ 278 /* B */ 279 /* C */ 280 /* D */ 281 /* E */ 282 /* F */ 267 /* 0 */ 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F, 268 /* 1 */ 0xFE10, 0xFE11, 0xFE12, 0xFE13, 0xFE14, 0xFE15, 0xFE16, 0xFE17, 0xFE18, 0xFE19, 0xFE1A, 0xFE1B, 0xFE1C, 0xFE1D, 0xFE1E, 0xFE1F, 269 /* 2 */ 0xFE20, 0xFE21, 0xFE22, 0xFE23, 0xFE24, 0xFE25, 0xFE26, 0xFE27, 0xFE28, 0xFE29, 0xFE2A, 0xFE2B, 0xFE2C, 0xFE2D, 0xFE2E, 0xFE2F, 270 /* 3 */ 0xFE30, 0xFE31, 0xFE32, 0xFE33, 0xFE34, 0xFE35, 0xFE36, 0xFE37, 0xFE38, 0xFE39, 0xFE3A, 0xFE3B, 0xFE3C, 0xFE3D, 0xFE3E, 0xFE3F, 271 /* 4 */ 0xFE40, 0xFE41, 0xFE42, 0xFE43, 0xFE44, 0xFE45, 0xFE46, 0xFE47, 0xFE48, 0xFE49, 0xFE4A, 0xFE4B, 0xFE4C, 0xFE4D, 0xFE4E, 0xFE4F, 272 /* 5 */ 0xFE50, 0xFE51, 0xFE52, 0xFE53, 0xFE54, 0xFE55, 0xFE56, 0xFE57, 0xFE58, 0xFE59, 0xFE5A, 0xFE5B, 0xFE5C, 0xFE5D, 0xFE5E, 0xFE5F, 273 /* 6 */ 0xFE60, 0xFE61, 0xFE62, 0xFE63, 0xFE64, 0xFE65, 0xFE66, 0xFE67, 0xFE68, 0xFE69, 0xFE6A, 0xFE6B, 0xFE6C, 0xFE6D, 0xFE6E, 0xFE6F, 274 /* 7 */ 0xFE70, 0xFE71, 0xFE72, 0xFE73, 0xFE74, 0xFE75, 0xFE76, 0xFE77, 0xFE78, 0xFE79, 0xFE7A, 0xFE7B, 0xFE7C, 0xFE7D, 0xFE7E, 0xFE7F, 275 /* 8 */ 0xFE80, 0xFE81, 0xFE82, 0xFE83, 0xFE84, 0xFE85, 0xFE86, 0xFE87, 0xFE88, 0xFE89, 0xFE8A, 0xFE8B, 0xFE8C, 0xFE8D, 0xFE8E, 0xFE8F, 276 /* 9 */ 0xFE90, 0xFE91, 0xFE92, 0xFE93, 0xFE94, 0xFE95, 0xFE96, 0xFE97, 0xFE98, 0xFE99, 0xFE9A, 0xFE9B, 0xFE9C, 0xFE9D, 0xFE9E, 0xFE9F, 277 /* A */ 0xFEA0, 0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4, 0xFEA5, 0xFEA6, 0xFEA7, 0xFEA8, 0xFEA9, 0xFEAA, 0xFEAB, 0xFEAC, 0xFEAD, 0xFEAE, 0xFEAF, 278 /* B */ 0xFEB0, 0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4, 0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8, 0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC, 0xFEBD, 0xFEBE, 0xFEBF, 279 /* C */ 0xFEC0, 0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4, 0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8, 0xFEC9, 0xFECA, 0xFECB, 0xFECC, 0xFECD, 0xFECE, 0xFECF, 280 /* D */ 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4, 0xFED5, 0xFED6, 0xFED7, 0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD, 0xFEDE, 0xFEDF, 281 /* E */ 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, 0xFEE7, 0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF, 282 /* F */ 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0x0000, 283 283 284 284 /* Table 9 (for high byte 0xFF) */ 285 285 286 /* 0 */ 287 /* 1 */ 288 /* 2 */ 289 /* 3 */ 290 /* 4 */ 291 /* 5 */ 292 /* 6 */ 293 /* 7 */ 294 /* 8 */ 295 /* 9 */ 296 /* A */ 297 /* B */ 298 /* C */ 299 /* D */ 300 /* E */ 301 /* F */ 286 /* 0 */ 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F, 287 /* 1 */ 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18, 0xFF19, 0xFF1A, 0xFF1B, 0xFF1C, 0xFF1D, 0xFF1E, 0xFF1F, 288 /* 2 */ 0xFF20, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 289 /* 3 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0xFF3B, 0xFF3C, 0xFF3D, 0xFF3E, 0xFF3F, 290 /* 4 */ 0xFF40, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 291 /* 5 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0xFF5B, 0xFF5C, 0xFF5D, 0xFF5E, 0xFF5F, 292 /* 6 */ 0xFF60, 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F, 293 /* 7 */ 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, 294 /* 8 */ 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87, 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F, 295 /* 9 */ 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97, 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F, 296 /* A */ 0xFFA0, 0xFFA1, 0xFFA2, 0xFFA3, 0xFFA4, 0xFFA5, 0xFFA6, 0xFFA7, 0xFFA8, 0xFFA9, 0xFFAA, 0xFFAB, 0xFFAC, 0xFFAD, 0xFFAE, 0xFFAF, 297 /* B */ 0xFFB0, 0xFFB1, 0xFFB2, 0xFFB3, 0xFFB4, 0xFFB5, 0xFFB6, 0xFFB7, 0xFFB8, 0xFFB9, 0xFFBA, 0xFFBB, 0xFFBC, 0xFFBD, 0xFFBE, 0xFFBF, 298 /* C */ 0xFFC0, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC4, 0xFFC5, 0xFFC6, 0xFFC7, 0xFFC8, 0xFFC9, 0xFFCA, 0xFFCB, 0xFFCC, 0xFFCD, 0xFFCE, 0xFFCF, 299 /* D */ 0xFFD0, 0xFFD1, 0xFFD2, 0xFFD3, 0xFFD4, 0xFFD5, 0xFFD6, 0xFFD7, 0xFFD8, 0xFFD9, 0xFFDA, 0xFFDB, 0xFFDC, 0xFFDD, 0xFFDE, 0xFFDF, 300 /* E */ 0xFFE0, 0xFFE1, 0xFFE2, 0xFFE3, 0xFFE4, 0xFFE5, 0xFFE6, 0xFFE7, 0xFFE8, 0xFFE9, 0xFFEA, 0xFFEB, 0xFFEC, 0xFFED, 0xFFEE, 0xFFEF, 301 /* F */ 0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF, 302 302 }; 303 303 #endif -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h
r48674 r48947 33 33 fsw_u8 *p2 = (fsw_u8 *)s2data; 34 34 fsw_u32 c1, c2; 35 35 36 36 for (i = 0; i < len; i++) { 37 37 c1 = *p1++; … … 60 60 fsw_u16 *p2 = (fsw_u16 *)s2data; 61 61 fsw_u32 c1, c2; 62 62 63 63 for (i = 0; i < len; i++) { 64 64 c1 = *p1++; … … 77 77 fsw_u16 *p2 = (fsw_u16 *)s2data; 78 78 fsw_u32 c1, c2; 79 79 80 80 for (i = 0; i < len; i++) { 81 81 c1 = *p1++; … … 93 93 fsw_u16 *p2 = (fsw_u16 *)s2data; 94 94 fsw_u32 c1, c2; 95 95 96 96 for (i = 0; i < len; i++) { 97 97 c1 = *p1++; … … 119 119 fsw_u16 *p2 = (fsw_u16 *)s2data; 120 120 fsw_u32 c1, c2; 121 121 122 122 for (i = 0; i < len; i++) { 123 123 c1 = *p1++; … … 145 145 fsw_u16 *p2 = (fsw_u16 *)s2data; 146 146 fsw_u32 c1, c2; 147 147 148 148 for (i = 0; i < len; i++) { 149 149 c1 = *p1++; … … 162 162 fsw_u8 *dp; 163 163 fsw_u32 c; 164 164 165 165 dest->type = FSW_STRING_TYPE_ISO88591; 166 166 dest->len = srclen; … … 169 169 if (status) 170 170 return status; 171 171 172 172 sp = (fsw_u8 *)srcdata; 173 173 dp = (fsw_u8 *)dest->data; … … 196 196 fsw_u8 *dp; 197 197 fsw_u32 c; 198 198 199 199 dest->type = FSW_STRING_TYPE_ISO88591; 200 200 dest->len = srclen; … … 203 203 if (status) 204 204 return status; 205 205 206 206 sp = (fsw_u16 *)srcdata; 207 207 dp = (fsw_u8 *)dest->data; … … 220 220 fsw_u8 *dp; 221 221 fsw_u32 c; 222 222 223 223 dest->type = FSW_STRING_TYPE_ISO88591; 224 224 dest->len = srclen; … … 227 227 if (status) 228 228 return status; 229 229 230 230 sp = (fsw_u16 *)srcdata; 231 231 dp = (fsw_u8 *)dest->data; … … 244 244 fsw_u16 *dp; 245 245 fsw_u32 c; 246 246 247 247 dest->type = FSW_STRING_TYPE_UTF16; 248 248 dest->len = srclen; … … 251 251 if (status) 252 252 return status; 253 253 254 254 sp = (fsw_u8 *)srcdata; 255 255 dp = (fsw_u16 *)dest->data; … … 268 268 fsw_u16 *dp; 269 269 fsw_u32 c; 270 270 271 271 dest->type = FSW_STRING_TYPE_UTF16; 272 272 dest->len = srclen; … … 275 275 if (status) 276 276 return status; 277 277 278 278 sp = (fsw_u8 *)srcdata; 279 279 dp = (fsw_u16 *)dest->data; … … 302 302 fsw_u16 *dp; 303 303 fsw_u32 c; 304 304 305 305 dest->type = FSW_STRING_TYPE_UTF16; 306 306 dest->len = srclen; … … 309 309 if (status) 310 310 return status; 311 311 312 312 sp = (fsw_u16 *)srcdata; 313 313 dp = (fsw_u16 *)dest->data; … … 326 326 fsw_u8 *dp; 327 327 fsw_u32 c; 328 328 329 329 sp = (fsw_u8 *)srcdata; 330 330 destsize = 0; 331 331 for (i = 0; i < srclen; i++) { 332 332 c = *sp++; 333 333 334 334 if (c < 0x000080) 335 335 destsize++; … … 341 341 destsize += 4; 342 342 } 343 343 344 344 dest->type = FSW_STRING_TYPE_UTF8; 345 345 dest->len = srclen; … … 348 348 if (status) 349 349 return status; 350 350 351 351 sp = (fsw_u8 *)srcdata; 352 352 dp = (fsw_u8 *)dest->data; 353 353 for (i = 0; i < srclen; i++) { 354 354 c = *sp++; 355 355 356 356 if (c < 0x000080) { 357 357 *dp++ = (fsw_u8)c; … … 380 380 fsw_u8 *dp; 381 381 fsw_u32 c; 382 382 383 383 sp = (fsw_u16 *)srcdata; 384 384 destsize = 0; 385 385 for (i = 0; i < srclen; i++) { 386 386 c = *sp++; 387 387 388 388 if (c < 0x000080) 389 389 destsize++; … … 395 395 destsize += 4; 396 396 } 397 397 398 398 dest->type = FSW_STRING_TYPE_UTF8; 399 399 dest->len = srclen; … … 402 402 if (status) 403 403 return status; 404 405 sp = (fsw_u16 *)srcdata; 406 dp = (fsw_u8 *)dest->data; 407 for (i = 0; i < srclen; i++) { 408 c = *sp++; 409 404 405 sp = (fsw_u16 *)srcdata; 406 dp = (fsw_u8 *)dest->data; 407 for (i = 0; i < srclen; i++) { 408 c = *sp++; 409 410 410 if (c < 0x000080) { 411 411 *dp++ = (fsw_u8)c; … … 434 434 fsw_u8 *dp; 435 435 fsw_u32 c; 436 436 437 437 sp = (fsw_u16 *)srcdata; 438 438 destsize = 0; 439 439 for (i = 0; i < srclen; i++) { 440 440 c = *sp++; c = FSW_SWAPVALUE_U16(c); 441 441 442 442 if (c < 0x000080) 443 443 destsize++; … … 449 449 destsize += 4; 450 450 } 451 451 452 452 dest->type = FSW_STRING_TYPE_UTF8; 453 453 dest->len = srclen; … … 456 456 if (status) 457 457 return status; 458 458 459 459 sp = (fsw_u16 *)srcdata; 460 460 dp = (fsw_u8 *)dest->data; 461 461 for (i = 0; i < srclen; i++) { 462 462 c = *sp++; c = FSW_SWAPVALUE_U16(c); 463 463 464 464 if (c < 0x000080) { 465 465 *dp++ = (fsw_u8)c; -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/Ata.c
r48674 r48947 26 26 27 27 /** @file 28 This file contains all helper functions on the ATA command 29 28 This file contains all helper functions on the ATA command 29 30 30 Copyright (c) 2006 - 2008, Intel Corporation.<BR> 31 31 All rights reserved. This program and the accompanying materials … … 58 58 all the information of the IDE device. 59 59 60 @retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and 60 @retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and 61 61 48-bit addressing must be used 62 @retval EFI_UNSUPPORTED The disk doesn't not support Atapi6 or it supports but the 62 @retval EFI_UNSUPPORTED The disk doesn't not support Atapi6 or it supports but the 63 63 capacity is below 120G, 48bit addressing is not needed 64 64 @retval EFI_DEVICE_ERROR The identify data in IdeDev is incorrect … … 137 137 Enable SMART of the disk if supported 138 138 139 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 139 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 140 140 all the information of the IDE device. 141 141 **/ … … 290 290 including device type, media block size, media capacity, and etc. 291 291 292 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 292 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 293 293 all the information of the IDE device. 294 294 … … 307 307 UINT32 Capacity; 308 308 UINT8 DeviceSelect; 309 UINTN 309 UINTN Retry; 310 310 311 311 // … … 324 324 DeviceSelect = (UINT8) ((IdeDev->Device) << 4); 325 325 326 326 327 327 Retry = 3; 328 while (Retry > 0) { 328 while (Retry > 0) { 329 329 Status = AtaPioDataIn ( 330 330 IdeDev, … … 375 375 return EFI_SUCCESS; 376 376 } else if (Status == EFI_DEVICE_ERROR) { 377 378 379 380 381 382 383 384 385 386 387 388 389 390 377 // 378 // Some disk with big capacity (>200GB) is slow when being identified 379 // and will return all zero for word83. 380 // We try twice at first. If it fails, we do a SoftRest and try again. 381 // 382 Retry--; 383 if (Retry == 1) { 384 // 385 // Do a SoftRest before the third attempt. 386 // 387 AtaSoftReset (IdeDev); 388 } 389 continue; 390 } 391 391 // 392 392 // This is a hard disk <= 120GB capacity, treat it as normal hard disk … … 417 417 418 418 } 419 419 break; 420 420 } 421 421 … … 431 431 /** 432 432 This function is a helper function used to change the char order in a string. It 433 is designed specially for the PrintAtaModuleName() function. After the IDE device 434 is detected, the IDE driver gets the device module name by sending ATA command 433 is designed specially for the PrintAtaModuleName() function. After the IDE device 434 is detected, the IDE driver gets the device module name by sending ATA command 435 435 called ATA Identify Command or ATAPI Identify Command to the specified IDE device. 436 436 The module name returned is a string of ASCII characters: the first character is bit8--bit15 437 437 of the first word, the second character is BIT0--bit7 of the first word and so on. Thus 438 the string can not be print directly before it is preprocessed by this func to change 438 the string can not be print directly before it is preprocessed by this func to change 439 439 the order of characters in each word in the string. 440 440 … … 482 482 This function is used to send out ATA commands conforms to the PIO Data In Protocol. 483 483 484 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 484 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 485 485 all the information of the IDE device. 486 486 @param Buffer buffer contained data transferred from device to host. … … 492 492 @param CylinderLsb value of the low byte of the Cylinder Register 493 493 @param CylinderMsb value of the high byte of the Cylinder Register 494 494 495 495 @retval EFI_SUCCESS send out the ATA command and device send required data successfully. 496 496 @retval EFI_DEVICE_ERROR command sent failed. … … 779 779 Register, the Error Register's value is also be parsed and print out. 780 780 781 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 781 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 782 782 record all the information of the IDE device. 783 783 … … 877 877 878 878 /** 879 This function is called by the AtaBlkIoReadBlocks() to perform reading from 879 This function is called by the AtaBlkIoReadBlocks() to perform reading from 880 880 media in block unit. 881 881 882 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 882 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 883 883 all the information of the IDE device. 884 884 @param DataBuffer A pointer to the destination buffer for the data. 885 885 @param Lba The starting logical block address to read from on the device media. 886 886 @param NumberOfBlocks The number of transfer data blocks. 887 887 888 888 @return status is fully dependent on the return status of AtaPioDataIn() function. 889 889 … … 986 986 987 987 /** 988 This function is called by the AtaBlkIoWriteBlocks() to perform writing onto 988 This function is called by the AtaBlkIoWriteBlocks() to perform writing onto 989 989 media in block unit. 990 990 … … 994 994 @param Lba The starting logical block address to write onto the device media. 995 995 @param NumberOfBlocks The number of transfer data blocks. 996 996 997 997 @return status is fully dependent on the return status of AtaPioDataIn() function. 998 998 … … 1082 1082 /** 1083 1083 This function is used to implement the Soft Reset on the specified device. But, 1084 the ATA Soft Reset mechanism is so strong a reset method that it will force 1084 the ATA Soft Reset mechanism is so strong a reset method that it will force 1085 1085 resetting on both devices connected to the same cable. 1086 1086 … … 1147 1147 } 1148 1148 /** 1149 This function is used to send out ATA commands conforms to the PIO Data In 1149 This function is used to send out ATA commands conforms to the PIO Data In 1150 1150 Protocol, supporting ATA/ATAPI-6 standard 1151 1151 … … 1622 1622 // 1623 1623 IdeDev->PciIo->Io.Read ( 1624 1625 1626 1627 1628 1629 1630 1631 1624 IdeDev->PciIo, 1625 EfiPciIoWidthUint8, 1626 EFI_PCI_IO_PASS_THROUGH_BAR, 1627 IoPortForBmis, 1628 1, 1629 &RegisterValue 1630 ); 1631 1632 1632 RegisterValue |= (BMIS_INTERRUPT | BMIS_ERROR); 1633 1633 1634 1634 IdeDev->PciIo->Io.Write ( 1635 1636 1637 1638 1639 1640 1641 1635 IdeDev->PciIo, 1636 EfiPciIoWidthUint8, 1637 EFI_PCI_IO_PASS_THROUGH_BAR, 1638 IoPortForBmis, 1639 1, 1640 &RegisterValue 1641 ); 1642 1642 1643 1643 Status = EFI_SUCCESS; 1644 1644 1645 1645 RemainBlockNum = NumberOfBlocks; 1646 1646 while (RemainBlockNum > 0) { … … 1840 1840 if (((RegisterValue & (BMIS_INTERRUPT | BMIS_ERROR)) != 0) || (Count == 0)) { 1841 1841 if (((RegisterValue & BMIS_ERROR) != 0) || (Count == 0)) { 1842 1843 1842 Status = EFI_DEVICE_ERROR; 1843 break; 1844 1844 } 1845 1845 break; … … 1874 1874 &RegisterValue 1875 1875 ); 1876 1876 // 1877 1877 // Read Status Register of IDE device to clear interrupt 1878 1878 // … … 1905 1905 } 1906 1906 1907 1908 1909 1907 if (EFI_ERROR (Status)) { 1908 break; 1909 } 1910 1910 DataBuffer = (UINT8 *) DataBuffer + NumberOfBlocks * IdeDev->BlkIo.Media->BlockSize; 1911 1911 StartLba += NumberOfBlocks; … … 1925 1925 /** 1926 1926 This function is called by the AtaBlkIoReadBlocks() to perform reading from 1927 media in block unit. The function has been enhanced to support >120GB access 1927 media in block unit. The function has been enhanced to support >120GB access 1928 1928 and transfer at most 65536 blocks per command 1929 1929 1930 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1930 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1931 1931 all the information of the IDE device. 1932 1932 @param DataBuffer A pointer to the destination buffer for the data. … … 1957 1957 on the device media. 1958 1958 @param NumberOfBlocks The number of transfer data blocks. 1959 1959 1960 1960 @return status depends on the function DoAtaUdma() returns. 1961 1961 **/ … … 2340 2340 /** 2341 2341 This function is called by the AtaBlkIoWriteBlocks() to perform 2342 writing to media in block unit. 2342 writing to media in block unit. 2343 2343 2344 2344 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used … … 2348 2348 on the device media. 2349 2349 @param NumberOfBlocks The number of transfer data blocks. 2350 2350 2351 2351 @return status depends on the function DoAtaUdma() returns. 2352 2352 **/ … … 2369 2369 to record all the information of the IDE device. 2370 2370 @param DataBuffer A pointer to the source buffer for the data. 2371 @param StartLba The starting logical block address to write onto the device 2371 @param StartLba The starting logical block address to write onto the device 2372 2372 media. 2373 2373 @param NumberOfBlocks The number of transfer data blocks. … … 2450 2450 of the intrinsic block size of the device. 2451 2451 @param Buffer A pointer to the source buffer for the data.The caller 2452 is responsible for either having implicit or explicit 2452 is responsible for either having implicit or explicit 2453 2453 ownership of the memory that data is written from. 2454 2454 … … 2821 2821 } 2822 2822 2823 2824 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/Atapi.c
r48674 r48947 26 26 27 27 /** @file 28 This file contains all helper functions on the ATAPI command 29 30 Copyright (c) 2006 - 2008, Intel Corporation 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 28 This file contains all helper functions on the ATAPI command 29 30 Copyright (c) 2006 - 2008, Intel Corporation 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 38 38 39 39 **/ … … 43 43 /** 44 44 This function is used to get the current status of the media residing 45 in the LS-120 drive or ZIP drive. The media status is returned in the 45 in the LS-120 drive or ZIP drive. The media status is returned in the 46 46 Error Status. 47 47 … … 55 55 @retval EFI_WRITE_PROTECTED The media is writing protected. 56 56 57 @note This function must be called after the LS120EnableMediaStatus() 58 with second parameter set to TRUE 57 @note This function must be called after the LS120EnableMediaStatus() 58 with second parameter set to TRUE 59 59 (means enable media status notification) is called. 60 60 **/ … … 216 216 IDEReadPortWMultiple ( 217 217 IdeDev->PciIo, 218 IdeDev->IoPort->Data, 219 1, 218 IdeDev->IoPort->Data, 219 1, 220 220 &TempWordBuffer 221 221 ); … … 227 227 228 228 /** 229 This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut(). 229 This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut(). 230 230 It is used to transfer data between host and device. The data direction is specified 231 231 by the fourth parameter. … … 273 273 // 274 274 // for performance, we assert the ByteCount is an even number 275 // which is actually a reasonable assumption 275 // which is actually a reasonable assumption 276 276 ASSERT((ByteCount%2) == 0); 277 277 278 278 PtrBuffer = Buffer; 279 279 RequiredWordCount = ByteCount / 2; … … 284 284 285 285 while (ActualWordCount < RequiredWordCount) { 286 286 287 287 // 288 288 // before each data transfer stream, the host should poll DRQ bit ready, … … 293 293 return CheckErrorStatus (IdeDev); 294 294 } 295 295 296 296 // 297 297 // read Status Register will clear interrupt … … 328 328 ActualWordCount += WordCount; 329 329 } 330 330 331 331 if (Read) { 332 332 // … … 353 353 354 354 /** 355 This function is used to send out ATAPI commands conforms to the Packet Command 355 This function is used to send out ATAPI commands conforms to the Packet Command 356 356 with PIO Data In Protocol. 357 357 … … 359 359 to record all the information of the IDE device. 360 360 @param Packet pointer pointing to ATAPI_PACKET_COMMAND data structure 361 which contains the contents of the command. 361 which contains the contents of the command. 362 362 @param Buffer buffer contained data transferred from device to host. 363 363 @param ByteCount data size in byte unit of the buffer. 364 @param TimeOut this parameter is used to specify the timeout value for the 365 PioReadWriteData() function. 364 @param TimeOut this parameter is used to specify the timeout value for the 365 PioReadWriteData() function. 366 366 367 367 @retval EFI_SUCCESS send out the ATAPI packet command successfully … … 464 464 @param Buffer buffer contained data transferred from host to device. 465 465 @param ByteCount data size in byte unit of the buffer. 466 @param TimeOut this parameter is used to specify the timeout value 467 for the PioReadWriteData() function. 466 @param TimeOut this parameter is used to specify the timeout value 467 for the PioReadWriteData() function. 468 468 @retval EFI_SUCCESS send out the ATAPI packet command successfully 469 and device received data successfully. 469 and device received data successfully. 470 470 @retval EFI_DEVICE_ERROR the device failed to send data. 471 471 … … 492 492 return Status; 493 493 } 494 494 495 495 // 496 496 // Select device via Device/Head Register. … … 614 614 615 615 There are 5 steps to reach such objective: 616 1. Sends out the ATAPI Identify Command to the specified device. 616 1. Sends out the ATAPI Identify Command to the specified device. 617 617 Only ATAPI device responses to this command. If the command succeeds, 618 it returns the Identify data structure which filled with information 619 about the device. Since the ATAPI device contains removable media, 618 it returns the Identify data structure which filled with information 619 about the device. Since the ATAPI device contains removable media, 620 620 the only meaningful information is the device module name. 621 621 2. Sends out ATAPI Inquiry Packet Command to the specified device. … … 623 623 the device type information. 624 624 3. Allocate sense data space for future use. We don't detect the media 625 presence here to improvement boot performance, especially when CD 625 presence here to improvement boot performance, especially when CD 626 626 media is present. The media detection will be performed just before 627 627 each BLK_IO read/write 628 628 629 629 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 630 630 to record all the information of the IDE device. … … 633 633 @retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type 634 634 is not supported by this IDE driver. 635 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 635 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 636 636 637 637 @note Parameter "IdeDev" will be updated in this function. … … 746 746 // 747 747 case 0x04: 748 748 749 749 // 750 750 // Optical … … 785 785 /** 786 786 Sends out ATAPI Request Sense Packet Command to the specified device. This command 787 will return all the current Sense data in the device. This function will pack 787 will return all the current Sense data in the device. This function will pack 788 788 all the Sense data in one single buffer. 789 789 … … 791 791 to record all the information of the IDE device. 792 792 @param SenseCounts allocated in this function, and freed by the calling function. 793 This buffer is used to accommodate all the sense data returned 793 This buffer is used to accommodate all the sense data returned 794 794 by the device. 795 795 … … 877 877 /** 878 878 This function is used to parse sense data. Only the first sense data is honoured 879 879 880 880 @param IdeDev Indicates the calling context. 881 881 @param SenseCount Count of sense data. … … 963 963 AtapiTestUnitReady ( 964 964 IN IDE_BLK_IO_DEV *IdeDev, 965 OUT SENSE_RESULT *SResult 965 OUT SENSE_RESULT *SResult 966 966 ) 967 967 { 968 968 ATAPI_PACKET_COMMAND Packet; 969 969 EFI_STATUS Status; 970 UINTN 970 UINTN SenseCount; 971 971 972 972 // … … 1001 1001 Current device status will impact device's response to the Read Capacity 1002 1002 Command. For example, if the device once reset, the Read Capacity 1003 Command will fail. The Sense data record the current device status, so 1003 Command will fail. The Sense data record the current device status, so 1004 1004 if the Read Capacity Command failed, the Sense data must be requested 1005 1005 and be analyzed to determine if the Read Capacity Command should retry. … … 1015 1015 @note Parameter "IdeDev" will be updated in this function. 1016 1016 1017 1017 1018 1018 **/ 1019 1019 EFI_STATUS 1020 1020 AtapiReadCapacity ( 1021 1021 IN IDE_BLK_IO_DEV *IdeDev, 1022 OUT SENSE_RESULT *SResult1022 OUT SENSE_RESULT *SResult 1023 1023 ) 1024 1024 { … … 1029 1029 EFI_STATUS SenseStatus; 1030 1030 ATAPI_PACKET_COMMAND Packet; 1031 UINTN 1031 UINTN SenseCount; 1032 1032 1033 1033 // … … 1075 1075 1076 1076 if (!EFI_ERROR (SenseStatus)) { 1077 ParseSenseData (IdeDev, SenseCount, SResult); 1078 1079 1077 ParseSenseData (IdeDev, SenseCount, SResult); 1078 1079 if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) { 1080 1080 if (IdeDev->Type == IdeCdRom) { 1081 1081 … … 1085 1085 Data.LastLba0; 1086 1086 1087 1087 IdeDev->BlkIo.Media->MediaPresent = TRUE; 1088 1088 1089 1089 IdeDev->BlkIo.Media->ReadOnly = TRUE; … … 1104 1104 1105 1105 IdeDev->BlkIo.Media->LastBlock = (FormatData.LastLba3 << 24) | 1106 (FormatData.LastLba2 << 16) | 1106 (FormatData.LastLba2 << 16) | 1107 1107 (FormatData.LastLba1 << 8) | 1108 1108 FormatData.LastLba0; … … 1137 1137 /** 1138 1138 This function is used to test the current media write-protected or not residing 1139 in the LS-120 drive or ZIP drive. 1139 in the LS-120 drive or ZIP drive. 1140 1140 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1141 1141 to record all the information of the IDE device. … … 1186 1186 1187 1187 /** 1188 Used before read/write blocks from/to ATAPI device media. Since ATAPI device 1189 media is removable, it is necessary to detect whether media is present and 1188 Used before read/write blocks from/to ATAPI device media. Since ATAPI device 1189 media is removable, it is necessary to detect whether media is present and 1190 1190 get current present media's information, and if media has been changed, Block 1191 1191 I/O Protocol need to be reinstalled. … … 1436 1436 read from media in block unit. 1437 1437 1438 The main command used to access media here is READ(10) Command. 1439 READ(10) Command requests that the ATAPI device media transfer 1440 specified data to the host. Data is transferred in block(sector) 1438 The main command used to access media here is READ(10) Command. 1439 READ(10) Command requests that the ATAPI device media transfer 1440 specified data to the host. Data is transferred in block(sector) 1441 1441 unit. The maximum number of blocks that can be transferred once is 1442 65536. This is the main difference between READ(10) and READ(12) 1442 65536. This is the main difference between READ(10) and READ(12) 1443 1443 Command. The maximum number of blocks in READ(12) is 2 power 32. 1444 1444 1445 1445 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1446 1446 to record all the information of the IDE device. 1447 @param Buffer A pointer to the destination buffer for the data. 1448 @param Lba The starting logical block address to read from on the 1447 @param Buffer A pointer to the destination buffer for the data. 1448 @param Lba The starting logical block address to read from on the 1449 1449 device media. 1450 1450 @param NumberOfBlocks The number of transfer data blocks. … … 1554 1554 This function is called by the AtapiBlkIoWriteBlocks() to perform 1555 1555 write onto media in block unit. 1556 The main command used to access media here is Write(10) Command. 1557 Write(10) Command requests that the ATAPI device media transfer 1558 specified data to the host. Data is transferred in block (sector) 1556 The main command used to access media here is Write(10) Command. 1557 Write(10) Command requests that the ATAPI device media transfer 1558 specified data to the host. Data is transferred in block (sector) 1559 1559 unit. The maximum number of blocks that can be transferred once is 1560 65536. 1560 65536. 1561 1561 1562 1562 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1563 1563 to record all the information of the IDE device. 1564 @param Buffer A pointer to the source buffer for the data. 1565 @param Lba The starting logical block address to write onto 1564 @param Buffer A pointer to the source buffer for the data. 1565 @param Lba The starting logical block address to write onto 1566 1566 the device media. 1567 1567 @param NumberOfBlocks The number of transfer data blocks. 1568 1568 1569 1569 @return status is fully dependent on the return status of AtapiPacketCommandOut() function. 1570 1570 … … 1621 1621 SectorCount = (UINT16) BlocksRemaining; 1622 1622 } 1623 1623 1624 1624 // 1625 1625 // Command code is WRITE_10. … … 1672 1672 command should be sent without waiting for the BSY clear and DRDY 1673 1673 set. 1674 This function is called by IdeBlkIoReset(), 1674 This function is called by IdeBlkIoReset(), 1675 1675 a interface function of Block I/O protocol. 1676 1676 … … 1710 1710 return EFI_DEVICE_ERROR; 1711 1711 } 1712 1712 1713 1713 // 1714 1714 // stall 5 seconds to make the device status stable … … 1729 1729 of the intrinsic block size of the device. 1730 1730 @param Buffer A pointer to the destination buffer for the data. The caller 1731 is responsible for either having implicit or explicit 1731 is responsible for either having implicit or explicit 1732 1732 ownership of the memory that data is read into. 1733 1733 1734 1734 @retval EFI_SUCCESS Read Blocks successfully. 1735 1735 @retval EFI_DEVICE_ERROR Read Blocks failed. … … 1831 1831 return EFI_DEVICE_ERROR; 1832 1832 } 1833 1833 1834 1834 // 1835 1835 // Read blocks succeeded 1836 1836 // 1837 1837 1838 1838 // 1839 1839 // save the first block to the cache for performance … … 1867 1867 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media. 1868 1868 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the 1869 intrinsic block size of the device. 1870 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1869 intrinsic block size of the device. 1870 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1871 1871 or the data buffer is not valid. 1872 1872 … … 1916 1916 return Status; 1917 1917 } 1918 1918 1919 1919 // 1920 1920 // Get the intrinsic block size … … 1975 1975 } 1976 1976 1977 1978 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/ComponentName.c
r48674 r48947 27 27 /** @file 28 28 UEFI Component Name(2) protocol implementation for ConPlatform driver. 29 30 Copyright (c) 2006 - 2008, Intel Corporation 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 29 30 Copyright (c) 2006 - 2008, Intel Corporation 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 38 38 39 39 **/ -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/ComponentName.h
r48674 r48947 26 26 27 27 /** @file 28 28 29 29 UEFI Component Name(2) protocol implementation header file for IDE Bus driver. 30 30 31 31 Copyright (c) 2006, Intel Corporation 32 32 All rights reserved. This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/DriverConfiguration.c
r48674 r48947 26 26 27 27 /** @file 28 Implementation of UEFI Driver Configuration Protocol for IDE bus driver which 28 Implementation of UEFI Driver Configuration Protocol for IDE bus driver which 29 29 provides ability to set IDE bus controller specific options. 30 31 Copyright (c) 2006 - 2008, Intel Corporation 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 30 31 Copyright (c) 2006 - 2008, Intel Corporation 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 39 39 40 40 **/ … … 107 107 108 108 /** 109 Allows the user to set controller specific options for a controller that a 109 Allows the user to set controller specific options for a controller that a 110 110 driver is currently managing. 111 111 … … 118 118 It will not be NULL for a bus driver that wishes to set 119 119 options for one of its child controllers. 120 @param Language A pointer to a three character ISO 639-2 language identifier. 121 This is the language of the user interface that should be presented 122 to the user, and it must match one of the languages specified in 120 @param Language A pointer to a three character ISO 639-2 language identifier. 121 This is the language of the user interface that should be presented 122 to the user, and it must match one of the languages specified in 123 123 SupportedLanguages. The number of languages supported by a driver is up to 124 124 the driver writer. 125 @param ActionRequired A pointer to the action that the calling agent is required 125 @param ActionRequired A pointer to the action that the calling agent is required 126 126 to perform when this function returns. 127 128 129 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 127 128 129 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 130 130 options for the controller specified by ControllerHandle.. 131 131 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 132 132 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 133 133 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 134 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 134 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 135 135 the controller specified by ControllerHandle and ChildHandle. 136 136 @retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language. 137 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 137 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 138 138 controller specified by ControllerHandle and ChildHandle. 139 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 139 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 140 140 controller specified by ControllerHandle and ChildHandle 141 141 **/ … … 209 209 210 210 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance. 211 @param ControllerHandle The handle of the controller to test if it's current configuration options 211 @param ControllerHandle The handle of the controller to test if it's current configuration options 212 212 are valid. 213 @param ChildHandle The handle of the child controller to test if it's current configuration 214 options are valid. This is an optional parameter that may be NULL. It will 213 @param ChildHandle The handle of the child controller to test if it's current configuration 214 options are valid. This is an optional parameter that may be NULL. It will 215 215 be NULL for device drivers. It will also be NULL for a bus drivers that 216 wish to test the configuration options for the bus controller. It will 217 not be NULL for a bus driver that wishes to test configuration options for 216 wish to test the configuration options for the bus controller. It will 217 not be NULL for a bus driver that wishes to test configuration options for 218 218 one of its child controllers. 219 219 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being … … 222 222 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 223 223 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 224 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 224 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 225 225 specified by ControllerHandle and ChildHandle. 226 226 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being … … 263 263 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance. 264 264 @param ControllerHandle The handle of the controller to force default configuration options on. 265 @param ChildHandle The handle of the child controller to force default configuration 266 options on This is an optional parameter that may be NULL. It 267 will be NULL for device drivers. It will also be NULL for a bus 265 @param ChildHandle The handle of the child controller to force default configuration 266 options on This is an optional parameter that may be NULL. It 267 will be NULL for device drivers. It will also be NULL for a bus 268 268 drivers that wish to force default configuration options for the bus 269 269 controller. It will not be NULL for a bus driver that wishes to force 270 270 default configuration options for one of its child controllers. 271 @param DefaultType The type of default configuration options to force on the controller 272 specified by ControllerHandle and ChildHandle. 273 @param ActionRequired A pointer to the action that the calling agent is required to perform 271 @param DefaultType The type of default configuration options to force on the controller 272 specified by ControllerHandle and ChildHandle. 273 @param ActionRequired A pointer to the action that the calling agent is required to perform 274 274 when this function returns. 275 275 276 @retval EFI_SUCCESS The driver specified by This successfully forced the 277 default configuration options on the controller specified by 276 @retval EFI_SUCCESS The driver specified by This successfully forced the 277 default configuration options on the controller specified by 278 278 ControllerHandle and ChildHandle. 279 279 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 280 280 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 281 281 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 282 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 282 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 283 283 configuration options on the controller specified by ControllerHandle 284 284 and ChildHandle. 285 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 285 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 286 286 specified by DefaultType. 287 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 287 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 288 288 options on the controller specified by ControllerHandle and ChildHandle. 289 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 289 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 290 290 options on the controller specified by ControllerHandle and ChildHandle. 291 291 **/ -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/DriverDiagnostics.c
r48674 r48947 28 28 Implementation of UEFI driver Diagnostics protocol which to perform diagnostic on the IDE 29 29 Bus controller. 30 31 Copyright (c) 2006 - 2008, Intel Corporation 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 30 31 Copyright (c) 2006 - 2008, Intel Corporation 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 39 39 40 40 **/ … … 69 69 This is an optional parameter that may be NULL. It will 70 70 be NULL for device drivers. It will also be NULL for a 71 bus drivers that wish to run diagnostics on the bus controller. 72 It will not be NULL for a bus driver that wishes to run 71 bus drivers that wish to run diagnostics on the bus controller. 72 It will not be NULL for a bus driver that wishes to run 73 73 diagnostics on one of its child controllers. 74 74 @param DiagnosticType Indicates type of diagnostics to perform on the controller 75 75 specified by ControllerHandle and ChildHandle. 76 @param Language A pointer to a three character ISO 639-2 language identifier. 77 This is the language in which the optional error message should 78 be returned in Buffer, and it must match one of the languages 76 @param Language A pointer to a three character ISO 639-2 language identifier. 77 This is the language in which the optional error message should 78 be returned in Buffer, and it must match one of the languages 79 79 specified in SupportedLanguages. The number of languages supported by 80 80 a driver is up to the driver writer. … … 82 82 @param BufferSize The size, in bytes, of the data returned in Buffer. 83 83 @param Buffer A buffer that contains a Null-terminated Unicode string 84 plus some additional data whose format is defined by ErrorType. 85 Buffer is allocated by this function with AllocatePool(), and 84 plus some additional data whose format is defined by ErrorType. 85 Buffer is allocated by this function with AllocatePool(), and 86 86 it is the caller's responsibility to free it with a call to FreePool(). 87 87 88 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 88 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 89 89 the diagnostic. 90 90 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. … … 94 94 @retval EFI_INVALID_PARAMETER BufferType is NULL. 95 95 @retval EFI_INVALID_PARAMETER Buffer is NULL. 96 @retval EFI_UNSUPPORTED The driver specified by This does not support running 97 diagnostics for the controller specified by ControllerHandle 96 @retval EFI_UNSUPPORTED The driver specified by This does not support running 97 diagnostics for the controller specified by ControllerHandle 98 98 and ChildHandle. 99 99 @retval EFI_UNSUPPORTED The driver specified by This does not support the 100 100 type of diagnostic specified by DiagnosticType. 101 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 101 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 102 102 specified by Language. 103 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 103 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 104 104 diagnostics. 105 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 105 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 106 106 status information in ErrorType, BufferSize,and Buffer. 107 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 107 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 108 108 did not pass the diagnostic. 109 109 **/ -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/Ide.c
r48674 r48947 27 27 /** @file 28 28 The file containing the helper functions implement of the Ide Bus driver 29 29 30 30 Copyright (c) 2006 - 2008, Intel Corporation 31 31 All rights reserved. This program and the accompanying materials … … 51 51 52 52 @param PciIo The PCI IO protocol instance 53 @param Port the IDE Port number 53 @param Port the IDE Port number 54 54 55 55 @return the one-byte data read from IDE port … … 297 297 @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to 298 298 receive IDE IO port registers' base addresses 299 299 300 300 @retval EFI_UNSUPPORTED return this value when the BARs is not IO type 301 301 @retval EFI_SUCCESS Get the Base address successfully … … 351 351 case PCI_CLASS_MASS_STORAGE_IDE: 352 352 fIDEAhciEmulation = FALSE; 353 353 break; 354 354 case 0x6: 355 355 fIDEAhciEmulation = TRUE; 356 356 break; 357 357 default: 358 ASSERT_EFI_ERROR((EFI_UNSUPPORTED)); 359 358 ASSERT_EFI_ERROR((EFI_UNSUPPORTED)); 359 return EFI_UNSUPPORTED; 360 360 } 361 361 DEBUG((DEBUG_INFO, "class primary code: %x\n", PciData.Hdr.ClassCode[0] & IDE_PRIMARY_OPERATING_MODE)); … … 378 378 fIDEAhciEmulation ? 0x3e6 :(UINT16) ((PciData.Device.Bar[1] & 0x0000fffc) + 2); 379 379 } 380 IdeRegsBaseAddr[IdePrimary].BusMasterBaseAddr = 380 IdeRegsBaseAddr[IdePrimary].BusMasterBaseAddr = 381 381 fIDEAhciEmulation ? 0 : (UINT16)((PciData.Device.Bar[4] & 0x0000fff0)); 382 382 … … 401 401 402 402 DEBUG((DEBUG_INFO, "%a:%d CommandBlockBaseAddr:%x, " 403 404 405 406 407 403 "ControlBlockBaseAddr:%x, " 404 "BusMasterBaseAddr:%x\n", __FILE__, __LINE__, 405 IdeRegsBaseAddr[IdePrimary].CommandBlockBaseAddr, 406 IdeRegsBaseAddr[IdePrimary].ControlBlockBaseAddr, 407 IdeRegsBaseAddr[IdePrimary].BusMasterBaseAddr)); 408 408 DEBUG((DEBUG_INFO, "%a:%d CommandBlockBaseAddr:%x, " 409 410 411 412 413 409 "ControlBlockBaseAddr:%x, " 410 "BusMasterBaseAddr:%x\n", __FILE__, __LINE__, 411 IdeRegsBaseAddr[IdeSecondary].CommandBlockBaseAddr, 412 IdeRegsBaseAddr[IdeSecondary].ControlBlockBaseAddr, 413 IdeRegsBaseAddr[IdeSecondary].BusMasterBaseAddr)); 414 414 return EFI_SUCCESS; 415 415 } … … 422 422 423 423 @param IdeDev The BLK_IO private data which specifies the IDE device 424 424 425 425 @retval EFI_INVALID_PARAMETER return this value when the channel is invalid 426 426 @retval EFI_SUCCESS reassign the IDE IO resource successfully … … 441 441 return EFI_INVALID_PARAMETER; 442 442 } 443 443 444 444 // 445 445 // Requery IDE IO port registers' base addresses in case of the switch of … … 664 664 665 665 @param IdeDev The BLK_IO private data which specifies the IDE device. 666 666 667 667 @retval EFI_NOT_FOUND The device or channel is not found 668 668 @retval EFI_SUCCESS The device is found … … 786 786 So this function is called after data transfer is finished. 787 787 788 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 788 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 789 789 to record all the information of the IDE device. 790 790 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear. … … 849 849 is finished. 850 850 851 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 851 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 852 852 to record all the information of the IDE device. 853 853 … … 972 972 /** 973 973 This function is used to poll for the DRQ bit set in the Alternate Status Register. 974 DRQ is set when the device is ready to transfer data. So this function is called after 974 DRQ is set when the device is ready to transfer data. So this function is called after 975 975 the command is sent to the device and before required data is transferred. 976 976 977 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 977 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 978 978 record all the information of the IDE device. 979 979 … … 1037 1037 is clear when the device is not busy. Every command must be sent after device is not busy. 1038 1038 1039 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1039 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1040 1040 to record all the information of the IDE device. 1041 1041 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 1079 1079 } 1080 1080 /** 1081 This function is used to poll for the BSY bit clear in the Alternate Status Register. 1082 BSY is clear when the device is not busy. Every command must be sent after device is 1081 This function is used to poll for the BSY bit clear in the Alternate Status Register. 1082 BSY is clear when the device is not busy. Every command must be sent after device is 1083 1083 not busy. 1084 1084 1085 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1085 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1086 1086 all the information of the IDE device. 1087 1087 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 1122 1122 /** 1123 1123 This function is used to poll for the DRDY bit set in the Status Register. DRDY 1124 bit is set when the device is ready to accept command. Most ATA commands must be 1124 bit is set when the device is ready to accept command. Most ATA commands must be 1125 1125 sent after DRDY set except the ATAPI Packet Command. 1126 1126 … … 1174 1174 } 1175 1175 /** 1176 This function is used to poll for the DRDY bit set in the Alternate Status Register. 1177 DRDY bit is set when the device is ready to accept command. Most ATA commands must 1176 This function is used to poll for the DRDY bit set in the Alternate Status Register. 1177 DRDY bit is set when the device is ready to accept command. Most ATA commands must 1178 1178 be sent after DRDY set except the ATAPI Packet Command. 1179 1179 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/Ide.h
r48674 r48947 55 55 56 56 @param PciIo The PCI IO protocol instance 57 @param Port the IDE Port number 57 @param Port the IDE Port number 58 58 59 59 return the one-byte data read from IDE port … … 180 180 @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to 181 181 receive IDE IO port registers' base addresses 182 182 183 183 @retval EFI_UNSUPPORTED return this value when the BARs is not IO type 184 184 @retval EFI_SUCCESS Get the Base address successfully … … 214 214 215 215 @param IdeDev The BLK_IO private data which specifies the IDE device. 216 216 217 217 @retval EFI_NOT_FOUND The device or channel is not found 218 218 @retval EFI_SUCCESS The device is found … … 239 239 So this function is called after data transfer is finished. 240 240 241 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 241 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 242 242 to record all the information of the IDE device. 243 243 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear. … … 263 263 is finished. 264 264 265 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 265 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 266 266 to record all the information of the IDE device. 267 267 … … 307 307 /** 308 308 This function is used to poll for the DRQ bit set in the Alternate Status Register. 309 DRQ is set when the device is ready to transfer data. So this function is called after 309 DRQ is set when the device is ready to transfer data. So this function is called after 310 310 the command is sent to the device and before required data is transferred. 311 311 312 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 312 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 313 313 record all the information of the IDE device. 314 314 … … 331 331 is clear when the device is not busy. Every command must be sent after device is not busy. 332 332 333 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 333 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 334 334 to record all the information of the IDE device. 335 335 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 347 347 348 348 /** 349 This function is used to poll for the BSY bit clear in the Alternate Status Register. 350 BSY is clear when the device is not busy. Every command must be sent after device is 349 This function is used to poll for the BSY bit clear in the Alternate Status Register. 350 BSY is clear when the device is not busy. Every command must be sent after device is 351 351 not busy. 352 352 353 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 353 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 354 354 all the information of the IDE device. 355 355 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 368 368 /** 369 369 This function is used to poll for the DRDY bit set in the Status Register. DRDY 370 bit is set when the device is ready to accept command. Most ATA commands must be 370 bit is set when the device is ready to accept command. Most ATA commands must be 371 371 sent after DRDY set except the ATAPI Packet Command. 372 372 … … 387 387 388 388 /** 389 This function is used to poll for the DRDY bit set in the Alternate Status Register. 390 DRDY bit is set when the device is ready to accept command. Most ATA commands must 389 This function is used to poll for the DRDY bit set in the Alternate Status Register. 390 DRDY bit is set when the device is ready to accept command. Most ATA commands must 391 391 be sent after DRDY set except the ATAPI Packet Command. 392 392 … … 421 421 including device type, media block size, media capacity, and etc. 422 422 423 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 423 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 424 424 all the information of the IDE device. 425 425 … … 447 447 This function is used to send out ATA commands conforms to the PIO Data In Protocol. 448 448 449 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 449 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 450 450 all the information of the IDE device. 451 451 @param Buffer buffer contained data transferred from device to host. … … 457 457 @param CylinderLsb value of the low byte of the Cylinder Register 458 458 @param CylinderMsb value of the high byte of the Cylinder Register 459 459 460 460 @retval EFI_SUCCESS send out the ATA command and device send required data successfully. 461 461 @retval EFI_DEVICE_ERROR command sent failed. … … 513 513 Register, the Error Register's value is also be parsed and print out. 514 514 515 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 515 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 516 516 record all the information of the IDE device. 517 517 … … 527 527 /** 528 528 This function is used to implement the Soft Reset on the specified device. But, 529 the ATA Soft Reset mechanism is so strong a reset method that it will force 529 the ATA Soft Reset mechanism is so strong a reset method that it will force 530 530 resetting on both devices connected to the same cable. 531 531 … … 595 595 of the intrinsic block size of the device. 596 596 @param Buffer A pointer to the source buffer for the data.The caller 597 is responsible for either having implicit or explicit 597 is responsible for either having implicit or explicit 598 598 ownership of the memory that data is written from. 599 599 … … 627 627 628 628 There are 5 steps to reach such objective: 629 1. Sends out the ATAPI Identify Command to the specified device. 629 1. Sends out the ATAPI Identify Command to the specified device. 630 630 Only ATAPI device responses to this command. If the command succeeds, 631 it returns the Identify data structure which filled with information 632 about the device. Since the ATAPI device contains removable media, 631 it returns the Identify data structure which filled with information 632 about the device. Since the ATAPI device contains removable media, 633 633 the only meaningful information is the device module name. 634 634 2. Sends out ATAPI Inquiry Packet Command to the specified device. … … 636 636 the device type information. 637 637 3. Allocate sense data space for future use. We don't detect the media 638 presence here to improvement boot performance, especially when CD 638 presence here to improvement boot performance, especially when CD 639 639 media is present. The media detection will be performed just before 640 640 each BLK_IO read/write 641 641 642 642 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 643 643 to record all the information of the IDE device. … … 646 646 @retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type 647 647 is not supported by this IDE driver. 648 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 648 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 649 649 650 650 @note Parameter "IdeDev" will be updated in this function. … … 664 664 command should be sent without waiting for the BSY clear and DRDY 665 665 set. 666 This function is called by IdeBlkIoReset(), 666 This function is called by IdeBlkIoReset(), 667 667 a interface function of Block I/O protocol. 668 668 … … 689 689 of the intrinsic block size of the device. 690 690 @param Buffer A pointer to the destination buffer for the data. The caller 691 is responsible for either having implicit or explicit 691 is responsible for either having implicit or explicit 692 692 ownership of the memory that data is read into. 693 693 694 694 @retval EFI_SUCCESS Read Blocks successfully. 695 695 @retval EFI_DEVICE_ERROR Read Blocks failed. … … 728 728 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media. 729 729 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the 730 intrinsic block size of the device. 731 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 730 intrinsic block size of the device. 731 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 732 732 or the data buffer is not valid. 733 733 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/IdeBus.c
r48674 r48947 26 26 27 27 /** @file 28 This file implement UEFI driver for IDE Bus which includes device identification, 29 Child device(Disk, CDROM, etc) enumeration and child handler installation, and 28 This file implement UEFI driver for IDE Bus which includes device identification, 29 Child device(Disk, CDROM, etc) enumeration and child handler installation, and 30 30 driver stop. 31 31 32 32 Copyright (c) 2006 - 2009, Intel Corporation 33 33 All rights reserved. This program and the accompanying materials … … 179 179 Node = (EFI_DEV_PATH *) RemainingDevicePath; 180 180 // 181 // Check if RemainingDevicePath is the End of Device Path Node, 181 // Check if RemainingDevicePath is the End of Device Path Node, 182 182 // if yes, go on checking other conditions 183 183 // … … 219 219 return Status; 220 220 } 221 221 222 222 // 223 223 // Close the I/O Abstraction(s) used to perform the supported test … … 454 454 if (EnumAll || RemainingDevicePath == NULL) { 455 455 // 456 // If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL, 456 // If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL, 457 457 // must enumerate all IDE devices anyway 458 458 // … … 464 464 } else if (!IsDevicePathEnd (RemainingDevicePath)) { 465 465 // 466 // If RemainingDevicePath isn't the End of Device Path Node, 466 // If RemainingDevicePath isn't the End of Device Path Node, 467 467 // only scan the specified device by RemainingDevicePath 468 468 // … … 485 485 // If RemainingDevicePath is the End of Device Path Node, 486 486 // skip enumerate any device and return EFI_SUCCESS 487 // 487 // 488 488 BeginningIdeChannel = IdeMaxChannel; 489 489 EndIdeChannel = IdeMaxChannel - 1; … … 1286 1286 1287 1287 /** 1288 This function is used by the IDE bus driver to get inquiry data. 1288 This function is used by the IDE bus driver to get inquiry data. 1289 1289 Data format of Identify data is defined by the Interface GUID. 1290 1290 … … 1294 1294 1295 1295 @retval EFI_SUCCESS The command was accepted without any errors. 1296 @retval EFI_NOT_FOUND Device does not support this data class 1297 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1298 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough 1296 @retval EFI_NOT_FOUND Device does not support this data class 1297 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1298 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough 1299 1299 1300 1300 **/ … … 1327 1327 1328 1328 /** 1329 This function is used by the IDE bus driver to get identify data. 1329 This function is used by the IDE bus driver to get identify data. 1330 1330 Data format of Identify data is defined by the Interface GUID. 1331 1331 … … 1335 1335 1336 1336 @retval EFI_SUCCESS The command was accepted without any errors. 1337 @retval EFI_NOT_FOUND Device does not support this data class 1338 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 1339 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 1337 @retval EFI_NOT_FOUND Device does not support this data class 1338 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 1339 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 1340 1340 1341 1341 **/ … … 1368 1368 1369 1369 /** 1370 This function is used by the IDE bus driver to get sense data. 1370 This function is used by the IDE bus driver to get sense data. 1371 1371 Data format of Sense data is defined by the Interface GUID. 1372 1372 1373 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1374 @param SenseData Pointer to the SenseData. 1375 @param SenseDataSize Size of SenseData in bytes. 1373 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1374 @param SenseData Pointer to the SenseData. 1375 @param SenseDataSize Size of SenseData in bytes. 1376 1376 @param SenseDataNumber Pointer to the value for the identify data size. 1377 1377 1378 1378 @retval EFI_SUCCESS The command was accepted without any errors. 1379 @retval EFI_NOT_FOUND Device does not support this data class 1380 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1381 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 1379 @retval EFI_NOT_FOUND Device does not support this data class 1380 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1381 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 1382 1382 1383 1383 **/ … … 1397 1397 This function is used by the IDE bus driver to get controller information. 1398 1398 1399 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1399 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1400 1400 @param IdeChannel Pointer to the Ide Channel number. Primary or secondary. 1401 1401 @param IdeDevice Pointer to the Ide Device number. Master or slave. 1402 1402 1403 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 1404 @retval EFI_UNSUPPORTED This is not an IDE device 1403 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 1404 @retval EFI_UNSUPPORTED This is not an IDE device 1405 1405 1406 1406 **/ -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/IdeBus.h
r48674 r48947 208 208 // 209 209 /** 210 Allows the user to set controller specific options for a controller that a 210 Allows the user to set controller specific options for a controller that a 211 211 driver is currently managing. 212 212 … … 219 219 It will not be NULL for a bus driver that wishes to set 220 220 options for one of its child controllers. 221 @param Language A pointer to a three character ISO 639-2 language identifier. 222 This is the language of the user interface that should be presented 223 to the user, and it must match one of the languages specified in 221 @param Language A pointer to a three character ISO 639-2 language identifier. 222 This is the language of the user interface that should be presented 223 to the user, and it must match one of the languages specified in 224 224 SupportedLanguages. The number of languages supported by a driver is up to 225 225 the driver writer. 226 @param ActionRequired A pointer to the action that the calling agent is required 226 @param ActionRequired A pointer to the action that the calling agent is required 227 227 to perform when this function returns. 228 229 230 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 228 229 230 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 231 231 options for the controller specified by ControllerHandle.. 232 232 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 233 233 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 234 234 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 235 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 235 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 236 236 the controller specified by ControllerHandle and ChildHandle. 237 237 @retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language. 238 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 238 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 239 239 controller specified by ControllerHandle and ChildHandle. 240 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 240 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 241 241 controller specified by ControllerHandle and ChildHandle 242 242 **/ … … 255 255 256 256 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance. 257 @param ControllerHandle The handle of the controller to test if it's current configuration options 257 @param ControllerHandle The handle of the controller to test if it's current configuration options 258 258 are valid. 259 @param ChildHandle The handle of the child controller to test if it's current configuration 260 options are valid. This is an optional parameter that may be NULL. It will 259 @param ChildHandle The handle of the child controller to test if it's current configuration 260 options are valid. This is an optional parameter that may be NULL. It will 261 261 be NULL for device drivers. It will also be NULL for a bus drivers that 262 wish to test the configuration options for the bus controller. It will 263 not be NULL for a bus driver that wishes to test configuration options for 262 wish to test the configuration options for the bus controller. It will 263 not be NULL for a bus driver that wishes to test configuration options for 264 264 one of its child controllers. 265 265 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being … … 268 268 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 269 269 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 270 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 270 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 271 271 specified by ControllerHandle and ChildHandle. 272 272 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being … … 287 287 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance. 288 288 @param ControllerHandle The handle of the controller to force default configuration options on. 289 @param ChildHandle The handle of the child controller to force default configuration 290 options on This is an optional parameter that may be NULL. It 291 will be NULL for device drivers. It will also be NULL for a bus 289 @param ChildHandle The handle of the child controller to force default configuration 290 options on This is an optional parameter that may be NULL. It 291 will be NULL for device drivers. It will also be NULL for a bus 292 292 drivers that wish to force default configuration options for the bus 293 293 controller. It will not be NULL for a bus driver that wishes to force 294 294 default configuration options for one of its child controllers. 295 @param DefaultType The type of default configuration options to force on the controller 296 specified by ControllerHandle and ChildHandle. 297 @param ActionRequired A pointer to the action that the calling agent is required to perform 295 @param DefaultType The type of default configuration options to force on the controller 296 specified by ControllerHandle and ChildHandle. 297 @param ActionRequired A pointer to the action that the calling agent is required to perform 298 298 when this function returns. 299 299 300 @retval EFI_SUCCESS The driver specified by This successfully forced the 301 default configuration options on the controller specified by 300 @retval EFI_SUCCESS The driver specified by This successfully forced the 301 default configuration options on the controller specified by 302 302 ControllerHandle and ChildHandle. 303 303 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 304 304 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 305 305 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 306 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 306 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 307 307 configuration options on the controller specified by ControllerHandle 308 308 and ChildHandle. 309 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 309 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 310 310 specified by DefaultType. 311 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 311 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 312 312 options on the controller specified by ControllerHandle and ChildHandle. 313 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 313 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 314 314 options on the controller specified by ControllerHandle and ChildHandle. 315 315 **/ … … 335 335 This is an optional parameter that may be NULL. It will 336 336 be NULL for device drivers. It will also be NULL for a 337 bus drivers that wish to run diagnostics on the bus controller. 338 It will not be NULL for a bus driver that wishes to run 337 bus drivers that wish to run diagnostics on the bus controller. 338 It will not be NULL for a bus driver that wishes to run 339 339 diagnostics on one of its child controllers. 340 340 @param DiagnosticType Indicates type of diagnostics to perform on the controller 341 341 specified by ControllerHandle and ChildHandle. 342 @param Language A pointer to a three character ISO 639-2 language identifier. 343 This is the language in which the optional error message should 344 be returned in Buffer, and it must match one of the languages 342 @param Language A pointer to a three character ISO 639-2 language identifier. 343 This is the language in which the optional error message should 344 be returned in Buffer, and it must match one of the languages 345 345 specified in SupportedLanguages. The number of languages supported by 346 346 a driver is up to the driver writer. … … 348 348 @param BufferSize The size, in bytes, of the data returned in Buffer. 349 349 @param Buffer A buffer that contains a Null-terminated Unicode string 350 plus some additional data whose format is defined by ErrorType. 351 Buffer is allocated by this function with AllocatePool(), and 350 plus some additional data whose format is defined by ErrorType. 351 Buffer is allocated by this function with AllocatePool(), and 352 352 it is the caller's responsibility to free it with a call to FreePool(). 353 353 354 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 354 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 355 355 the diagnostic. 356 356 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. … … 360 360 @retval EFI_INVALID_PARAMETER BufferType is NULL. 361 361 @retval EFI_INVALID_PARAMETER Buffer is NULL. 362 @retval EFI_UNSUPPORTED The driver specified by This does not support running 363 diagnostics for the controller specified by ControllerHandle 362 @retval EFI_UNSUPPORTED The driver specified by This does not support running 363 diagnostics for the controller specified by ControllerHandle 364 364 and ChildHandle. 365 365 @retval EFI_UNSUPPORTED The driver specified by This does not support the 366 366 type of diagnostic specified by DiagnosticType. 367 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 367 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 368 368 specified by Language. 369 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 369 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 370 370 diagnostics. 371 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 371 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 372 372 status information in ErrorType, BufferSize,and Buffer. 373 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 373 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 374 374 did not pass the diagnostic. 375 375 **/ … … 454 454 Flushes all modified data to a physical block devices 455 455 456 @param This Indicates a pointer to the calling context which to specify a 456 @param This Indicates a pointer to the calling context which to specify a 457 457 specific block device 458 458 … … 465 465 ); 466 466 /** 467 This function is used by the IDE bus driver to get inquiry data. 467 This function is used by the IDE bus driver to get inquiry data. 468 468 Data format of Identify data is defined by the Interface GUID. 469 469 … … 473 473 474 474 @retval EFI_SUCCESS The command was accepted without any errors. 475 @retval EFI_NOT_FOUND Device does not support this data class 476 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 477 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough 475 @retval EFI_NOT_FOUND Device does not support this data class 476 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 477 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough 478 478 479 479 **/ … … 487 487 488 488 /** 489 This function is used by the IDE bus driver to get identify data. 489 This function is used by the IDE bus driver to get identify data. 490 490 Data format of Identify data is defined by the Interface GUID. 491 491 … … 495 495 496 496 @retval EFI_SUCCESS The command was accepted without any errors. 497 @retval EFI_NOT_FOUND Device does not support this data class 498 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 499 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 497 @retval EFI_NOT_FOUND Device does not support this data class 498 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 499 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 500 500 501 501 **/ … … 509 509 510 510 /** 511 This function is used by the IDE bus driver to get sense data. 511 This function is used by the IDE bus driver to get sense data. 512 512 Data format of Sense data is defined by the Interface GUID. 513 513 514 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 515 @param SenseData Pointer to the SenseData. 516 @param SenseDataSize Size of SenseData in bytes. 514 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 515 @param SenseData Pointer to the SenseData. 516 @param SenseDataSize Size of SenseData in bytes. 517 517 @param SenseDataNumber Pointer to the value for the identify data size. 518 518 519 519 @retval EFI_SUCCESS The command was accepted without any errors. 520 @retval EFI_NOT_FOUND Device does not support this data class 521 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 522 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 520 @retval EFI_NOT_FOUND Device does not support this data class 521 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 522 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 523 523 524 524 **/ … … 535 535 This function is used by the IDE bus driver to get controller information. 536 536 537 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 537 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 538 538 @param IdeChannel Pointer to the Ide Channel number. Primary or secondary. 539 539 @param IdeDevice Pointer to the Ide Device number. Master or slave. 540 540 541 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 542 @retval EFI_UNSUPPORTED This is not an IDE device 541 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 542 @retval EFI_UNSUPPORTED This is not an IDE device 543 543 544 544 **/ … … 551 551 ); 552 552 /** 553 The is an event(generally the event is exitBootService event) call back function. 553 The is an event(generally the event is exitBootService event) call back function. 554 554 Clear pending IDE interrupt before OS loader/kernel take control of the IDE device. 555 555 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeBusDxe/IdeData.h
r48674 r48947 29 29 30 30 Copyright (c) 2006 - 2007 Intel Corporation. <BR> 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 38 38 39 39 **/ … … 169 169 // 1 second 170 170 // 171 #define ATATIMEOUT 1000 171 #define ATATIMEOUT 1000 172 172 173 173 // … … 179 179 // 1 second 180 180 // 181 #define ATAPITIMEOUT 1000 181 #define ATAPITIMEOUT 1000 182 182 183 183 // … … 189 189 // 2 seconds 190 190 // 191 #define CDROMLONGTIMEOUT 2000 191 #define CDROMLONGTIMEOUT 2000 192 192 193 193 // 194 194 // 5 seconds 195 195 // 196 #define ATAPILONGTIMEOUT 5000 196 #define ATAPILONGTIMEOUT 5000 197 197 198 198 // -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeControllerDxe/ComponentName.c
r48674 r48947 30 30 31 31 Copyright (c) 2008 Intel Corporation. <BR> 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 32 All rights reserved. This program and the accompanying materials 33 are licensed and made available under the terms and conditions of the BSD License 34 which accompanies this distribution. The full text of the license may be found at 35 http://opensource.org/licenses/bsd-license.php 36 37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 38 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 39 39 40 40 **/ … … 103 103 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 104 104 Language - A pointer to a three character ISO 639-2 language identifier. 105 This is the language of the driver name that that the caller 105 This is the language of the driver name that that the caller 106 106 is requesting, and it must match one of the languages specified 107 in SupportedLanguages. The number of languages supported by a 107 in SupportedLanguages. The number of languages supported by a 108 108 driver is up to the driver writer. 109 109 DriverName - A pointer to the Unicode string to return. This Unicode string 110 is the name of the driver specified by This in the language 110 is the name of the driver specified by This in the language 111 111 specified by Language. 112 112 113 113 Returns: 114 114 EFI_SUCCESS - The Unicode string for the Driver specified by This 115 and the language specified by Language was returned 115 and the language specified by Language was returned 116 116 in DriverName. 117 117 EFI_INVALID_PARAMETER - Language is NULL. 118 118 EFI_INVALID_PARAMETER - DriverName is NULL. 119 EFI_UNSUPPORTED - The driver specified by This does not support the 119 EFI_UNSUPPORTED - The driver specified by This does not support the 120 120 language specified by Language. 121 121 … … 148 148 Arguments: 149 149 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 150 ControllerHandle - The handle of a controller that the driver specified by 151 This is managing. This handle specifies the controller 150 ControllerHandle - The handle of a controller that the driver specified by 151 This is managing. This handle specifies the controller 152 152 whose name is to be returned. 153 ChildHandle - The handle of the child controller to retrieve the name 154 of. This is an optional parameter that may be NULL. It 155 will be NULL for device drivers. It will also be NULL 156 for a bus drivers that wish to retrieve the name of the 157 bus controller. It will not be NULL for a bus driver 153 ChildHandle - The handle of the child controller to retrieve the name 154 of. This is an optional parameter that may be NULL. It 155 will be NULL for device drivers. It will also be NULL 156 for a bus drivers that wish to retrieve the name of the 157 bus controller. It will not be NULL for a bus driver 158 158 that wishes to retrieve the name of a child controller. 159 Language - A pointer to a three character ISO 639-2 language 160 identifier. This is the language of the controller name 159 Language - A pointer to a three character ISO 639-2 language 160 identifier. This is the language of the controller name 161 161 that that the caller is requesting, and it must match one 162 of the languages specified in SupportedLanguages. The 163 number of languages supported by a driver is up to the 162 of the languages specified in SupportedLanguages. The 163 number of languages supported by a driver is up to the 164 164 driver writer. 165 165 ControllerName - A pointer to the Unicode string to return. This Unicode 166 string is the name of the controller specified by 167 ControllerHandle and ChildHandle in the language 168 specified by Language from the point of view of the 169 driver specified by This. 166 string is the name of the controller specified by 167 ControllerHandle and ChildHandle in the language 168 specified by Language from the point of view of the 169 driver specified by This. 170 170 171 171 Returns: 172 EFI_SUCCESS - The Unicode string for the user readable name in the 173 language specified by Language for the driver 172 EFI_SUCCESS - The Unicode string for the user readable name in the 173 language specified by Language for the driver 174 174 specified by This was returned in DriverName. 175 175 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. 176 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid 176 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid 177 177 EFI_HANDLE. 178 178 EFI_INVALID_PARAMETER - Language is NULL. 179 179 EFI_INVALID_PARAMETER - ControllerName is NULL. 180 EFI_UNSUPPORTED - The driver specified by This is not currently 181 managing the controller specified by 180 EFI_UNSUPPORTED - The driver specified by This is not currently 181 managing the controller specified by 182 182 ControllerHandle and ChildHandle. 183 EFI_UNSUPPORTED - The driver specified by This does not support the 183 EFI_UNSUPPORTED - The driver specified by This does not support the 184 184 language specified by Language. 185 185 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeControllerDxe/IdeController.c
r48674 r48947 26 26 27 27 /** @file 28 This driver module produces IDE_CONTROLLER_INIT protocol and will be used by 28 This driver module produces IDE_CONTROLLER_INIT protocol and will be used by 29 29 IDE Bus driver to support platform dependent timing information. This driver 30 30 is responsible for early initialization of IDE controller. 31 31 32 32 Copyright (c) 2008 - 2009 Intel Corporation. <BR> 33 All rights reserved. This program and the accompanying materials 34 are licensed and made available under the terms and conditions of the BSD License 35 which accompanies this distribution. The full text of the license may be found at 36 http://opensource.org/licenses/bsd-license.php 37 38 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 33 All rights reserved. This program and the accompanying materials 34 are licensed and made available under the terms and conditions of the BSD License 35 which accompanies this distribution. The full text of the license may be found at 36 http://opensource.org/licenses/bsd-license.php 37 38 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 40 40 41 41 **/ … … 73 73 // 74 74 EFI_ATA_COLLECTIVE_MODE gEfiAtaCollectiveModeTemplate = { 75 { 75 { 76 76 TRUE, // PioMode.Valid 77 77 0 // PioMode.Mode … … 101 101 /*++ 102 102 Routine Description: 103 104 Chipset Ide Driver EntryPoint function. It follows the standard EFI driver 103 104 Chipset Ide Driver EntryPoint function. It follows the standard EFI driver 105 105 model. It's called by StartImage() of DXE Core 106 106 107 107 Arguments: 108 109 ImageHandle -- While the driver image loaded be the ImageLoader(), 110 an image handle is assigned to this driver binary, 108 109 ImageHandle -- While the driver image loaded be the ImageLoader(), 110 an image handle is assigned to this driver binary, 111 111 all activities of the driver is tied to this ImageHandle 112 112 *SystemTable -- A pointer to the system table, for all BS(Boo Services) and … … 114 114 115 115 Returns: 116 116 117 117 Always call EfiLibInstallDriverBindingProtocol( ) and return the result 118 118 … … 147 147 148 148 Routine Description: 149 149 150 150 Register Driver Binding protocol for this driver. 151 151 152 152 Arguments: 153 153 154 154 This -- a pointer points to the Binding Protocol instance 155 Controller -- The handle of controller to be tested. 155 Controller -- The handle of controller to be tested. 156 156 *RemainingDevicePath -- A pointer to the device path. Ignored by device 157 157 driver but used by bus driver … … 239 239 240 240 Routine Description: 241 242 This routine is called right after the .Supported() called and return 241 242 This routine is called right after the .Supported() called and return 243 243 EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols 244 244 are closed. 245 245 246 246 Arguments: 247 247 248 248 This -- a pointer points to the Binding Protocol instance 249 249 Controller -- The handle of controller to be tested. Parameter … … 280 280 281 281 // 282 // Install IDE_CONTROLLER_INIT protocol 282 // Install IDE_CONTROLLER_INIT protocol 283 283 // 284 284 return gBS->InstallMultipleProtocolInterfaces ( … … 298 298 ) 299 299 /*++ 300 300 301 301 Routine Description: 302 Stop this driver on Controller Handle. 302 Stop this driver on Controller Handle. 303 303 304 304 Arguments: 305 305 This - Protocol instance pointer. 306 Controller - Handle of device to stop driver on 306 Controller - Handle of device to stop driver on 307 307 NumberOfChildren - Not used 308 308 ChildHandleBuffer - Not used … … 311 311 EFI_SUCCESS - This driver is removed DeviceHandle 312 312 other - This driver was not removed from this device 313 313 314 314 --*/ 315 315 { … … 376 376 Routine Description: 377 377 378 This function can be used to obtain information about a specified channel. 378 This function can be used to obtain information about a specified channel. 379 379 It's usually used by IDE Bus driver during enumeration process. 380 380 … … 383 383 This -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. 384 384 Channel -- Channel number (0 based, either 0 or 1) 385 Enabled -- TRUE if the channel is enabled. If the channel is disabled, 385 Enabled -- TRUE if the channel is enabled. If the channel is disabled, 386 386 then it will no be enumerated. 387 387 MaxDevices -- The Max number of IDE devices that the bus driver can expect … … 389 389 390 390 Returns: 391 EFI_STATUS 391 EFI_STATUS 392 392 393 393 --*/ … … 418 418 Routine Description: 419 419 420 This function is called by IdeBus driver before executing certain actions. 420 This function is called by IdeBus driver before executing certain actions. 421 421 This allows IDE Controller Init to prepare for each action. 422 422 … … 428 428 429 429 Returns: 430 430 431 431 --*/ 432 432 { … … 457 457 458 458 Returns: 459 459 460 460 --*/ 461 461 { … … 486 486 487 487 Returns: 488 488 489 489 --*/ 490 490 { … … 515 515 516 516 Returns: 517 517 518 518 --*/ 519 519 { … … 560 560 561 561 Returns: 562 562 563 563 --*/ 564 564 { -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxIdeControllerDxe/IdeController.h
r48674 r48947 29 29 30 30 Copyright (c) 2008 Intel Corporation. <BR> 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 31 All rights reserved. This program and the accompanying materials 32 are licensed and made available under the terms and conditions of the BSD License 33 which accompanies this distribution. The full text of the license may be found at 34 http://opensource.org/licenses/bsd-license.php 35 36 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 38 38 39 39 **/ … … 86 86 87 87 Routine Description: 88 88 89 89 Register Driver Binding protocol for this driver. 90 90 91 91 Arguments: 92 92 93 93 This -- a pointer points to the Binding Protocol instance 94 Controller -- The handle of controller to be tested. 94 Controller -- The handle of controller to be tested. 95 95 *RemainingDevicePath -- A pointer to the device path. Ignored by device 96 96 driver but used by bus driver … … 113 113 114 114 Routine Description: 115 116 This routine is called right after the .Supported() called and return 115 116 This routine is called right after the .Supported() called and return 117 117 EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols 118 118 are closed. 119 119 120 120 Arguments: 121 121 122 122 This -- a pointer points to the Binding Protocol instance 123 123 Controller -- The handle of controller to be tested. Parameter … … 137 137 ) 138 138 /*++ 139 139 140 140 Routine Description: 141 Stop this driver on Controller Handle. 141 Stop this driver on Controller Handle. 142 142 143 143 Arguments: 144 144 This - Protocol instance pointer. 145 Controller - Handle of device to stop driver on 145 Controller - Handle of device to stop driver on 146 146 NumberOfChildren - Not used 147 147 ChildHandleBuffer - Not used … … 150 150 EFI_SUCCESS - This driver is removed DeviceHandle 151 151 other - This driver was not removed from this device 152 152 153 153 --*/ 154 154 ; … … 367 367 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 368 368 Language - A pointer to a three character ISO 639-2 language identifier. 369 This is the language of the driver name that that the caller 369 This is the language of the driver name that that the caller 370 370 is requesting, and it must match one of the languages specified 371 in SupportedLanguages. The number of languages supported by a 371 in SupportedLanguages. The number of languages supported by a 372 372 driver is up to the driver writer. 373 373 DriverName - A pointer to the Unicode string to return. This Unicode string 374 is the name of the driver specified by This in the language 374 is the name of the driver specified by This in the language 375 375 specified by Language. 376 376 377 377 Returns: 378 378 EFI_SUCCESS - The Unicode string for the Driver specified by This 379 and the language specified by Language was returned 379 and the language specified by Language was returned 380 380 in DriverName. 381 381 EFI_INVALID_PARAMETER - Language is NULL. 382 382 EFI_INVALID_PARAMETER - DriverName is NULL. 383 EFI_UNSUPPORTED - The driver specified by This does not support the 383 EFI_UNSUPPORTED - The driver specified by This does not support the 384 384 language specified by Language. 385 385 … … 404 404 Arguments: 405 405 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 406 ControllerHandle - The handle of a controller that the driver specified by 407 This is managing. This handle specifies the controller 406 ControllerHandle - The handle of a controller that the driver specified by 407 This is managing. This handle specifies the controller 408 408 whose name is to be returned. 409 ChildHandle - The handle of the child controller to retrieve the name 410 of. This is an optional parameter that may be NULL. It 411 will be NULL for device drivers. It will also be NULL 412 for a bus drivers that wish to retrieve the name of the 413 bus controller. It will not be NULL for a bus driver 409 ChildHandle - The handle of the child controller to retrieve the name 410 of. This is an optional parameter that may be NULL. It 411 will be NULL for device drivers. It will also be NULL 412 for a bus drivers that wish to retrieve the name of the 413 bus controller. It will not be NULL for a bus driver 414 414 that wishes to retrieve the name of a child controller. 415 Language - A pointer to a three character ISO 639-2 language 416 identifier. This is the language of the controller name 415 Language - A pointer to a three character ISO 639-2 language 416 identifier. This is the language of the controller name 417 417 that that the caller is requesting, and it must match one 418 of the languages specified in SupportedLanguages. The 419 number of languages supported by a driver is up to the 418 of the languages specified in SupportedLanguages. The 419 number of languages supported by a driver is up to the 420 420 driver writer. 421 421 ControllerName - A pointer to the Unicode string to return. This Unicode 422 string is the name of the controller specified by 423 ControllerHandle and ChildHandle in the language 424 specified by Language from the point of view of the 425 driver specified by This. 422 string is the name of the controller specified by 423 ControllerHandle and ChildHandle in the language 424 specified by Language from the point of view of the 425 driver specified by This. 426 426 427 427 Returns: 428 EFI_SUCCESS - The Unicode string for the user readable name in the 429 language specified by Language for the driver 428 EFI_SUCCESS - The Unicode string for the user readable name in the 429 language specified by Language for the driver 430 430 specified by This was returned in DriverName. 431 431 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. 432 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid 432 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid 433 433 EFI_HANDLE. 434 434 EFI_INVALID_PARAMETER - Language is NULL. 435 435 EFI_INVALID_PARAMETER - ControllerName is NULL. 436 EFI_UNSUPPORTED - The driver specified by This is not currently 437 managing the controller specified by 436 EFI_UNSUPPORTED - The driver specified by This is not currently 437 managing the controller specified by 438 438 ControllerHandle and ChildHandle. 439 EFI_UNSUPPORTED - The driver specified by This does not support the 439 EFI_UNSUPPORTED - The driver specified by This does not support the 440 440 language specified by Language. 441 441 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable/EmuVariable.c
r48674 r48947 80 80 @param[in] DataSize Size of data. 0 means delete 81 81 82 @param[in] Attributes 82 @param[in] Attributes Attribues of the variable 83 83 84 84 @param[in] Variable The variable information which is used to keep track of variable usage. -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable/InitVariable.c
r48730 r48947 248 248 } 249 249 250 /* 250 /* 251 251 * Tell DevEFI which the current variable is, then ask for the next one. 252 252 */ … … 267 267 if (u32Rc == EFI_VARIABLE_OP_STATUS_OK) 268 268 { 269 /* 269 /* 270 270 * Output buffer check. 271 271 */ … … 277 277 UINT32 i; 278 278 279 /* 279 /* 280 280 * Read back the result. 281 281 */ -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c
r48674 r48947 401 401 EdidOverrideDataBlock = AllocatePool (sizeof (EDID_BLOCK_SIZE * 2)); 402 402 if (NULL == EdidOverrideDataBlock) { 403 403 Status = EFI_OUT_OF_RESOURCES; 404 404 goto Done; 405 405 } … … 429 429 if (ReadEdidData (Private, &EdidDiscoveredDataBlock, &EdidDiscoveredDataSize) == EFI_SUCCESS) { 430 430 Private->EdidDiscovered.SizeOfEdid = (UINT32) EdidDiscoveredDataSize; 431 431 Private->EdidDiscovered.Edid = (UINT8 *) AllocateCopyPool ( 432 432 EdidDiscoveredDataSize, 433 433 EdidDiscoveredDataBlock 434 434 ); 435 435 436 436 if (NULL == Private->EdidDiscovered.Edid) { 437 437 Status = EFI_OUT_OF_RESOURCES; 438 438 goto Done; 439 439 } … … 450 450 EdidActiveDataBlock = EdidOverrideDataBlock; 451 451 EdidFound = TRUE; 452 453 454 452 } 453 454 if (EdidFound == TRUE) { 455 455 // 456 456 // Parse EDID data structure to retrieve modes supported by monitor … … 466 466 ); 467 467 if (NULL == Private->EdidActive.Edid) { 468 468 Status = EFI_OUT_OF_RESOURCES; 469 469 goto Done; 470 470 } -
trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
r43152 r48947 179 179 uint16_t sig, vmode, attrs; 180 180 uint16_t cur_info_ofs; /* Current offset in mode list. */ 181 181 182 182 /* Read and check the VBE Extra Data signature. */ 183 183 sig = in_word(VBE_EXTRA_PORT, 0); … … 188 188 return 0; 189 189 } 190 190 191 191 cur_info_ofs = sizeof(VBEHeader); 192 192 193 193 vmode = in_word(VBE_EXTRA_PORT, cur_info_ofs + offsetof(ModeInfoListItem, mode)/*&cur_info->mode*/); 194 194 while (vmode != VBE_VESA_MODE_END_OF_LIST) 195 195 { 196 196 attrs = in_word(VBE_EXTRA_PORT, /*&cur_info->info.ModeAttributes*/cur_info_ofs + offsetof(ModeInfoListItem, info.ModeAttributes) ); 197 197 198 198 if (vmode == mode) 199 199 { … … 217 217 { 218 218 ModeInfoListItem *cur_info = &mode_info_list; 219 219 220 220 while (cur_info->mode != VBE_VESA_MODE_END_OF_LIST) 221 221 { … … 650 650 * 651 651 */ 652 void vbe_biosfn_save_restore_state(uint16_t STACK_BASED *AX, uint16_t CX, uint16_t DX, 652 void vbe_biosfn_save_restore_state(uint16_t STACK_BASED *AX, uint16_t CX, uint16_t DX, 653 653 uint16_t ES, uint16_t STACK_BASED *BX) 654 654 { -
trunk/src/VBox/Devices/Input/PS2K.cpp
r47321 r48947 433 433 }; 434 434 435 /* 435 /* 436 436 * Note 1: The behavior of these keys depends on the state of modifier keys 437 437 * at the time the key was pressed. -
trunk/src/VBox/Devices/Input/PS2M.cpp
r48358 r48947 461 461 if (pThis->enmProtocol == PS2M_PROTO_PS2STD) 462 462 { 463 switch (pThis->enmKnockState) 463 switch (pThis->enmKnockState) 464 464 { 465 465 case PS2M_KNOCK_INITIAL: … … 482 482 pThis->enmKnockState = PS2M_KNOCK_INITIAL; 483 483 } 484 } 485 else if (pThis->enmProtocol == PS2M_PROTO_IMPS2) 486 { 487 switch (pThis->enmKnockState) 484 } 485 else if (pThis->enmProtocol == PS2M_PROTO_IMPS2) 486 { 487 switch (pThis->enmKnockState) 488 488 { 489 489 case PS2M_KNOCK_INITIAL: … … 638 638 break; 639 639 case ACMD_SET_SAMP_RATE: 640 //@todo reject unsupported rates 640 //@todo reject unsupported rates 641 641 ps2mSetRate(pThis, cmd); 642 642 ps2mRateProtocolKnock(pThis, cmd); -
trunk/src/VBox/Devices/Input/UsbKbd.cpp
r47675 r48947 747 747 rc = true; 748 748 } 749 /* Avoid "hanging" keys: If a key is unreported but no longer 749 /* Avoid "hanging" keys: If a key is unreported but no longer 750 750 * depressed, we'll need to report the key-up state, too. 751 751 */ 752 752 if (pabUnreportedKeys[iKey] && !pabDepressedKeys[iKey]) 753 753 rc = true; 754 754 755 755 pabUnreportedKeys[iKey] = 0; 756 756 } … … 974 974 975 975 for (iModKey = USBHID_MODIFIER_FIRST; iModKey <= USBHID_MODIFIER_LAST; ++iModKey) 976 if (pThis->abDepressedKeys[iModKey]) 976 if (pThis->abDepressedKeys[iModKey]) 977 977 pThis->abUnreportedKeys[iModKey] = 1; 978 978 } -
trunk/src/VBox/Devices/Input/UsbMouse.cpp
r47885 r48947 203 203 bool fHaveDoneQueueWaiter; 204 204 /** If device has pending changes. */ 205 bool fHasPendingChanges; 205 bool fHasPendingChanges; 206 206 /** Is this a relative, absolute or multi-touch pointing device? */ 207 207 USBHIDMODE enmMode; … … 655 655 656 656 /* Report ID */ 0x85, REPORTID_TOUCH_MAX_COUNT, 657 /* Usage (Contact count maximum) */ 0x09, 0x55, 658 /* Usage (Device identifier) */ 0x09, 0x53, 659 /* Report Size (8) */ 0x75, 0x08, 660 /* Report Count (2) */ 0x95, 0x02, 657 /* Usage (Contact count maximum) */ 0x09, 0x55, 658 /* Usage (Device identifier) */ 0x09, 0x53, 659 /* Report Size (8) */ 0x75, 0x08, 660 /* Report Count (2) */ 0x95, 0x02, 661 661 /* Logical Maximum (255) */ 0x26, 0xFF, 0x00, 662 /* Feature (Var) */ 0xB1, 0x02, 662 /* Feature (Var) */ 0xB1, 0x02, 663 663 664 664 /* Usage Page (Vendor-Defined 1) */ 0x06, 0x00, 0xFF, … … 708 708 /* End Collection */ 0xC0, 709 709 710 /* Usage Page (Digitizer) */ 0x05, 0x0D, 711 /* Usage (Device configuration) */ 0x09, 0x0E, 712 /* Collection (Application) */ 0xA1, 0x01, 713 /* Report ID */ 0x85, REPORTID_TOUCH_DEVCONFIG, 714 /* Usage (Device settings) */ 0x09, 0x23, 715 /* Collection (Logical) */ 0xA1, 0x02, 716 /* Usage (Device mode) */ 0x09, 0x52, 717 /* Usage (Device identifier) */ 0x09, 0x53, 718 /* Logical Minimum (0) */ 0x15, 0x00, 719 /* Logical Maximum (10) */ 0x25, 0x0A, 720 /* Report Size (8) */ 0x75, 0x08, 721 /* Report Count (2) */ 0x95, 0x02, 722 /* Feature (Var) */ 0xB1, 0x02, 723 /* End Collection */ 0xC0, 710 /* Usage Page (Digitizer) */ 0x05, 0x0D, 711 /* Usage (Device configuration) */ 0x09, 0x0E, 712 /* Collection (Application) */ 0xA1, 0x01, 713 /* Report ID */ 0x85, REPORTID_TOUCH_DEVCONFIG, 714 /* Usage (Device settings) */ 0x09, 0x23, 715 /* Collection (Logical) */ 0xA1, 0x02, 716 /* Usage (Device mode) */ 0x09, 0x52, 717 /* Usage (Device identifier) */ 0x09, 0x53, 718 /* Logical Minimum (0) */ 0x15, 0x00, 719 /* Logical Maximum (10) */ 0x25, 0x0A, 720 /* Report Size (8) */ 0x75, 0x08, 721 /* Report Count (2) */ 0x95, 0x02, 722 /* Feature (Var) */ 0xB1, 0x02, 723 /* End Collection */ 0xC0, 724 724 /* End Collection */ 0xC0 725 725 }; … … 1223 1223 pReport->m.dy = clamp_i8(pAccumulated->u.Relative.dy); 1224 1224 pReport->m.dz = clamp_i8(pAccumulated->u.Relative.dz); 1225 1225 1226 1226 cbCopy = sizeof(pReport->m); 1227 1227 LogRel3(("Rel event, dx=%d, dy=%d, dz=%d, fButtons=%02x, report size %d\n", … … 1781 1781 #define SET_PROTOCOL 0x0B 1782 1782 1783 static uint8_t sau8QASampleBlob[256] = 1783 static uint8_t sau8QASampleBlob[256] = 1784 1784 { 1785 1785 0xfc, 0x28, 0xfe, 0x84, 0x40, 0xcb, 0x9a, 0x87, -
trunk/src/VBox/Devices/Network/DevINIP.cpp
r47933 r48947 116 116 bool fLnkUp; 117 117 #ifndef VBOX_WITH_NEW_LWIP 118 /** 119 * This hack-flag for spliting initialization logic in devINIPTcpipInitDone, 118 /** 119 * This hack-flag for spliting initialization logic in devINIPTcpipInitDone, 120 120 * this is the only place when during initialization we can be called from TCPIP 121 * thread. 121 * thread. 122 122 * This callback used for Initialization and Finalization with old lwip. 123 123 */ … … 127 127 * In callback we're getting status of interface adding operation (TCPIP thread), 128 128 * but we need inform constructing routine whether it was success or not(EMT thread). 129 */ 129 */ 130 130 int rcInitialization; 131 131 } DEVINTNETIP, *PDEVINTNETIP; … … 342 342 #else 343 343 netif->output = devINIPOutput; 344 344 345 345 lwip_etharp_init(); 346 346 TMTimerSetMillies(g_pDevINIPData->ARPTimer, ARP_TMR_INTERVAL); … … 363 363 PDMDEV_SET_ERROR(pDevIns, rc, 364 364 N_("Configuration error: Failed to get the \"IP\" value")); 365 /* @todo: perhaps we should panic if IPv4 address isn't specify, with assumtion that 366 * ISCSI target specified in IPv6 form. 365 /* @todo: perhaps we should panic if IPv4 address isn't specify, with assumtion that 366 * ISCSI target specified in IPv6 form. 367 367 */ 368 368 return rc; … … 490 490 /** 491 491 * Signals the end of lwIP TCPIP initialization. 492 * 492 * 493 493 * @note: TCPIP thread, corresponding EMT waiting on semaphore. 494 494 * @param arg opaque argument, here the pointer to the PDEVINTNETIP. … … 512 512 { 513 513 pThis->rcInitialization = VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES; 514 PDMDEV_SET_ERROR(pThis->pDevIns, 514 PDMDEV_SET_ERROR(pThis->pDevIns, 515 515 pThis->rcInitialization, 516 516 N_("Configuration error: Invalid \"IP\" value")); … … 518 518 } 519 519 memcpy(&ipaddr, &ip, sizeof(ipaddr)); 520 520 521 521 if (!inet_aton(pThis->pszNetmask, &ip)) 522 522 { 523 523 pThis->rcInitialization = VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES; 524 PDMDEV_SET_ERROR(pThis->pDevIns, 524 PDMDEV_SET_ERROR(pThis->pDevIns, 525 525 pThis->rcInitialization, 526 526 N_("Configuration error: Invalid \"Netmask\" value")); … … 534 534 { 535 535 pThis->rcInitialization = VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES; 536 PDMDEV_SET_ERROR(pThis->pDevIns, 536 PDMDEV_SET_ERROR(pThis->pDevIns, 537 537 pThis->rcInitialization, 538 538 N_("Configuration error: Invalid \"Gateway\" value")); … … 549 549 pThis->IntNetIF.name[0] = 'I'; 550 550 pThis->IntNetIF.name[1] = 'N'; 551 551 552 552 ret = netif_add(&pThis->IntNetIF, &ipaddr, &netmask, &gw, NULL, 553 553 devINIPInterface, lwip_tcpip_input); … … 555 555 if (!ret) 556 556 { 557 557 558 558 pThis->rcInitialization = VERR_NET_NO_NETWORK; 559 PDMDEV_SET_ERROR(pThis->pDevIns, 559 PDMDEV_SET_ERROR(pThis->pDevIns, 560 560 pThis->rcInitialization, 561 561 N_("netif_add failed")); … … 565 565 lwip_netif_set_default(&pThis->IntNetIF); 566 566 lwip_netif_set_up(&pThis->IntNetIF); 567 567 568 568 #ifndef VBOX_WITH_NEW_LWIP 569 569 } … … 581 581 * XXX: We do it only for new LWIP, old LWIP will stay broken for now. 582 582 */ 583 static DECLCALLBACK(void) devINIPTcpipFiniDone(void *arg) 583 static DECLCALLBACK(void) devINIPTcpipFiniDone(void *arg) 584 584 { 585 585 PDEVINTNETIP pThis = (PDEVINTNETIP)arg; -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r47499 r48947 1089 1089 Frame.Hdr.DstMac.au16[2] = 0xffff; 1090 1090 Frame.Hdr.EtherType = RT_H2BE_U16_C(0x801e); 1091 int rc = pThis->pIAboveConfigR3->pfnGetMac(pThis->pIAboveConfigR3, 1091 int rc = pThis->pIAboveConfigR3->pfnGetMac(pThis->pIAboveConfigR3, 1092 1092 &Frame.Hdr.SrcMac); 1093 1093 if (RT_SUCCESS(rc)) 1094 1094 rc = drvR3IntNetResumeSend(pThis, &Frame, sizeof(Frame)); 1095 1095 if (RT_FAILURE(rc)) 1096 LogRel(("IntNet#%u: Sending dummy frame failed: %Rrc\n", 1096 LogRel(("IntNet#%u: Sending dummy frame failed: %Rrc\n", 1097 1097 pDrvIns->iInstance, rc)); 1098 1098 } -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r48526 r48947 1050 1050 */ 1051 1051 #ifndef RT_OS_DARWIN 1052 pThis->pIAboveConfig->pfnSetLinkState(pThis->pIAboveConfig, 1052 pThis->pIAboveConfig->pfnSetLinkState(pThis->pIAboveConfig, 1053 1053 PDMNETWORKLINKSTATE_DOWN_RESUME); 1054 1054 #endif -
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r46921 r48947 1272 1272 break; 1273 1273 case kIntNetAddrType_IPv6: 1274 Log(("intnetR0IfAddrCacheAddIt: hIf=%#x MAC=%.6Rhxs IPv6 added #%d %RTnaipv6 %s\n", 1274 Log(("intnetR0IfAddrCacheAddIt: hIf=%#x MAC=%.6Rhxs IPv6 added #%d %RTnaipv6 %s\n", 1275 1275 pIf->hIf, &pIf->MacAddr, pCache->cEntries, pAddr->IPv6, pszMsg)); 1276 1276 break; … … 2858 2858 } 2859 2859 else if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPV6)) 2860 { 2860 { 2861 2861 /* 2862 * IPV6 ICMP Neighbor Discovery : replace 2862 * IPV6 ICMP Neighbor Discovery : replace 2863 2863 * 1) the advertised source mac address in outgoing neighbor sollicitations 2864 2864 * with the HW MAC address of the trunk interface, … … 2868 2868 * Note that this only applies to traffic going out on the trunk. Incoming 2869 2869 * NS/NA will never advertise any VM mac address, so we do not need to touch 2870 * them. Other VMs on this bridge as well as the host will see and use the VM's 2870 * them. Other VMs on this bridge as well as the host will see and use the VM's 2871 2871 * actual mac addresses. 2872 2872 * … … 2874 2874 2875 2875 PRTNETIPV6 pIPv6 = (PRTNETIPV6)(pEthHdr + 1); 2876 PRTNETNDP pNd = (PRTNETNDP)(pIPv6 + 1); 2877 PRTNETNDP_SLLA_OPT pLLAOpt = (PRTNETNDP_SLLA_OPT)(pNd + 1); 2876 PRTNETNDP pNd = (PRTNETNDP)(pIPv6 + 1); 2877 PRTNETNDP_SLLA_OPT pLLAOpt = (PRTNETNDP_SLLA_OPT)(pNd + 1); 2878 2878 2879 2879 /* make sure we have enough bytes to work with */ … … 2882 2882 pIPv6->ip6_hlim == 0xff && 2883 2883 /* protocol has to be icmpv6 */ 2884 pIPv6->ip6_nxt == RTNETIPV6_PROT_ICMPV6 && 2884 pIPv6->ip6_nxt == RTNETIPV6_PROT_ICMPV6 && 2885 2885 /* we either have a sollicitation with source link layer addr. opt, or */ 2886 2886 ((pNd->icmp6_type == RTNETIPV6_ICMP_NS_TYPE && … … 2900 2900 pNd->icmp6_cksum = computeIPv6FullChecksum(pIPv6); 2901 2901 } 2902 2902 2903 2903 } 2904 2904 } … … 2933 2933 * @param pNetwork The network the frame is being sent to. 2934 2934 * @param pSG Pointer to the gather list for the frame. 2935 * @param pEthHdr Pointer to the ethernet header. 2935 * @param pEthHdr Pointer to the ethernet header. 2936 2936 */ 2937 2937 static bool intnetR0NetworkDetectAndFixNdBroadcast(PINTNETNETWORK pNetwork, PINTNETSG pSG, PRTNETETHERHDR pEthHdr) … … 2943 2943 * using the temporary buffer if necessary. 2944 2944 */ 2945 if (RT_UNLIKELY(pSG->cbTotal < sizeof(RTNETETHERHDR) + sizeof(RTNETIPV6) + 2945 if (RT_UNLIKELY(pSG->cbTotal < sizeof(RTNETETHERHDR) + sizeof(RTNETIPV6) + 2946 2946 sizeof(RTNETNDP))) 2947 2947 return false; … … 2998 2998 * @param pNetwork The network the frame is being sent to. 2999 2999 * @param pSG Pointer to the gather list for the frame. 3000 * @param pEthHdr Pointer to the ethernet header. 3000 * @param pEthHdr Pointer to the ethernet header. 3001 3001 */ 3002 3002 static void intnetR0NetworkSnoopNAFromWire(PINTNETNETWORK pNetwork, PINTNETSG pSG, PRTNETETHERHDR pEthHdr) … … 3006 3006 * using the temporary buffer if necessary. 3007 3007 */ 3008 if (RT_UNLIKELY(pSG->cbTotal < sizeof(RTNETETHERHDR) + sizeof(RTNETIPV6) + 3008 if (RT_UNLIKELY(pSG->cbTotal < sizeof(RTNETETHERHDR) + sizeof(RTNETIPV6) + 3009 3009 sizeof(RTNETNDP))) 3010 3010 return; … … 3037 3037 && pIPv6->ip6_src.QWords.qw1 == 0) 3038 3038 { 3039 3040 intnetR0NetworkAddrCacheDelete(pNetwork, (PCRTNETADDRU) &pNd->target_address, 3039 3040 intnetR0NetworkAddrCacheDelete(pNetwork, (PCRTNETADDRU) &pNd->target_address, 3041 3041 kIntNetAddrType_IPv6, sizeof(RTNETADDRIPV6), "tif/ip6"); 3042 3042 } … … 5263 5263 case kIntNetTrunkType_WhateverNone: 5264 5264 #ifdef VBOX_WITH_NAT_SERVICE 5265 /* 5265 /* 5266 5266 * Well, here we don't want load anything special, 5267 * just communicate between processes via internal network. 5267 * just communicate between processes via internal network. 5268 5268 */ 5269 5269 case kIntNetTrunkType_SrvNat: … … 5288 5288 #endif /* VBOXNETADP_DO_NOT_USE_NETFLT */ 5289 5289 break; 5290 #ifndef VBOX_WITH_NAT_SERVICE 5290 #ifndef VBOX_WITH_NAT_SERVICE 5291 5291 case kIntNetTrunkType_SrvNat: 5292 5292 pszName = "VBoxSrvNat"; -
trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
r48526 r48947 120 120 /* be paranoid */ 121 121 AssertPtrReturnVoid(arg); 122 122 123 123 de = TAILQ_PREV(req->dns_server, dns_list_head, de_list); 124 124 125 125 if (de == NULL) 126 126 { … … 137 137 struct mbuf *m = NULL; 138 138 char *data; 139 139 140 140 m = slirpDnsMbufAlloc(pData); 141 141 if (m == NULL) … … 168 168 169 169 /* expiration will be bumped in dnsproxy_query */ 170 170 171 171 dnsproxy_query(pData, so, m, iphlen); 172 172 /* should we free so->so_m ? */ 173 173 return; 174 174 } 175 176 socket_clean_up: 175 176 socket_clean_up: 177 177 /* This socket (so) will be detached, so we need to remove timeout(&_arg) references 178 * before leave 178 * before leave 179 179 */ 180 180 so->so_timeout = NULL; … … 309 309 #else /* VBOX */ 310 310 AssertPtr(pData); 311 311 312 312 /* m->m_data points to IP header */ 313 313 #if 0 … … 340 340 341 341 342 req = so->so_timeout_arg; 342 req = so->so_timeout_arg; 343 343 344 344 if (!req) … … 347 347 Assert(!so->so_timeout_arg); 348 348 349 if ((req = RTMemAllocZ(sizeof(struct request) + byte)) == NULL) 349 if ((req = RTMemAllocZ(sizeof(struct request) + byte)) == NULL) 350 350 { 351 351 LogRel(("calloc failed\n")); … … 382 382 383 383 req->recursion = 0; 384 384 385 385 DPRINTF(("External query RD=%d\n", RD(buf))); 386 386 387 387 if (retransmit == 0) 388 388 hash_add_request(pData, req); … … 394 394 /* let's slirp to care about expiration */ 395 395 so->so_expire = curtime + recursive_timeout * 1000; 396 396 397 397 memset(&addr, 0, sizeof(struct sockaddr_in)); 398 398 addr.sin_family = AF_INET; … … 408 408 /* send it to our authoritative server */ 409 409 Log2(("NAT: request will be sent to %RTnaipv4 on %R[natsock]\n", addr.sin_addr, so)); 410 410 411 411 byte = sendto(so->s, buf, (unsigned int)byte, 0, 412 412 (struct sockaddr *)&addr, 413 413 sizeof(struct sockaddr_in)); 414 if (byte == -1) 414 if (byte == -1) 415 415 { 416 416 /* XXX: is it really enough? */ … … 425 425 ++authoritative_queries; 426 426 427 # if 0 428 /* XXX: this stuff for _debugging_ only, 429 * first enforce guest to send next request 430 * and second for faster getting timeout callback 431 * other option is adding couple entries in resolv.conf with 427 # if 0 428 /* XXX: this stuff for _debugging_ only, 429 * first enforce guest to send next request 430 * and second for faster getting timeout callback 431 * other option is adding couple entries in resolv.conf with 432 432 * invalid nameservers. 433 433 * 434 * For testing purposes could be used 435 * namebench -S -q 10000 -m random or -m chunk 434 * For testing purposes could be used 435 * namebench -S -q 10000 -m random or -m chunk 436 436 */ 437 437 /* RTThreadSleep(3000); */ … … 497 497 LogRel(("sendto failed: %s\n", strerror(errno))); 498 498 ++dropped_answers; 499 } 499 } 500 500 else 501 501 ++answered_queries; … … 509 509 510 510 AssertPtr(pData); 511 511 512 512 /* XXX: mbuf->data points to ??? */ 513 513 byte = m->m_len; … … 524 524 525 525 /* find corresponding query */ 526 if (query == NULL) 526 if (query == NULL) 527 527 { 528 /* XXX: if we haven't found anything for this request ... 528 /* XXX: if we haven't found anything for this request ... 529 529 * What we are expecting later? 530 530 */ -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r48526 r48947 354 354 /* set default addresses */ 355 355 inet_aton("127.0.0.1", &loopback_addr); 356 356 357 357 if (!fUseHostResolver) 358 358 { … … 744 744 if (so->so_timeout != NULL) 745 745 { 746 /* so_timeout - might change the so_expire value or 747 * drop so_timeout* from so. 746 /* so_timeout - might change the so_expire value or 747 * drop so_timeout* from so. 748 748 */ 749 749 so->so_timeout(pData, so, so->so_timeout_arg); 750 /* on 4.2 so-> 750 /* on 4.2 so-> 751 751 */ 752 752 if ( so_next->so_prev != so /* so_timeout freed the socket */ -
trunk/src/VBox/Devices/PC/BIOS/bios.c
r44528 r48947 100 100 // interrupt level. 101 101 uint8_t isrA, isrB, imr, last_int = 0xFF; 102 102 103 103 outb(PIC_MASTER, PIC_CMD_RD_ISR); // Read master ISR 104 104 isrA = inb(PIC_MASTER); … … 175 175 176 176 /* Avoid using preprocessing directives within macro arguments. */ 177 bios_conf = 177 bios_conf = 178 178 #ifdef __WATCOMC__ 179 179 "watcom " -
trunk/src/VBox/Devices/PC/BIOS/eltorito.c
r45791 r48947 135 135 // --------------------------------------------------------------------------- 136 136 137 // !! TODO !! convert EBDA accesses to far pointers 137 // !! TODO !! convert EBDA accesses to far pointers 138 138 139 139 extern int diskette_param_table; … … 144 144 // @TODO: a macro or a function for getting the EBDA segment 145 145 uint16_t ebda_seg = read_word(0x0040,0x000E); 146 146 147 147 // the only important data is this one for now 148 148 write_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.active, 0x00); … … 153 153 // @TODO: a macro or a function for getting the EBDA segment 154 154 uint16_t ebda_seg = read_word(0x0040,0x000E); 155 155 156 156 return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.active); 157 157 } … … 161 161 // @TODO: a macro or a function for getting the EBDA segment 162 162 uint16_t ebda_seg = read_word(0x0040,0x000E); 163 163 164 164 return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.emulated_drive); 165 165 } … … 177 177 cdemu = ebda_seg :> &EbdaData->cdemu; 178 178 179 179 180 180 BX_DEBUG_INT13_ET("%s: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", __func__, AX, BX, CX, DX, ES); 181 181 // BX_DEBUG_INT13_ET("%s: SS=%04x DS=%04x ES=%04x DI=%04x SI=%04x\n", __func__, get_SS(), DS, ES, DI, SI); 182 182 183 183 switch (GET_AH()) { 184 184 … … 206 206 write_byte(DS,SI+0x11,cdemu->vdevice.spt); 207 207 write_byte(DS,SI+0x12,cdemu->vdevice.heads); 208 208 209 209 // If we have to terminate emulation 210 210 if(GET_AL() == 0x00) { … … 244 244 { 245 245 bio_dsk_t __far *bios_dsk; 246 246 247 247 bios_dsk = read_word(0x0040, 0x000E) :> &EbdaData->bdisk; 248 248 249 249 if (device >= BX_MAX_STORAGE_DEVICES) 250 250 return 0; 251 251 252 252 // if (bios_dsk->devices[device].type != DSK_TYPE_ATAPI) 253 253 // return 0; 254 254 255 255 if (bios_dsk->devices[device].device != DSK_DEVICE_CDROM) 256 256 return 0; 257 257 258 258 return 1; 259 259 } … … 390 390 cdemu->ilba = lba; 391 391 392 BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n", 392 BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n", 393 393 cdemu->emulated_drive, cdemu->media, cdemu->ilba); 394 394 … … 410 410 return 13; 411 411 412 BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n", 412 BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n", 413 413 cdemu->emulated_drive, cdemu->media, cdemu->ilba); 414 414 /* Set up emulated drive geometry based on the media type. */ … … 481 481 482 482 /* at this point, we are emulating a floppy/harddisk */ 483 483 484 484 // Recompute the device number 485 485 device = cdemu->controller_index * 2; 486 486 device += cdemu->device_spec; 487 487 488 488 SET_DISK_RET_STATUS(0x00); 489 489 490 490 /* basic checks : emulation should be active, dl should equal the emulated drive */ 491 491 if (!cdemu->active || (cdemu->emulated_drive != GET_DL())) { … … 493 493 goto int13_fail; 494 494 } 495 495 496 496 switch (GET_AH()) { 497 497 … … 525 525 SET_AH(status); 526 526 SET_DISK_RET_STATUS(0); 527 527 528 528 /* set CF if error status read */ 529 529 if (status) … … 539 539 vheads = cdemu->vdevice.heads; 540 540 ilba = cdemu->ilba; 541 541 542 542 sector = GET_CL() & 0x003f; 543 543 cylinder = (GET_CL() & 0x00c0) << 2 | GET_CH(); … … 553 553 if(nbsectors==0) 554 554 goto int13_success; 555 555 556 556 // sanity checks sco openserver needs this! 557 557 if ((sector > vspt) … … 560 560 goto int13_fail; 561 561 } 562 562 563 563 // After validating the input, verify does nothing 564 564 if (GET_AH() == 0x04) 565 565 goto int13_success; 566 566 567 567 segment = ES+(BX / 16); 568 568 offset = BX % 16; 569 569 570 570 // calculate the virtual lba inside the image 571 571 vlba=((((uint32_t)cylinder*(uint32_t)vheads)+(uint32_t)head)*(uint32_t)vspt)+((uint32_t)(sector-1)); 572 572 573 573 // In advance so we don't lose the count 574 574 SET_AL(nbsectors); 575 575 576 576 // start lba on cd 577 577 slba = (uint32_t)vlba / 4; 578 578 before = (uint32_t)vlba % 4; 579 579 580 580 // end lba on cd 581 581 elba = (uint32_t)(vlba + nbsectors - 1) / 4; … … 603 603 goto int13_fail_noah; 604 604 } 605 605 606 606 goto int13_success; 607 607 break; … … 611 611 vcylinders = cdemu->vdevice.cylinders - 1; 612 612 vheads = cdemu->vdevice.heads - 1; 613 613 614 614 SET_AL( 0x00 ); 615 615 SET_BL( 0x00 ); … … 694 694 695 695 bios_dsk = ebda_seg :> &EbdaData->bdisk; 696 696 697 697 BX_DEBUG_INT13_CD("%s: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", __func__, AX, BX, CX, DX, ES); 698 698 699 699 SET_DISK_RET_STATUS(0x00); 700 700 701 701 /* basic check : device should be 0xE0+ */ 702 702 if( (GET_ELDL() < 0xE0) || (GET_ELDL() >= 0xE0 + BX_MAX_STORAGE_DEVICES) ) { … … 704 704 goto int13_fail; 705 705 } 706 706 707 707 // Get the ata channel 708 708 device = bios_dsk->cdidmap[GET_ELDL()-0xE0]; 709 709 710 710 /* basic check : device has to be valid */ 711 711 if (device >= BX_MAX_STORAGE_DEVICES) { -
trunk/src/VBox/Devices/PC/BIOS/floppy.c
r48069 r48947 125 125 { 126 126 uint8_t val8; 127 127 128 128 // Reset controller 129 129 val8 = inb(0x03f2); 130 130 outb(0x03f2, val8 & ~0x04); 131 131 outb(0x03f2, val8 | 0x04); 132 132 133 133 // Wait for controller to come out of reset 134 134 do { … … 140 140 { 141 141 uint8_t val8, dor, prev_reset; 142 142 143 143 // set 40:3e bit 7 to 0 144 144 val8 = read_byte(0x0040, 0x003e); 145 145 val8 &= 0x7f; 146 146 write_byte(0x0040, 0x003e, val8); 147 147 148 148 // turn on motor of selected drive, DMA & int enabled, normal operation 149 149 prev_reset = inb(0x03f2) & 0x04; … … 155 155 dor |= drive; 156 156 outb(0x03f2, dor); 157 157 158 158 // reset the disk motor timeout value of INT 08 159 159 write_byte(0x0040,0x0040, BX_FLOPPY_ON_CNT); 160 160 161 161 // program data rate 162 162 val8 = read_byte(0x0040, 0x008b); 163 163 val8 >>= 6; 164 164 outb(0x03f7, val8); 165 165 166 166 // wait for drive readiness 167 167 do { 168 168 val8 = inb(0x3f4); 169 169 } while ( (val8 & 0xc0) != 0x80 ); 170 170 171 171 if (prev_reset == 0) { 172 172 #ifdef VBOX_WITH_FLOPPY_IRQ_POLLING … … 190 190 uint8_t val8; 191 191 uint16_t media_state_offset; 192 192 193 193 val8 = read_byte(0x0040, 0x003e); // diskette recal status 194 194 if (drive) … … 197 197 if (val8 == 0) 198 198 return 0; 199 199 200 200 media_state_offset = 0x0090; 201 201 if (drive) 202 202 media_state_offset += 1; 203 203 204 204 val8 = read_byte(0x0040, media_state_offset); 205 205 val8 = (val8 >> 4) & 0x01; 206 206 if (val8 == 0) 207 207 return 0; 208 208 209 209 // checks passed, return KNOWN 210 210 return 1; … … 218 218 uint8_t return_status[7]; 219 219 int i; 220 220 221 221 floppy_prepare_controller(drive); 222 222 223 223 // send Read ID command (2 bytes) to controller 224 224 outb(0x03f5, 0x4a); // 4a: Read ID (MFM) 225 225 outb(0x03f5, drive); // 0=drive0, 1=drive1, head always 0 226 226 227 227 #ifdef VBOX_WITH_FLOPPY_IRQ_POLLING 228 228 // turn on interrupts 229 229 int_enable(); 230 230 231 231 // wait on 40:3e bit 7 to become 1 232 232 do { 233 233 val8 = (read_byte(0x0040, 0x003e) & 0x80); 234 234 } while ( val8 == 0 ); 235 235 236 236 val8 = 0; // separate asm from while() loop 237 237 // turn off interrupts … … 240 240 floppy_wait_for_interrupt(); 241 241 #endif 242 242 243 243 // read 7 return status bytes from controller 244 244 for (i = 0; i < 7; ++i) { 245 245 return_status[i] = inb(0x3f5); 246 246 } 247 247 248 248 if ( (return_status[0] & 0xc0) != 0 ) 249 249 return 0; … … 256 256 uint8_t val8; 257 257 uint16_t curr_cyl_offset; 258 258 259 259 floppy_prepare_controller(drive); 260 260 261 261 // send Recalibrate command (2 bytes) to controller 262 262 outb(0x03f5, 0x07); // 07: Recalibrate 263 263 outb(0x03f5, drive); // 0=drive0, 1=drive1 264 264 265 265 #ifdef VBOX_WITH_FLOPPY_IRQ_POLLING 266 266 // turn on interrupts 267 267 int_enable(); 268 268 269 269 // wait on 40:3e bit 7 to become 1 270 270 do { 271 271 val8 = (read_byte(0x0040, 0x003e) & 0x80); 272 272 } while ( val8 == 0 ); 273 273 274 274 val8 = 0; // separate asm from while() loop 275 275 // turn off interrupts … … 293 293 write_byte(0x0040, 0x003e, val8); 294 294 write_byte(0x0040, curr_cyl_offset, 0); // current cylinder is 0 295 295 296 296 return 1; 297 297 } … … 303 303 uint16_t media_state_offset; 304 304 uint8_t drive_type, config_data, media_state; 305 305 306 306 if (floppy_drive_recal(drive) == 0) 307 307 return 0; 308 308 309 309 // Try the diskette data rates in the following order: 310 310 // 1 Mbps -> 500 Kbps -> 300 Kbps -> 250 Kbps 311 311 // The 1 Mbps rate is only tried for 2.88M drives. 312 312 313 313 // ** config_data ** 314 314 // Bitfields for diskette media control: … … 320 320 // 3-2 {data rate at start of operation} 321 321 // 1-0 reserved 322 322 323 323 // ** media_state ** 324 324 // Bitfields for diskette drive media state: … … 388 388 retval = 0; 389 389 } 390 390 391 391 write_byte(0x0040, 0x008B, config_data); 392 392 while (!floppy_read_id(drive)) { … … 408 408 write_byte(0x0040, 0x008B, config_data); 409 409 } 410 410 411 411 if (drive == 0) 412 412 media_state_offset = 0x0090; … … 415 415 write_byte(0x0040, 0x008B, config_data); 416 416 write_byte(0x0040, media_state_offset, media_state); 417 417 418 418 return retval; 419 419 } … … 423 423 { 424 424 uint8_t drive_type; 425 425 426 426 // check CMOS to see if drive exists 427 427 // @todo: break out drive type determination … … 456 456 uint16_t last_addr; 457 457 int i; 458 458 459 459 BX_DEBUG_INT13_FL("%s: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", __func__, AX, BX, CX, DX, ES); 460 460 461 461 ah = GET_AH(); 462 462 463 463 switch ( ah ) { 464 464 case 0x00: // diskette controller reset … … 483 483 return; 484 484 } 485 485 486 486 // force re-calibration etc. 487 487 write_byte(0x0040, 0x003e, 0); 488 488 489 489 SET_AH(0); 490 490 set_diskette_ret_status(0); … … 492 492 set_diskette_current_cyl(drive, 0); // current cylinder 493 493 return; 494 494 495 495 case 0x01: // Read Diskette Status 496 496 CLEAR_CF(); … … 501 501 } 502 502 return; 503 503 504 504 case 0x02: // Read Diskette Sectors 505 505 case 0x03: // Write Diskette Sectors … … 510 510 head = GET_DH(); 511 511 drive = GET_ELDL(); 512 512 513 513 if ( (drive > 1) || (head > 1) || 514 514 (num_sectors == 0) || (num_sectors > 72) ) { … … 520 520 return; 521 521 } 522 522 523 523 // see if drive exists 524 524 if (floppy_drive_exists(drive) == 0) { … … 529 529 return; 530 530 } 531 531 532 532 // see if media in drive, and type is known 533 533 if (floppy_media_known(drive) == 0) { … … 540 540 } 541 541 } 542 542 543 543 if (ah == 0x02) { 544 544 // Read Diskette Sectors 545 545 546 546 //----------------------------------- 547 547 // set up DMA controller for transfer 548 548 //----------------------------------- 549 549 550 550 // es:bx = pointer to where to place information from diskette 551 551 // port 04: DMA-1 base and current address, channel 2 … … 561 561 } 562 562 base_count = (num_sectors * 512) - 1; 563 563 564 564 // check for 64K boundary overrun 565 565 last_addr = base_address + base_count; … … 571 571 return; 572 572 } 573 573 574 574 BX_DEBUG_INT13_FL("masking DMA-1 c2\n"); 575 575 outb(0x000a, 0x06); 576 576 577 577 BX_DEBUG_INT13_FL("clear flip-flop\n"); 578 578 outb(0x000c, 0x00); // clear flip-flop … … 584 584 outb(0x0005, base_count>>8); 585 585 BX_DEBUG_INT13_FL("xfer buf at %x:%x\n", page, base_address); 586 586 587 587 // port 0b: DMA-1 Mode Register 588 588 mode_register = 0x46; // single mode, increment, autoinit disable, … … 590 590 BX_DEBUG_INT13_FL("setting mode register\n"); 591 591 outb(0x000b, mode_register); 592 592 593 593 BX_DEBUG_INT13_FL("setting page register\n"); 594 594 // port 81: DMA-1 Page Register, channel 2 595 595 outb(0x0081, page); 596 596 597 597 BX_DEBUG_INT13_FL("unmask chan 2\n"); 598 598 outb(0x000a, 0x02); // unmask channel 2 599 599 600 600 BX_DEBUG_INT13_FL("unmasking DMA-1 c2\n"); 601 601 outb(0x000a, 0x02); 602 602 603 603 //-------------------------------------- 604 604 // set up floppy controller for transfer 605 605 //-------------------------------------- 606 606 floppy_prepare_controller(drive); 607 607 608 608 // send read-normal-data command (9 bytes) to controller 609 609 outb(0x03f5, 0xe6); // e6: read normal data … … 616 616 outb(0x03f5, 0); // Gap length 617 617 outb(0x03f5, 0xff); // Gap length 618 618 619 619 #ifdef VBOX_WITH_FLOPPY_IRQ_POLLING 620 620 // turn on interrupts 621 621 int_enable(); 622 622 623 623 // wait on 40:3e bit 7 to become 1 or timeout (latter isn't armed so it won't happen) 624 624 do { … … 634 634 val8 = (read_byte(0x0040, 0x003e) & 0x80); 635 635 } while ( val8 == 0 ); 636 636 637 637 val8 = 0; // separate asm from while() loop 638 638 // turn off interrupts … … 655 655 } 656 656 #endif 657 657 658 658 // check port 3f4 for accessibility to status bytes 659 659 val8 = inb(0x3f4); … … 666 666 write_byte(0x0040, 0x0042 + i, return_status[i]); 667 667 } 668 668 669 669 if ( (return_status[0] & 0xc0) != 0 ) { 670 670 SET_AH(0x20); … … 686 686 } else if (ah == 0x03) { 687 687 // Write Diskette Sectors 688 688 689 689 //----------------------------------- 690 690 // set up DMA controller for transfer 691 691 //----------------------------------- 692 692 693 693 // es:bx = pointer to where to place information from diskette 694 694 // port 04: DMA-1 base and current address, channel 2 … … 704 704 } 705 705 base_count = (num_sectors * 512) - 1; 706 706 707 707 // check for 64K boundary overrun 708 708 last_addr = base_address + base_count; … … 714 714 return; 715 715 } 716 716 717 717 BX_DEBUG_INT13_FL("masking DMA-1 c2\n"); 718 718 outb(0x000a, 0x06); 719 719 720 720 outb(0x000c, 0x00); // clear flip-flop 721 721 outb(0x0004, base_address); … … 725 725 outb(0x0005, base_count>>8); 726 726 BX_DEBUG_INT13_FL("xfer buf at %x:%x\n", page, base_address); 727 727 728 728 // port 0b: DMA-1 Mode Register 729 729 mode_register = 0x4a; // single mode, increment, autoinit disable, 730 730 // transfer type=read, channel 2 731 731 outb(0x000b, mode_register); 732 732 733 733 // port 81: DMA-1 Page Register, channel 2 734 734 outb(0x0081, page); 735 735 736 736 BX_DEBUG_INT13_FL("unmasking DMA-1 c2\n"); 737 737 outb(0x000a, 0x02); 738 738 739 739 //-------------------------------------- 740 740 // set up floppy controller for transfer 741 741 //-------------------------------------- 742 742 floppy_prepare_controller(drive); 743 743 744 744 // send write-normal-data command (9 bytes) to controller 745 745 outb(0x03f5, 0xc5); // c5: write normal data … … 752 752 outb(0x03f5, 0); // Gap length 753 753 outb(0x03f5, 0xff); // Gap length 754 754 755 755 #ifdef VBOX_WITH_FLOPPY_IRQ_POLLING 756 756 // turn on interrupts 757 757 int_enable(); 758 758 759 759 // wait on 40:3e bit 7 to become 1 760 760 do { … … 770 770 val8 = (read_byte(0x0040, 0x003e) & 0x80); 771 771 } while ( val8 == 0 ); 772 772 773 773 val8 = 0; // separate asm from while() loop @todo: why?? 774 774 // turn off interrupts … … 790 790 } 791 791 #endif 792 792 793 793 // check port 3f4 for accessibility to status bytes 794 794 val8 = inb(0x3f4); 795 795 if ( (val8 & 0xc0) != 0xc0 ) 796 796 BX_PANIC("%s: ctrl not ready\n", __func__); 797 797 798 798 // read 7 return status bytes from controller and store in BDA 799 799 for (i = 0; i < 7; ++i) { … … 801 801 write_byte(0x0040, 0x0042 + i, return_status[i]); 802 802 } 803 803 804 804 if ( (return_status[0] & 0xc0) != 0 ) { 805 805 if ( (return_status[1] & 0x02) != 0 ) { … … 815 815 return; 816 816 } 817 817 818 818 // ??? should track be new val from return_status[3] ? 819 819 set_diskette_current_cyl(drive, track); … … 824 824 } else { // if (ah == 0x04) 825 825 // Verify Diskette Sectors 826 826 827 827 // ??? should track be new val from return_status[3] ? 828 828 set_diskette_current_cyl(drive, track); … … 833 833 } 834 834 break; 835 835 836 836 case 0x05: // format diskette track 837 837 BX_DEBUG_INT13_FL("floppy f05\n"); 838 838 839 839 num_sectors = GET_AL(); 840 840 track = GET_CH(); 841 841 head = GET_DH(); 842 842 drive = GET_ELDL(); 843 843 844 844 if ((drive > 1) || (head > 1) || (track > 79) || 845 845 (num_sectors == 0) || (num_sectors > 18)) { … … 848 848 SET_CF(); // error occurred 849 849 } 850 850 851 851 // see if drive exists 852 852 if (floppy_drive_exists(drive) == 0) { … … 856 856 return; 857 857 } 858 858 859 859 // see if media in drive, and type is known 860 860 if (floppy_media_known(drive) == 0) { … … 867 867 } 868 868 } 869 869 870 870 // set up DMA controller for transfer 871 871 // @todo: merge/factor out pointer normalization … … 879 879 } 880 880 base_count = (num_sectors * 4) - 1; 881 881 882 882 // check for 64K boundary overrun 883 883 last_addr = base_address + base_count; … … 889 889 return; 890 890 } 891 891 892 892 outb(0x000a, 0x06); 893 893 outb(0x000c, 0x00); // clear flip-flop … … 903 903 outb(0x0081, page); 904 904 outb(0x000a, 0x02); 905 905 906 906 // set up floppy controller for transfer 907 907 floppy_prepare_controller(drive); 908 908 909 909 // send format-track command (6 bytes) to controller 910 910 outb(0x03f5, 0x4d); // 4d: format track … … 918 918 // turn on interrupts 919 919 int_enable(); 920 920 921 921 // wait on 40:3e bit 7 to become 1 922 922 do { … … 931 931 val8 = (read_byte(0x0040, 0x003e) & 0x80); 932 932 } while ( val8 == 0 ); 933 933 934 934 val8 = 0; // separate asm from while() loop 935 935 // turn off interrupts … … 955 955 if ( (val8 & 0xc0) != 0xc0 ) 956 956 BX_PANIC("%s: ctrl not ready\n", __func__); 957 957 958 958 // read 7 return status bytes from controller and store in BDA 959 959 for (i = 0; i < 7; ++i) { … … 961 961 write_byte(0x0040, 0x0042 + i, return_status[i]); 962 962 } 963 963 964 964 if ( (return_status[0] & 0xc0) != 0 ) { 965 965 if ( (return_status[1] & 0x02) != 0 ) { … … 974 974 } 975 975 } 976 976 977 977 SET_AH(0); 978 978 set_diskette_ret_status(0); … … 980 980 CLEAR_CF(); // successful 981 981 return; 982 983 982 983 984 984 case 0x08: // read diskette drive parameters 985 985 BX_DEBUG_INT13_FL("floppy f08\n"); 986 986 drive = GET_ELDL(); 987 987 988 988 if (drive > 1) { 989 989 AX = 0; … … 997 997 return; 998 998 } 999 999 1000 1000 // @todo: break out drive type determination 1001 1001 drive_type = inb_cmos(0x10); … … 1005 1005 if (drive_type & 0x0f) 1006 1006 num_floppies++; 1007 1007 1008 1008 if (drive == 0) 1009 1009 drive_type >>= 4; 1010 1010 else 1011 1011 drive_type &= 0x0f; 1012 1012 1013 1013 SET_BH(0); 1014 1014 SET_BL(drive_type); … … 1017 1017 SET_DL(num_floppies); 1018 1018 SET_DH(1); // max head # 1019 1019 1020 1020 switch (drive_type) { 1021 1021 case 0: // none … … 1023 1023 SET_DH(0); // max head # 1024 1024 break; 1025 1025 1026 1026 case 1: // 360KB, 5.25" 1027 1027 CX = 0x2709; // 40 tracks, 9 sectors 1028 1028 break; 1029 1029 1030 1030 case 2: // 1.2MB, 5.25" 1031 1031 CX = 0x4f0f; // 80 tracks, 15 sectors 1032 1032 break; 1033 1033 1034 1034 case 3: // 720KB, 3.5" 1035 1035 CX = 0x4f09; // 80 tracks, 9 sectors 1036 1036 break; 1037 1037 1038 1038 case 4: // 1.44MB, 3.5" 1039 1039 CX = 0x4f12; // 80 tracks, 18 sectors 1040 1040 break; 1041 1041 1042 1042 case 5: // 2.88MB, 3.5" 1043 1043 CX = 0x4f24; // 80 tracks, 36 sectors 1044 1044 break; 1045 1045 1046 1046 case 14: // 15.6 MB 3.5" (fake) 1047 1047 CX = 0xfe3f; // 255 tracks, 63 sectors … … 1056 1056 BX_PANIC("%s: bad floppy type\n", __func__); 1057 1057 } 1058 1058 1059 1059 /* set es & di to point to 11 byte diskette param table in ROM */ 1060 1060 ES = 0xF000; // @todo: any way to make this relocatable? … … 1063 1063 /* disk status not changed upon success */ 1064 1064 return; 1065 1065 1066 1066 case 0x15: // read diskette drive type 1067 1067 BX_DEBUG_INT13_FL("floppy f15\n"); … … 1087 1087 SET_AH(1); // drive present, does not support change line 1088 1088 } 1089 1089 1090 1090 return; 1091 1091 1092 1092 case 0x16: // get diskette change line status 1093 1093 BX_DEBUG_INT13_FL("floppy f16\n"); … … 1099 1099 return; 1100 1100 } 1101 1101 1102 1102 SET_AH(0x06); // change line not supported 1103 1103 set_diskette_ret_status(0x06); 1104 1104 SET_CF(); 1105 1105 return; 1106 1106 1107 1107 case 0x17: // set diskette type for format(old) 1108 1108 BX_DEBUG_INT13_FL("floppy f17\n"); … … 1112 1112 SET_CF(); 1113 1113 return; 1114 1114 1115 1115 case 0x18: // set diskette type for format(new) 1116 1116 BX_DEBUG_INT13_FL("floppy f18\n"); … … 1119 1119 SET_CF(); 1120 1120 return; 1121 1121 1122 1122 default: 1123 1123 BX_INFO("%s: unsupported AH=%02x\n", __func__, GET_AH()); 1124 1124 1125 1125 // if ( (ah==0x20) || ((ah>=0x41) && (ah<=0x49)) || (ah==0x4e) ) { 1126 1126 SET_AH(0x01); // ??? … … 1137 1137 { 1138 1138 uint8_t val8; 1139 1139 1140 1140 switch ( GET_AH() ) { 1141 1141 1142 1142 case 0x01: // Read Diskette Status 1143 1143 CLEAR_CF(); … … 1148 1148 } 1149 1149 return; 1150 1150 1151 1151 default: 1152 1152 SET_CF(); … … 1162 1162 { 1163 1163 uint8_t val8, DOR, ctrl_info; 1164 1164 1165 1165 ctrl_info = read_byte(0x0040, 0x008F); 1166 1166 if (drive==1) … … 1188 1188 if (val8 != 0x80) 1189 1189 BX_PANIC("d_f_m: MRQ bit not set\n"); 1190 1190 1191 1191 // change line 1192 1192 1193 1193 // existing BDA values 1194 1194 1195 1195 // turn on drive motor 1196 1196 outb(0x03f2, DOR); // Digital Output Register -
trunk/src/VBox/Devices/PC/BIOS/pcibios.c
r45710 r48947 80 80 * enabled during execution, and that the routines are re-entrant. 81 81 * 82 * Implementation notes: 82 * Implementation notes: 83 83 * - The PCI BIOS interface already uses certain 32-bit registers even in 84 84 * 16-bit mode. To simplify matters, all 32-bit GPRs are saved/restored and … … 232 232 BX_DEBUG_PCI("PCI: Find class %08lX index %u\n", 233 233 search_item, index); 234 } else 235 BX_DEBUG_PCI("PCI: Find device %04X:%04X index %u\n", 234 } else 235 BX_DEBUG_PCI("PCI: Find device %04X:%04X index %u\n", 236 236 (uint16_t)search_item, (uint16_t)(search_item >> 16), index); 237 237 … … 261 261 262 262 /* If the header type indicates a bus, we're interested. The secondary 263 * and subordinate bus numbers will indicate which buses are present; 264 * thus we can determine the highest bus number. In the common case, 263 * and subordinate bus numbers will indicate which buses are present; 264 * thus we can determine the highest bus number. In the common case, 265 265 * there will be only the primary bus (i.e. bus 0) and we can avoid 266 266 * looking at the remaining 255 theoretically present buses. This check … … 317 317 318 318 SET_AH(SUCCESSFUL); /* Assume success. */ 319 CLEAR_CF(); 319 CLEAR_CF(); 320 320 321 321 switch (GET_AL()) { -
trunk/src/VBox/Devices/PC/BIOS/vds.h
r42202 r48947 38 38 } u; 39 39 } vds_edds; 40 40 41 41 42 42 /* VDS services */ -
trunk/src/VBox/Devices/PC/DevACPI.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevDMA.cpp
-
Property svn:keywords
changed from
Id
toId Revision
r48046 r48947 454 454 *pu32, port, DMAPG2CX(reg))); 455 455 return VINF_SUCCESS; 456 } 456 } 457 457 458 458 if (cb == 2) … … 482 482 u32, port, DMAPG2CX(reg))); 483 483 } 484 else if (cb == 2) 484 else if (cb == 2) 485 485 { 486 486 Assert(!(u32 & ~0xffff)); /* Check for garbage in high bits. */ … … 567 567 /* Set the TC (Terminal Count) bit if transfer was completed. */ 568 568 if (ch->u16CurCount == ch->u16BaseCount + 1) 569 switch (opmode) 569 switch (opmode) 570 570 { 571 571 case DMODE_DEMAND: -
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r48755 r48947 811 811 pProcessorInf->u8CoreEnabled = cCpus; 812 812 pProcessorInf->u8ThreadCount = 1; 813 pProcessorInf->u16ProcessorCharacteristics 813 pProcessorInf->u16ProcessorCharacteristics 814 814 = RT_BIT(2); /* 64-bit capable */ 815 815 pProcessorInf->u16ProcessorFamily2 = 0; -
trunk/src/VBox/Devices/PC/DevHPET.cpp
r45839 r48947 1059 1059 if (u64Period) { 1060 1060 hpetAdjustComparator(pHpetTimer, u64CurTick); 1061 1061 1062 1062 u64Diff = hpetComputeDiff(pHpetTimer, u64CurTick); 1063 1063 1064 1064 Log4(("HPET: periodic: next in %llu\n", hpetTicksToNs(pThis, u64Diff))); 1065 1065 TMTimerSetNano(pTimer, hpetTicksToNs(pThis, u64Diff)); -
trunk/src/VBox/Devices/PC/DevIoApic.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevPIC.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevPcArch.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevPcBios.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DevRTC.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/PC/DrvACPI.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
-
Property svn:keywords
changed from
Id
toId Revision
r48028 r48947 1098 1098 #endif /*IN_RING3*/ 1099 1099 1100 -
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r48192 r48947 378 378 bool fIRQEnabled; 379 379 /** Flag whether the ISA I/O port range is disabled 380 * to prevent the BIOS to access the device. */ 380 * to prevent the BIOS to access the device. */ 381 381 bool fISAEnabled; /**< @todo unused, to be removed */ 382 382 /** Flag whether 24-bit mailboxes are in use (default is 32-bit). */ … … 1021 1021 static void buslogicClearInterrupt(PBUSLOGIC pBusLogic) 1022 1022 { 1023 LogFlowFunc(("pBusLogic=%#p, clearing %#02x (pending %#02x)\n", 1023 LogFlowFunc(("pBusLogic=%#p, clearing %#02x (pending %#02x)\n", 1024 1024 pBusLogic, pBusLogic->regInterrupt, pBusLogic->uPendingIntr)); 1025 1025 pBusLogic->regInterrupt = 0; … … 1193 1193 { 1194 1194 RTGCPHYS GCPhysAddrCCB = pTaskState->MailboxGuest.u32PhysAddrCCB; 1195 LogFlowFunc(("Completing CCB %RGp hstat=%u, dstat=%u, outgoing mailbox at %RGp\n", GCPhysAddrCCB, 1195 LogFlowFunc(("Completing CCB %RGp hstat=%u, dstat=%u, outgoing mailbox at %RGp\n", GCPhysAddrCCB, 1196 1196 uHostAdapterStatus, uDeviceStatus, GCPhysAddrMailboxIncoming)); 1197 1197 … … 1349 1349 PPDMDEVINS pDevIns = pTaskState->CTX_SUFF(pTargetDevice)->CTX_SUFF(pBusLogic)->CTX_SUFF(pDevIns); 1350 1350 uint32_t cbDataCCB; 1351 uint32_t u32PhysAddrCCB; 1352 1351 uint32_t u32PhysAddrCCB; 1352 1353 1353 /* Extract the data length and physical address from the CCB. */ 1354 1354 if (pTaskState->fIs24Bit) … … 1515 1515 #endif 1516 1516 1517 LogFlowFunc(("pTaskState=%#p cbDataCCB=%u direction=%u cbSeg=%u\n", pTaskState, cbDataCCB, 1517 LogFlowFunc(("pTaskState=%#p cbDataCCB=%u direction=%u cbSeg=%u\n", pTaskState, cbDataCCB, 1518 1518 pTaskState->CommandControlBlockGuest.c.uDataDirection, pTaskState->DataSeg.cbSeg)); 1519 1519 … … 1633 1633 1634 1634 /* With 32-bit CCBs, the (optional) sense buffer physical address is provided separately. 1635 * On the other hand, with 24-bit CCBs, the sense buffer is simply located at the end of 1636 * the CCB, right after the variable-length CDB. 1635 * On the other hand, with 24-bit CCBs, the sense buffer is simply located at the end of 1636 * the CCB, right after the variable-length CDB. 1637 1637 */ 1638 1638 if (pTaskState->fIs24Bit) 1639 { 1639 { 1640 1640 GCPhysAddrSenseBuffer = pTaskState->MailboxGuest.u32PhysAddrCCB; 1641 1641 GCPhysAddrSenseBuffer += pTaskState->CommandControlBlockGuest.c.cbCDB + RT_OFFSETOF(CCB24, abCDB); … … 1844 1844 { 1845 1845 /* Some Adaptec AHA-154x drivers (e.g. OS/2) execute this command and expect 1846 * it to fail. If it succeeds, the drivers refuse to load. However, some newer 1847 * Adaptec 154x models supposedly support it too?? 1846 * it to fail. If it succeeds, the drivers refuse to load. However, some newer 1847 * Adaptec 154x models supposedly support it too?? 1848 1848 */ 1849 1849 … … 1905 1905 /* The area for incoming mailboxes is right after the last entry of outgoing mailboxes. */ 1906 1906 pBusLogic->GCPhysAddrMailboxIncomingBase = pBusLogic->GCPhysAddrMailboxOutgoingBase + (pBusLogic->cMailbox * sizeof(Mailbox24)); 1907 1907 1908 1908 Log(("GCPhysAddrMailboxOutgoingBase=%RGp\n", pBusLogic->GCPhysAddrMailboxOutgoingBase)); 1909 1909 Log(("GCPhysAddrMailboxIncomingBase=%RGp\n", pBusLogic->GCPhysAddrMailboxIncomingBase)); 1910 1910 Log(("cMailboxes=%u (24-bit mode)\n", pBusLogic->cMailbox)); 1911 1911 LogRel(("Initialized 24-bit mailbox, %d entries at %08x\n", pRequest->cMailbox, ADDR_TO_U32(pRequest->aMailboxBaseAddr))); 1912 1912 1913 1913 pBusLogic->regStatus &= ~BUSLOGIC_REGISTER_STATUS_INITIALIZATION_REQUIRED; 1914 1914 pBusLogic->cbReplyParametersLeft = 0; … … 2297 2297 case BUSLOGICCOMMAND_WRITE_BUSMASTER_CHIP_FIFO: 2298 2298 pBusLogic->cbCommandParametersLeft = 3; 2299 break; 2299 break; 2300 2300 case BUSLOGICCOMMAND_INITIALIZE_MAILBOX: 2301 2301 pBusLogic->cbCommandParametersLeft = sizeof(RequestInitMbx); … … 2326 2326 #ifndef IN_RING3 2327 2327 /* This command must be executed in R3 as it rehooks the ISA I/O port. */ 2328 if (pBusLogic->uOperationCode == BUSLOGICCOMMAND_MODIFY_IO_ADDRESS) 2328 if (pBusLogic->uOperationCode == BUSLOGICCOMMAND_MODIFY_IO_ADDRESS) 2329 2329 { 2330 2330 rc = VINF_IOM_R3_IOPORT_WRITE; … … 2630 2630 { 2631 2631 /* Unregister the old range, if any. */ 2632 if (pBusLogic->IOISABase) 2632 if (pBusLogic->IOISABase) 2633 2633 rc = PDMDevHlpIOPortDeregister(pBusLogic->CTX_SUFF(pDevIns), pBusLogic->IOISABase, 4); 2634 2634 2635 if (RT_SUCCESS(rc)) 2635 if (RT_SUCCESS(rc)) 2636 2636 { 2637 2637 pBusLogic->IOISABase = 0; /* First mark as unregistered. */ … … 2993 2993 /** 2994 2994 * Read a mailbox from guest memory. Convert 24-bit mailboxes to 2995 * 32-bit format. 2995 * 32-bit format. 2996 2996 * 2997 2997 * @returns Mailbox guest physical address. … … 3485 3485 if (pszArgs) 3486 3486 fVerbose = strstr(pszArgs, "verbose") != NULL; 3487 3487 3488 3488 /* Show basic information. */ 3489 3489 pHlp->pfnPrintf(pHlp, … … 3511 3511 pHlp->pfnPrintf(pHlp, "Current command: %02X\n", pThis->uOperationCode); 3512 3512 3513 if (fVerbose && (pThis->regStatus & BUSLOGIC_REGISTER_STATUS_INITIALIZATION_REQUIRED) == 0) 3513 if (fVerbose && (pThis->regStatus & BUSLOGIC_REGISTER_STATUS_INITIALIZATION_REQUIRED) == 0) 3514 3514 { 3515 3515 RTGCPHYS GCMailbox; … … 3564 3564 { 3565 3565 PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), GCMailbox, &Mbx32, sizeof(Mailbox32)); 3566 pHlp->pfnPrintf(pHlp, " slot %03d: CCB at %08X completion code %02X BTSTAT %02X SDSTAT %02X", i, 3566 pHlp->pfnPrintf(pHlp, " slot %03d: CCB at %08X completion code %02X BTSTAT %02X SDSTAT %02X", i, 3567 3567 Mbx32.u32PhysAddrCCB, Mbx32.u.in.uCompletionCode, Mbx32.u.in.uHostAdapterStatus, Mbx32.u.in.uTargetDeviceStatus); 3568 3568 pHlp->pfnPrintf(pHlp, "%s\n", pThis->uMailboxOutgoingPositionCurrent == i ? " *" : ""); -
trunk/src/VBox/Devices/Storage/DrvHostFloppy.cpp
r45062 r48947 92 92 dwLastError = GetLastError(); 93 93 rc = RTErrConvertFromWin32(dwLastError); 94 Log(("DrvHostFloppy: IOCTL_DISK_GET_DRIVE_GEOMETRY(%s) failed, LastError=%d rc=%Rrc\n", 94 Log(("DrvHostFloppy: IOCTL_DISK_GET_DRIVE_GEOMETRY(%s) failed, LastError=%d rc=%Rrc\n", 95 95 pThis->pszDevice, dwLastError, rc)); 96 96 return rc; -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r47829 r48947 694 694 695 695 /** 696 * Called when media is unmounted 697 * 696 * Called when media is unmounted 697 * 698 698 * @param pInterface Pointer to the interface structure containing the called function pointer. 699 699 */ … … 961 961 PDMBLOCKTYPE enmType = pThis->pDrvBlock->pfnGetType(pThis->pDrvBlock); 962 962 VSCSILUNTYPE enmLunType; 963 switch (enmType) 963 switch (enmType) 964 964 { 965 965 case PDMBLOCKTYPE_HARD_DISK: -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r48872 r48947 623 623 624 624 /** 625 * vvl: this structure duplicate meaning of sockaddr, 625 * vvl: this structure duplicate meaning of sockaddr, 626 626 * perhaps it'd be better to get rid of it. 627 627 */ … … 681 681 int iInetFamily = PF_INET; 682 682 struct in_addr ip; 683 #ifdef VBOX_WITH_NEW_LWIP 683 #ifdef VBOX_WITH_NEW_LWIP 684 684 ip6_addr_t ip6; 685 685 #endif 686 686 687 687 /* Check whether lwIP is set up in this VM instance. */ 688 688 if (!DevINIPConfigured()) … … 696 696 if (inet6_aton(pszAddress, &ip6)) 697 697 iInetFamily = PF_INET6; 698 else /* concatination with if */ 699 #endif 698 else /* concatination with if */ 699 #endif 700 700 if (!lwip_inet_aton(pszAddress, &ip)) 701 701 { -
trunk/src/VBox/Devices/Storage/UsbMsd.cpp
r44528 r48947 55 55 56 56 /** 57 * USB MSD Command Block Wrapper or CBW. The command block 57 * USB MSD Command Block Wrapper or CBW. The command block 58 58 * itself (CBWCB) contains protocol-specific data (here SCSI). 59 59 */ -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp
r44528 r48947 120 120 * 121 121 * @returns VBox status code. 122 * @param hVScsiLun The virtual SCSI LUN 122 * @param hVScsiLun The virtual SCSI LUN 123 123 * mounting the medium. 124 124 */ … … 142 142 * 143 143 * @returns VBox status code. 144 * @param hVScsiLun The virtual SCSI LUN 144 * @param hVScsiLun The virtual SCSI LUN 145 145 * mounting the medium. 146 146 */ -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r46597 r48947 186 186 unsigned uCmd = pVScsiReq->pbCDB[0]; 187 187 188 /* 188 /* 189 189 * GET CONFIGURATION, GET EVENT/STATUS NOTIFICATION, INQUIRY, and REQUEST SENSE commands 190 190 * operate even when a unit attention condition exists for initiator; every other command … … 194 194 { 195 195 /* 196 * A note on media changes: As long as a medium is not present, the unit remains in 197 * the 'not ready' state. Technically the unit becomes 'ready' soon after a medium 198 * is inserted; however, we internally keep the 'not ready' state until we've had 196 * A note on media changes: As long as a medium is not present, the unit remains in 197 * the 'not ready' state. Technically the unit becomes 'ready' soon after a medium 198 * is inserted; however, we internally keep the 'not ready' state until we've had 199 199 * a chance to report the UNIT ATTENTION status indicating a media change. 200 200 */ … … 205 205 pVScsiLunMmc->Core.fReady = true; 206 206 } 207 else 207 else 208 208 rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_NOT_READY, 209 209 SCSI_ASC_MEDIUM_NOT_PRESENT, 0x00); … … 431 431 cbMax = vscsiBE2HU16(&pVScsiReq->pbCDB[7]); 432 432 fMSF = (pVScsiReq->pbCDB[1] >> 1) & 1; 433 switch (format) 433 switch (format) 434 434 { 435 435 case 0x00: … … 461 461 vscsiDeviceReqComplete(pVScsiLun->pVScsiDevice, pVScsiReq, rcReq, false, VINF_SUCCESS); 462 462 } 463 else if (!cSectorTransfer) 463 else if (!cSectorTransfer) 464 464 { 465 465 /* A 0 transfer length is not an error. */ -
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r45671 r48947 3596 3596 unsigned k = 0; 3597 3597 if ( !(Ed.hwinfo & ED_HWINFO_SKIP) 3598 && (TdAddr != TailP)) 3598 && (TdAddr != TailP)) 3599 3599 { 3600 3600 do -
trunk/src/VBox/Devices/USB/VUSBDevice.cpp
r46806 r48947 1104 1104 pUrb->pszDesc, pUrb->enmState, pDev, pDev->pUsbIns->pszName)); 1105 1105 vusbUrbUnlink(pUrb); 1106 /* Unlink isn't enough, because boundary timer and detaching will try to reap it. 1107 * It was tested with MSD & iphone attachment to vSMP guest, if 1106 /* Unlink isn't enough, because boundary timer and detaching will try to reap it. 1107 * It was tested with MSD & iphone attachment to vSMP guest, if 1108 1108 * it breaks anything, please add comment here, why we should unlink only. 1109 1109 */ -
trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
r46046 r48947 218 218 * (i.e. the default control pipe stuff). */ 219 219 CFRunLoopSourceRef RunLoopSrcRef; 220 /** we want to add and remove RunLoopSourceRefs to run loop's of 220 /** we want to add and remove RunLoopSourceRefs to run loop's of 221 221 * every EMT thread participated in USB processing. */ 222 222 RTLISTANCHOR HeadOfRunLoopLst; … … 284 284 * Adds Source ref to current run loop and adds it the list of runloops. 285 285 */ 286 static int usbProxyDarwinAddRunLoopRef(PRTLISTANCHOR pListHead, 286 static int usbProxyDarwinAddRunLoopRef(PRTLISTANCHOR pListHead, 287 287 CFRunLoopSourceRef SourceRef) 288 288 { … … 308 308 309 309 RTListAppend((PRTLISTNODE)pListHead, &pListNode->List); 310 310 311 311 return VINF_SUCCESS; 312 312 } … … 315 315 /* 316 316 * Removes all source reference from mode of run loop's we've registered them. 317 * 318 */ 319 static int usbProxyDarwinRemoveSourceRefFromAllRunLoops(PRTLISTANCHOR pHead, 317 * 318 */ 319 static int usbProxyDarwinRemoveSourceRefFromAllRunLoops(PRTLISTANCHOR pHead, 320 320 CFRunLoopSourceRef SourceRef) 321 321 { 322 322 AssertPtrReturn(pHead, VERR_INVALID_PARAMETER); 323 324 while (!RTListIsEmpty(pHead)) 323 324 while (!RTListIsEmpty(pHead)) 325 325 { 326 326 PRUNLOOPREFLIST pNode = RTListGetFirst(pHead, RUNLOOPREFLIST, List); 327 327 /* XXX: Should Release Reference? */ 328 328 Assert(CFGetRetainCount(pNode->RunLoopRef)); 329 329 330 330 CFRunLoopRemoveSource(pNode->RunLoopRef, SourceRef, g_pRunLoopMode); 331 331 CFRelease(SourceRef); … … 335 335 336 336 RTMemFree(pNode); 337 } 337 } 338 338 339 339 return VINF_SUCCESS; … … 896 896 { 897 897 RTListInit((PRTLISTNODE)&pIf->HeadOfRunLoopLst); 898 usbProxyDarwinAddRunLoopRef(&pIf->HeadOfRunLoopLst, 898 usbProxyDarwinAddRunLoopRef(&pIf->HeadOfRunLoopLst, 899 899 pIf->RunLoopSrcRef); 900 900 -
trunk/src/VBox/Devices/build/VBoxDD.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/build/VBoxDD2.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
Note:
See TracChangeset
for help on using the changeset viewer.