Message ID | 54a08fcb41b12e715529148a6bc11bcb3e2adb4d.1567326213.git.noring@nocrew.org (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Series | Linux for the PlayStation 2 | expand |
On 9/1/19 6:37 PM, Fredrik Noring wrote: > Signed-off-by: Fredrik Noring <noring@nocrew.org> > --- > arch/mips/kernel/setup.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c > index ab349d2381c3..7d5bf8cb513b 100644 > --- a/arch/mips/kernel/setup.c > +++ b/arch/mips/kernel/setup.c > @@ -870,14 +870,16 @@ static void __init resource_init(void) > switch (boot_mem_map.map[i].type) { > case BOOT_MEM_RAM: > case BOOT_MEM_INIT_RAM: > - case BOOT_MEM_ROM_DATA: > res->name = "System RAM"; > res->flags |= IORESOURCE_SYSRAM; > break; > + case BOOT_MEM_ROM_DATA: > + res->name = "System ROM"; > + break; > case BOOT_MEM_RESERVED: > case BOOT_MEM_NOMAP: > default: > - res->name = "reserved"; > + res->name = "Reserved"; Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > } > > request_resource(&iomem_resource, res); >
在 2019/9/2 0:37, Fredrik Noring 写道: > Signed-off-by: Fredrik Noring <noring@nocrew.org> > --- > arch/mips/kernel/setup.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c > index ab349d2381c3..7d5bf8cb513b 100644 > --- a/arch/mips/kernel/setup.c > +++ b/arch/mips/kernel/setup.c > @@ -870,14 +870,16 @@ static void __init resource_init(void) > switch (boot_mem_map.map[i].type) { > case BOOT_MEM_RAM: > case BOOT_MEM_INIT_RAM: > - case BOOT_MEM_ROM_DATA: > res->name = "System RAM"; > res->flags |= IORESOURCE_SYSRAM; > break; > + case BOOT_MEM_ROM_DATA: > + res->name = "System ROM"; > + break; Hi Fredik, ROM_DATA meant memory used by ROM(Bootloader) to store data in some machines, is that name right? Btw, boot_mem_map had been droped recently, see mips-next tree, please rebase. Thanks -- Jiaxun Yang > case BOOT_MEM_RESERVED: > case BOOT_MEM_NOMAP: > default: > - res->name = "reserved"; > + res->name = "Reserved"; > } > > request_resource(&iomem_resource, res);
> ROM_DATA meant memory used by ROM(Bootloader) to store data in some > machines, is that name right? That's the machine reset code, and other things such as the BIOS, drivers, firmware, splash screen animations, a DVD player, etc. > Btw, boot_mem_map had been droped recently, see mips-next tree, please > rebase. OK, then I think we can drop this patch since it was meant as a starting point to mapping all addresses in /proc/iomem. I have patches that make it look like this: # cat /proc/iomem 00000000-01ffffff : System RAM 00010000-00431c4b : Kernel code 00431c4c-00584fff : Kernel data 007c0000-007e695f : Kernel bss 12000000-13ffffff : Graphics Synthesizer 1c000000-1c1fffff : IOP RAM 1e000000-1e0fffff : System ROM 1f801600-1f8016ff : USB OHCI 1fc00000-1fffffff : System ROM There are many other regions, and it would be useful to have them all included eventually, but they are not essential for the initial system. Fredrik
在 2019/9/2 23:26, Fredrik Noring 写道: >> ROM_DATA meant memory used by ROM(Bootloader) to store data in some >> machines, is that name right? > That's the machine reset code, and other things such as the BIOS, drivers, > firmware, splash screen animations, a DVD player, etc. Hi Fredik, Then it's not *memory* right?' And It should not be managed by boot_mem_map (Or memblock after boot_mem_map being dropped). >> Btw, boot_mem_map had been droped recently, see mips-next tree, please >> rebase. > OK, then I think we can drop this patch since it was meant as a starting > point to mapping all addresses in /proc/iomem. I have patches that make > it look like this: Add these stuff to resource system by platform code is better than hijack memory map of all other machines. > > # cat /proc/iomem > 00000000-01ffffff : System RAM > 00010000-00431c4b : Kernel code > 00431c4c-00584fff : Kernel data > 007c0000-007e695f : Kernel bss > 12000000-13ffffff : Graphics Synthesizer > 1c000000-1c1fffff : IOP RAM > 1e000000-1e0fffff : System ROM > 1f801600-1f8016ff : USB OHCI > 1fc00000-1fffffff : System ROM > > There are many other regions, and it would be useful to have them all > included eventually, but they are not essential for the initial system. > > Fredrik Thanks. -- Jiaxun Yang
> Then it's not *memory* right?' > > And It should not be managed by boot_mem_map (Or memblock after > boot_mem_map being dropped). ROM0 corresponds to IC503 (BOOT) and ROM1 to IC506 (DVD) in the SCPH-30000 series edition 6 service manual. Both 4 MiB 44 pin chips. IC506 is faintly marked with SCEI at the bottom of this image of the A side of the mainboard: https://commons.wikimedia.org/wiki/File:PS2-SCPH-30001-Motherboard.jpg IC503 is on the B side. What would they be if not read-only memory? Sony made numerous revisions of their mainboards, so earlier and later designs were different. > Add these stuff to resource system by platform code is better than > hijack memory map of all other machines. Sorry, I was unclear. The other ones are platform resources, although incomplete. Fredrik
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index ab349d2381c3..7d5bf8cb513b 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -870,14 +870,16 @@ static void __init resource_init(void) switch (boot_mem_map.map[i].type) { case BOOT_MEM_RAM: case BOOT_MEM_INIT_RAM: - case BOOT_MEM_ROM_DATA: res->name = "System RAM"; res->flags |= IORESOURCE_SYSRAM; break; + case BOOT_MEM_ROM_DATA: + res->name = "System ROM"; + break; case BOOT_MEM_RESERVED: case BOOT_MEM_NOMAP: default: - res->name = "reserved"; + res->name = "Reserved"; } request_resource(&iomem_resource, res);
Signed-off-by: Fredrik Noring <noring@nocrew.org> --- arch/mips/kernel/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)