GithubHelp home page GithubHelp logo

i386 Support about tlmu HOT 4 CLOSED

edgarigl avatar edgarigl commented on July 24, 2024
i386 Support

from tlmu.

Comments (4)

edgarigl avatar edgarigl commented on July 24, 2024

On Tue, Dec 11, 2012 at 06:45:35AM -0800, Derek wrote:

Has anyone done an i386 target? I looked at hw/tlm_mach.c and I am
trying to figure out how to map the MIPS/ARM/CRIS calls to i386
equivalents. I get a clean compile and run but c_example (i386 build)
jumps to undefined memory locations.

Hi Derek,

I don't think anyone has done. Howto do it, depends on what you want
to use TLMu for. the hw/tlm_mach.c example, creates a pretty bare
CPU subsystem within TLMu and leaves all the peripheral models for
the main emulator (e.g TLM-2.0).

If you wan't to use a standard QEMU machine and maybe only punch
a hole in the address/irq space for one TLM device, it is better
to base things off an existing machine. An example is the
ARM Versatile Express TLM board, hw/vexpress.c.

Best regards,
Edgar

from tlmu.

derekdm3 avatar derekdm3 commented on July 24, 2024

Thanks. I looked at the hw/vexpress.c example and made equivalent changes to integratorcp.c and pc_piix.c. I believe the mem/irq mapping is correct. Do you have a TLM or c_example type of test using the vexpress?

from tlmu.

edgarigl avatar edgarigl commented on July 24, 2024

On Thu, Dec 13, 2012 at 03:01:27PM -0800, Derek wrote:

Thanks. I looked at the hw/vexpress.c example and made equivalent changes to
integratorcp.c and pc_piix.c. I believe the mem/irq mapping is correct. Do you
have a TLM or c_example type of test using the vexpress?

Reply to this email directly or view_it_on_GitHub.
[https://github.com/notifications/beacon/
5zgfs4_9QSADEjtAvu1j9xZrYKJ60863BXJclm1UqDb6aRfAmBmp31GcUDzq_EmT.gif]

Hi,

No, there is no ready example for that but depending on what you want
to do.

Do you want to use TLM-2.0? or do you want to write a bare external
emulator? the latter is more difficult, but possible.

if you reallty want the latter, look at the c_example. You'll find
a spot where whe do:

            tlmu_append_arg(&sys[i].t.q, "-M");
            tlmu_append_arg(&sys[i].t.q, "tlm-mach");

Change that to match the name of your machine, possibly "ntegratorcp-tlm".

then look at the spot:
/*
* Tell TLMu what memory areas that map actual RAM. This needs
* to be done for RAM's that are not internal to the TLMu
* emulator, but managed by the main emulator or by other
* TLMu instances.
*/
tlmu_map_ram(&sys[i].t.q, "rom", 0x18000000ULL, 128 * 1024, 0);
tlmu_map_ram(&sys[i].t.q, "ram", 0x19000000ULL, 128 * 1024, 1);

and replace those lines or add lines to map memory that is not within the TLMu
model, but modeled externally but that will possibly execute code from the TLMu
CPU. Thats all.

If you show me a diff or code of what you've done, I can give more specific feedback.

Good luck,
Edgar

from tlmu.

derekdm3 avatar derekdm3 commented on July 24, 2024

I made a new sc_example using the versatile PB board model instead of the 3 cpu's.

cpu[0] = new tlmu_sc("board0", "libtlmu-arm.so", "versatilepb-tlm", ... , "test_img.bin" ...);

I made the same changes in vexpress.c and adjusted the TLMu ram area and it worked.

if(tlm) { tlm_map(env, 0x10200000ULL, ..., &pic[18], ...); tlm_register_rams(); }

I built a bare-metal test application that printed text using the uart and the magic SC device.

Thanks for your help. I really want a TLM 2.0 ISS for i386, so I will try this setup with pc-tlm.

from tlmu.

Related Issues (5)

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.