PPC: Add U3 based Mac machine

Linux on PPC64 knows only so many chipsets. One of the is the U3. So
we can use that when we're emulating a PPC64 machine, making Linux happy.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@681 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Alexander Graf
2010-02-22 18:52:30 +00:00
parent b2036c0313
commit 88679e07e4
3 changed files with 19 additions and 13 deletions

View File

@@ -63,6 +63,7 @@ enum {
ARCH_PREP = 0, ARCH_PREP = 0,
ARCH_MAC99, ARCH_MAC99,
ARCH_HEATHROW, ARCH_HEATHROW,
ARCH_MAC99_U3,
}; };
int is_apple(void) int is_apple(void)
@@ -77,7 +78,8 @@ int is_oldworld(void)
int is_newworld(void) int is_newworld(void)
{ {
return machine_id == ARCH_MAC99; return (machine_id == ARCH_MAC99) ||
(machine_id == ARCH_MAC99_U3);
} }
static const pci_arch_t known_arch[] = { static const pci_arch_t known_arch[] = {
@@ -95,6 +97,13 @@ static const pci_arch_t known_arch[] = {
0xf2000000, 0x00800000, 0x00000000, 0x01000000, 0xf2000000, 0x00800000, 0x00000000, 0x01000000,
{ 8, 9, 10, 11 } { 8, 9, 10, 11 }
}, },
[ARCH_MAC99_U3] = { "MAC99_U3", PCI_VENDOR_ID_APPLE,
PCI_DEVICE_ID_APPLE_U3_AGP,
0xf0800000, 0xf0c00000,
0xf0000000, 0x02000000, 0x80000000, 0x10000000,
0xf2000000, 0x00800000, 0x00000000, 0x01000000,
{ 0x1b, 0x1c, 0x1d, 0x1e }
},
[ARCH_HEATHROW] = { "HEATHROW", PCI_VENDOR_ID_MOTOROLA, [ARCH_HEATHROW] = { "HEATHROW", PCI_VENDOR_ID_MOTOROLA,
PCI_DEVICE_ID_MOTOROLA_MPC106, PCI_DEVICE_ID_MOTOROLA_MPC106,
0xfec00000, 0xfee00000, 0xfec00000, 0xfee00000,
@@ -557,6 +566,7 @@ arch_of_init( void )
break; break;
case ARCH_MAC99: case ARCH_MAC99:
case ARCH_MAC99_U3:
case ARCH_PREP: case ARCH_PREP:
default: default:
@@ -597,17 +607,6 @@ arch_of_init( void )
push_str("system-id"); push_str("system-id");
fword("property"); fword("property");
/* pci info */
if (machine_id == ARCH_MAC99) {
push_str("/pci");
fword("find-device");
push_str("u3-agp");
fword("encode-string");
push_str("compatible");
fword("property");
}
/* memory info */ /* memory info */
push_str("/memory"); push_str("/memory");

View File

@@ -279,6 +279,12 @@ static const pci_subclass_t mem_subclass[] = {
static const pci_dev_t hbrg_devices[] = { static const pci_dev_t hbrg_devices[] = {
{
PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U3_AGP, NULL,
"pci", "AAPL,UniNorth", "u3-agp\0",
3, 2, 1,
host_config_cb, NULL,
},
{ {
PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_AGP, NULL, PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_AGP, NULL,
"pci", "AAPL,UniNorth", "uni-north\0", "pci", "AAPL,UniNorth", "uni-north\0",
@@ -1084,7 +1090,7 @@ static const pci_dev_t misc_pci[] = {
{ {
PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_KEYL, PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_KEYL,
"mac-io", "mac-io", "AAPL,Keylargo", "Keylargo\0", "mac-io", "mac-io", "AAPL,Keylargo", "Keylargo\0",
1, 1, 2, 1, 1, 1,
&macio_keylargo_config_cb, NULL, &macio_keylargo_config_cb, NULL,
}, },
{ {

View File

@@ -187,6 +187,7 @@ extern const pci_arch_t *arch;
#define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f #define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f
#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 #define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
#define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 #define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022
#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b
#define PCI_VENDOR_ID_SUN 0x108e #define PCI_VENDOR_ID_SUN 0x108e
#define PCI_DEVICE_ID_SUN_EBUS 0x1000 #define PCI_DEVICE_ID_SUN_EBUS 0x1000