Changeset 53252 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg
- Timestamp:
- Nov 6, 2014 12:57:32 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware/MdePkg
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/IoLib.h
r53251 r53252 2620 2620 2621 2621 2622 #ifdef VBOX2623 2624 /**2625 Reads an 8-bit I/O FIFO port.2626 2627 @param Port The I/O port to read.2628 @param Buffer The buffer to write the data to.2629 @param Count The number of bytes to read.2630 2631 **/2632 VOID2633 EFIAPI2634 IoReadBuffer8 (2635 IN UINTN Port,2636 OUT VOID *Buffer,2637 IN UINTN Count2638 );2639 2640 /**2641 Reads a 16-bit I/O FIFO port.2642 2643 @param Port The I/O port to read.2644 @param Buffer The buffer to write the data to.2645 @param Count The number of words to read.2646 2647 **/2648 VOID2649 EFIAPI2650 IoReadBuffer16 (2651 IN UINTN Port,2652 OUT VOID *Buffer,2653 IN UINTN Count2654 );2655 2656 /**2657 Reads a 32-bit I/O FIFO port.2658 2659 @param Port The I/O port to read.2660 @param Buffer The buffer to write the data to.2661 @param Count The number of dwords to read.2662 2663 **/2664 VOID2665 EFIAPI2666 IoReadBuffer32 (2667 IN UINTN Port,2668 OUT VOID *Buffer,2669 IN UINTN Count2670 );2671 2672 /**2673 Writes to an 8-bit I/O FIFO port.2674 2675 @param Port The I/O port to read.2676 @param Buffer The buffer to write the data to.2677 @param Count The number of bytes to write.2678 2679 **/2680 VOID2681 EFIAPI2682 IoWriteBuffer8 (2683 IN UINTN Port,2684 IN CONST VOID *Buffer,2685 IN UINTN Count2686 );2687 2688 /**2689 Writes to a 16-bit I/O FIFO port.2690 2691 @param Port The I/O port to read.2692 @param Buffer The buffer to write the data to.2693 @param Count The number of words to write.2694 2695 **/2696 VOID2697 EFIAPI2698 IoWriteBuffer16 (2699 IN UINTN Port,2700 IN CONST VOID *Buffer,2701 IN UINTN Count2702 );2703 2704 /**2705 Writes to a 32-bit I/O FIFO port.2706 2707 @param Port The I/O port to read.2708 @param Buffer The buffer to write the data to.2709 @param Count The number of dwords to write.2710 2711 **/2712 VOID2713 EFIAPI2714 IoWriteBuffer32 (2715 IN UINTN Port,2716 IN CONST VOID *Buffer,2717 IN UINTN Count2718 );2719 2720 #endif /* VBOX */2721 2722 2622 #endif 2723 2623 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
r53251 r53252 197 197 } 198 198 199 200 #ifdef VBOX201 202 /**203 Reads an 8-bit I/O FIFO port.204 205 @param Port The I/O port to read.206 @param Buffer The buffer to write the data to.207 @param Count The number of bytes to read.208 209 **/210 __inline__211 VOID212 EFIAPI213 IoReadBuffer8 (214 IN UINTN Port,215 OUT VOID *Buffer,216 IN UINTN Count217 )218 {219 __asm__ __volatile__ ("rep; insb" : "+D" (Buffer), "+c" (Count) : "d" ((UINT16)Port));220 }221 222 223 /**224 Reads a 16-bit I/O FIFO port.225 226 @param Port The I/O port to read.227 @param Buffer The buffer to write the data to.228 @param Count The number of words to read.229 230 **/231 __inline__232 VOID233 EFIAPI234 IoReadBuffer16 (235 IN UINTN Port,236 OUT VOID *Buffer,237 IN UINTN Count238 )239 {240 __asm__ __volatile__ ("rep; insw" : "+D" (Buffer), "+c" (Count) : "d" ((UINT16)Port));241 }242 243 /**244 Reads a 32-bit I/O FIFO port.245 246 @param Port The I/O port to read.247 @param Buffer The buffer to write the data to.248 @param Count The number of dwords to read.249 250 **/251 __inline__252 VOID253 EFIAPI254 IoReadBuffer32 (255 IN UINTN Port,256 OUT VOID *Buffer,257 IN UINTN Count258 )259 {260 __asm__ __volatile__ ("rep; insl" : "+D" (Buffer), "+c" (Count) : "d" ((UINT16)Port));261 }262 263 264 /**265 Writes to an 8-bit I/O FIFO port.266 267 @param Port The I/O port to read.268 @param Buffer The buffer to write the data to.269 @param Count The number of bytes to write.270 271 **/272 __inline__273 VOID274 EFIAPI275 IoWriteBuffer8 (276 IN UINTN Port,277 IN CONST VOID *Buffer,278 IN UINTN Count279 )280 {281 __asm__ __volatile__ ("rep; outsb" : "+S" (Buffer), "+c" (Count) : "d" ((UINT16)Port));282 }283 284 285 /**286 Writes to a 16-bit I/O FIFO port.287 288 @param Port The I/O port to read.289 @param Buffer The buffer to write the data to.290 @param Count The number of words to write.291 292 **/293 __inline__294 VOID295 EFIAPI296 IoWriteBuffer16 (297 IN UINTN Port,298 IN CONST VOID *Buffer,299 IN UINTN Count300 )301 {302 __asm__ __volatile__ ("rep; outsw" : "+S" (Buffer), "+c" (Count) : "d" ((UINT16)Port));303 }304 305 /**306 Writes to a 32-bit I/O FIFO port.307 308 @param Port The I/O port to read.309 @param Buffer The buffer to write the data to.310 @param Count The number of dwords to write.311 312 **/313 __inline__314 VOID315 EFIAPI316 IoWriteBuffer32 (317 IN UINTN Port,318 IN CONST VOID *Buffer,319 IN UINTN Count320 )321 {322 __asm__ __volatile__ ("rep; outsl" : "+S" (Buffer), "+c" (Count) : "d" ((UINT16)Port));323 }324 325 #endif /* VBOX */
Note:
See TracChangeset
for help on using the changeset viewer.