Skip to content

Conversation

mintsuki
Copy link
Collaborator

Also, move test_bios_region_rw() to unlock_region.c file and make it static.

@FlyGoat
Copy link
Owner

FlyGoat commented Jun 16, 2025

I'm not sure cflush is necessary as BIOS regions are usually writeback cached and it won't hurt to keep data in cache. It won't hurt either, so I'm happy to apply this change tho.

…caches are flushed

Also, move test_bios_region_rw() to unlock_region.c file and make it static.
@mintsuki mintsuki force-pushed the unlock-bios-region-improvements branch from ae6c927 to 33c34a1 Compare June 16, 2025 21:49
@mintsuki
Copy link
Collaborator Author

I'm not sure cflush is necessary as BIOS regions are usually writeback cached and it won't hurt to keep data in cache. It won't hurt either, so I'm happy to apply this change tho.

But what if the data is evicted, or what about APs? Then the BIOS and VBIOS would basically disappear, which doesn't sound quite right to me...

@FlyGoat
Copy link
Owner

FlyGoat commented Jun 16, 2025

I'm not sure cflush is necessary as BIOS regions are usually writeback cached and it won't hurt to keep data in cache. It won't hurt either, so I'm happy to apply this change tho.

But what if the data is evicted, or what about APs? Then the BIOS and VBIOS would basically disappear, which doesn't sound quite right to me...

Ah I see your point, so your concern is Cache is accepting writes, but underlying memory is not? This won't happen on Intel/AMD h/w as it seems like writing permission check is done at microcode level but it makes sense to test it this way.

@FlyGoat
Copy link
Owner

FlyGoat commented Jun 16, 2025

LGTM now, thanks a lot.

@FlyGoat FlyGoat merged commit 3dd9e7e into FlyGoat:main Jun 16, 2025
1 check passed
@mintsuki mintsuki deleted the unlock-bios-region-improvements branch June 16, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants