GithubHelp home page GithubHelp logo

Radix Question about microwatt HOT 1 CLOSED

openpowerwtf avatar openpowerwtf commented on July 22, 2024
Radix Question

from microwatt.

Comments (1)

paulusmack avatar paulusmack commented on July 22, 2024

I think it's correct as it is, actually.

The previous state (PROC_TBL_WAIT) set r.shift = RTS and r.mask_size = RPDS from the process table entry. The total number of address bits mapped by the radix tree is 2^(RTS + 31), hence the +31. The address generation logic ignores the bottom 12 bits, hence the -12. The logic is:

        pgtable_addr := x"00" & r.pgbase(55 downto 19) &
                        ((r.pgbase(18 downto 3) and not mask) or (addrsh and mask)) &
                        "000";

where mask = (1 << r.mask_size) - 1 and addrsh = r.addr >> (r.shift + 12).

The '& "000"' at the end accounts for the fact that each entry in the root page directory is 8 bytes. Basically the RPDS field is exactly the number of bits we need to take from the address being translated in order to index the root page directory.

As an experiment, I tried making the change you suggest. The result was that Linux doesn't boot, but crashes very early. The kernel MMU code is exactly the same as on a P9 or P10 --- there is no microwatt-specific code in there. The kernel boots just fine without that change.

from microwatt.

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.