Giter Club home page Giter Club logo

qemu's People

Contributors

afaerber avatar agraf avatar aik avatar aliguori avatar aurel32 avatar avikivity avatar awilliam avatar balrog-kun avatar blueswirl avatar bonzini avatar dgibson avatar edgarigl avatar ehabkost avatar gongleiarei avatar hpoussin avatar jan-kiszka avatar jcmvbkbc avatar jnsnow avatar jwrdegoede avatar kevmw avatar kraxel avatar markmc avatar mstsirkin avatar pete128 avatar plieven avatar pm215 avatar rth7680 avatar stefanharh avatar stweil avatar xanclic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qemu's Issues

SD emulation fails if SD card being emulated is SDHC or SDXC

Specifically, the CSD or the CID specify the type of the card, which is ignored by the emulator. This leads to issues with sdmmc.c, where it returns the type of the card as being regular SD when it really should be detected as SDHC or SDXC.

One problem caused by this is that sector calculations for reading and writing are multiplied by 512 if not SDHC or SDXC, which if the card really is one of those can cause for the location information (sector * 512) to overflow. I observed the overflow by stepping through GDB. The same exact binary works on hardware.

I am unable to provide a quick example at the moment. My recommendation to reproduce is to get the CID and CSD of an SDXC card, set the faux card with qemu, then try to do a read or write using sdmmc.c (I was using my own lib's sdmmc.c, based on Normmatt's work). Stepping through the operation should at one point hit a line with if(handelSD.isSDHC == 0) sector_no <<= 9; -- that conditional is only hit if the card isn't SDHC. With an SDXC card that line executes in the emulator, works as intended on hardware.

Crash when trying to execute arm9loaderhax payload

Upon attempting to execute an arm9 payload (arm-softmmu/qemu-system-arm -kernel arm9loaderhax.bin -M ctr9)
qemu immediately crashes, outputting the following:

qemu: fatal: Trying to execute code outside RAM or ROM at 0x00010000

R00=00000000 R01=000002ff R02=00000100 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=00010000
PSR=400001d3 -Z-- A svc32
FPSCR: 00000000
Abort trap: 6

I tried the latest release of Luma3DS(7.0.4 at the time of this writing) and the latest GodMode9 (v1.1.3)
I tried this on two different systems (first being macOS, second being Debian) to confirm that this wasn't an isolated issue.

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.