Giter Club home page Giter Club logo

Comments (5)

GabrielMajeri avatar GabrielMajeri commented on May 25, 2024

I've tried reproducing your issue by copy and pasting the code from that article, then making it compile by using the new API. But it does not crash for me at any point. Could you provide the code that reproduces the issue as a gist and specify how you are running QEMU?

from uefi-rs.

Knight-Ops avatar Knight-Ops commented on May 25, 2024

Gist : https://gist.github.com/r0ck3tAKATrashPanda/f0b7262140b17a2d09167c40209cc477

OVMF : https://www.kraxel.org/repos/jenkins/edk2/edk2.git-ovmf-x64-0-20190704.1245.g82c1a21208.noarch.rpm

QEMU : .\qemu-system-x86_64.exe -nodefaults -vga std -machine q35,accel=kvm:tcg -m 128M -drive if=pflash,format=raw,readonly=on,file=OVMF-pure-efi.fd -drive if=pflash,format=raw,readonly=on,file=OVMF_VARS-pure-efi.fd -drive format=raw,file=fat:rw:vmdir -serial stdio -monitor vc:1024x768

Edit: This is also on a Windows system (for QEMU)

from uefi-rs.

GabrielMajeri avatar GabrielMajeri commented on May 25, 2024

I see what the issue is. The uefi_start function receives a reference to SystemTable<Boot> instead of taking it by value and this crashes the program (since this type is already just a wrapper for the system table).

Unfortunately I'm not entirely sure if we can fix this since the Rust compilers allows the efi_main function to have any signature. We have docs on how it should look, but without using a macro with custom derive or something like that it's unlinkely we'll be able to verifiy the signature of the function.

from uefi-rs.

Knight-Ops avatar Knight-Ops commented on May 25, 2024

from uefi-rs.

GabrielMajeri avatar GabrielMajeri commented on May 25, 2024

There's no issue in particular, but I've been busy recently and need some time to think how to implement a macro-based solution (probably a custom attribute implemented in uefi-macros). I'll close this issue and track this in #100

from uefi-rs.

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.