mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-23 12:35:41 +00:00
parent
aac0ac7c63
commit
f7d80a9bf9
@ -43,6 +43,8 @@ namespace Ahci_driver {
|
||||
|
||||
Block::Driver *claim_port(long device_num);
|
||||
void free_port(long device_num);
|
||||
|
||||
struct Missing_controller { };
|
||||
}
|
||||
|
||||
|
||||
|
@ -182,7 +182,16 @@ struct Block::Main
|
||||
{
|
||||
Genode::log("--- Starting AHCI driver ---");
|
||||
bool support_atapi = config.xml().attribute_value("atapi", false);
|
||||
Ahci_driver::init(env, heap, root, support_atapi);
|
||||
try { Ahci_driver::init(env, heap, root, support_atapi); }
|
||||
|
||||
catch (Ahci_driver::Missing_controller) {
|
||||
Genode::error("no AHCI controller found");
|
||||
env.parent().exit(~0);
|
||||
}
|
||||
catch (Genode::Parent::Service_denied) {
|
||||
Genode::error("hardware access denied");
|
||||
env.parent().exit(~0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -49,8 +49,7 @@ struct X86_hba : Platform::Hba
|
||||
[&] () { pci.upgrade_ram(4096); });
|
||||
|
||||
if (!pci_device_cap.valid()) {
|
||||
Genode::error("no AHCI controller found");
|
||||
throw -1;
|
||||
throw Ahci_driver::Missing_controller();
|
||||
}
|
||||
|
||||
/* construct pci client */
|
||||
|
Loading…
x
Reference in New Issue
Block a user