mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 06:45:08 +00:00
Kernel: Make map_typed() & map_typed_writable() fallible using ErrorOr
This mostly just moved the problem, as a lot of the callers are not capable of propagating the errors themselves, but it's a step in the right direction.
This commit is contained in:
parent
e2e5d4da16
commit
fb3e46e930
14 changed files with 80 additions and 57 deletions
|
@ -36,15 +36,15 @@ UNMAP_AFTER_INIT MultiProcessorParser::MultiProcessorParser(PhysicalAddress floa
|
|||
|
||||
UNMAP_AFTER_INIT void MultiProcessorParser::parse_floating_pointer_data()
|
||||
{
|
||||
auto floating_pointer = Memory::map_typed<MultiProcessor::FloatingPointer>(m_floating_pointer);
|
||||
auto floating_pointer = Memory::map_typed<MultiProcessor::FloatingPointer>(m_floating_pointer).release_value_but_fixme_should_propagate_errors();
|
||||
m_configuration_table = PhysicalAddress(floating_pointer->physical_address_ptr);
|
||||
dbgln("Features {}, IMCR? {}", floating_pointer->feature_info[0], (floating_pointer->feature_info[0] & (1 << 7)));
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void MultiProcessorParser::parse_configuration_table()
|
||||
{
|
||||
auto configuration_table_length = Memory::map_typed<MultiProcessor::ConfigurationTableHeader>(m_configuration_table)->length;
|
||||
auto config_table = Memory::map_typed<MultiProcessor::ConfigurationTableHeader>(m_configuration_table, configuration_table_length);
|
||||
auto configuration_table_length = Memory::map_typed<MultiProcessor::ConfigurationTableHeader>(m_configuration_table).release_value_but_fixme_should_propagate_errors()->length;
|
||||
auto config_table = Memory::map_typed<MultiProcessor::ConfigurationTableHeader>(m_configuration_table, configuration_table_length).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
size_t entry_count = config_table->entry_count;
|
||||
auto* entry = config_table->entries;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue