From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: [SeaBIOS PATCH 1/2] Fix regression of commit 87b533bf Date: Mon, 19 Sep 2011 14:53:38 +0800 Message-ID: <20110919065338.22802.48911.stgit@t> References: <20110919065307.22802.51309.stgit@t> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, mtosatti@redhat.com, alex.williamson@redhat.com, kevin@koconnor.net To: seabios@seabios.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43967 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753988Ab1ISGxS (ORCPT ); Mon, 19 Sep 2011 02:53:18 -0400 In-Reply-To: <20110919065307.22802.51309.stgit@t> Sender: kvm-owner@vger.kernel.org List-ID: After adding more device entries in ACPI DSDT tables, the filesize of bios.bin changed from 128K to 256K. But bios could not initialize successfully. This is a regression since seabios commit 87b533bf. Prior to that commit, seabios did not mark the early 32bit initialization code as init code. However, a side effect of marking that code (handle_post) as init code is that it is more likely the linker could place the code at an address less than 0xe0000. The patch (just a hack) would cover up the issue. Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/post.c b/src/post.c index e195e89..bc2e548 100644 --- a/src/post.c +++ b/src/post.c @@ -336,7 +336,7 @@ reloc_init(void) // Start of Power On Self Test (POST) - the BIOS initilization phase. // This function does the setup needed for code relocation, and then // invokes the relocation and main setup code. -void VISIBLE32INIT +void VISIBLE32FLAT handle_post(void) { debug_serial_setup(); @@ -356,6 +356,14 @@ handle_post(void) // Allow writes to modify bios area (0xf0000) make_bios_writable(); + + void handle_post2(void); + handle_post2(); +} + +void VISIBLE32INIT +handle_post2(void) +{ HaveRunPost = 1; // Detect ram and setup internal malloc.