The ppc targets fail because of src/cpu/ppc/ppc4xx/mem.c struct mem_range is never ever defined. Is it struct lb_memory?!
I have a bunch of other patches lying around that I will commit if nobody complains
Stefan
Stefan Reinauer stepan@openbios.org writes:
The ppc targets fail because of src/cpu/ppc/ppc4xx/mem.c struct mem_range is never ever defined. Is it struct lb_memory?!
That is because of the big change where sizeram was removed. I think the definition originally sat in src/include/mem.h Which has been removed, because it is no longer used.
Getting the ppc port to use the device tree, looks like an interesting task.
I have a bunch of other patches lying around that I will commit if nobody complains
Stefan
Index: src/arch/ppc/boot/linuxbios_table.c
RCS file: /cvsroot/freebios/freebios2/src/arch/ppc/boot/linuxbios_table.c,v retrieving revision 1.7 diff -u -r1.7 linuxbios_table.c --- src/arch/ppc/boot/linuxbios_table.c 27 Oct 2004 08:53:35 -0000 1.7 +++ src/arch/ppc/boot/linuxbios_table.c 11 Nov 2004 15:39:34 -0000 @@ -129,7 +129,7 @@ }
void lb_memory_range(struct lb_memory *mem,
- uint32_t type, uint64_t start, uint64_t size)
- uint32_t type, unsigned long start, unsigned long size)
{ int entries; entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); Index: src/arch/ppc/boot/linuxbios_table.h =================================================================== RCS file: /cvsroot/freebios/freebios2/src/arch/ppc/boot/linuxbios_table.h,v retrieving revision 1.1 diff -u -r1.1 linuxbios_table.h --- src/arch/ppc/boot/linuxbios_table.h 13 Jun 2003 22:07:51 -0000 1.1 +++ src/arch/ppc/boot/linuxbios_table.h 11 Nov 2004 15:39:34 -0000 @@ -7,8 +7,6 @@
/* This file holds function prototypes for building the linuxbios table. */ unsigned long write_linuxbios_table(
- unsigned long *processor_map,
- struct mem_range *ram, unsigned long low_table_start, unsigned long low_table_end, unsigned long rom_table_start, unsigned long rom_table_end);
Index: src/arch/ppc/lib/cpuid.c
RCS file: /cvsroot/freebios/freebios2/src/arch/ppc/lib/cpuid.c,v retrieving revision 1.5 diff -u -r1.5 cpuid.c --- src/arch/ppc/lib/cpuid.c 27 Oct 2004 08:53:35 -0000 1.5 +++ src/arch/ppc/lib/cpuid.c 11 Nov 2004 15:39:34 -0000 @@ -3,6 +3,7 @@
#include "ppc.h" #include "ppcreg.h" +#include <device/device.h> #include <console/console.h>
void display_cpuid(struct device *cpu) Index: src/include/cpu/cpu.h =================================================================== RCS file: /cvsroot/freebios/freebios2/src/include/cpu/cpu.h,v retrieving revision 1.4 diff -u -r1.4 cpu.h --- src/include/cpu/cpu.h 16 Oct 2004 06:20:04 -0000 1.4 +++ src/include/cpu/cpu.h 11 Nov 2004 15:39:34 -0000 @@ -2,7 +2,7 @@ #define CPU_CPU_H
struct device; -#include <arch/cpu.h> +// #include <arch/cpu.h>
void cpu_initialize(void); void initialize_cpus(struct bus *cpu_bus);
The fix here is to add an arch/ppc/include/arch/cpu.h. It can be empty...
The rest look fine.
Eric
Let me have a look. I'm back from travel tomorrow....
Greg
On Nov 11, 2004, at 8:42 AM, Stefan Reinauer wrote:
The ppc targets fail because of src/cpu/ppc/ppc4xx/mem.c struct mem_range is never ever defined. Is it struct lb_memory?!
I have a bunch of other patches lying around that I will commit if nobody complains
Stefan
<ppc.diff>
On Thu, 2004-11-11 at 08:42, Stefan Reinauer wrote:
The ppc targets fail because of src/cpu/ppc/ppc4xx/mem.c struct mem_range is never ever defined. Is it struct lb_memory?!
I have a bunch of other patches lying around that I will commit if nobody complains
Stefan
You marked the #include<arch/cpu.h> in inlcude/cpu/cpu.h. It breaks all x86 port !!!
Ollie
* Li-Ta Lo ollie@lanl.gov [041112 21:19]:
You marked the #include<arch/cpu.h> in inlcude/cpu/cpu.h. It breaks all x86 port !!!
Ouch. Fixed.
<brown-paperbag>Stefan</brown-paperbag>
On Thu, 11 Nov 2004, Stefan Reinauer wrote:
The ppc targets fail because of src/cpu/ppc/ppc4xx/mem.c struct mem_range is never ever defined. Is it struct lb_memory?!
this changed recently.
I have a bunch of other patches lying around that I will commit if nobody complains
what are these patches doing ?
ron
Ron,
I'll give a quick comment. Some patches are fixing smaller issues where prototypes and their functions drifted because a prototype was changed due to x86 merger but the ppc function was not adopted or similar. Others add missing includes. With these patches I get all PPC ports built up to the point of the missing mem_range structure which i did not attempt to fix.
--- src/arch/ppc/boot/linuxbios_table.c 27 Oct 2004 08:53:35 -0000 1.7 +++ src/arch/ppc/boot/linuxbios_table.c 11 Nov 2004 15:39:34 -0000 @@ -129,7 +129,7 @@ void lb_memory_range(struct lb_memory *mem,
- uint32_t type, uint64_t start, uint64_t size)
- uint32_t type, unsigned long start, unsigned long size)
{
The prototype in linuxbios_table.h uses ulongs too. This would be the same on ppc64 platforms, but on ppc ulong is just 32bit (pointer size)
diff -u -r1.1 linuxbios_table.h --- src/arch/ppc/boot/linuxbios_table.h 13 Jun 2003 22:07:51 -0000 1.1 +++ src/arch/ppc/boot/linuxbios_table.h 11 Nov 2004 15:39:34 -0000 @@ -7,8 +7,6 @@ unsigned long write_linuxbios_table(
- unsigned long *processor_map,
- struct mem_range *ram, unsigned long low_table_start, unsigned long low_table_end, unsigned long rom_table_start, unsigned long rom_table_end);
These are unused and unimplemented in the actual function.
--- src/arch/ppc/lib/cpuid.c 27 Oct 2004 08:53:35 -0000 1.5 +++ src/arch/ppc/lib/cpuid.c 11 Nov 2004 15:39:34 -0000 @@ -3,6 +3,7 @@ #include "ppcreg.h" +#include <device/device.h> #include <console/console.h>
missing include
--- src/include/cpu/cpu.h 16 Oct 2004 06:20:04 -0000 1.4 +++ src/include/cpu/cpu.h 11 Nov 2004 15:39:34 -0000 @@ -2,7 +2,7 @@ #define CPU_CPU_H
struct device; -#include <arch/cpu.h> +// #include <arch/cpu.h>
void cpu_initialize(void); void initialize_cpus(struct bus *cpu_bus);
The file was not there on PPC. I created it now and reversed above patch.
Stefan
those changes look fine.
ron