minix86 | x86 documentation , disassembler and emulator - WIP | Emulator library

 by   xem HTML Version: Current License: No License

kandi X-RAY | minix86 Summary

kandi X-RAY | minix86 Summary

minix86 is a HTML library typically used in Utilities, Emulator applications. minix86 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

A x86 documentation, disassembler and emulator (in pure JS) optimized for running (MS-DOS) .COM files.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              minix86 has a low active ecosystem.
              It has 287 star(s) with 26 fork(s). There are 13 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 2 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of minix86 is current.

            kandi-Quality Quality

              minix86 has no bugs reported.

            kandi-Security Security

              minix86 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              minix86 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              minix86 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of minix86
            Get all kandi verified functions for this library.

            minix86 Key Features

            No Key Features are available at this moment for minix86.

            minix86 Examples and Code Snippets

            No Code Snippets are available at this moment for minix86.

            Community Discussions

            QUESTION

            How can the L1, L2, L3 CPU caches be turned off on modern x86/amd64 chips?
            Asked 2020-May-01 at 12:52

            Every modern high-performance CPU of the x86/x86_64 architecture has some hierarchy of data caches: L1, L2, and sometimes L3 (and L4 in very rare cases), and data loaded from/to main RAM is cached in some of them.

            Sometimes the programmer may want some data to not be cached in some or all cache levels (for example, when wanting to memset 16 GB of RAM and keep some data still in the cache): there are some non-temporal (NT) instructions for this like MOVNTDQA (https://stackoverflow.com/a/37092 http://lwn.net/Articles/255364/)

            But is there a programmatic way (for some AMD or Intel CPU families like P3, P4, Core, Core i*, ...) to completely (but temporarily) turn off some or all levels of the cache, to change how every memory access instruction (globally or for some applications / regions of RAM) uses the memory hierarchy? For example: turn off L1, turn off L1 and L2? Or change every memory access type to "uncached" UC (CD+NW bits of CR0??? SDM vol3a pages 423 424, 425 and "Third-Level Cache Disable flag, bit 6 of the IA32_MISC_ENABLE MSR (Available only in processors based on Intel NetBurst microarchitecture) — Allows the L3 cache to be disabled and enabled, independently of the L1 and L2 caches.").

            I think such action will help to protect data from cache side channel attacks/leaks like stealing AES keys, covert cache channels, Meltdown/Spectre. Although this disabling will have an enormous performance cost.

            PS: I remember such a program posted many years ago on some technical news website, but can't find it now. It was just a Windows exe to write some magical values into an MSR and make every Windows program running after it very slow. The caches were turned off until reboot or until starting the program with the "undo" option.

            ...

            ANSWER

            Answered 2018-Jan-20 at 22:02

            The Intel's manual 3A, Section 11.5.3, provides an algorithm to globally disable the caches:

            11.5.3 Preventing Caching

            To disable the L1, L2, and L3 caches after they have been enabled and have received cache fills, perform the following steps:

            1. Enter the no-fill cache mode. (Set the CD flag in control register CR0 to 1 and the NW flag to 0.
            2. Flush all caches using the WBINVD instruction.
            3. Disable the MTRRs and set the default memory type to uncached or set all MTRRs for the uncached memory type (see the discussion of the discussion of the TYPE field and the E flag in Section 11.11.2.1, “IA32_MTRR_DEF_TYPE MSR”).

            The caches must be flushed (step 2) after the CD flag is set to ensure system memory coherency. If the caches are not flushed, cache hits on reads will still occur and data will be read from valid cache lines.

            The intent of the three separate steps listed above addresses three distinct requirements: (i) discontinue new data replacing existing data in the cache (ii) ensure data already in the cache are evicted to memory, (iii) ensure subsequent memory references observe UC memory type semantics. Different processor implementation of caching control hardware may allow some variation of software implementation of these three requirements. See note below.

            NOTES Setting the CD flag in control register CR0 modifies the processor’s caching behaviour as indicated in Table 11-5, but setting the CD flag alone may not be sufficient across all processor families to force the effective memory type for all physical memory to be UC nor does it force strict memory ordering, due to hardware implementation variations across different processor families. To force the UC memory type and strict memory ordering on all of physical memory, it is sufficient to either program the MTRRs for all physical memory to be UC memory type or disable all MTRRs.

            For the Pentium 4 and Intel Xeon processors, after the sequence of steps given above has been executed, the cache lines containing the code between the end of the WBINVD instruction and before the MTRRS have actually been disabled may be retained in the cache hierarchy. Here, to remove code from the cache completely, a second WBINVD instruction must be executed after the MTRRs have been disabled.

            That's a long quote but it boils down to this code

            Source https://stackoverflow.com/questions/48360238

            QUESTION

            Using inline assembly with serialization instructions
            Asked 2018-Jan-30 at 14:35

            We consider that we are using GCC (or GCC-compatible) compiler on a X86_64 architecture, and that eax, ebx, ecx, edx and level are variables (unsigned int or unsigned int*) for input and output of the instruction (like here).

            ...

            ANSWER

            Answered 2018-Jan-30 at 14:35

            First of all, lfence may be as strongly serializing as cpuid, or maybe not. If you care about performance, check and see if you can find evidence that lfence is strong enough (at least for your use-case). Possibly even using both mfence; lfence might be better than cpuid, if neither mfence nor lfence alone are enough to serialize on both AMD and Intel. (I'm not sure, see my linked comment).

            2. Yes, all the ones that don't tell the compiler that the asm statement writes E[A-D]X are dangerous and will likely cause hard-to-debug weirdness. (i.e. you need to use (dummy) output operands or clobbers).

            You need volatile, because you want the asm code to be executed for the side-effect of serialization, not to produce the outputs.

            If you don't want to use the CPUID result for anything (e.g. do double duty by serializing and querying something), you should simply list the registers as clobbers, not outputs, so you don't need any C variables to hold the results.

            Source https://stackoverflow.com/questions/48522628

            QUESTION

            How to use CPUID as a serializing instruction?
            Asked 2018-Jan-29 at 14:51

            CPUID can be used as a serializing instruction as described here and here. What is the minimal/simplest asm syntax to use it in that way in C++?

            ...

            ANSWER

            Answered 2018-Jan-29 at 13:44

            Is there a reason you're not using the fence operations? If the goal is to serialize a section of code you can do something like

            Source https://stackoverflow.com/questions/48502569

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install minix86

            You can download it from GitHub.

            Support

            Instructions table: https://github.com/xem/minix86/blob/gh-pages/instructions.md (wip).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/xem/minix86.git

          • CLI

            gh repo clone xem/minix86

          • sshUrl

            git@github.com:xem/minix86.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Emulator Libraries

            yuzu

            by yuzu-emu

            rpcs3

            by RPCS3

            Ryujinx

            by Ryujinx

            ruffle

            by ruffle-rs

            1on1-questions

            by VGraupera

            Try Top Libraries by xem

            miniCodeEditor

            by xemHTML

            sheet

            by xemHTML

            W

            by xemHTML

            3DShomebrew

            by xemHTML

            miniMinifier

            by xemCSS