1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Kernel/Graphics: Assert if trying to initialize with the wrong driver

This commit is contained in:
Liav A 2021-07-03 05:11:29 +03:00 committed by Gunnar Beutner
parent 053a832fac
commit b4e230a7bb
2 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,8 @@ struct [[gnu::packed]] BochsDisplayMMIORegisters {
UNMAP_AFTER_INIT NonnullRefPtr<BochsGraphicsAdapter> BochsGraphicsAdapter::initialize(PCI::Address address)
{
PCI::ID id = PCI::get_id(address);
VERIFY((id.vendor_id == 0x1234 && id.device_id == 0x1111) || (id.vendor_id == 0x80ee && id.device_id == 0xbeef));
return adopt_ref(*new BochsGraphicsAdapter(address));
}