|
在EDK中做SCSI driver,环境是NT32,要在driver binding protocal support( )中打开pciio协议,当编译的时候发现open pciio protocal fail,代码如下:7 _) C( {8 j! Y# Q, I, J1 E
EFI_BREAKPOINT( );
0 S9 S3 r! `2 n$ c Status = gBS->OpenProtocol (6 p% F$ |4 ]2 u" E/ ]0 \' {
Controller,, W0 e/ ~: e# w9 ]$ a
&gEfiPciIoProtocolGuid,
& j- `; W' K: E+ M (VOID **) &PciIo,7 I9 }( f8 P0 m) u7 Q. \* e
This->DriverBindingHandle,
; |1 z9 }2 T# }7 J" ^. t- U Controller,( B- V5 p1 R3 e5 b+ R& o
EFI_OPEN_PROTOCOL_BY_DRIVER, x' d6 l+ _2 @1 o; q3 _, o
);
9 M3 }5 L2 P7 |& g8 V if (EFI_ERROR (Status)) { A) F3 { D2 M6 v" I- Z: x3 p, A2 I
return Status;3 i4 m& g3 P0 b9 o$ G+ U
1:在NT32下打开一个PCIIO protocal,应该是与硬件没有任何关系的,为什么却fail?用VS studio调试跟踪发现,其实是在执行handle.c 文件中的CoreGetProtocolInterface( )函数时,在 Look at each protocol interface for a match时没有找到匹配protocal返回一个unsupport状态值。
, R. V) d0 m4 P& _2:当我在用EDK中提供的AtapiScsiPassThruDriverBindingSupported( )测试时,同样会出现此现象。+ b, S# x$ t6 ^4 e7 x
请问:
/ E8 z. d, f3 y2 e2 I当invoke support( )时传递的controller参数需要硬件支持吗?如果不需要为什么会fail掉呢 |
|