Changeset dbda808 in rtems-libbsd


Ignore:
Timestamp:
Jul 6, 2012, 3:57:12 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, fd86c091b97759106da7355ce1dd81ebe030e285, freebsd-9.3, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
0d23ec9
Parents:
4d28b93
Message:

Put CPU specific bus_space routines into separate files

The code in rtemsbsd/freebsd/machine/bus.h assumed that all bus space
accesses were through memory in a simple fashion. The i386 has a true
distinction between I/O and memory space which must be accounted for.

This may not be the eventual structure of this code but we must
have different bus space accessors for different hardware configurations.
And in many, if not most, cases we will want these to be inlined for
performance.

Files:
3 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • freebsd-to-rtems.py

    r4d28b93 rdbda808  
    483483                'rtems/machine/rtems-bsd-config.h',
    484484                'rtems/machine/clock.h',
    485                 'rtems/machine/cpufunc.h',
    486485                'rtems/machine/endian.h',
    487486                'rtems/macpue/_limits.h',
     
    12131212                'i386/include/legacyvar.h',
    12141213                'i386/include/pci_cfgreg.h',
     1214                'i386/include/cpufunc.h',
    12151215        ]
    12161216)
  • rtemsbsd/freebsd/machine/bus.h

    r4d28b93 rdbda808  
    213213
    214214
    215 static __inline void
    216 bus_space_barrier(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs,
    217     bus_size_t size, int flags)
    218 {
    219         /* Do nothing */
    220 }
    221 
    222 
    223 /*
    224  * Read 1 unit of data from bus space described by the tag, handle and ofs
    225  * tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    226  * data is returned.
    227  */
    228 static __inline uint8_t
    229 bus_space_read_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs)
    230 {
    231         uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    232         return (*bsp);
    233 }
    234 
    235 static __inline uint16_t
    236 bus_space_read_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs)
    237 {
    238         uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    239         return (*bsp);
    240 }
    241 
    242 static __inline uint32_t
    243 bus_space_read_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs)
    244 {
    245         uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    246         return (*bsp);
    247 }
    248 
    249 static __inline uint64_t
    250 bus_space_read_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs)
    251 {
    252         uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    253         return (*bsp);
    254 }
    255 
    256 
    257 /*
    258  * Write 1 unit of data to bus space described by the tag, handle and ofs
    259  * tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    260  * data is passed by value.
    261  */
    262 static __inline void
    263 bus_space_write_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs,
    264     uint8_t val)
    265 {
    266         uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    267         *bsp = val;
    268 }
    269 
    270 static __inline void
    271 bus_space_write_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs,
    272     uint16_t val)
    273 {
    274         uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    275         *bsp = val;
    276 }
    277 
    278 static __inline void
    279 bus_space_write_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs,
    280     uint32_t val)
    281 {
    282         uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    283         *bsp = val;
    284 }
    285 
    286 static __inline void
    287 bus_space_write_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t ofs,
    288     uint64_t val)
    289 {
    290         uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    291         *bsp = val;
    292 }
    293 
    294 
    295 /*
    296  * Read count units of data from bus space described by the tag, handle and
    297  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    298  * data is returned in the buffer passed by reference.
    299  */
    300 static __inline void
    301 bus_space_read_multi_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    302     bus_size_t ofs, uint8_t *bufp, bus_size_t count)
    303 {
    304         uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    305         while (count-- > 0) {
    306                 *bufp++ = *bsp;
    307         }
    308 }
    309 
    310 static __inline void
    311 bus_space_read_multi_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    312     bus_size_t ofs, uint16_t *bufp, bus_size_t count)
    313 {
    314         uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    315         while (count-- > 0) {
    316                 *bufp++ = *bsp;
    317         }
    318 }
    319 
    320 static __inline void
    321 bus_space_read_multi_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    322     bus_size_t ofs, uint32_t *bufp, bus_size_t count)
    323 {
    324         uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    325         while (count-- > 0) {
    326                 *bufp++ = *bsp;
    327         }
    328 }
    329 
    330 static __inline void
    331 bus_space_read_multi_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    332     bus_size_t ofs, uint64_t *bufp, bus_size_t count)
    333 {
    334         uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    335         while (count-- > 0) {
    336                 *bufp++ = *bsp;
    337         }
    338 }
    339 
    340 
    341 /*
    342  * Write count units of data to bus space described by the tag, handle and
    343  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    344  * data is read from the buffer passed by reference.
    345  */
    346 static __inline void
    347 bus_space_write_multi_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    348     bus_size_t ofs, const uint8_t *bufp, bus_size_t count)
    349 {
    350         uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    351         while (count-- > 0) {
    352                 *bsp = *bufp++;
    353         }
    354 }
    355 
    356 static __inline void
    357 bus_space_write_multi_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    358     bus_size_t ofs, const uint16_t *bufp, bus_size_t count)
    359 {
    360         uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    361         while (count-- > 0) {
    362                 *bsp = *bufp++;
    363         }
    364 }
    365 
    366 static __inline void
    367 bus_space_write_multi_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    368     bus_size_t ofs, const uint32_t *bufp, bus_size_t count)
    369 {
    370         uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    371         while (count-- > 0) {
    372                 *bsp = *bufp++;
    373         }
    374 }
    375 
    376 static __inline void
    377 bus_space_write_multi_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    378     bus_size_t ofs, const uint64_t *bufp, bus_size_t count)
    379 {
    380         uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    381         while (count-- > 0) {
    382                 *bsp = *bufp++;
    383         }
    384 }
    385 
    386 
    387 /*
    388  * Read count units of data from bus space described by the tag, handle and
    389  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    390  * data is written to the buffer passed by reference and read from successive
    391  * bus space addresses. Access is unordered.
    392  */
    393 static __inline void
    394 bus_space_read_region_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    395     bus_size_t ofs, uint8_t *bufp, bus_size_t count)
    396 {
    397         while (count-- > 0) {
    398                 uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    399                 *bufp++ = *bsp;
    400                 ofs += 1;
    401         }
    402 }
    403 
    404 static __inline void
    405 bus_space_read_region_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    406     bus_size_t ofs, uint16_t *bufp, bus_size_t count)
    407 {
    408         while (count-- > 0) {
    409                 uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    410                 *bufp++ = *bsp;
    411                 ofs += 2;
    412         }
    413 }
    414 
    415 static __inline void
    416 bus_space_read_region_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    417     bus_size_t ofs, uint32_t *bufp, bus_size_t count)
    418 {
    419         while (count-- > 0) {
    420                 uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    421                 *bufp++ = *bsp;
    422                 ofs += 4;
    423         }
    424 }
    425 
    426 static __inline void
    427 bus_space_read_region_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    428     bus_size_t ofs, uint64_t *bufp, bus_size_t count)
    429 {
    430         while (count-- > 0) {
    431                 uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    432                 *bufp++ = *bsp;
    433                 ofs += 8;
    434         }
    435 }
    436 
    437 
    438 /*
    439  * Write count units of data from bus space described by the tag, handle and
    440  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    441  * data is read from the buffer passed by reference and written to successive
    442  * bus space addresses. Access is unordered.
    443  */
    444 static __inline void
    445 bus_space_write_region_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    446     bus_size_t ofs, const uint8_t *bufp, bus_size_t count)
    447 {
    448         while (count-- > 0) {
    449                 uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    450                 *bsp = *bufp++;
    451                 ofs += 1;
    452         }
    453 }
    454 
    455 static __inline void
    456 bus_space_write_region_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    457     bus_size_t ofs, const uint16_t *bufp, bus_size_t count)
    458 {
    459         while (count-- > 0) {
    460                 uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    461                 *bsp = *bufp++;
    462                 ofs += 2;
    463         }
    464 }
    465 
    466 static __inline void
    467 bus_space_write_region_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    468     bus_size_t ofs, const uint32_t *bufp, bus_size_t count)
    469 {
    470         while (count-- > 0) {
    471                 uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    472                 *bsp = *bufp++;
    473                 ofs += 4;
    474         }
    475 }
    476 
    477 static __inline void
    478 bus_space_write_region_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    479     bus_size_t ofs, const uint64_t *bufp, bus_size_t count)
    480 {
    481         while (count-- > 0) {
    482                 uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    483                 *bsp = *bufp++;
    484                 ofs += 8;
    485         }
    486 }
    487 
    488 
    489 /*
    490  * Write count units of data from bus space described by the tag, handle and
    491  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    492  * data is passed by value. Writes are unordered.
    493  */
    494 static __inline void
    495 bus_space_set_multi_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    496     bus_size_t ofs, uint8_t val, bus_size_t count)
    497 {
    498         uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    499         while (count-- > 0) {
    500                 *bsp = val;
    501         }
    502 }
    503 
    504 static __inline void
    505 bus_space_set_multi_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    506     bus_size_t ofs, uint16_t val, bus_size_t count)
    507 {
    508         uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    509         while (count-- > 0) {
    510                 *bsp = val;
    511         }
    512 }
    513 
    514 static __inline void
    515 bus_space_set_multi_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    516     bus_size_t ofs, uint32_t val, bus_size_t count)
    517 {
    518         uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    519         while (count-- > 0) {
    520                 *bsp = val;
    521         }
    522 }
    523 
    524 static __inline void
    525 bus_space_set_multi_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    526     bus_size_t ofs, uint64_t val, bus_size_t count)
    527 {
    528         uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    529         while (count-- > 0) {
    530                 *bsp = val;
    531         }
    532 }
    533 
    534 
    535 /*
    536  * Write count units of data from bus space described by the tag, handle and
    537  * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The
    538  * data is passed by value and written to successive bus space addresses.
    539  * Writes are unordered.
    540  */
    541 static __inline void
    542 bus_space_set_region_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    543     bus_size_t ofs, uint8_t val, bus_size_t count)
    544 {
    545         while (count-- > 0) {
    546                 uint8_t __volatile *bsp = (uint8_t __volatile *)(bsh + ofs);
    547                 *bsp = val;
    548                 ofs += 1;
    549         }
    550 }
    551 
    552 static __inline void
    553 bus_space_set_region_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    554     bus_size_t ofs, uint16_t val, bus_size_t count)
    555 {
    556         while (count-- > 0) {
    557                 uint16_t __volatile *bsp = (uint16_t __volatile *)(bsh + ofs);
    558                 *bsp = val;
    559                 ofs += 2;
    560         }
    561 }
    562 
    563 static __inline void
    564 bus_space_set_region_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    565     bus_size_t ofs, uint32_t val, bus_size_t count)
    566 {
    567         while (count-- > 0) {
    568                 uint32_t __volatile *bsp = (uint32_t __volatile *)(bsh + ofs);
    569                 *bsp = val;
    570                 ofs += 4;
    571         }
    572 }
    573 
    574 static __inline void
    575 bus_space_set_region_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh,
    576     bus_size_t ofs, uint64_t val, bus_size_t count)
    577 {
    578         while (count-- > 0) {
    579                 uint64_t __volatile *bsp = (uint64_t __volatile *)(bsh + ofs);
    580                 *bsp = val;
    581                 ofs += 8;
    582         }
    583 }
    584 
    585 
    586 /*
    587  * Copy count units of data from bus space described by the tag and the first
    588  * handle and ofs pair to bus space described by the tag and the second handle
    589  * and ofs pair. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes.
    590  * The data is read from successive bus space addresses and also written to
    591  * successive bus space addresses. Both reads and writes are unordered.
    592  */
    593 static __inline void
    594 bus_space_copy_region_1(bus_space_tag_t bst __unused, bus_space_handle_t bsh1,
    595     bus_size_t ofs1, bus_space_handle_t bsh2, bus_size_t ofs2, bus_size_t count)
    596 {
    597         bus_addr_t dst = bsh1 + ofs1;
    598         bus_addr_t src = bsh2 + ofs2;
    599         uint8_t __volatile *dstp = (uint8_t __volatile *) dst;
    600         uint8_t __volatile *srcp = (uint8_t __volatile *) src;
    601         if (dst > src) {
    602                 src += count - 1;
    603                 dst += count - 1;
    604                 while (count-- > 0) {
    605                         *dstp = *srcp;
    606                         src -= 1;
    607                         dst -= 1;
    608                 }
    609         } else {
    610                 while (count-- > 0) {
    611                         *dstp = *srcp;
    612                         src += 1;
    613                         dst += 1;
    614                 }
    615         }
    616 }
    617 
    618 static __inline void
    619 bus_space_copy_region_2(bus_space_tag_t bst __unused, bus_space_handle_t bsh1,
    620     bus_size_t ofs1, bus_space_handle_t bsh2, bus_size_t ofs2, bus_size_t count)
    621 {
    622         bus_addr_t dst = bsh1 + ofs1;
    623         bus_addr_t src = bsh2 + ofs2;
    624         uint16_t __volatile *dstp = (uint16_t __volatile *) dst;
    625         uint16_t __volatile *srcp = (uint16_t __volatile *) src;
    626         if (dst > src) {
    627                 src += (count - 1) << 1;
    628                 dst += (count - 1) << 1;
    629                 while (count-- > 0) {
    630                         *dstp = *srcp;
    631                         src -= 2;
    632                         dst -= 2;
    633                 }
    634         } else {
    635                 while (count-- > 0) {
    636                         *dstp = *srcp;
    637                         src += 2;
    638                         dst += 2;
    639                 }
    640         }
    641 }
    642 
    643 static __inline void
    644 bus_space_copy_region_4(bus_space_tag_t bst __unused, bus_space_handle_t bsh1,
    645     bus_size_t ofs1, bus_space_handle_t bsh2, bus_size_t ofs2, bus_size_t count)
    646 {
    647         bus_addr_t dst = bsh1 + ofs1;
    648         bus_addr_t src = bsh2 + ofs2;
    649         uint32_t __volatile *dstp = (uint32_t __volatile *) dst;
    650         uint32_t __volatile *srcp = (uint32_t __volatile *) src;
    651         if (dst > src) {
    652                 src += (count - 1) << 2;
    653                 dst += (count - 1) << 2;
    654                 while (count-- > 0) {
    655                         *dstp = *srcp;
    656                         src -= 4;
    657                         dst -= 4;
    658                 }
    659         } else {
    660                 while (count-- > 0) {
    661                         *dstp = *srcp;
    662                         src += 4;
    663                         dst += 4;
    664                 }
    665         }
    666 }
    667 
    668 static __inline void
    669 bus_space_copy_region_8(bus_space_tag_t bst __unused, bus_space_handle_t bsh1,
    670     bus_size_t ofs1, bus_space_handle_t bsh2, bus_size_t ofs2, bus_size_t count)
    671 {
    672         bus_addr_t dst = bsh1 + ofs1;
    673         bus_addr_t src = bsh2 + ofs2;
    674         uint64_t __volatile *dstp = (uint64_t __volatile *) dst;
    675         uint64_t __volatile *srcp = (uint64_t __volatile *) src;
    676         if (dst > src) {
    677                 src += (count - 1) << 3;
    678                 dst += (count - 1) << 3;
    679                 while (count-- > 0) {
    680                         *dstp = *srcp;
    681                         src -= 8;
    682                         dst -= 8;
    683                 }
    684         } else {
    685                 while (count-- > 0) {
    686                         *dstp = *srcp;
    687                         src += 8;
    688                         dst += 8;
    689                 }
    690         }
    691 }
    692 
    693 
    694 /*
    695  * Stream accesses are the same as normal accesses on RTEMS; there are no
    696  * supported bus systems with an endianess different from the host one.
    697  */
    698 #define bus_space_read_stream_1(t, h, o)        \
    699         bus_space_read_1(t, h, o)
    700 #define bus_space_read_stream_2(t, h, o)        \
    701         bus_space_read_2(t, h, o)
    702 #define bus_space_read_stream_4(t, h, o)        \
    703         bus_space_read_4(t, h, o)
    704 #define bus_space_read_stream_8(t, h, o)        \
    705         bus_space_read_8(t, h, o)
    706 
    707 #define bus_space_read_multi_stream_1(t, h, o, a, c)    \
    708         bus_space_read_multi_1(t, h, o, a, c)
    709 #define bus_space_read_multi_stream_2(t, h, o, a, c)    \
    710         bus_space_read_multi_2(t, h, o, a, c)
    711 #define bus_space_read_multi_stream_4(t, h, o, a, c)    \
    712         bus_space_read_multi_4(t, h, o, a, c)
    713 #define bus_space_read_multi_stream_8(t, h, o, a, c)    \
    714         bus_space_read_multi_8(t, h, o, a, c)
    715 
    716 #define bus_space_write_stream_1(t, h, o, v)    \
    717         bus_space_write_1(t, h, o, v)
    718 #define bus_space_write_stream_2(t, h, o, v)    \
    719         bus_space_write_2(t, h, o, v)
    720 #define bus_space_write_stream_4(t, h, o, v)    \
    721         bus_space_write_4(t, h, o, v)
    722 #define bus_space_write_stream_8(t, h, o, v)    \
    723         bus_space_write_8(t, h, o, v)
    724 
    725 #define bus_space_write_multi_stream_1(t, h, o, a, c)   \
    726         bus_space_write_multi_1(t, h, o, a, c)
    727 #define bus_space_write_multi_stream_2(t, h, o, a, c)   \
    728         bus_space_write_multi_2(t, h, o, a, c)
    729 #define bus_space_write_multi_stream_4(t, h, o, a, c)   \
    730         bus_space_write_multi_4(t, h, o, a, c)
    731 #define bus_space_write_multi_stream_8(t, h, o, a, c)   \
    732         bus_space_write_multi_8(t, h, o, a, c)
    733 
    734 #define bus_space_set_multi_stream_1(t, h, o, v, c)     \
    735         bus_space_set_multi_1(t, h, o, v, c)
    736 #define bus_space_set_multi_stream_2(t, h, o, v, c)     \
    737         bus_space_set_multi_2(t, h, o, v, c)
    738 #define bus_space_set_multi_stream_4(t, h, o, v, c)     \
    739         bus_space_set_multi_4(t, h, o, v, c)
    740 #define bus_space_set_multi_stream_8(t, h, o, v, c)     \
    741         bus_space_set_multi_8(t, h, o, v, c)
    742 
    743 #define bus_space_read_region_stream_1(t, h, o, a, c)   \
    744         bus_space_read_region_1(t, h, o, a, c)
    745 #define bus_space_read_region_stream_2(t, h, o, a, c)   \
    746         bus_space_read_region_2(t, h, o, a, c)
    747 #define bus_space_read_region_stream_4(t, h, o, a, c)   \
    748         bus_space_read_region_4(t, h, o, a, c)
    749 #define bus_space_read_region_stream_8(t, h, o, a, c)   \
    750         bus_space_read_region_8(t, h, o, a, c)
    751 
    752 #define bus_space_write_region_stream_1(t, h, o, a, c)  \
    753         bus_space_write_region_1(t, h, o, a, c)
    754 #define bus_space_write_region_stream_2(t, h, o, a, c)  \
    755         bus_space_write_region_2(t, h, o, a, c)
    756 #define bus_space_write_region_stream_4(t, h, o, a, c)  \
    757         bus_space_write_region_4(t, h, o, a, c)
    758 #define bus_space_write_region_stream_8(t, h, o, a, c)  \
    759         bus_space_write_region_8(t, h, o, a, c)
    760 
    761 #define bus_space_set_region_stream_1(t, h, o, v, c)    \
    762         bus_space_set_region_1(t, h, o, v, c)
    763 #define bus_space_set_region_stream_2(t, h, o, v, c)    \
    764         bus_space_set_region_2(t, h, o, v, c)
    765 #define bus_space_set_region_stream_4(t, h, o, v, c)    \
    766         bus_space_set_region_4(t, h, o, v, c)
    767 #define bus_space_set_region_stream_8(t, h, o, v, c)    \
    768         bus_space_set_region_8(t, h, o, v, c)
    769 
    770 #define bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c)    \
    771         bus_space_copy_region_1(t, h1, o1, h2, o2, c)
    772 #define bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c)    \
    773         bus_space_copy_region_2(t, h1, o1, h2, o2, c)
    774 #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c)    \
    775         bus_space_copy_region_4(t, h1, o1, h2, o2, c)
    776 #define bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c)    \
    777         bus_space_copy_region_8(t, h1, o1, h2, o2, c)
     215#if defined(__i386__)
     216  #include <freebsd/machine/bus_space-i386.h>
     217#elif defined(__ppc__)
     218  #include <freebsd/machine/bus_space-simple_memory.h>
     219#else
     220  #error "Bus space routines not implemented for this architecture!!"
     221#endif
    778222
    779223#include <freebsd/machine/bus_dma.h>
Note: See TracChangeset for help on using the changeset viewer.