MIPS questions

Jay Monkman jtm at smoothsmoothie.com
Fri Oct 24 16:59:48 UTC 2003


I'm working on a MIPS BSP, and have a couple questions.

Does anybody have TCP/IP working? Unless I make changes, I get
alignment errors. During processing, the stack overlays the TCP source
and dest port numbers with the address of the mbuf. Since there's no
guarantee those stay aligned, how is TCP working on MIPS? It looks
like the fixes we put in for ARM will fix this also.


In _CPU_ISR_Set_level in cpukit/score/cpu/mips/cpu.c, there's a chunk
of code:
  sr = srbits | ((new_level==0)? (0xfc00 | SR_EXL | SR_IE): \
                 (((new_level<<9) & 0xfc00) | \
                  (new_level & 1)?(SR_EXL | SR_IE):0));

I think there needs to be parentheses around the last line. Without
the parentheses, the statement turns into:
  sr = srbits | ((new_level==0)? (0xfc00 | SR_EXL | SR_IE): \
                 (SR_EXL | SR_IE));

Or am I missing something?

Thanks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20031024/4b1ddfc0/attachment.bin>


More information about the users mailing list