Open Firmware is two words

Not OpenFirmware.
Also fixed a spelling mistake and removed some extra spaces.
This commit is contained in:
joevt 2022-08-21 23:49:18 -07:00
parent e097b7a0a1
commit cd122ce263
13 changed files with 45 additions and 44 deletions

View File

@ -12,7 +12,7 @@ This program aims to not only improve upon what Sheepshaver, PearPC, and other P
## Implemented Features
This emulator has a debugging environment, complete with a disassembler. We also have implemented enough to allow OpenFirmware to boot, going so far as to allow audio playback of the boot-up jingles.
This emulator has a debugging environment, complete with a disassembler. We also have implemented enough to allow Open Firmware to boot, going so far as to allow audio playback of the boot-up jingles.
## How to Use
@ -52,7 +52,7 @@ You need to install development tools first.
At least, a C++11 compliant compiler and [CMake](https://cmake.org) are required.
You will also have to recursive clone or run
You will also have to recursive clone or run
```
git submodule update --init --recursive
```

View File

@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file Utilities for working with the Apple OpenFirmware NVRAM partition. */
/** @file Utilities for working with the Apple Open Firmware NVRAM partition. */
#include <devices/common/ofnvram.h>
#include <endianswap.h>
@ -146,7 +146,7 @@ void OfNvramUtils::printenv()
int i;
if (!this->validate()) {
cout << "Invalid OpenFirmware partition content!" << endl;
cout << "Invalid Open Firmware partition content!" << endl;
return;
}
@ -191,7 +191,7 @@ void OfNvramUtils::setenv(string var_name, string value)
int i, flag;
if (!this->validate()) {
cout << "Invalid OpenFirmware partition content!" << endl;
cout << "Invalid Open Firmware partition content!" << endl;
return;
}
@ -221,7 +221,7 @@ void OfNvramUtils::setenv(string var_name, string value)
}
}
// see if one of the stanard properties should be changed
// see if one of the standard properties should be changed
if (of_vars.find(var_name) == of_vars.end()) {
cout << "Attempt to change unknown variable " << var_name << endl;
return;

View File

@ -24,7 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <devices/common/nvram.h>
/** @file Utilities for working with the Apple OpenFirmware NVRAM partition. */
/** @file Utilities for working with the Apple Open Firmware NVRAM partition. */
#define OF_NVRAM_OFFSET 0x1800
#define OF_NVRAM_SIG 0x1275

View File

@ -1,5 +1,5 @@
The Apple Desktop Bus is a bit-serial peripheral bus, Apple themselves cited a 2-MHz Motorola 68HC11 microcontroller as an example platform to implement the ADB standard with. Its transfer speed is usually around 10.0 kilobits per second, roughly comparable to a PS/2 port at 12.0 kilobits per second.
The device commands are in the form of single byte strings. The first four bits are to signal which of the 16 devices are to be used. The next two bits are for which action to execute (talk, listen, flush, or reset). These are followed by two bits which determine the register to reference (register 0 is usually a communications register, while register 3 is used for device info).
# Commands

View File

@ -5,7 +5,7 @@ The ATI Rage is a video card that comes bundled with early Power Mac G3s and New
The ATI Rage can usually be located at IOBase (ex.: 0xF3000000 for Power Mac G3 Beige) + 0x9000. However, the video memory appears to be at 0x81000000 and is capped at 8 MB.
# Register Map
| Register Name | Offset |
|:-------------------:|:------:|
| BUS_CNTL | 0xA0 |

View File

@ -19,7 +19,7 @@ All registers are 32-bit here.
| Register | Offset |
|:-----------------:|:------:|
| Sound Control | 0x0 |
| Sound Control | 0x0 |
| Codec Control | 0x10 |
| Codec Status | 0x20 |
| Clipping Count | 0x30 |

View File

@ -1,5 +1,5 @@
The BMac is an Ethernet controller featured in G3 and early G4 Macs. As described by a Linux contributor, this controller "appears to have some parts in common with the Sun "Happy Meal" (HME) controller".
The max frame size is 0x5EE bytes.
It resides on 0xF3011000, with Writing DMA on 0xF3008200 and Reading DMA on 0xF3008300.

View File

@ -8,7 +8,7 @@ computers. As those names suggest, Apple engineers liked to name their I/O contr
after airports and train stations.
Heathrow and its siblings are collectively referred to as __mac-io__ devices in the
OpenFirmware device tree.
Open Firmware device tree.
## Mac I/O family
@ -134,7 +134,7 @@ Macintosh firmware configures the Heathrow ASIC to live at address `0xF3000000`.
#### Feature control register
Bit names in the table below were pulled from OpenFirmware v2.4.
Bit names in the table below were pulled from Open Firmware v2.4.
The field "Description" represents my personal attempt to describe the function
of those bits based on publicly available Apple and Linux sources.

View File

@ -9,7 +9,7 @@
| 0x68080000 | Opcode Dispatch Table |
| 0x68FFE000 | KernelData |
| 0x68FFF000 | EmulatorData |
| 0xFF800000 | OpenFirmware |
| 0xFF800000 | Open Firmware |
| 0xFFF0C000 | HardwarePriv |
# PHYSICAL MEMORY MAP
@ -44,14 +44,14 @@
### Main Memory
* 0x00000000 - 0x7FFFFFFF
Mac OS
Mac OS
* 0x00400000 - Open Firmware
* 0x00400000 - OpenFirmware
### PCI/Device Memory Area 0x80000000 - 0xFF000000
* 0x81000000 - Video Display Device (normally)
* 0xF3000000 -
Mac OS I/O Device area

View File

@ -2,7 +2,7 @@
| Register Name | Number |
|:----------------:|:------:|
| R_COUNT0 | 0x0 |
| R_COUNT0 | 0x0 |
| R_COUNT1 | 0x1 |
| R_FIFO | 0x2 |
| R_CMD | 0x3 |
@ -23,7 +23,7 @@
| Command Name | Number |
|:----------------:|:------:|
| NOP | 0x0 |
| NOP | 0x0 |
| ARBITRATE | 0x1 |
| SELECT | 0x2 |
| COMMAND | 0x3 |

View File

@ -12,7 +12,7 @@ The Description-Based Direct Memory Access relies on memory-based descriptions,
| Channel | Number |
|:-----------------:|:------:|
| SCSI0 | 0x0 |
| SCSI0 | 0x0 |
| FLOPPY | 0x1 |
| ETHERNET TRANSMIT | 0x2 |
| ETHERNET RECIEVE | 0x3 |
@ -27,9 +27,9 @@ The Description-Based Direct Memory Access relies on memory-based descriptions,
# NCR 53C94
The NCR 53C94 is the SCSI controller.
# Register Map
| Offset | Read functionality |Write functionality |
|:------:|:------------------------:|:-------------------------:|
| 0x0 | Transfer counter LSB | Transfer counter LSB |
@ -49,7 +49,7 @@ The NCR 53C94 is the SCSI controller.
# SWIM 3
The SWIM 3 (Sanders-Wozniak integrated machine 3) is the floppy drive disk controller. As can be inferred by the name, the SWIM III chip is the improvement of a combination of floppy disk driver designs by Steve Wozniak (who worked on his own floppy drive controller for early Apple computers) and Wendell B. Sander (who worked on an MFM-compatible IBM floppy drive controller).
The SWIM 3 (Sanders-Wozniak integrated machine 3) is the floppy drive disk controller. As can be inferred by the name, the SWIM III chip is the improvement of a combination of floppy disk driver designs by Steve Wozniak (who worked on his own floppy drive controller for early Apple computers) and Wendell B. Sander (who worked on an MFM-compatible IBM floppy drive controller).
The SWIM chip is resided on the logic board physically and is located at IOBase + 0x15000 in the device tree. It sits between the I/O controller and the floppy disk connector. Its function is to translate the I/O commands to specialized signals to drive the floppy disk drive, i.e. disk spinning speed, head position, phase sync, etc.
@ -79,4 +79,4 @@ Mac OS relies on 8 KB of NVRAM at minimum to run properly. It's usually found at
# Miscellaneous
The Power Mac G3 Beige has an additional register at 0xFF000004, which is dubbed varyingly as the "cpu-id" (by OpenFirmware), the ""systemReg" (display driver) or "MachineID" (platform driver).
The Power Mac G3 Beige has an additional register at 0xFF000004, which is dubbed varyingly as the "cpu-id" (by Open Firmware), the ""systemReg" (display driver) or "MachineID" (platform driver).

View File

@ -1,30 +1,30 @@
# OpenFirmware in Power Macintosh
# Open Firmware in Power Macintosh
*compiled from various sources by Max Poliakovski.*
[Open Firmware](https://en.wikipedia.org/wiki/Open_Firmware) is a platform-independent
boot firmware architecture covered by an IEEE standard.
All PowerMacintosh computers run OpenFirmware except the very first generation
All PowerMacintosh computers run Open Firmware except the very first generation
that uses [Nubus](https://en.wikipedia.org/wiki/NuBus) instead of
[PCI](https://en.wikipedia.org/wiki/Peripheral_Component_Interconnect).
OpenFirmware is used to perform hardware identification and initialization during
Open Firmware is used to perform hardware identification and initialization during
the booting process after power-on. It also provides a platform-independent
description of the attached devices available for operating systems.
In this respect, OpenFirmware can be compared with [BIOS](https://en.wikipedia.org/wiki/BIOS),
In this respect, Open Firmware can be compared with [BIOS](https://en.wikipedia.org/wiki/BIOS),
widely used in the PC world.
Being based upon the [Forth programming language](https://en.wikipedia.org/wiki/Forth_(programming_language)),
OpenFirmware offers an operating system, an interactive environment as well as a
Open Firmware offers an operating system, an interactive environment as well as a
programming language in one package. Its shell can be used as well by users for
controlling the boot enviroment as by developers for developing and debugging device
drivers.
This document focuses on various aspects of Apple's OpenFirmware implementation
This document focuses on various aspects of Apple's Open Firmware implementation
as found in various PowerMacintosh models.
## OpenFirmware Versions
## Open Firmware Versions
### Old World Macs
@ -43,17 +43,17 @@ as found in various PowerMacintosh models.
*TBD*
## OpenFirmware image
## Open Firmware image
### Old World Macs
OpenFirmware in OldWorld Macs is stored in the monolithic 4MB ROM. Its hibernated
Open Firmware in OldWorld Macs is stored in the monolithic 4MB ROM. Its hibernated
image is located at offset `0x320000` or `0x330000` from beginning of the ROM.
That corresponds to the physical address `0xFFF20000` or `0xFFF30000`, respectively.
The size of the OpenFirmware image varies from 98KB (v1.0.5) to 172KB (v2.4).
The size of the Open Firmware image varies from 98KB (v1.0.5) to 172KB (v2.4).
Apple's OpenFirmware image has the following structure:
Apple's Open Firmware image has the following structure:
| Section type | Architecture | Relative Size (v1.0.5) | Relative Size (v2.4) |
|:------------------:|:------------:|:----------------------:|:--------------------:|
@ -112,9 +112,10 @@ FFF20084 dc.l 0x7720 ; offset to the last Forth word descriptor of the kernel
```
### OpenFirmware internals
Apple's OpenFirmware contains a small kernel implemented in the native PowerPC code. This kernel performs the following actions:
### Open Firmware internals
Apple's Open Firmware contains a small kernel implemented in the native PowerPC code. This kernel performs the following actions:
* set up memory translation for OF execution
* relocate itself from ROM to RAM
@ -123,23 +124,23 @@ Apple's OpenFirmware contains a small kernel implemented in the native PowerPC c
* pass control to recompiled OF that starts building the device tree
* process low-level exceptions
## OpenFirmware and the Macintosh boot process
## Open Firmware and the Macintosh boot process
### Old World Macs
1. In response to power coming on, HWInit code in the Power Macintosh ROM performs initialization of the memory controller and the basic I/O facilities as well as some self-testing. After that, the startup chime is played.
2. HWInit passes control to OpenFirmware kernel that prepares OF execution from RAM. OF builds the **device tree** - a platform-independent description of the attached HW.
2. HWInit passes control to Open Firmware kernel that prepares OF execution from RAM. OF builds the **device tree** - a platform-independent description of the attached HW.
3. OF returns control to HWInit that initializes several low-level data structures required by the Nanokernel.
4. HWInit passes control to the Nanokernel that initializes the native execution enviroment and the 68k emulator.
5. 68k emulator executes the start-up code in the Macintosh ROM that initializes various managers.
6. The device tree generated by the OpenFirmware in step 2 is imported by the Expansion Bus Manager initialization code and stored in the **NameRegistry**.
6. The device tree generated by the Open Firmware in step 2 is imported by the Expansion Bus Manager initialization code and stored in the **NameRegistry**.
7. An operating system is located and loaded.
### New World Macs
*TBD*
## OpenFirmware bugs
## Open Firmware bugs
Apple OF is known to contain numerous bugs. The following table lists some recently discrovered bugs, not mentioned elsewhere.

View File

@ -8,7 +8,7 @@ Code execution generally begins at 0xFFF00100, which the reset exception vector.
# BATs
The 601 BATs are emulated by the OpenFirmware.
The 601 BATs are emulated by the Open Firmware.
# TLBs