Coder Social home page Coder Social logo

Comments (3)

ubercomp avatar ubercomp commented on August 27, 2024 1

Yeah... This one is a bummer. Unfortunately, as far as I know (and I might very well be wrong here), the architecture doesn't give me a way to know that the guest is idle. If I were to get serious about this, i.e. build an emulator to run real applications, the 100% CPU issue would of course have to be solved, which means I would probably have to go for Intel or ARM. The reason I did LatticeMico32 was just because I wanted to know if I could and LM32 was the easiest target I could find. Also, I wanted a "dynamic recompilator" instead of just an interpreter.

from jslm32.

ysangkok avatar ysangkok commented on August 27, 2024

According to Wikipedia, the HLT instruction requires ring 0 access.

As I see it, that leaves us with two options:

  • Find the place in the Linux kernel where the HLT instruction would be called and make the emulator wait e.g. 10 ms when the instruction pointer reaches that address.
  • Modify the instruction set and use the instruction in Linux. The requires patching Linux, so I guess it's a bad idea. Though it's a bit less hackish in some aspects, especially if it could be done in a backward-compatible way.

from jslm32.

ysangkok avatar ysangkok commented on August 27, 2024

Closing this since it is unactionable (we can't know whether the guest is idle).

from jslm32.

Related Issues (6)

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.