New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 8 users

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2014
Cc:
Components:



Sign in to add a comment

Adding support for MIPS architecture in native client

Reported by mips3...@gmail.com, Sep 22 2011

Issue description

NaCl supports only x86 and ARM architecture today.
We would like to contribute the patches which will support native client on MIPS architecture. Please advise steps to do so.
 
Project Member

Comment 1 by bradchen@google.com, Sep 23 2011

Cc: sehr@google.com
Labels: -Component- Component-PNaCl Mstone-X
Status: Available
Here's what the todo list might look like:
- design and implement a NaCl sandbox for the MIPS ISA
- implement a validator for the MIPS sandbox
- implement a PNaCl code generator for the MIPS sandbox
- port the NaCl runtime to the MIPS sandbox

Has Chrome been ported to MIPS? If not that will probably need to be done too.

Comment 2 by mips3...@gmail.com, Sep 23 2011

We have already done the steps above and we would like to contribute the patches (i.e. we would to submit them for a review to you). If you can advise what parts would you like to see first, that would be helpful.

As of a browser work, Chromium (v15) has been ported to MIPS, though we still have not demoed PNaCl inside of Chromium.
Project Member

Comment 3 by mseaborn@chromium.org, Sep 23 2011

To get started, please just post whatever you have, e.g. on codereview.chromium.org or just by posting patches to native-client-discuss@googlegroups.com.
Project Member

Comment 4 by sehr@google.com, Sep 23 2011

In particular, we would like to review whatever documentation you have regarding your sandbox sequences, etc., strategy for validation, etc., first if possible.

Comment 5 by mips3...@gmail.com, Oct 5 2011

Overview of native client for MIPS. It describes sandboxing techniques and the trampoline layout for native client for Mips.

Comment 6 by mips3...@gmail.com, Oct 5 2011

The comment above has a document that describes sandboxing approach for MIPS architecture. You will find a lot of similarities to the approach previously taken for ARM architecture.

If you agree on the document, we would like you to review changes for PNaCl-LLVM first.
Project Member

Comment 7 by bsy@google.com, Oct 5 2011

thanks for the attachment.  this looks interesting.  a couple of quick comments/questions:

- why is the common trampoline code within the untrusted code space at all?  the location within the trampoline area requires bundles to be "stapled" together (with the halt and forward branches), but this could have been done in NaClSyscallSeg (the pushing of regs 4-7,31), since on MIPS we don't need to do segment register mucking while inside the untrusted code space.

- what is the overhead of this sandboxing scheme?  are measurement results available?  or simulation results?

- since t4 contains 0x3fffffff and t3 contains 0x3ffffff0, where t4 are used for both store (do you also do load?) sandboxing and stack pointer confinement, and t3 is used for bundle restriction.  what is the cost of permanently sequestering two registers?  you could do bundle restriction by, for example,

 xori t3, t4, 0xf
 and r1, r1, t3
 jal r1

to reduce register pressure (yeah, MIPS has plenty compared to x86-32) by materializing one constant from the other using a temporary as an intermediate strategy rather than materializing de nouveau w/ the usual lui ori or sequestering two registers, at the expense of an additional instruction at time-of-use, plus more icache pressure.

- the memory map includes a guard region, but doesn't say how large it has to be.  iirc, the MIPS32 instruction set can do lw/sw (and sh,sb,usw,sc,etc) with a signed 16-bit offset from a register, so it seems like that there should be two 32KB guard regions with no-access pages for the address ranges [0x40000000-0x40007fff] and [0xffff8000-0xffffffff], though of course the top (or negative) memory addresses should already be inaccessible because (typically) that's reserved for the kernel (kseg3).

Comment 8 by mips3...@gmail.com, Oct 6 2011

Thank you very much for the initial feedback.

- the common trampoline code was previously part of each trampoline, then we moved it to a separate code space, but you are right, the correct place is inside of NaClSyscallSeg. We will change that.

- as of the overhead, we do not have sufficient information yet. Some benchmarks, such as Dhrystone, have been run so far, but we will let you know when more results become available.

- speaking of register t3, it does not contain 0x3ffffff0, it is a value that is set on the runtime by sel_ldr based on the address of data segment. We believe the expense of using two registers for sandboxing masks is not high, and initial results seem to say the same.

- the guard region is 32KB wide.
Project Member

Comment 9 by bsy@google.com, Oct 7 2011

ah, i forgot that MIPS doesn't have an NX-analog, so t3 must necessarily be used to give a power-of-2 code region size.

Comment 10 by mips3...@gmail.com, Oct 13 2011

Initial patch for nacl-llvm has been submitted for a codereview.
http://codereview.chromium.org/8273005/
Project Member

Comment 11 by bsy@google.com, Oct 22 2011

re-reading the doc, it looks like there's no load sandboxing.  this is inconsistent with the x86-* sandboxes and the thumb sandbox (though load/read sandboxing wasn't in the initial arm sandbox), and having load/read sandboxing is something we really want -- we don't want to force all applications (embeddings of NaCl) to scrub all memory of any potentially sensitive information.  this can, for example, include environment variables such as USER, PATH, etc might be considered sensitive.

Comment 12 by mips3...@gmail.com, Oct 23 2011

There is load sandboxing, we just missed to explicitly state that in the document, since it is the same as store sandboxing.
You can see it implemented in the patch we sent, check functions static bool IsDangerousLoad and MipsNaClRewritePass::SandboxLoadStore at

http://codereview.chromium.org/8273005/diff/1/llvm/lib/Target/Mips/MipsNaClRewritePass.cpp

We will explicitly mention load sandboxing in the next version of the document.
Overview of Native Client for MIPS. Version 0.3.
Project Member

Comment 14 by bradchen@google.com, Feb 13 2012

Thanks for sharing the design doc. Mostly this looks pretty straightforward. A few questions:
- Can you please put this under version control someplace? Or in a Wiki? If you'd like access to the NaCl repo for this purpose that sounds reasonable to me. However this would need to be done using a personal (not role) account.
- Including a side-by-side comparison with the ARM address space layout and sandbox rules might be useful for people who are familiar with that sandbox. Key differences could also be helpful in recognizing the interesting parts of both systems.
- Did you put any thought into a 64-bit sandbox? Perhaps it is the ILP32 requirement?
- Can you explain explicitly what is supposed to happen if a pointer wraps around below address zero?
- The document is structured around what is possible. This is one way to approach things, but I'd like to see:
  - a high-level list of what common MIPS ISA features are _not_ allowed. This will identify features we want to check with tests and in the validator implementation.
  - in this context specifically a clearer statement of what addressing modes exist and what are not allowed, and state explicitly that it applies to all loads/stores including stack references; what about target address calculations?
- Can you cite your preferred reference for current MIPS architecture? One detail I'd like to be able to confirm is that the 32-bit MIPS ISA always uses a delayed branch. Do I recall correctly that the 64-bit MIPS ISA does not use a delayed branch? 
- Need to have Bennet have a look at the trampoline design proposal

Comment 15 by mips3...@gmail.com, Feb 15 2012

Thanks for the feedback. Here are some notes on your questions:

- Having the document in NaCl repository would be fine, if we can have an access to change it once it needs to be updated. If that is possible, let me know what would be a desirable placeholder (and provide me with some access to put it). Thanks.
- As of ARM/MIPS comparison, sure, we can add it to the document, though the similarities between the two seemed pretty obvious to us (this is why we have omitted the comparison).
- MIPS 64-bit support is of interest to us, but we have not spent enough time to discuss it much yet.
- Pointer can not wrap below address zero. It can not reach that low (i.e. high).
- We have a principle that "everything which is not allowed is forbidden". Having said this, I do understand what you mean, and while we implicitly list what action/modes we are preventing, sure we can list all the actions/patterns/instructions that we consider problematic. As of target address calculations, what concerns do you have?
- Our target architecture is MIPS32R2 instruction set; the reference for it is "MIPS32® Architecture For Programmers Volume II: The MIPS32® Instruction Set" and it is mentioned in the document.
- We are targeting MIPS platform which make use of branch delay slots. In some cases, such as 'branch likely' instructions, the instruction in the delay slot is not executed if the branch is not taken. On the other side, microMIPS instruction set (which we do not support for the time being) has branch instructions without delay slots.
Project Member

Comment 16 by bradchen@google.com, Feb 15 2012

Cc: bradchen@google.com
Project Member

Comment 17 by bradchen@google.com, Feb 15 2012

The ARM/MIPS comparison would be useful for people who are familiar with the ARM ISA but not with MIPS. These days that is pretty common.

Can you please explain with an example in the doc why a wrap-below address cannot occur?

How is instruction set selected on MIPS? How can we be sure that untrusted code will not somehow enter microMIPS or 64-bit execution modes? Please cover this explicitly in the doc.

Adding a "Non-goals" or "Is-not" section to the document would make it explicit and obvious to people that you are not doing 64-bit support etc.
Overview of Native Client for MIPS. Version 0.4.
native-client-mips-0.4.txt
15.9 KB View Download
Overall I think this is nearly there. Please note my comment in the online doc about address underflow. The other thing I would like you to add is: pseudocode for the validator. From this it should be straightforward for a reader to see the exact validation rules that must be implemented.

Project Member

Comment 20 by pet...@mips.com, Apr 4 2012

Validator changes have been uploaded for a code review at:

http://codereview.chromium.org/9979025/
Project Member

Comment 21 by pet...@mips.com, Apr 12 2012

Binutils change has been uploaded for a code review at:
http://codereview.chromium.org/10020059/
Project Member

Comment 22 by pet...@mips.com, Apr 24 2012

Two more CL are associated with this issue:

Moving dgen_ scripts out of validator_arm into a common directory.
http://codereview.chromium.org/10191011/

and

[MIPS] Enable building binutils for MIPS.
http://codereview.chromium.org/10214003/
Project Member

Comment 23 by pet...@mips.com, May 22 2012

Initial checkin for MIPS changes for GOLD can be seen and reviewed at:

http://codereview.chromium.org/10252012/
Project Member

Comment 24 by bugdroid1@chromium.org, Jun 1 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=8780

------------------------------------------------------------------------
r8780 | petarj@mips.com | Fri Jun 01 08:59:30 PDT 2012

Changed paths:
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/dgen_opt.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/dgen_dump.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/optimize-table.py?r1=8780&r2=8779&pathrev=8780
 M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_loads.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.cc?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator_mips.gyp?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/dgen_input.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/model-inl.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/ncval.cc?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/compile_tests.sh?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_jmp_imm.S?r1=8780&r2=8779&pathrev=8780
 M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_sp_updates.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/dgen_output.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_read_only_regs.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_invalid_dest.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_forbidden_instructions.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_loads.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_jmp_reg.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_stores.S?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/gen?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/address_set.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_jmp_imm.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/address_set_test.cc?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/address_set.cc?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_sp_updates.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator_tests.cc?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/generate_decoder.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_read_only_regs.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_invalid_dest.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_forbidden_instructions.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/mips32.table?r1=8780&r2=8779&pathrev=8780
 M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/build.scons?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_jmp_reg.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_stores.err?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/gen/decode.cc?r1=8780&r2=8779&pathrev=8780
 M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/site_scons/site_tools/naclsdk.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/model.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/mips-opt.table?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/build.scons?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/inst_classes.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/decode.h?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen/dgen_core.py?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/dgen?r1=8780&r2=8779&pathrev=8780
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validation-report.py?r1=8780&r2=8779&pathrev=8780

Initial patch for MIPS architecture that includes implementation of the validator, as well as the test code and script changes that enable building MIPS binutils and test executables.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=pnacl/build.sh misc-tools ; src/trusted/validator_mips/testdata/compile_tests.sh

Review URL: https://chromiumcodereview.appspot.com/9979025
------------------------------------------------------------------------
Project Member

Comment 25 by bugdroid1@chromium.org, Jun 19 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=8987

------------------------------------------------------------------------
r8987 | dschuff@google.com | Tue Jun 19 16:17:12 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=8987&r2=8986&pathrev=8987

[MIPS] Update UPSTREAM_REV to pull in MIPS LLVM change

R=robertm@chromium.org,jvoung@chromium.org,sehr@chromium.org
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= it compiles

Review URL: https://chromiumcodereview.appspot.com/10583023
------------------------------------------------------------------------
Project Member

Comment 26 by sehr@google.com, Jun 28 2012

Are there remaining issues with this, or can we close it?
Project Member

Comment 27 by pet...@mips.com, Jun 28 2012

There are no remaining CLs open (we are upstreaming some general changes to LLVM trunk right now), but we will be sending more patches (sel_ldr is the next one) soon, so I believe we should leave the issue open as an umbrella for the remaining changes, until we have all the pieces inside.

Project Member

Comment 28 by pet...@mips.com, Jul 11 2012

Toolchain scripts are available for review at:

http://codereview.chromium.org/10703143/.
Project Member

Comment 29 by bugdroid1@chromium.org, Jul 16 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9148

------------------------------------------------------------------------
r9148 | robertm@google.com | Mon Jul 16 06:54:02 PDT 2012

Changed paths:
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/packagelist.natty.armel.extra?r1=9148&r2=9147&pathrev=9148
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/packagelist.natty.armel.base?r1=9148&r2=9147&pathrev=9148
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/trusted-toolchain-creator.armel.precise.sh?r1=9148&r2=9147&pathrev=9148
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/packagelist.amd64.crosstool?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/qemu_tool_arm.sh?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/qemu_tool.sh revision 9137)
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.natty.armel.base?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/packagelist.natty.armel.base revision 9137)
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/trusted-toolchain-creator.armel.lucid.sh?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.precise.sh?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/trusted-toolchain-creator.armel.precise.sh revision 9137)
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/chrome.cc.host.sh?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/chrome.cc.host.sh revision 9137)
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/packagelist.precise.armel.base?r1=9148&r2=9147&pathrev=9148
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/chrome.cc.host.sh?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.lucid.sh?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/trusted-toolchain-creator.armel.lucid.sh revision 9137)
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.precise.armel.extra?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/packagelist.precise.armel.extra revision 9137)
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.precise.armel.base?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/packagelist.precise.armel.base revision 9137)
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/chrome.cc.arm.sh?r1=9148&r2=9147&pathrev=9148
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/packagelist.precise.armel.extra?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.natty.armel.extra?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/packagelist.natty.armel.extra revision 9137)
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/chrome.cc.arm.sh?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/chrome.cc.arm.sh revision 9137)
 D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/llvm/qemu_tool.sh?r1=9148&r2=9147&pathrev=9148
 A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.amd64.crosstool?r1=9148&r2=9147&pathrev=9148 (from /trunk/src/native_client/tools/llvm/packagelist.amd64.crosstool revision 9137)

Rename tools/llvm to tools/trusted_cross_toolchains
(using "llvm" does not make any sense at this point) 

Plus some additional adjustment to make the co-existance with the MIPS cross toolchain easier.
E.g. rename qemu_tool.sh to qemu_tool_arm.sh


BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= trybots
Review URL: https://chromiumcodereview.appspot.com/10736073
------------------------------------------------------------------------
Project Member

Comment 30 by pet...@mips.com, Jul 20 2012

MIPS will be switching to QEMU 1.X in future.
Another ticket has been created for this:
http://code.google.com/p/nativeclient/issues/detail?id=2914.
Project Member

Comment 31 by bugdroid1@chromium.org, Aug 8 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9402

------------------------------------------------------------------------
r9402 | petarj@mips.com | 2012-08-08T04:29:24.272161Z

Changed paths:
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=9402&r2=9401&pathrev=9402
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/qemu_tool_mips32.sh?r1=9402&r2=9401&pathrev=9402

    [MIPS] Toolchain scripts for MIPS architecture.

    Scripts that download, build and prepare tools for MIPS architecture.
    The current set is dependent on QEMU 0.12.5.

    There is no stock crosstoolchain for MIPS on Ubuntu, so we download Mentor's
    crosstoolchain. The other libraries come from standard Debian distribution
    (Squeeze) for MIPS, yet are tested on Ubuntu Lucid.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=tools/llvm/trusted-toolchain-creator-mips.sh trusted_sdk

Review URL: https://chromiumcodereview.appspot.com/10703143
------------------------------------------------------------------------
Project Member

Comment 32 by bugdroid1@chromium.org, Sep 28 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9827

------------------------------------------------------------------------
r9827 | petarj@mips.com | 2012-09-24T23:11:47.715002Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/platform_qualify/build.scons?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/platform_qualify/arch/mips?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_signal.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl.scons?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_signal_common.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_tls.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/mips?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_syscall_handlers_gen.py?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/ncvalidate.cc?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/ncvalidate.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator/validator_init.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_signal_mips.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/elf_constants.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/sel_rt.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/site_scons/site_tools/library_deps.py?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/include/bits/wordsize.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator/ncvalidate.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/nacl_signal_mips.c?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/build.scons?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/elf_util.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/concurrency_ops.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_config.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/nacl_bootstrap.c?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/build.scons?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_syscall.S?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_rt.c?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator/cpufeatures.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/tramp_mips.S?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_rt.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/portability.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/nacl_bootstrap.x?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/mips/sel_segments.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_ldr_mips.c?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/nacl_base.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_app.c?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch.S?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/tramp_mips.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_ldr_mips.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/sel_ldr-inl.h?r1=9827&r2=9826&pathrev=9827
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/cpuid_mips.h?r1=9827&r2=9826&pathrev=9827
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/posix/nacl_signal.c?r1=9827&r2=9826&pathrev=9827

[MIPS] Implementation of sel_ldr for MIPS architecture.

Set of changes needed for sel_ldr support for MIPS architecture.

The commit queue is not working for NaCl at the moment, so we are committing with:
NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/10919162
------------------------------------------------------------------------
Project Member

Comment 33 by bugdroid1@chromium.org, Sep 30 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9884

------------------------------------------------------------------------
r9884 | petarj@mips.com | 2012-09-30T20:53:55.351618Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/scripts/common-tools.sh?r1=9884&r2=9883&pathrev=9884
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=9884&r2=9883&pathrev=9884

[MIPS] Build sel_ldr for MIPS. 

Small change to the pnacl/build.sh to enable conditional building sel_ldr for
MIPS.

NOTRY=true
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275 
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11009007
------------------------------------------------------------------------
Project Member

Comment 34 by bugdroid1@chromium.org, Oct 4 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9928

------------------------------------------------------------------------
r9928 | petarj@mips.com | 2012-10-04T21:49:05.713416Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/tramp_mips.S?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_ldr_mips.h?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_config.h?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/mips-opt.table?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/gen/decode.cc?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/inst_classes.h?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_syscall.S?r1=9928&r2=9927&pathrev=9928
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/mips32.table?r1=9928&r2=9927&pathrev=9928

[MIPS] Use break instruction as NACL_HALT for MIPS. 

Replacing previous NACL_HALT (jr $zero) with a break instruction.

The commit queue is not working for NaCl at the moment, so we are
committing with:

NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275 
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11016003
------------------------------------------------------------------------
Project Member

Comment 35 by bugdroid1@chromium.org, Oct 8 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9946

------------------------------------------------------------------------
r9946 | petarj@mips.com | 2012-10-08T14:09:01.719089Z

Changed paths:
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/support/nacl_mips_defs.h?r1=9946&r2=9945&pathrev=9946
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/support/setjmp_mips32.S?r1=9946&r2=9945&pathrev=9946

[MIPS] Untrusted versions of setjmp and longjmp.

Implementation of setjmp/longjmp.

The commit queue is not working for NaCl at the moment, so we are
committing with:
NOTRY=true
However, we have run a try job manually, and it passed fine

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275 
TEST= None

Review URL: https://chromiumcodereview.appspot.com/11039026
------------------------------------------------------------------------
Project Member

Comment 36 by bugdroid1@chromium.org, Oct 16 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=9978

------------------------------------------------------------------------
r9978 | petarj@mips.com | 2012-10-11T17:31:46.062512Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=9978&r2=9977&pathrev=9978

[MIPS] Script to build a trusted mipsel-linux-gnu cross toolchain from source.

This script is intended to build a mipsel-linux-gnu cross compilation toolchain
(from source) that runs on x86 linux and generates code for a little-endian,
hard-float, mips32 target.

The commit queue is not working for NaCl at the moment, so we are
committing with:
NOTRY=true
However, we have run a try job manually, and it passed fine

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run the script

Review URL: https://chromiumcodereview.appspot.com/11036032
------------------------------------------------------------------------
Project Member

Comment 37 by bugdroid1@chromium.org, Oct 16 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10007

------------------------------------------------------------------------
r10007 | petarj@mips.com | 2012-10-16T10:07:21.195034Z

Changed paths:
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_unpredicted.err?r1=10007&r2=10006&pathrev=10007
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.cc?r1=10007&r2=10006&pathrev=10007
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validation-report.py?r1=10007&r2=10006&pathrev=10007
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.h?r1=10007&r2=10006&pathrev=10007
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/testdata/test_unpredicted.S?r1=10007&r2=10006&pathrev=10007
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/build.scons?r1=10007&r2=10006&pathrev=10007

[MIPS] New pattern in validator to detect jumps/branches in delay slots.

New pattern and tests have been added to detect if a branch or jump is placed in
delay slot. We need to avoid these situations since behaviour under these
circumstances is 'unpredicted'.

The commit queue is not working for NaCl at the moment, so we are committing
with:
NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11090024
------------------------------------------------------------------------
Project Member

Comment 38 by bugdroid1@chromium.org, Oct 16 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10009

------------------------------------------------------------------------
r10009 | petarj@mips.com | 2012-10-16T11:01:59.762217Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c?r1=10009&r2=10008&pathrev=10009
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=10009&r2=10008&pathrev=10009

[MIPS] Update SConstruct to use new MIPS toolchain.

Recent switch to a newer 4.7.2 GCC for MIPS requires changes in SConstruct.
The change also includes minor change to comply with unused-but-set-variable
restriction.

The commit queue is not working for NaCl at the moment, so we are committing
with:
NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11151031
------------------------------------------------------------------------
Project Member

Comment 39 by bugdroid1@chromium.org, Nov 3 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10183

------------------------------------------------------------------------
r10183 | petarj@mips.com | 2012-11-03T02:58:34.684626Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c?r1=10183&r2=10182&pathrev=10183
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_rt.c?r1=10183&r2=10182&pathrev=10183
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/linux/mips/sel_segments.c?r1=10183&r2=10182&pathrev=10183
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_rt.h?r1=10183&r2=10182&pathrev=10183
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch.S?r1=10183&r2=10182&pathrev=10183
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_syscall.S?r1=10183&r2=10182&pathrev=10183

[MIPS] Restore the trusted stack in NaClSyscallSeg.

Restore the trusted stack when switching back to the trusted zone.
Also, remove the extra frame-header zone.
Additional clean-up of code that used to save gp.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11368024
------------------------------------------------------------------------
Project Member

Comment 40 by mseaborn@chromium.org, Nov 10 2012

Labels: Arch-MIPS
Project Member

Comment 41 by bugdroid1@chromium.org, Nov 13 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10242

------------------------------------------------------------------------
r10242 | mseaborn@chromium.org | 2012-11-13T03:03:38.210798Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=10242&r2=10241&pathrev=10242

PNaCl: Enable MIPS in a couple of places

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=PNaCl toolchain trybots

Review URL: https://codereview.chromium.org/11369127
------------------------------------------------------------------------
Project Member

Comment 42 by bugdroid1@chromium.org, Nov 13 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10259

------------------------------------------------------------------------
r10259 | mseaborn@chromium.org | 2012-11-13T23:08:51.294845Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/scripts/lit_known_failures.txt?r1=10259&r2=10258&pathrev=10259

PNaCl: Disable failing MIPS tests

This fixes failures on the PNaCl toolchain bots in the
"llvm-regression" step introduced by r10242.  (This step was added to
the trybots between running try jobs and committing r10242.)

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=PNaCl toolchain trybots

Review URL: https://codereview.chromium.org/11369222
------------------------------------------------------------------------
Project Member

Comment 43 by bugdroid1@chromium.org, Nov 15 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10278

------------------------------------------------------------------------
r10278 | mseaborn@chromium.org | 2012-11-15T17:37:49.023604Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch.S?r1=10278&r2=10277&pathrev=10278

MIPS: Fix NaClSwitch() to set $t9 to the address of the entry point

The MIPS calling convention is that a function is called with $t9 set
to the address of the function being called.  This is used rather like
%ebx on x86-32 for locating global variables.

This change is needed to make hello_world.nexe work, otherwise the
nexe crashes the first time it dereferences a pointer derived from
$t9.

This also fixes an information leak: we no longer leak the value of
$t9 from trusted code.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=hello_world (with other changes applied locally)

Review URL: https://codereview.chromium.org/11308039
------------------------------------------------------------------------
Project Member

Comment 44 by bugdroid1@chromium.org, Nov 15 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10288

------------------------------------------------------------------------
r10288 | mseaborn@chromium.org | 2012-11-15T23:51:00.088760Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=10288&r2=10287&pathrev=10288
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/driver/pnacl-translate.py?r1=10288&r2=10287&pathrev=10288
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/driver/pnacl-ld.py?r1=10288&r2=10287&pathrev=10288
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/driver/driver_tools.py?r1=10288&r2=10287&pathrev=10288
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/driver/pnacl-as.py?r1=10288&r2=10287&pathrev=10288
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/driver/pnacl-nativeld.py?r1=10288&r2=10287&pathrev=10288

PNaCl: Add more MIPS support to the toolchain

 * Add various MIPS definitions to the driver scripts.
 * Build some system libraries for MIPS.

This isn't quite enough to link a translated hello_world.nexe, because
libgcc and libgcc_eh are not built yet.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=PNaCl toolchain trybots

Review URL: https://codereview.chromium.org/11299012
------------------------------------------------------------------------
Project Member

Comment 45 by bugdroid1@chromium.org, Nov 20 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10314

------------------------------------------------------------------------
r10314 | petarj@mips.com | 2012-11-20T21:19:25.121948Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=10314&r2=10313&pathrev=10314
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/qemu_tool_mips32.sh?r1=10314&r2=10313&pathrev=10314

[MIPS] Minor tweaks for QEMU.

Correct value of QEMU_JAIL and create symbolic links for libstdc++.so and
libgcc_s.so. This enables correct execution of QEMU.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run trusted-toolchain-creator.mipsel.squeeze.sh trusted_sdk


Review URL: https://chromiumcodereview.appspot.com/11414047
------------------------------------------------------------------------
Project Member

Comment 46 by bugdroid1@chromium.org, Dec 11 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10427

------------------------------------------------------------------------
r10427 | petarj@mips.com | 2012-12-11T00:03:38.917617Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c?r1=10427&r2=10426&pathrev=10427
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_syscall.S?r1=10427&r2=10426&pathrev=10427

[MIPS] Minor fixes for service runtime.

This change:
- renames NaClAllocateSpace for MIPS to NaClAllocateSpaceAslr, and
- defines symbol NaClSyscallThreadCaptureFault for MIPS.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11503016
------------------------------------------------------------------------
Project Member

Comment 47 by bugdroid1@chromium.org, Jan 1 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10523

------------------------------------------------------------------------
r10523 | petarj@mips.com | 2013-01-01T05:41:05.738615Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=10523&r2=10522&pathrev=10523

[MIPS] Do not use pnacl-irt-link for MIPS target.

Recent change ("Build the ARM core IRT using arm-flavored bitcode") broke the
build for MIPS.

"--pnacl-irt-link" should be used for ARM only.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= build run_irt_thread_test


Review URL: https://chromiumcodereview.appspot.com/11691004
------------------------------------------------------------------------
Project Member

Comment 48 by bugdroid1@chromium.org, Jan 6 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10543

------------------------------------------------------------------------
r10543 | petarj@mips.com | 2013-01-06T02:05:10.572712Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/DEPS?r1=10543&r2=10542&pathrev=10543

[MIPS] Update pnacl_llvm_rev and pnacl_gcc_rev

Update pnacl_llvm_rev and pnacl_gcc_rev to get recent changes for MIPS arch.

This pulls in the following LLVM changes:

b835840: [MIPS] Add support for nacl-expand-tls pass on MIPS.
b9f96a1: Move VLD cases properly into IsDangerousLoad and update tests
         that had incorrect -sfi-<xx> flags

and the following GCC change:

e09efac: [MIPS] Add support for building libgcc_eh for MIPS in PNaCl

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh all


Review URL: https://chromiumcodereview.appspot.com/11773010
------------------------------------------------------------------------
Project Member

Comment 49 by bugdroid1@chromium.org, Jan 8 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10550

------------------------------------------------------------------------
r10550 | mseaborn@chromium.org | 2013-01-08T00:17:51.267927Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=10550&r2=10549&pathrev=10550

MIPS trusted toolchain: Don't skip QEMU patch if the file is missing

Skipping the patch just masks problems, such as if you haven't run
"gclient sync" recently, because it builds a qemu-mips that doesn't
handle the pread64() syscall properly.  It should be an error if the
patch file is missing.

Also do a spelling fix.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=none

Review URL: https://codereview.chromium.org/11299042
------------------------------------------------------------------------
Project Member

Comment 50 by bugdroid1@chromium.org, Jan 31 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10686

------------------------------------------------------------------------
r10686 | petarj@mips.com | 2013-01-30T23:28:43.500416Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.cc?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator.h?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/validator_tests.cc?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/ncvalidate.cc?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/inst_classes.h?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/model.h?r1=10686&r2=10685&pathrev=10686
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/validator_mips/ncval.cc?r1=10686&r2=10685&pathrev=10686

[MIPS] Add thread-pointer to data addressing register list.

There is already a rule which prevents modification of thread pointer,
so we can be sure the value inside is correct. Thus, no need to guard
loads and stores via tp.
In addition, the change gets rid of some non-POD static constructors.

The commit queue is not working for NaCl at the moment, so we are committing
with:
NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/11876041
------------------------------------------------------------------------
Project Member

Comment 51 by bugdroid1@chromium.org, Feb 5 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10714

------------------------------------------------------------------------
r10714 | dschuff@chromium.org | 2013-02-05T18:43:17.349821Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/scripts/lit_known_failures.txt?r1=10714&r2=10713&pathrev=10714
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/DEPS?r1=10714&r2=10713&pathrev=10714

Update pnacl/DEPS to bring in merge to r172453

There was one MIPS test failure introduced, I haven't made an attempt to debug it.

R=jvoung@chromium.org,eliben@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3178
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275

Review URL: https://codereview.chromium.org/12180016
------------------------------------------------------------------------
Project Member

Comment 52 by bugdroid1@chromium.org, Feb 14 2013

Comment 53 by hehe...@gmail.com, Mar 1 2013

I have a question about runing mips version nexe in mips operation.
Following the instruction of developing pnacl. I did blew steps, generating nexe file is in x86_64 and runing is in mips.
1. Download sourcecode of nacl sdk
2.Open mips flag "export PNACL_BUILD_MIPS=true"
3.Build in pnacl folder.
4.Execute pnacl-clang and pnacl-translate commands to generate mips verion nexe files
5.Copy all sdk files from x86_64 machine to mips machine
6. Run run.py
But it can't run well. I check run.py and find it doesn't support mips version.
Is there any other way to run mips version nexe files? Hope you can answer me. thanks 

Project Member

Comment 54 by pet...@mips.com, Mar 6 2013

Project Member

Comment 55 by bugdroid1@chromium.org, Mar 8 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10960

------------------------------------------------------------------------
r10960 | petarj@mips.com | 2013-03-08T12:10:09.707570Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_syscall_common.c?r1=10960&r2=10959&pathrev=10960
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/nacl_config.h?r1=10960&r2=10959&pathrev=10960
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/posix/nacl_signal.c?r1=10960&r2=10959&pathrev=10960

[MIPS] Leave room for frame header on stack for MIPS arch

In addition to proper alignment of an arbitrary stack top, additional space
for frame header for MIPS has to be left. Its size is 16 bytes.

This change also fixes entry value of t9 which needs to be equal to
prog_ctr for PIC code.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh all


Review URL: https://chromiumcodereview.appspot.com/12460003
------------------------------------------------------------------------
Project Member

Comment 56 by bugdroid1@chromium.org, Mar 13 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10972

------------------------------------------------------------------------
r10972 | petarj@mips.com | 2013-03-13T00:43:39.355335Z

Changed paths:
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/thread_capture/arch/mips/thread_capture_test_injection.c?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/thread_capture/nacl.scons?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/gdb/nacl.scons?r1=10972&r2=10971&pathrev=10972
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/thread_capture/arch/mips?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/callingconv/nacl.scons?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/callingconv_case_by_case/nacl.scons?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/thread_capture/nacl_thread_capture_test_injection_test.c?r1=10972&r2=10971&pathrev=10972
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/syscall_return_sandboxing/sandboxed_mips.S?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/syscall_return_sandboxing/nacl.scons?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/egyptian_cotton/nacl.scons?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/run.py?r1=10972&r2=10971&pathrev=10972
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/callingconv_ppapi/nacl.scons?r1=10972&r2=10971&pathrev=10972

[MIPS] Support for building tests for MIPS

This change includes set of small changes to enable building the tests
for MIPS.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= ./scons hello_world --mode=nacl platform=mips32 --verbose


Review URL: https://chromiumcodereview.appspot.com/12667019
------------------------------------------------------------------------
Project Member

Comment 57 by bugdroid1@chromium.org, Mar 13 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10973

------------------------------------------------------------------------
r10973 | petarj@mips.com | 2013-03-13T02:30:44.657358Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/common/register_set.c?r1=10973&r2=10972&pathrev=10973
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/common/register_set.h?r1=10973&r2=10972&pathrev=10973

[MIPS] Implement register_set.{c,h} parts for MIPS

Implementation of macros used in register_set files when arch is MIPS.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run register_set test


Review URL: https://chromiumcodereview.appspot.com/12781011
------------------------------------------------------------------------
Project Member

Comment 58 by bugdroid1@chromium.org, Mar 13 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10978

------------------------------------------------------------------------
r10978 | petarj@mips.com | 2013-03-13T17:51:19.098574Z

Changed paths:
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.squeeze.mipsel.extra?r1=10978&r2=10977&pathrev=10978
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=10978&r2=10977&pathrev=10978
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.squeeze.mipsel.base?r1=10978&r2=10977&pathrev=10978

[MIPS] Update the toolchain script with packages for Chromium

The script is updated to be able to produce the tarball for Chromium
build. Depending on the input <nacl_sdk|chrome_sdk>, tarball for
standalone native client or Chromium build will be created.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run trusted-toolchain-creator.mipsel.squeeze.sh chrome_sdk

Review URL: https://chromiumcodereview.appspot.com/12315003
------------------------------------------------------------------------
Project Member

Comment 59 by bugdroid1@chromium.org, Mar 14 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=10995

------------------------------------------------------------------------
r10995 | mseaborn@chromium.org | 2013-03-14T23:19:34.088163Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/build.scons?r1=10995&r2=10994&pathrev=10995

Reset LIBPATH to fix the build of MIPS nacl_helper_bootstrap on Ubuntu Precise

We reset LIBPATH in the same way that LINKFLAGS is reset.

Without this, I get the following:

$ ./scons sel_ldr --mode=dbg-host platform=mips32 sel_ldr --verbose
...
cc -o scons-out/dbg-linux-mips32/obj/src/trusted/service_runtime/nacl_bootstrap_munge_phdr scons-out/dbg-linux-mips32/obj/src/trusted/service_runtime/linux/nacl_bootstrap_munge_phdr.o -Lscons-out/dbg-linux-mips32/lib -Ltoolchain/linux_mips-trusted/sysroot/usr/lib -lelf
/usr/bin/ld: fatal error: toolchain/linux_mips-trusted/sysroot/usr/lib/libgcc_s.so: unsupported ELF machine number 8
collect2: ld returned 1 exit status
scons: *** [scons-out/dbg-linux-mips32/obj/src/trusted/service_runtime/nacl_bootstrap_munge_phdr] Error 1

I don't know why resetting LIBPATH wasn't needed for ARM too.

Note that Scons doesn't handle incremental builds correctly for this
parameter: once nacl_bootstrap_munge_phdr is present, if the fix is
undone Scons doesn't try to rebuild the file.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=see above

Review URL: https://codereview.chromium.org/12288068
------------------------------------------------------------------------
Project Member

Comment 60 by bugdroid1@chromium.org, Mar 15 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11001

------------------------------------------------------------------------
r11001 | petarj@mips.com | 2013-03-15T22:07:35.658828Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/toolchain/eh_return.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/exception_test/nacl.scons?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/toolchain/stack_frame.cc?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/barebones/top_of_sandbox.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/data_not_executable/execute_data.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/stack_alignment/stack_alignment_asm_test.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/command_tester.py?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/stubout_mode/nacl.scons?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/data_not_executable/nacl.scons?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/exception_test/exception_crash_test.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/exception_test/exception_test.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/stubout_mode/partly_invalid.c?r1=11001&r2=11000&pathrev=11001
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/trusted_crash/crash_in_syscall/nacl.scons?r1=11001&r2=11000&pathrev=11001

[MIPS] Add remaining parts for building tests for MIPS

This change includes remaining parts of the patch for building tests for
MIPS. Some tests have been temporarily disabled for execution inside of
the emulator.

Minor change in stack_frame.cc in code unrelated to this CL to satisfy
presubmit script.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= ./scons hello_world --mode=nacl platform=mips32 --verbose

Review URL: https://chromiumcodereview.appspot.com/12256018
------------------------------------------------------------------------
Project Member

Comment 61 by bugdroid1@chromium.org, Apr 9 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11151

------------------------------------------------------------------------
r11151 | petarj@mips.com | 2013-04-09T15:30:34.121061Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/SConstruct?r1=11151&r2=11150&pathrev=11151
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/arch/mips/nacl_switch.S?r1=11151&r2=11150&pathrev=11151
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/elf_util.c?r1=11151&r2=11150&pathrev=11151
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/elf_constants.h?r1=11151&r2=11150&pathrev=11151

[MIPS] Small updates after LLVM merge

The change includes several small fixes:

1. set registers $at and $gp to zero when switching to untrusted code to
   avoid leaks from trusted code;
2. ignore MIPS reginfo section (generated with recently merged trunk code)
3. info message for the MIPS toolchain should print "nacl_sdk" to reflect
   recent changes in the toolchain script.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run smoke tests


Review URL: https://chromiumcodereview.appspot.com/13454020
------------------------------------------------------------------------
Project Member

Comment 62 by bugdroid1@chromium.org, Jun 6 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11497

------------------------------------------------------------------------
r11497 | dschuff@chromium.org | 2013-06-06T22:14:29.818918Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/DEPS?r1=11497&r2=11496&pathrev=11497
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/pnacl/build.sh?r1=11497&r2=11496&pathrev=11497

Update pnacl binutils DEPS and enable mips support in binutils

This brings in support for MIPS currently under review in upstream binutils:
be24de8 [MIPS] Add support for mips-nacl in bfd
76854aa [MIPS] Add support for MIPS target in gold

It also enables it in build.sh in the binutils build.

R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275

Review URL: https://codereview.chromium.org/15960018
------------------------------------------------------------------------
Project Member

Comment 63 by bugdroid1@chromium.org, Jun 11 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11526

------------------------------------------------------------------------
r11526 | jvoung@google.com | 2013-06-11T21:26:42.042178Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/TOOL_REVISIONS?r1=11526&r2=11525&pathrev=11526
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tests/spec2k/run_all.sh?r1=11526&r2=11525&pathrev=11526

Update TOOL_REVISIONS for PNaCl 11491->11518

r11517 | Prune the llc binary from the host installation directory
r11516 | PNaCl: Update LLVM revision in pnacl/DEPS
    33ef544: (mseaborn@chromium.org) PNaCl: Extend ExpandStructRegs to handle "insertvalue" instructions
r11507 | Fix Mispelled local variable in llc and pnacl-llc.
r11506 | Replace llc by pnacl-llc in our toolchain/build
r11504 | Add CL argument -bitcode-format to llvm-dis, llc, and pnacl-llc.
r11497 | Update pnacl binutils DEPS and enable mips support in binutils
    be24de8 [MIPS] Add support for mips-nacl in bfd
    76854aa [MIPS] Add support for MIPS target in gold
r11496 | pnacl_abi.bc is no longer needed - remove it from the build.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3476
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3479
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3429
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3339

R=eliben@chromium.org, mseaborn@chromium.org

Review URL: https://codereview.chromium.org/16654006
------------------------------------------------------------------------
Project Member

Comment 64 by bugdroid1@chromium.org, Jul 3 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11674

------------------------------------------------------------------------
r11674 | mseaborn@chromium.org | 2013-07-03T19:17:58.917814Z

Changed paths:
   D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.squeeze.mipsel.base?r1=11674&r2=11673&pathrev=11674
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.wheezy.mipsel.extra?r1=11674&r2=11673&pathrev=11674
   D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.squeeze.mipsel.extra?r1=11674&r2=11673&pathrev=11674
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/packagelist.wheezy.mipsel.base?r1=11674&r2=11673&pathrev=11674
   D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.squeeze.sh?r1=11674&r2=11673&pathrev=11674
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh?r1=11674&r2=11673&pathrev=11674

[MIPS] Switch the script to use packages from Debian Wheezy

Recent dependencies in Chromium (such as the need to use the latest libnss3
package) prevent us to use Debian Squeeze repository anymore.

This change switches it to Debian Wheezy repository and adds minor changes
in the script that ensure the toolchain build does not re-download tarballs
and SVN checkouts if they are already present.

The change also fixes  issue #3401  when strcasecmp is statically linked into
the QEMU binary.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3401
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= trusted-toolchain-creator.mipsel.debian.sh nacl_sdk (or chrome_sdk)

Committed on behalf of Petar Jovanovic (petarj@mips.com) because the
commit queue is currently not working for this change.  (The presubmit
checks are timing out because they are invoking SVN, which is
prompting for credentials.)

Review URL: https://codereview.chromium.org/16880002
------------------------------------------------------------------------
Project Member

Comment 65 by bugdroid1@chromium.org, Jul 11 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11744

------------------------------------------------------------------------
r11744 | petarj@mips.com | 2013-07-11T22:11:42.377332Z

Changed paths:
   D http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c?r1=11744&r2=11743&pathrev=11744
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/platform_qualify/build.scons?r1=11744&r2=11743&pathrev=11744
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/trusted/service_runtime/sel_qualify.c?r1=11744&r2=11743&pathrev=11744

[MIPS] Remove NaClCheckDEP for MIPS

MIPS sandboxing does not require DEP, and the target MIPS platforms do not
support it. Thus, this change removes the code we do not need.

NOTRY=true
However, we have run a try job manually, and it passed fine, except for
the nacl-lucid64_validator_opt that is broken.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run smoke tests for MIPS platform

Review URL: https://chromiumcodereview.appspot.com/18861003
------------------------------------------------------------------------
Project Member

Comment 66 by bugdroid1@chromium.org, Aug 8 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=11955

------------------------------------------------------------------------
r11955 | petarj@mips.com | 2013-08-08T17:16:58.563644Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_selector.py?r1=11955&r2=11954&pathrev=11955

[MIPS] Run toolchain build on a buildbot

Simple change to trigger building MIPS trusted toolchain on a buildbot.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=

Review URL: https://chromiumcodereview.appspot.com/19755007
------------------------------------------------------------------------
Project Member

Comment 67 by bugdroid1@chromium.org, Dec 12 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=12533

------------------------------------------------------------------------
r12533 | petarj@mips.com | 2013-12-12T04:09:30.870590Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/file_up_down_load.sh?r1=12533&r2=12532&pathrev=12533
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_pnacl.sh?r1=12533&r2=12532&pathrev=12533
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_selector.py?r1=12533&r2=12532&pathrev=12533
   A http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_toolchain_mips_trusted.sh?r1=12533&r2=12532&pathrev=12533

[MIPS] Upload a toolchain tarball for MIPS after the build step

trusted toolchain tarball for MIPS nacl_sdk.tgz is now uploaded to Google
storage after it is built on linux-pnacl-x86_32-tests-mips.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= none

Review URL: https://codereview.chromium.org/101713002
------------------------------------------------------------------------
Project Member

Comment 68 by bugdroid1@chromium.org, Feb 20 2014

------------------------------------------------------------------------
r252416 | petarj@mips.com | 2014-02-20T23:34:10.508741Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/ppapi_untrusted.gyp?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/trusted/plugin/plugin.cc?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/native_client.gyp?r1=252416&r2=252415&pathrev=252416
   A http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/trusted/plugin/arch_mips/sandbox_isa.cc?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/components/nacl.gyp?r1=252416&r2=252415&pathrev=252416
   A http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/trusted/plugin/arch_mips?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/trusted/plugin/plugin.gypi?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_component_crx_gen.py?r1=252416&r2=252415&pathrev=252416
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp?r1=252416&r2=252415&pathrev=252416

[MIPS] Support for MIPS PNaCl in PPAPI

Add necessary definitions and build blocks for MIPS.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= Build Chromium for MIPS

Review URL: https://codereview.chromium.org/152133007
------------------------------------------------------------------------
Project Member

Comment 69 by bugdroid1@chromium.org, Feb 23 2014

------------------------------------------------------------------------
r252847 | petarj@mips.com | 2014-02-23T08:04:37.367312Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/components/nacl.gyp?r1=252847&r2=252846&pathrev=252847
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp?r1=252847&r2=252846&pathrev=252847
   M http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp?r1=252847&r2=252846&pathrev=252847

[MIPS] Use IRT shim instead of dummy IRT shim

IRT shim is needed as it whitelists NaCl IRT interfaces exposed under
PNaCl.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= Build Chromium for MIPS

Review URL: https://codereview.chromium.org/175533002
------------------------------------------------------------------------
Project Member

Comment 70 by bugdroid1@chromium.org, Feb 25 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=12803

------------------------------------------------------------------------
r12803 | petarj@mips.com | 2014-02-25T01:24:15.428724Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/build/untrusted.gypi?r1=12803&r2=12802&pathrev=12803

[MIPS] Add missing MIPS clause in untrusted.gypi

Build MIPS IRT shim with PNaCl.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= build Chromium with NaCl turned on

Review URL: https://codereview.chromium.org/177113004
------------------------------------------------------------------------
Project Member

Comment 71 by bugdroid1@chromium.org, Feb 25 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/native_client?view=rev&revision=12803

------------------------------------------------------------------------
r12803 | petarj@mips.com | 2014-02-25T01:24:15.428724Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/build/untrusted.gypi?r1=12803&r2=12802&pathrev=12803

[MIPS] Add missing MIPS clause in untrusted.gypi

Build MIPS IRT shim with PNaCl.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= build Chromium with NaCl turned on

Review URL: https://codereview.chromium.org/177113004
------------------------------------------------------------------------
Project Member

Comment 72 by bugdroid1@chromium.org, Mar 12 2014

------------------------------------------------------------------------
r256622 | petarj@mips.com | 2014-03-12T20:22:39.355378Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/components/nacl/nacl_defines.gypi?r1=256622&r2=256621&pathrev=256622

[MIPS] Add missing NaCl defines for MIPS

Add missing NaCl definitions for MIPS architecture.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= build MIPS Chromium with NaCl

Review URL: https://codereview.chromium.org/197213002
------------------------------------------------------------------------
Project Member

Comment 73 by bugdroid1@chromium.org, Mar 12 2014

------------------------------------------------------------------------
r256639 | petarj@mips.com | 2014-03-12T20:54:44.425488Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/liblouis/liblouis_nacl.gyp?r1=256639&r2=256638&pathrev=256639

[MIPS] Define liblouis_nacl nexe for MIPS

Add missing case for MIPS in liblouis_nacl_wrapper_nacl.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= Chromium buildbots

Review URL: https://codereview.chromium.org/197613002
------------------------------------------------------------------------
Project Member

Comment 74 by bugdroid1@chromium.org, Mar 14 2014

------------------------------------------------------------------
r256958 | petarj@mips.com | 2014-03-14T00:05:32.405246Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/base/third_party/nspr/prcpucfg_nacl.h?r1=256958&r2=256957&pathrev=256958

[MIPS] Include MIPS part in the config file for native client

Add missing definitions for MIPS NaCl.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= build and run Chromium with NaCl

Review URL: https://codereview.chromium.org/192883003
-----------------------------------------------------------------
Project Member

Comment 75 by bugdroid1@chromium.org, Apr 7 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/native_client?view=rev&revision=13000

------------------------------------------------------------------
r13000 | petarj@mips.com | 2014-04-07T16:57:43.371119Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/build/untrusted.gypi?r1=13000&r2=12999&pathrev=13000

[MIPS] Make 'mips32' suffix for all test nexes

Fix inconsistency between suffixes for MIPS test nexes.
Now all test nexes for MIPS32 match *_mips32.nexe.

NOTRY=true
However, I have run a try job manually, and it passed fine, but CQ has
some issues, and this is a workaround for it.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=trybots

Review URL: https://codereview.chromium.org/226183016
-----------------------------------------------------------------
Project Member

Comment 76 by mseaborn@chromium.org, May 9 2014

Cc: pet...@mips.com
Status: Fixed
Given that we have fairly complete MIPS support in NaCl/PNaCl now, I'm closing this, to tidy the issue tracker.

The main thing that remains is to enable some MIPS testing on the bots.

Feel free to continue referencing this issue in "BUG=" lines, and feel free to create more issues with "Arch-MIPS".
Project Member

Comment 77 by bugdroid1@chromium.org, May 14 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/native_client?view=rev&revision=13173

------------------------------------------------------------------
r13173 | petarj@mips.com | 2014-05-14T17:31:22.231286Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh?r1=13173&r2=13172&pathrev=13173

[MIPS] Switch to newer versions of the tools

Update:

- gcc to 4.9.0
- binutils to 2.24
- eglibc to 2.19
- gdb to 7.7.1
- kernel headers to 3.14.2

NOTRY=true
However, I have run a try job manually, and it passed fine, but CQ has
some issues, and this is a workaround for it.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= mips toolchain buildbot

Review URL: https://codereview.chromium.org/281953004
-----------------------------------------------------------------
Project Member

Comment 78 by bugdroid1@chromium.org, Oct 13 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/native_client?view=rev&revision=13901

------------------------------------------------------------------
r13901 | petarj@mips.com | 2014-10-13T21:33:27.110389Z

Changed paths:
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_lib.py?r1=13901&r2=13900&pathrev=13901
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_pnacl.sh?r1=13901&r2=13900&pathrev=13901
   M http://src.chromium.org/viewvc/native_client/trunk/src/native_client/buildbot/buildbot_selector.py?r1=13901&r2=13900&pathrev=13901

[MIPS] Enhance MIPS testing on its buildbot

Modify the buildbot scripts so they can be reused for MIPS as well.
Execution of the tests is not yet enabled for MIPS since some tests do
not pass.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= trigger the buildbot

Review URL: https://codereview.chromium.org/427153003
-----------------------------------------------------------------

Sign in to add a comment