Announcement

Collapse
No announcement yet.

A Developer Hacked AMD's GCN GPUs To Run Custom Code Via OpenGL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by Kemosabe View Post
    What exactly is a GPU based OS supposed to be?
    Maybe an OS on top of another. I'm sure you can't do this right at bootup, you need some OS and driver running to access the card in the first place.

    Comment


    • #12
      If only Frostbite could give us an OpenGL engine.

      Comment


      • #13
        Originally posted by Kemosabe View Post
        What exactly is a GPU based OS supposed to be?
        The GPU is turing complete. The only real barriers to it acting as a CPU are its lack of bus control (they only speak PCIE and video outs) and the need for firmware to boot "to" it. But its actually completely doable - we have the ISA, we know how ata / pci / usb work, we can write drivers for those, but you need a better compiler infrastructure than OpenCL for that - you would want to have a systems programming language for the GPU where control flow is designed around parallelism and transparent pipelining.

        The hard part is building a firmware board for it. You need to fab your own PCH for the thing and it would probably require custom silicon for the GPU and ram to interface properly as a system hub. But radeonSI is really just another CPU architecture, one with its own ISA and hardware characteristics you can write an OS for. The software parts are already there, and tech wise our GPUs are sophisticated enough to perform the role.
        Last edited by zanny; 11-30-2015, 08:39 PM.

        Comment


        • #14
          It's like writing a driver on top of a driver...

          Comment


          • #15
            Originally posted by marek View Post
            It's like writing a driver on top of a driver...
            Yo dawg, I heard you like drivers?
            Last edited by Ericg; 12-01-2015, 12:40 AM.

            Comment


            • #16
              Originally posted by zanny View Post

              The GPU is turing complete. The only real barriers to it acting as a CPU are its lack of bus control (they only speak PCIE and video outs) and the need for firmware to boot "to" it. But its actually completely doable - we have the ISA, we know how ata / pci / usb work, we can write drivers for those, but you need a better compiler infrastructure than OpenCL for that - you would want to have a systems programming language for the GPU where control flow is designed around parallelism and transparent pipelining.

              The hard part is building a firmware board for it. You need to fab your own PCH for the thing and it would probably require custom silicon for the GPU and ram to interface properly as a system hub. But radeonSI is really just another CPU architecture, one with its own ISA and hardware characteristics you can write an OS for. The software parts are already there, and tech wise our GPUs are sophisticated enough to perform the role.
              you can run completely custom code on GPU using HSA runtime. So you can theoretically run an OS. You can even write drivers for other devices (if they use MMIO).
              Practically it's a bad idea, because you don't have privilege levels that would protect your OS structures from application code.

              Comment


              • #17
                Thanks Michael, very interesting article.

                Comment


                • #18
                  Originally posted by OneTimeShot View Post
                  Presumably the byte stream verifier in the Kernel should prevent anything malicious being loaded from userspace (?) A moderately amusing hack while waiting for Vulcan that will basically support this type of thing officially, I suppose...
                  AFAIK Vulkan will accept only SPIR code which is not directly binary for concrete GPU but very close. But this is also interesting https://twitter.com/grahamsellers/st...13605362954243

                  Comment


                  • #19
                    Originally posted by OneTimeShot View Post
                    Presumably the byte stream verifier in the Kernel should prevent anything malicious being loaded from userspace (?) A moderately amusing hack while waiting for Vulcan that will basically support this type of thing officially, I suppose...
                    I assumed SPIR-V was supposed to be the official bytecode that has to be understood by drivers - you still don't cope with the vendor ISA in the Vulkan world (and I don't know how one prevent a malicious byte stream to be sent to the GPU without being extremely invasive and inefficient for legitimate uses ; I might be wrong, of course).

                    Comment


                    • #20
                      Originally posted by dungeon View Post
                      GPU based OS should be if you have working fully functional OS kernel on the GPU, instead of the CPU.... but i don't think there is the one
                      Raspberry Pi Firmware which runs on the VideoCore IV comes close. It is all proprietary though.

                      Comment

                      Working...
                      X