2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-01-03 11:25:55 +01:00
kolibrios-nvme-driver/drivers/nvme/macros.inc

22 lines
972 B
PHP
Raw Normal View History

2024-04-21 02:28:43 +02:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2024-04-21 23:05:47 +02:00
macro PDEBUGF _level*, _fmt*, _bus*, _devfn*, [_args] {
2024-04-21 02:28:43 +02:00
push ebx
push ecx
2024-04-21 23:05:47 +02:00
movzx ebx, _devfn
2024-04-21 02:28:43 +02:00
shr ebx, 3 ; get rid of 3 lowest bits (function code), the rest bits is device code
2024-04-21 23:05:47 +02:00
movzx ecx, _devfn
2024-04-21 02:28:43 +02:00
and ecx, 00000111b ; get only 3 lowest bits (function code)
2024-04-21 23:05:47 +02:00
DEBUGF _level, _fmt, _bus, ebx, ecx, _args
2024-04-21 02:28:43 +02:00
pop ecx
pop ebx
}