mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
Kernel: Add bar_address_mask to mask the last 4 bits of a BAR address
Create a bar_address_mask constant to mask the last 4 bits of a BAR address instead of hand coding the mask all over the kernel.
This commit is contained in:
parent
20d517f1da
commit
83b87a5ade
Notes:
sideshowbarker
2024-07-17 00:37:23 +09:00
Author: https://github.com/Panky-codes 🔰
Commit: 83b87a5ade
Pull-request: https://github.com/SerenityOS/serenity/pull/18484
Reviewed-by: https://github.com/gmta ✅
8 changed files with 14 additions and 15 deletions
|
@ -47,8 +47,8 @@ ErrorOr<void> IntelNativeGraphicsAdapter::initialize_adapter()
|
|||
dmesgln_pci(*this, "framebuffer @ {}", PhysicalAddress(PCI::get_BAR2(device_identifier())));
|
||||
|
||||
using MMIORegion = IntelDisplayConnectorGroup::MMIORegion;
|
||||
MMIORegion first_region { MMIORegion::BARAssigned::BAR0, PhysicalAddress(PCI::get_BAR0(device_identifier()) & 0xfffffff0), bar0_space_size };
|
||||
MMIORegion second_region { MMIORegion::BARAssigned::BAR2, PhysicalAddress(PCI::get_BAR2(device_identifier()) & 0xfffffff0), bar2_space_size };
|
||||
MMIORegion first_region { MMIORegion::BARAssigned::BAR0, PhysicalAddress(PCI::get_BAR0(device_identifier()) & PCI::bar_address_mask), bar0_space_size };
|
||||
MMIORegion second_region { MMIORegion::BARAssigned::BAR2, PhysicalAddress(PCI::get_BAR2(device_identifier()) & PCI::bar_address_mask), bar2_space_size };
|
||||
|
||||
PCI::enable_bus_mastering(device_identifier());
|
||||
PCI::enable_io_space(device_identifier());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue