Skip to contentSkip to conversation

mips: PMC MSP71xx mips common

PATCH Marc St-Jean 3 participants 3 messages Feb 28, 2007 MIPS

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines · Ralf Baechle
Quoted 8 lines · Thiemo Seufer

Something like

#if LOADADDR == 0xffffffff80000000
      .fill   0x400

#endif

but by defining an appropriate name in arch/mips/Makefile instead of externalizing the load-y/LOADADDR there.

Quoted 6 lines

Basically a good idea but it will fail for 64-bit kernels so the test would need to be extended to cover XKPHYS as well. Also R2 processors which have the c0_ebase registers do no need to reserve space for exception handlers as they can easily move them elsewhere.

Ralf

Hi Ralf,

From your description it sounds like not all R2 CPUs have c0_ebase registers?

I don't know how to check for c0_ebase from the pre-processor, the test below assumes they all do.

How about something like:

#if (defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) && \
                 VMLINUX_LOAD_ADDRESS == CKSEG0) || \
         ((defined(CONFIG_SYS_HAS_CPU_MIPS64_R1) || defined(CONFIG_SYS_HAS_CPU_MIPS64_R2)) && \
                 VMLINUX_LOAD_ADDRESS == XKPHYS)
	.fill 0x400

#endif

Marc

#1 lore raw

All MIPS Release 2 implementations contain the EBase register.

/gmu
---
Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc. Email: uhler AT mips.com
1225 Charleston Road Voice: (650)567-5025
Mountain View, CA 94043

Quoted 53 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Marc St-Jean
Sent: Wednesday, February 28, 2007 1:36 PM
To: Ralf Baechle
Cc: Thiemo Seufer; Andrew Sharp; [email protected]
Subject: Re: [PATCH 2/5] mips: PMC MSP71xx mips common

Quoted 9 lines · Ralf Baechle
Quoted 7 lines · Thiemo Seufer

Something like

#if LOADADDR == 0xffffffff80000000
      .fill   0x400

#endif

but by defining an appropriate name in

arch/mips/Makefile instead

Quoted 3 lines

of > externalizing the load-y/LOADADDR there.

Basically a good idea but it will fail for 64-bit kernels

so the test

Quoted 1 line

would need to be extended to cover XKPHYS as well. Also R2

processors

Quoted 4 lines

which have the c0_ebase registers do no need to reserve space for exception handlers as they can easily move them elsewhere.

Ralf

Hi Ralf,

From your description it sounds like not all R2 CPUs have
c0_ebase registers?

I don't know how to check for c0_ebase from the pre-processor, the test below assumes they all do.

How about something like:

#if (defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) && \
                 VMLINUX_LOAD_ADDRESS == CKSEG0) || \
         ((defined(CONFIG_SYS_HAS_CPU_MIPS64_R1) || 
defined(CONFIG_SYS_HAS_CPU_MIPS64_R2)) && \
                 VMLINUX_LOAD_ADDRESS == XKPHYS)
	.fill 0x400

#endif

Marc

#2 lore raw
In reply to Marc St-Jean
Quoted 17 lines · Marc St-Jean
Quoted 16 lines · Ralf Baechle
Quoted 8 lines · Thiemo Seufer

Something like

#if LOADADDR == 0xffffffff80000000
      .fill   0x400

#endif

but by defining an appropriate name in arch/mips/Makefile instead of externalizing the load-y/LOADADDR there.

Basically a good idea but it will fail for 64-bit kernels so the test would need to be extended to cover XKPHYS as well. Also R2 processors which have the c0_ebase registers do no need to reserve space for exception handlers as they can easily move them elsewhere.

Quoted 8 lines
Quoted 1 line

Ralf

Hi Ralf,

From your description it sounds like not all R2 CPUs have c0_ebase registers?

I don't know how to check for c0_ebase from the pre-processor, the test below assumes they all do.

Sorry for being ambigous. All R2 processors have ebase. However Linux happens to support older processors as well, that was my point.

Quoted 8 lines

How about something like:

#if (defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) && \
                 VMLINUX_LOAD_ADDRESS == CKSEG0) || \
         ((defined(CONFIG_SYS_HAS_CPU_MIPS64_R1) || defined(CONFIG_SYS_HAS_CPU_MIPS64_R2)) && \
                 VMLINUX_LOAD_ADDRESS == XKPHYS)
	.fill 0x400

#endif

There are several potencial addresses in XKPHYS, so if anything:

#if !defined(CONFIG_CPU_MIPSR2) && \
    ((VMLINUX_LOAD_ADDRESS == CKSEG0) || \
     (VMLINUX_LOAD_ADDRESS & 0xc7ffffffffffffffUL) == XKPHYS)

However even where ebase actually exists there might be reasons not to use it. So a config option might be the safe thing to do.

Ralf