Patchwork [1/2] prep: Remove bogus BIOS size check

login
register
mail settings
Submitter Hervé Poussineau
Date Jan. 18, 2011, 9:43 p.m.
Message ID <1295387036-16961-1-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/79365/
State New
Headers show

Comments

Hervé Poussineau - Jan. 18, 2011, 9:43 p.m.
From: Andreas Färber <andreas.faerber@web.de>

r3480 added this check to account for the entry vector 0xfff00100 to be
available for CPUs that need it. Today however, the NIP is not yet
initialized at this point (zero), so the check always triggers.

Moreover, BIOS size check is already done previously, so this part can
be removed too.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/ppc_prep.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Andreas Färber - Jan. 19, 2011, 7:49 p.m.
Am 18.01.2011 um 22:43 schrieb Hervé Poussineau:

> From: Andreas Färber <andreas.faerber@web.de>
>
> r3480 added this check to account for the entry vector 0xfff00100 to  
> be
> available for CPUs that need it. Today however, the NIP is not yet
> initialized at this point (zero), so the check always triggers.
>
> Moreover, BIOS size check is already done previously, so this part can
> be removed too.
>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
> hw/ppc_prep.c |    3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
> index 1492266..6b22122 100644
> --- a/hw/ppc_prep.c
> +++ b/hw/ppc_prep.c
> @@ -600,9 +600,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
>     if (filename) {
>         qemu_free(filename);
>     }
> -    if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
> -        hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
> -    }

I've been thinking if we could replace this with a check for env- 
 >excep_prefix + env->hreset_vector or similar but haven't found the  
time to try it out yet.

Andreas

>
>     if (linux_boot) {
>         kernel_base = KERNEL_LOAD_ADDR;
> -- 
> 1.7.2.3
>
Aurelien Jarno - Jan. 29, 2011, 3:03 p.m.
On Tue, Jan 18, 2011 at 10:43:55PM +0100, Hervé Poussineau wrote:
> From: Andreas Färber <andreas.faerber@web.de>
> 
> r3480 added this check to account for the entry vector 0xfff00100 to be
> available for CPUs that need it. Today however, the NIP is not yet
> initialized at this point (zero), so the check always triggers.
> 
> Moreover, BIOS size check is already done previously, so this part can
> be removed too.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
>  hw/ppc_prep.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Thanks, applied.

> diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
> index 1492266..6b22122 100644
> --- a/hw/ppc_prep.c
> +++ b/hw/ppc_prep.c
> @@ -600,9 +600,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
>      if (filename) {
>          qemu_free(filename);
>      }
> -    if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
> -        hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
> -    }
>  
>      if (linux_boot) {
>          kernel_base = KERNEL_LOAD_ADDR;
> -- 
> 1.7.2.3
> 
> 
>

Patch

diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 1492266..6b22122 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -600,9 +600,6 @@  static void ppc_prep_init (ram_addr_t ram_size,
     if (filename) {
         qemu_free(filename);
     }
-    if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
-        hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
-    }
 
     if (linux_boot) {
         kernel_base = KERNEL_LOAD_ADDR;