radeon_hd: Ensure userspace accesses the AtomBIOS rom is R/W
* We should only need R/O in theory, but AtomBIOS has issues with R/O for some reason that needs investigated (#19348) * For now, we keep it R/W to userspace so radeon_hd doesn't break after 33c3179 Change-Id: Id50c8916690e6068c94fc496bbe89e80d7ba1bf8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8817 Reviewed-by: Alexander von Gluck <[email protected]> Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
9eae4e9bd4
commit
f1ea2e7ad4
@@ -139,6 +139,7 @@ init_common(int device, bool isClone)
|
||||
return status;
|
||||
}
|
||||
|
||||
// XXX: We *should* only need B_READ_AREA here, but AtomBIOS calls fail with it RO #19348
|
||||
gInfo->rom_area = clone_area("radeon hd AtomBIOS",
|
||||
(void**)&gInfo->rom, B_ANY_ADDRESS, B_READ_AREA | B_WRITE_AREA,
|
||||
gInfo->shared_info->rom_area);
|
||||
|
||||
@@ -115,8 +115,9 @@ mapAtomBIOSACPI(radeon_info &info, uint32& romSize)
|
||||
|| !memcmp(&info.atom_buffer[romHeader + 4], "MOTA", 4);
|
||||
|
||||
if (romValid == true) {
|
||||
set_area_protection(info.rom_area,
|
||||
B_KERNEL_READ_AREA | B_CLONEABLE_AREA);
|
||||
// XXX: We should only KERNEL_READ_AREA + CLONE here, but AtomBIOS calls fail w/RO #19348
|
||||
//set_area_protection(info.rom_area,
|
||||
// B_KERNEL_READ_AREA | B_CLONEABLE_AREA);
|
||||
ERROR("%s: AtomBIOS verified and locked (%" B_PRIu32 ")\n", __func__, romSize);
|
||||
} else
|
||||
ERROR("%s: AtomBIOS memcpy failed!\n", __func__);
|
||||
@@ -227,8 +228,9 @@ mapAtomBIOS(radeon_info &info, phys_addr_t romBase, uint32 romSize,
|
||||
|| !memcmp(&info.atom_buffer[romHeader + 4], "MOTA", 4);
|
||||
|
||||
if (romValid == true) {
|
||||
set_area_protection(info.rom_area,
|
||||
B_KERNEL_READ_AREA | B_CLONEABLE_AREA);
|
||||
// XXX: We should only KERNEL_READ_AREA + CLONE here, but AtomBIOS calls fail w/RO #19348
|
||||
//set_area_protection(info.rom_area,
|
||||
// B_KERNEL_READ_AREA | B_CLONEABLE_AREA);
|
||||
ERROR("%s: AtomBIOS verified and locked (%" B_PRIu32 ")\n", __func__, romSize);
|
||||
} else
|
||||
ERROR("%s: AtomBIOS memcpy failed!\n", __func__);
|
||||
|
||||
Reference in New Issue
Block a user