[U-Boot] [PATCH 3/3] biosemu: Do not free vga_info->BIOSImage when it is 0xc0000

For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
drivers/bios_emulator/atibios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index 7ea5fa6..dec6230 100644 --- a/drivers/bios_emulator/atibios.c +++ b/drivers/bios_emulator/atibios.c @@ -502,7 +502,8 @@ int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len, */ if (clean_up) { BE_exit(); - if (vga_info->BIOSImage) + if (vga_info->BIOSImage && + (u32)(vga_info->BIOSImage) != 0xc0000) free(vga_info->BIOSImage); free(vga_info); vga_info = NULL;

On 24 April 2015 at 01:48, Bin Meng bmeng.cn@gmail.com wrote:
For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/bios_emulator/atibios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Simon Glass sjg@chromium.org

On 24 April 2015 at 06:40, Simon Glass sjg@chromium.org wrote:
On 24 April 2015 at 01:48, Bin Meng bmeng.cn@gmail.com wrote:
For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/bios_emulator/atibios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Simon Glass sjg@chromium.org
Acked-by: Simon Glass sjg@chromium.org

On 24 April 2015 at 21:54, Simon Glass sjg@chromium.org wrote:
On 24 April 2015 at 06:40, Simon Glass sjg@chromium.org wrote:
On 24 April 2015 at 01:48, Bin Meng bmeng.cn@gmail.com wrote:
For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/bios_emulator/atibios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Simon Glass sjg@chromium.org
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-x86, thanks!
participants (2)
-
Bin Meng
-
Simon Glass