aboutsummaryrefslogtreecommitdiff
path: root/util/x86emu/yabel/biosemu.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-02-22 04:33:13 +0000
committerStefan Reinauer <stepan@openbios.org>2010-02-22 04:33:13 +0000
commitd650e9934ff8da9b9cb69e42e642c0ee6d390bf6 (patch)
tree8c6982efa868e828c21d4d427d2678e7e0804668 /util/x86emu/yabel/biosemu.c
parent30b90fe4f0b31aa6676f507d3913579453942ba8 (diff)
YABEL update
- drop x86emu + old biosemu in favor of YABEL - Add YABEL_DIRECTHW to get the old biosemu behavior - add support for vesa console using YABEL - add coreboot table entry with console information - add bootsplash support (reads /bootsplash.jpg from CBFS) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Pattrick Hueper <phueper@hueper.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5135 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/yabel/biosemu.c')
-rw-r--r--util/x86emu/yabel/biosemu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/util/x86emu/yabel/biosemu.c b/util/x86emu/yabel/biosemu.c
index df202814a4..09a98b50b6 100644
--- a/util/x86emu/yabel/biosemu.c
+++ b/util/x86emu/yabel/biosemu.c
@@ -86,10 +86,15 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
// in case we jump somewhere unexpected, or execution is finished,
// fill the biosmem with hlt instructions (0xf4)
- memset(biosmem, 0xf4, biosmem_size);
+ // But we have to be careful: If biosmem is 0x00000000 we're running
+ // in the lower 1MB and we must not wipe memory like that.
+ if (biosmem) {
+ DEBUG_PRINTF("Clearing biosmem\n");
+ memset(biosmem, 0xf4, biosmem_size);
+ }
+
+ X86EMU_setMemBase(biosmem, biosmem_size);
- M.mem_base = (long) biosmem;
- M.mem_size = biosmem_size;
DEBUG_PRINTF("membase set: %08x, size: %08x\n", (int) M.mem_base,
(int) M.mem_size);