I have seen that sort of code used to prevent OEM Vista versions (e.g., Lenovo) from installing on non-Lenovo machines. Haven’t yet see a case where generic OS can’t be convinced to run on any particular platform.
I am warned of this nasty, however.
Thanks!
Thos
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-323011-
xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Thursday, May 01, 2008 3:03 PM
To: Windows System Software Devs Interest List
Subject: [SPAM] RE:[ntdev] Mixing C and C++ files in a driver project.Thomas,
> So, buy the Vista machine and then have to install XP on it… Is a
mystery to me!!!If you are really lucky this is the only mystery that you will have to
solve. However, I am afraid you may be forced to solve some other
“mysteries” throughout your installation process, no matter if your
choose XP or RTM Vista - according to quite a few posts in this NG,
some newly-produced OEM machines just refuse to work with anything (
MSFT-produced, of course - more on it below), other than OEM-provided
Vista.Now let’s look at how the “competing community” does things. For
example, what you see below is taken from the source of a driver for
all boards based on the RTL8129 and RTL8139 chips (by passing an array
of pci_device_id structure to the function that registers your module
with PCI subsystem you tell it to invoke your probe() function whenever
it detects any PCI device that matches the specified criteria, with
vendor , device, subvendor and subdevice IDs in respectively the first,
second, third and fourth fields of a structure)static struct pci_device_id rtl8139_pci_tbl = {
{0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1113, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1500, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1259, 0xa11e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x14ea, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x14ea, 0xab07, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1432, 0x9130, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x02ac, 0x1012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x018a, 0x0106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },#ifdef CONFIG_SH_SECUREEDGE5410
/* Bogus 8139 silicon reports 8129 without external PROM*/
{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
#endif
#ifdef CONFIG_8139TOO_8129
{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8129 },
#endif/* some crazy cards report invalid vendor ids like
* 0x0001 here. The other ids are valid and constant,
* so we simply don’t match on the main vendor id.
*/
{PCI_ANY_ID, 0x8139, 0x10ec, 0x8139, 0, 0, RTL8139 },
{PCI_ANY_ID, 0x8139, 0x1186, 0x1300, 0, 0, RTL8139 },
{PCI_ANY_ID, 0x8139, 0x13d1, 0xab06, 0, 0, RTL8139 },{0,}
};As you can see, if you want to find any RTL8129 or RTL8139-based
adapter that does not get recognized by their system, you have to try
really hard. Please note that the above array is pretty short by
the"competing community’s" standards - you can find arrays of
pci_device_id structures of significantly larger size in their plain
vanilla kernel…Anton Bassov
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminarsTo unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer