Giter VIP home page Giter VIP logo

Comments (8)

GoWest279 avatar GoWest279 commented on July 28, 2024

I think I may figure out the issue:)
The asm pause instruction used in enclave.cc is an X86 instruction that is not supported by aarch64.
I changed it to the yield instruction that made it passed the compile.
I'm wondering is there anyway to verify the correctness?
Bests,
John

from ghost-userspace.

jackhumphries avatar jackhumphries commented on July 28, 2024

Yes, that's the correct way to fix this issue. You can call a function like the following in place of asm volatile("pause"); so that the same code works for multiple architectures:

inline void Pause() {
#ifndef __GNUC__
#error "GCC is needed for the macros in the `Pause()` function."
#endif
#if defined(__x86_64__)
  asm volatile("pause");
#elif defined(__aarch64__)
  asm volatile("yield");
#elif defined(__powerpc64__)
  asm volatile("or 27,27,27");
#else
  // Do nothing.
#endif
}

Could you please clarify what you mean about verifying correctness? If you replace the pause instruction with yield for code compiled to aarch64, then you should be good.

from ghost-userspace.

jackhumphries avatar jackhumphries commented on July 28, 2024

Feel free to reopen if you have any additional questions.

from ghost-userspace.

GoWest279 avatar GoWest279 commented on July 28, 2024

Hi, Jack, @jackhumphries
Thanks for the reply, and sorry for the late reply:) Finally got time to move on to this new project. Not sure whether I should keep all my problems to one issue or not.

I'm trying to run: bazel run fifo_agent.
I have a new question about the L3 cache check in lib/Topology.c(line 311) that RPI-4B does not have an L3 cache. But the comments on this function is for the NUMA CPU. Could that be some wrong configuration on my side? If not, would you mind providing any ideas about modifying the function?

I really appreciate that!

Bests,
JOhn

from ghost-userspace.

jackhumphries avatar jackhumphries commented on July 28, 2024

Hi John,

No worries and feel free to open a new issue each time. That way it is easier for other people who are having the same issue to find our discussion.

The Topology class will currently fail to construct if there is no L3 cache on your machine, though I actually updated the Topology class in our internal codebase recently so that it will construct without an L3 (this should fix your issue). Let me see if we are able to prioritize getting that pushed into the open source repo. If we can't prioritize it, I'll post the patch here for you.

Jack

from ghost-userspace.

GoWest279 avatar GoWest279 commented on July 28, 2024

Thanks so much for helping me out!!
I will open an issue next time. Looking forward to the new patch:) Let me know if there is anything I can help.
Meanwhile, I can work on odroid n2 which is a real heterogeneous platform.
Thanks again:)

from ghost-userspace.

jackhumphries avatar jackhumphries commented on July 28, 2024

Hi John,

We just pushed this in commit 1c09b74. This commit includes changes to the Topology class and some tests in topology_test to test the new changes. Please let me know if this works for you.

Jack

from ghost-userspace.

GoWest279 avatar GoWest279 commented on July 28, 2024

Thanks, Jack!
Just test it with FIFO scheduler and hello world binary. The new patch works on the RPI4 and odroid n2:)
Bests,
John

from ghost-userspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.