projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38d1a34
)
Try to prevent mapping option roms over flash.
author
Kevin O'Connor
<kevin@koconnor.net>
Sat, 18 Apr 2009 21:01:02 +0000
(17:01 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Sat, 18 Apr 2009 21:01:02 +0000
(17:01 -0400)
Don't map an option rom in last 4MiB of ram or at its max.
src/optionroms.c
patch
|
blob
|
history
diff --git
a/src/optionroms.c
b/src/optionroms.c
index 841cae27e472e4638ed2beaecefcac16584b6aa6..def3febb457c9fa1d6cd8f5124f521a1ae169a01 100644
(file)
--- a/
src/optionroms.c
+++ b/
src/optionroms.c
@@
-214,7
+214,9
@@
map_optionrom(u16 bdf, u32 vendev)
if (!sz || sz == 0xffffffff)
goto fail;
- if (orig < 16*1024*1024) {
+ if (orig == sz || (u32)(orig + 4*1024*1024) < 20*1024*1024) {
+ // Don't try to map to a pci addresses at its max, in the last
+ // 4MiB of ram, or the first 16MiB of ram.
dprintf(6, "Preset rom address doesn't look valid\n");
goto fail;
}