From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: [SeaBIOS PATCH v2] Fix regression of commit 87b533bf Date: Tue, 20 Sep 2011 04:00:57 -0400 (EDT) Message-ID: <2f5dea21-18c1-425f-bb4c-7845fd910b0a@zmail05.collab.prod.int.phx2.redhat.com> References: <20110919065338.22802.48911.stgit@t> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, alex williamson To: seabios@seabios.org Return-path: In-Reply-To: <20110919065338.22802.48911.stgit@t> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: seabios-bounces@seabios.org Sender: seabios-bounces@seabios.org List-Id: kvm.vger.kernel.org >>From 4678a3cb0e0a3cd7a4bc3d284c5719fdba90bc61 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 20 Sep 2011 15:43:55 +0800 Subject: [PATCH V2] Fix regression of commit 87b533bf From: Kevin O'Connor 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. --- Changes from v1: - correct the attribution Signed-off-by: Kevin O'Connor --- src/post.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 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. -- 1.7.6.1