Documentation for OpenFirmware

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

Documentation for OpenFirmware

Post by FlashBurn »

Hi,

I already searched through every site I found with the help of google. I found some specification regarding OpenFirmware, but what I did not find is a documentation of the API.

Can somebody point me at the right direction where I can find information regarding the API and ABI for OpenFirmware (SPARC and PowerPC)?
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Libera.chat IRC: dchapiesky

Re: Documentation for OpenFirmware

Post by dchapiesky »

OpenFirmware (or OpenBoot or OpenBIOS) is a forth interpreter...

Meaning that the bios its self is written in a forth language variant known as FCODE...

However....

It is less a BIOS and more a loader. It can manipulate memory, it understands the filesystem and device tree. Therefore there isn't really an API or ABI to functions

Your best bet of finding more information is:

https://www.openfirmware.info/Open_Firmware

and

https://www.openfirmware.info/data/docs/of1275.pdf

Interestingly the standards document above does not have "API" or "ABI" mentioned once in 266 pages...
Plagiarize. Plagiarize. Let not one line escape thine eyes...
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

Re: Documentation for OpenFirmware

Post by FlashBurn »

dchapiesky wrote: It is less a BIOS and more a loader. It can manipulate memory, it understands the filesystem and device tree. Therefore there isn't really an API or ABI to functions
There is an API and with this there also has to be an ABI (which is architecture dependent).

I know that there is a memory location with an array of function pointers (which is the API). What I don´t know is, is there always the same API with every implementation of OpenFirmware or not? Where is the ABI defined.

I could answer both questions in looking into the source code of open source loaders, but I like to have some kind of documentation and don´t relay only on some source code.
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Libera.chat IRC: dchapiesky

Re: Documentation for OpenFirmware

Post by dchapiesky »

FlashBurn wrote:Where is the ABI defined.
In the first document pdf I posted...

It is a VIRTUAL MACHINE... you don't jmp to it at all

This is the opensolaris (joyent) interface to the prom...

https://github.com/joyent/illumos-joyen ... n4v/promif

This is as close to an interface to the OpenBoot FORTH INTERPRETER as you will get...

It is called the Client Interface to OpenBoot.

There is no BIOS call interface where you are executing an API via an ABI... no list of jump tables where sparc assembly code acts as a BIOS... you are interacting with a virtual machine.

For more information:

https://docs.oracle.com/cd/E63648_01/pdf/806-1379.pdf
Plagiarize. Plagiarize. Let not one line escape thine eyes...
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

Re: Documentation for OpenFirmware

Post by FlashBurn »

I know how OpenFirmware works.

And in the source code you posted you can see that there is an API how to interact with OpenFirmware. If there is an API there also has to be an ABI ;) But I think we can stop this discussion here.

For me it would be interesting how the open source projects know how to interact with OpenFirmware. Is it that everytime the first one who wrote the code was working for the company and so did have access to the needed documentation and then everyone else who also did write some code for interacting with OpenFirmware just based his code on this?

So I will need to have a look at SILO and such loaders how to interact with OpenFirmware.
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Libera.chat IRC: dchapiesky

Re: Documentation for OpenFirmware

Post by dchapiesky »

First let me say Happy New Year to you!

Second... I am sure you have seen this but...

For ppc... Section 7.... the clinet interface handler arguments.... (which the source code I posted setup)

http://www.firmware.org/1275/bindings/p ... c-2_0.html

and then

8.2.3. Client Interface Handler Address
When client programs are invoked, r5 shall contain the address of the entry point of the client interface handler. If the system is executing in Real-Mode, the value in r5 is a real address; if in Virtual-Mode, the address in r5 is a mapped virtual address.

Note: this address points to the first instruction of the client interface handler, not to a procedure descriptor.

I do not see any ABI versioning information...

Sorry I could not find sparc related.

Cheers
Plagiarize. Plagiarize. Let not one line escape thine eyes...
Post Reply