Rev 4192 | Rev 4261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4192 | Rev 4243 | ||
---|---|---|---|
Line 1522... | Line 1522... | ||
1522 | panic("DP8390", "get_userdata: sys_vircopy failed", r); |
1522 | panic("DP8390", "get_userdata: sys_vircopy failed", r); |
1523 | } |
1523 | } |
1524 | 1524 | ||
1525 | static void insb(port_t port, void *buf, size_t size) |
1525 | static void insb(port_t port, void *buf, size_t size) |
1526 | { |
1526 | { |
1527 | int i; |
1527 | size_t i; |
1528 | 1528 | ||
1529 | for( i = 0; i < size; ++ i ){ |
1529 | for( i = 0; i < size; ++ i ){ |
1530 | *(( uint8_t * )( buf + i )) = inb( port ); |
1530 | *(( uint8_t * )( buf + i )) = inb( port ); |
1531 | } |
1531 | } |
1532 | } |
1532 | } |
1533 | 1533 | ||
1534 | static void insw(port_t port, void *buf, size_t size) |
1534 | static void insw(port_t port, void *buf, size_t size) |
1535 | { |
1535 | { |
1536 | int i; |
1536 | size_t i; |
1537 | 1537 | ||
1538 | for( i = 0; i < size; i += 2 ){ |
1538 | for( i = 0; i < size; i += 2 ){ |
1539 | *(( uint16_t * )( buf + i )) = inw( port ); |
1539 | *(( uint16_t * )( buf + i )) = inw( port ); |
1540 | } |
1540 | } |
1541 | } |
1541 | } |
1542 | 1542 | ||
1543 | static void outsb(port_t port, void *buf, size_t size) |
1543 | static void outsb(port_t port, void *buf, size_t size) |
1544 | { |
1544 | { |
1545 | int i; |
1545 | size_t i; |
1546 | 1546 | ||
1547 | for( i = 0; i < size; ++ i ){ |
1547 | for( i = 0; i < size; ++ i ){ |
1548 | outb( port, *(( uint8_t * )( buf + i ))); |
1548 | outb( port, *(( uint8_t * )( buf + i ))); |
1549 | } |
1549 | } |
1550 | } |
1550 | } |
1551 | 1551 | ||
1552 | static void outsw(port_t port, void *buf, size_t size) |
1552 | static void outsw(port_t port, void *buf, size_t size) |
1553 | { |
1553 | { |
1554 | int i; |
1554 | size_t i; |
1555 | 1555 | ||
1556 | for( i = 0; i < size; i += 2 ){ |
1556 | for( i = 0; i < size; i += 2 ){ |
1557 | outw( port, *(( uint16_t * )( buf + i ))); |
1557 | outw( port, *(( uint16_t * )( buf + i ))); |
1558 | } |
1558 | } |
1559 | } |
1559 | } |