MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bus_space_read_region_1

Function bus_space_read_region_1

freebsd/x86/include/bus.h:364–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362 size_t count);
363
364static __inline void
365bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
366 bus_size_t offset, u_int8_t *addr, size_t count)
367{
368
369 if (tag == X86_BUS_SPACE_IO) {
370 int _port_ = bsh + offset;
371#ifdef __GNUCLIKE_ASM
372 __asm __volatile(" \n\
373 1: inb %w2,%%al \n\
374 stosb \n\
375 incl %2 \n\
376 loop 1b" :
377 "=D" (addr), "=c" (count), "=d" (_port_) :
378 "0" (addr), "1" (count), "2" (_port_) :
379 "%eax", "memory", "cc");
380#endif
381 } else {
382 bus_space_handle_t _port_ = bsh + offset;
383#ifdef __GNUCLIKE_ASM
384 __asm __volatile(" \n\
385 repne \n\
386 movsb" :
387 "=D" (addr), "=c" (count), "=S" (_port_) :
388 "0" (addr), "1" (count), "2" (_port_) :
389 "memory", "cc");
390#endif
391 }
392}
393
394static __inline void
395bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,

Callers 1

orm_identifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected