‹ BackHN Continuity

Thread

ReBarUEFI: Resizable BAR for almost any UEFI system

243 points · 77 comments · nateb2022

  1. bigwheels · · focus · HN ↗
    What does this do? I perused the README but I'm still clueless on what the purpose and use-case is for ReBAR.

    (Posting this under the assumption others will also appreciate a bit of quick context.)

    1. mathisfun123 · · focus · HN ↗
      > what the purpose and use-case is for ReBAR

      Literally the second sentence in the repo:

      > This provides performance benefits and is even required for Intel Arc GPUs to function optimally.

      1. qudat · · focus · HN ↗
        Your quote doesn’t help me understand this project at all.

        What is a BAR let alone a resizable one? Readme just jumps in, which is fine, but I’m not sure why this is on HN or why I should care.

        1. pizza234 · · focus · HN ↗
          ReBAR stands for "Resizable BAR (Base Address Register)" - it makes the CPU's access window into GPU memory resizable; instead of accessing VRAM in small chunks, the CPU can access much more at once, which can improve performance on some modern GPUs.
          1. docenttx · · focus · HN ↗
            Its also neccessary in many cases using any PCIe device with BAR-addressable memory on-board above the threshold, not just vram.
        2. mathisfun123 · · focus · HN ↗
          i literally don't understand how people move through life - do you expect every single link on this site (or any site) to be ELI5 for you specifically? do you not understand that some things require effort/homework on your part?
          1. yunnpp · · focus · HN ↗
            What is the purpose of your comments? You failed to answer his question, then attack him for asking the question. Consider the two possibilities: a) doing that homework is easy, b) it's hard. If it's easy, you could have just posted the relevant link and be done. If it's hard, then his question is warranted. Either way, your comments add nothing. One can only conclude that you don't actually know how to answer the question. The real question, though, is: why even bother replying?

            Also, ReBAR can get complicated as you can see from other responses above. The articles on the web are also not really good as they tend to replicate marketing material and make vague statements about performance, but fail to explain how specifically performance is improved.

            1. mathisfun123 · · focus · HN ↗
              > What is the purpose of your comments?

              Same as his: to voice my frustration about something on the internet.

              1. Dylan16807 · · focus · HN ↗
                Your original comment sure didn't do that. It just gave an incorrect answer.
                1. mathisfun123 · · focus · HN ↗
                  What exactly was "incorrect" about it? He asked for a purpose and a use-case not an explanation.
                  1. Dylan16807 · · focus · HN ↗
                    > not an explanation

                    Wrong.

                    1. mathisfun123 · · focus · HN ↗
                      .... It's literally right there:

                      > I'm still clueless on what the purpose and use-case is for ReBAR

                      Are you seriously debating this?

                      1. Dylan16807 · · focus · HN ↗
                        They wanted a basic explanation in response to that.

                        Or to put it differently, I would take the sentence "He asked for a purpose and a use-case not an explanation." and replace the word "not" with a comma.

                        1. mathisfun123 · · focus · HN ↗
                          I quoted the direct response. I have no idea what you're debating.
                          1. Dylan16807 · · focus · HN ↗
                            I'm not sure how to put it simpler.

                            I agree with "He asked for a purpose and a use-case". (This is what your quote supports.)

                            I disagree with "not an explanation".

                            When asking for a purpose and use case, they were asking for an explanation.

        3. toast0 · · focus · HN ↗
          BARs are part of the PCI spec, they're the way for firmware and OS to determine the size of the memory or i/o window the card controls as well as the way for the system firmware (usually) to pick what address range the card should use.

          In the old days, they were a fixed size. If your GPU has 16 GB of ram and you want to access all of it via memory addresses, you'd need a 16 GB BAR ... but lots of (older) systems wouldn't be able to map in a large BAR because of a lack of address lines (or wahtever), so GPUs had stayed with 256MB for VRAM access because it was compatible. With a smaller BAR than the VRAM, you have to use some sort of windowing / paging setup. Resizable BAR lets the BAR start small so older systems will work, but grow larger with capable systems.

          Much better than having a jumper to set the BAR to big or small, and you can skip VRAM window management.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.