Re: How does "rsi" get set in x86 prologue?

2025-01-30 Thread Gautam Bhat
On Thu, Jan 2, 2025 at 3:45 PM Alex Bennée wrote: > The call into the prologue comes from: > > ret = tcg_qemu_tb_exec(cpu_env(cpu), tb_ptr); > > in cpu_tb_exec. With env in RDI and tb_ptr (the code address) being in > RSI. > > > -- > Alex Bennée > Virtualisation Tech Lead @ Linaro Thanks Alex.

How does "rsi" get set in x86 prologue?

2025-01-01 Thread Gautam Bhat
I am trying to understanding the generated code for the x86 target. On EPILOGUE code below: 0x7fff9800: 55 pushq%rbp 0x7fff9801: 53 pushq%rbx 0x7fff9802: 41 54pushq%r12 0x7fff9804: 41 55

Re: Point where target instructions are read

2024-05-18 Thread Gautam Bhat
On Sun, Apr 14, 2024 at 2:21 AM Gautam Bhat wrote: > > Ah I had my .tlb_fill callback set to an empty function with just > returning true. I need to put the actual code there. Let me fill this > function up and see what happens. > > -Gautam. Got it working. I can see the

Re: Point where target instructions are read

2024-04-13 Thread Gautam Bhat
Ah I had my .tlb_fill callback set to an empty function with just returning true. I need to put the actual code there. Let me fill this function up and see what happens. -Gautam. On Thu, Apr 11, 2024 at 2:45 AM Gautam Bhat wrote: > > On Tue, Apr 9, 2024 at 2:23 PM Peter Maydell

Re: Point where target instructions are read

2024-04-10 Thread Gautam Bhat
On Tue, Apr 9, 2024 at 2:23 PM Peter Maydell wrote: > That sounds like a problem with your binary. If the reset vector > needs to be at 0xFFFE then it needs to be there, and you > should arrange for it to be built correctly. It doesn't matter > whether it's an ELF file or a raw binary file, the d

Re: Point where target instructions are read

2024-04-08 Thread Gautam Bhat
On Thu, Apr 4, 2024 at 2:23 PM Peter Maydell wrote: > This will not work (yet) -- CPUs do not get reset as part of the > whole-system three-phase-reset, so using the exit phase method > is not sufficient to avoid the reset ordering problem here. > > You need to use rom_ptr_for_as() to see if ther

Re: Point where target instructions are read

2024-04-03 Thread Gautam Bhat
On Tue, Apr 2, 2024 at 2:01 AM Richard Henderson wrote: > The boot process must cooperate somehow. > > When using loader, you must link the image such that it loads at the pc reset > address > defined by the architecture manual. > > > r~ I changed my loading options to the following now to have

Point where target instructions are read

2024-04-01 Thread Gautam Bhat
Hi, Some background: I am trying to write a CPU emulator for MSP430 with Qemu. I am loading the MSP430 program as follows using the generic device loader: /qemu-system-msp430 -machine msp430-launchpad -device loader,file=simple_test -d in_asm,out_asm I have implemented somewhat the TranslatorOps

Re: Resources on deeper understanding of Translation blocks

2023-05-16 Thread Gautam Bhat
On Mon, May 15, 2023 at 7:22 PM Alex Bennée wrote: > > > Gautam Bhat writes: > > > Hi, > > > > I am going through some translation code for existing targets. > > > > I would like to know if there are any good resources on deeper > > understandin

Resources on deeper understanding of Translation blocks

2023-05-14 Thread Gautam Bhat
Hi, I am going through some translation code for existing targets. I would like to know if there are any good resources on deeper understanding of translation blocks? Also some advice on the best way to read code related to translation in Qemu and trying it out maybe using the debugger, printing

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-29 Thread Gautam Bhat
> Just create a minimal machine with some RAM in it, and use > the generic-loader to load the test binary into the RAM, then. > > -- PMM I should be using the -bios switch for loading the bare metal firmware, correct? -Gautam.

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-26 Thread Gautam Bhat
On Thu, Aug 26, 2021 at 1:24 AM Peter Maydell wrote: > > On Wed, 25 Aug 2021 at 20:03, Gautam Bhat wrote: > > If you're > doing this specifically because you want to look at how a > target frontend for a new architecture works, have fun, I guess. > > thanks > -

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-25 Thread Gautam Bhat
On Tue, Aug 24, 2021 at 1:52 PM Philippe Mathieu-Daudé wrote: > > > Aren't Nascent uC based on 8051? Because AFAIK QEMU doesn't emulate > this architecture. I am trying to emulate the TI MSP430 microcontroller. -Gautam.

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-23 Thread Gautam Bhat
On Sun, Aug 22, 2021 at 10:18 PM Peter Maydell wrote: > > On Sun, 22 Aug 2021 at 15:37, Gautam Bhat wrote: > > > > Hi, > > > > I am to implement a very simple microcontroller for my understanding > > of Qemu development. This microcontroller runs its code from

Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-22 Thread Gautam Bhat
Hi, I am to implement a very simple microcontroller for my understanding of Qemu development. This microcontroller runs its code from programmable flash which is bit-, byte- and word addressable. To do some initial tests of my nascent microcontroller implementation I would like to load a very simp

Re: Usage of pci bus

2020-06-19 Thread Gautam Bhat
On Fri, Jun 19, 2020 at 2:02 AM Peter Maydell wrote: > > On Thu, 18 Jun 2020 at 20:36, Gautam Bhat wrote: > > I am confused with the usage of PCI bus for connecting different > > peripherals. If I want to emulate an ARM board which doesn't have a > > PCI controller

Usage of pci bus

2020-06-18 Thread Gautam Bhat
Hi, I am confused with the usage of PCI bus for connecting different peripherals. If I want to emulate an ARM board which doesn't have a PCI controller how can I emulate it to be as close to the real board as possible? Is there an ARM interconnect or something where I can connect the peripheral co

Pain points in Software Virtual Development

2020-06-14 Thread Gautam Bhat
Hi All, I am interested in knowing what are the pain points in using Qemu as a Software Virtual Development Platform from not only CPU perspective but a complete PCB (CPU + different peripherals). In most of the engineering firms that I have worked at, the PCB board was the problem. There would e

ACPI table modifications

2019-10-11 Thread Gautam Bhat
Hi, I want to add some I2C based temperature sensors to the -M Q35 machine. I want to update the ACPI tables to add this device information. How can I go about doing this? Thanks, Gautam.