1. /*
* if a resource is "BUSY", it's not a hardware resource
* but a driver mapping of such a resource; we don't want
* to warn for those; some drivers legitimately map only
* partial hardware resources. (example: vesafb)
*/
if (p->flags & IORESOURCE_BUSY)
所以pci resource 分为硬件资源 猜想就是映射的是物理地址, 软件资源应该就是映射的是物理内存,带到后面验证吧。
2.这里使用了读写锁, 没有深入,大概是可以很多读的互斥写操作的锁,据说是初始一个很大的信号量a,然后读操作-1, check是否是大于0, 写操作-a,check是否等于0来实现互斥。
3.假设我要对某外设的IO资源进行保护。防止用户空间訪问。能够将其resource的flags置位exclusive就可以。??
4.0x10000 65536 各端口, 但是在64位机器中,端口资源会更多,所以不会再resource中限制,具体情况在acpi中
/*
* The legacy I/O space defined by the ia64 architecture supports only 65536 ports, but
* large machines may have multiple other I/O spaces so we can't place any a priori limit
* on IO_SPACE_LIMIT. These additional spaces are described in ACPI.
*/
5.e820 :ttp://blog.csdn.net/chenyu105/article/details/49892265