qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Abort on attempts to load out-of-range ROMs
@ 2011-05-16 11:33 Ben Leslie
  0 siblings, 0 replies; only message in thread
From: Ben Leslie @ 2011-05-16 11:33 UTC (permalink / raw)
  To: qemu-devel Developers

Abort on attempts to load out-of-range ROMs

Change ROM loading behaviour so that attempts to load ROMs that fall outside
valid memory ranges causing an abort with a useful error message, rather
than silently ignoring the problem.

Signed-off-by: Ben Leslie <benno@benno.id.au>
---
 exec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec.c b/exec.c
index a718d74..af1b6a2 100644
--- a/exec.c
+++ b/exec.c
@@ -3838,7 +3838,7 @@ void
cpu_physical_memory_write_rom(target_phys_addr_t addr,
         if ((pd & ~TARGET_PAGE_MASK) != IO_MEM_RAM &&
             (pd & ~TARGET_PAGE_MASK) != IO_MEM_ROM &&
             !(pd & IO_MEM_ROMD)) {
-            /* do nothing */
+           cpu_abort(first_cpu, "Attempting to load malformed ROM at
address: 0x%x\n", addr);
         } else {
             unsigned long addr1;
             addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-16 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 11:33 [Qemu-devel] [PATCH] Abort on attempts to load out-of-range ROMs Ben Leslie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).