Skip to contentSkip to conversation

Porting to NuBus PowerMacs

DISCUSSION Hubert Figuiere 13 participants 23 messages Jan 12, 1999 – Jan 14, 1999

lore
Share & tools
lore
#0 lore raw

I'd like to know what would be the complexity of porting LinuxPPC to NuBus PowerMacs ?

Here are my thoughts:

-we have BootX. So we can BootX LinuxPPC. We just need to build a
fake OpenFirmware device tree for BootX so he can pass it the kernel

-we have the source of the Mach MicroKernel, hence we have enough
to rewrite the specification to rewrite drivers for LinuxPPC. Some components and drivers may directly come from Linux Mac68k.

Note that I don't have a NuBus PowerMac. Only a 6200 (and my PowerCenter Pro, already supported).

Any comments ?

Hub

Quoted 3 lines

Je souhaiterais essayer Internet Explorer 4.0 sous Linux. Il existe 2 versions: une sous HP/UX et une sous Solaris Laquelle dois je utiliser?

-+- MJM in Guide du linuxien pervers : "Choisir son environnement" -+-

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#1 lore raw
Quoted 2 lines · Hubert Figuiere

I'd like to know what would be the complexity of porting LinuxPPC to NuBus PowerMacs ?

<[email protected]> is already thinking about it.

Quoted 5 lines

Here are my thoughts:

-we have BootX. So we can BootX LinuxPPC. We just need to build a fake OpenFirmware device tree for BootX so he can pass it the kernel

That was the original idea, but several things makes me wonder if it wouldn't be simpler to just pass a list of known infos (total ram size, processor type, machine ID and a couple of baseaddresses) to the kernel and almost-hard-code things in drivers since this hardware will not evolve very much now ;-)

Basically, I have to provide him a version of BootX that works on those machines and provide the requested infos. I didn't have time to work a lot on BootX those few last days, but I think I'll send him something around the end of the week, maybe next week.

Quoted 3 lines

-we have the source of the Mach MicroKernel, hence we have enough to rewrite the specification to rewrite drivers for LinuxPPC. Some components and drivers may directly come from Linux Mac68k.

We have also a lot of potentially useful things in the mac68k and APUS ports.

Quoted 2 lines

Note that I don't have a NuBus PowerMac. Only a 6200 (and my PowerCenter Pro, already supported).

;-)

Signature · 11 lines
           E-Mail: <mailto:[email protected]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email protected] ]]
#13 lore raw
In reply to Hubert Figuiere

[David Gatwood wrote:]

It's a lot harder than this, unfortunately. The NuBus machines' memory isn't contiguous. Thus, code would have to be written and/or obtained to find out what memory is available in the machine and where that memory is located in RAM. That's going to be a nasty problem unless some code is pulled from the MkLinux booter. I'd expect that to also require a substantial number of changes to the way memory is handled in linux, but I could be wrong.

erk. i hadn't thought about that. from looking at the ppc mm code though, it looks like it should be able to handle chunks of memory. the m68k and the apus code certainly look like they can handle being passed chunks of addresses/sizes. hopefully, it shouldn't be too bad...

so, ben, i guess i'll also need memory addresses/sizes as well. after perusing the m68k code, i think that's the only thing that i forgot to tell you about. this will essentially make bootx report essentially the same information as the m68k boot loader.

Beyond that, it will also require changes to irq.c to handle the interrupt controller and a lot of code for DMA, if that's desired (I don't think it's even remotely similar, AFAICT). Of course, that stuff can be obtained from Mach, but it'll be a lot of work.

well, my "oh so clever plan" is actually to use the gestalt information to mock up something that i pass to the m68k interrupt routines. presto! no more uglification of irq.c. given the similarities between the apus stuff and the nubus powermac stuff, i'm actually turning the nubus powermacs into a variant of apus for now. a lot of my fiddling actually ends up making some minor changes to the m68k code and calling that instead.

for now, i'm conveniently ignoring the dma stuff, but it looks like modifying the mac68k devices will actually prove to be more useful than dealing with the the standard pci powermac stuff.

Oh, and the i/o base address is different, which may or may not be a problem, and supporting certain pieces of hardware (which will remain nameless) will also require speed penalties (this is the other reason MkLinux is slower than LinuxPPC...).

heh. am i correct in assuming then that just using memory barriers just won't cut it for a certain device that seems to have a bunch of delay()'s sprinkled throughout it? strangely, this same piece of hardware seems to be necessary to get the newer tech g3 extension and the mklinux booter happy... any insights there?

-a
[email protected]

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#20 lore raw
In reply to Hubert Figuiere

Review

Quoted 12 lines · Hubert Figuiere

I'd like to know what would be the complexity of porting LinuxPPC to NuBus PowerMacs ?

Here are my thoughts:

(quoted diff) +0 -2
-we have BootX. So we can BootX LinuxPPC. We just need to build a
 fake OpenFirmware device tree for BootX so he can pass it the
 kernel
 
-we have the source of the Mach MicroKernel, hence we have enough
 to rewrite the specification to rewrite drivers for LinuxPPC.
 Some components and drivers may directly come from Linux Mac68k.

It's a lot harder than this, unfortunately. The NuBus machines' memory isn't contiguous. Thus, code would have to be written and/or obtained to find out what memory is available in the machine and where that memory is located in RAM. That's going to be a nasty problem unless some code is pulled from the MkLinux booter. I'd expect that to also require a substantial number of changes to the way memory is handled in linux, but I could be wrong.

Beyond that, it will also require changes to irq.c to handle the interrupt controller and a lot of code for DMA, if that's desired (I don't think it's even remotely similar, AFAICT). Of course, that stuff can be obtained from Mach, but it'll be a lot of work. Oh, and the i/o base address is different, which may or may not be a problem, and supporting certain pieces of hardware (which will remain nameless) will also require speed penalties (this is the other reason MkLinux is slower than LinuxPPC...).

Later,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#21 lore raw
Quoted 4 lines · David A. Gatwood

Beyond that, it will also require changes to irq.c to handle the interrupt controller and a lot of code for DMA, if that's desired (I don't think it's even remotely similar, AFAICT). Of course, that stuff can be obtained from Mach, but it'll be a lot of work. Oh, and the i/o base

I gather that DMA is not cache-coherent on the NuBus powermacs, which opens a whole new can of worms... it means you have to do explicit flush/invalidate requests, but it also means that you *have* to make sure that the cpu isn't accessing any words in any of the cache lines that the dma controller is accessing. If the dma buffer isn't cacheline-aligned, and is preceded or followed by unrelated stuff, you are in trouble.

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#2 lore raw
In reply to Benjamin Herrenschmidt
Quoted 5 lines · Benjamin Herrenschmidt

That was the original idea, but several things makes me wonder if it wouldn't be simpler to just pass a list of known infos (total ram size, processor type, machine ID and a couple of baseaddresses) to the kernel and almost-hard-code things in drivers since this hardware will not evolve very much now ;-)

RAM chips on that machine are... according to a reliable source... aligned on 64 meg boundaries, and are thought to be mirrored throughout that bank if they're <64 megs. Question is... what happens if a bank isn't filled. This is left as an exercise for the reader. But determining the memory layout is critical to getting it working. I'm hoping that I can get that bit of code from the MkLinux booter, but I'm not making any promises.

Quoted 4 lines

Basically, I have to provide him a version of BootX that works on those machines and provide the requested infos. I didn't have time to work a lot on BootX those few last days, but I think I'll send him something around the end of the week, maybe next week.

Also, please pass the machine gestalt (for model detection), video address, processor speed, and a flattened OF tree, if you could (and if you aren't already). That would ease porting the Mach MK to BootX-style booting (which is basically the only way MkLinux will ever run on iMacs and the new G3 MiniTower machines, unless we add OF booting, which I don't want to muck with right now).

Later,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#3 lore raw
In reply to Benjamin Herrenschmidt
Quoted 5 lines · Benjamin Herrenschmidt

That was the original idea, but several things makes me wonder if it wouldn't be simpler to just pass a list of known infos (total ram size, processor type, machine ID and a couple of baseaddresses) to the kernel and almost-hard-code things in drivers since this hardware will not evolve very much now ;-)

This is what we do with the embedded LinuxPPC ports now. The data structure is a combination of things the boot rom gives us and other configuration tidbits the Linux boot loader can find. It wouldn't be hard to expand this to other systems.

The next challenge would be to support OF fucntions (like find_devices(), etc.) for those drivers that run on both platforms. As the embedded systems mature, we may soon be doing this.......

    -- Dan

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#4 lore raw
In reply to Benjamin Herrenschmidt

According to Benjamin Herrenschmidt <[email protected]>:

Quoted 10 lines
Quoted 3 lines

-we have the source of the Mach MicroKernel, hence we have enough to rewrite the specification to rewrite drivers for LinuxPPC. Some components and drivers may directly come from Linux Mac68k.

We have also a lot of potentially useful things in the mac68k and APUS ports.

Quoted 2 lines

Note that I don't have a NuBus PowerMac. Only a 6200 (and my PowerCenter Pro, already supported).

;-)

I'm investigating the possibilities to support 5200/6200 (and its little brother 5300/6300) just because this machine is:

a) not supported by either MkLinux or LinuxPPC
b) I have one (in fact my fiancee has it).

There are several custom chips inside (like on any other Mac). First the big problem is that 6200 is a PowerPC inside a 68040 machine. It uses a "CAPELLA" custom chip as a bus translation unit. This may be a problem since I don't think it is used in any supported PowerMac.

RAM: 2 simm slot on a 68040 data bus.

Video: It is a "Valkyrie" Chip using a DRAM frame buffer. If I remember, Valkyrie is available in several PowerMacs and is already supported.

Memory Controller: it is a "F108" as in the LC 630 (ses Linux 68k port) that also handles IDE, SCSI and SCC serial ports. SCSI in this chip is a NCR 53C96. SCC is like the 8530 SCC (that we find in several Macs too).

ADB: "CUDA" chip similar to several 68k Mac. Accessed thru the "PrimeTime II". It is the 68HC05 and also handles PRAM, RTC, power supply control.

Sound: a "DFAC II" chip.

Other: "PRIMETIME II" chip manages SWIM II, VIA1, VIA2, sound controller and I/O bus adpater. Manages ADB sounds, CommSlot, PDS.

You can find the technote here:

http://developer.apple.com/techpubs/hardware/hardware2.html

Note that I have no porting experience. :-)

Hub

Quoted 3 lines

Je souhaiterais essayer Internet Explorer 4.0 sous Linux. Il existe 2 versions: une sous HP/UX et une sous Solaris Laquelle dois je utiliser?

-+- MJM in Guide du linuxien pervers : "Choisir son environnement" -+-

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#5 lore raw
Quoted 41 lines · On 13-Jan-99 Hubert Figuiere wrote:

According to Benjamin Herrenschmidt <[email protected]>:

Quoted 10 lines
Quoted 3 lines

-we have the source of the Mach MicroKernel, hence we have enough to rewrite the specification to rewrite drivers for LinuxPPC. Some components and drivers may directly come from Linux Mac68k.

We have also a lot of potentially useful things in the mac68k and APUS ports.

Quoted 2 lines

Note that I don't have a NuBus PowerMac. Only a 6200 (and my PowerCenter Pro, already supported).

;-)

I'm investigating the possibilities to support 5200/6200 (and its little brother 5300/6300) just because this machine is:

a) not supported by either MkLinux or LinuxPPC
b) I have one (in fact my fiancee has it).

There are several custom chips inside (like on any other Mac). First the big problem is that 6200 is a PowerPC inside a 68040 machine. It uses a "CAPELLA" custom chip as a bus translation unit. This may be a problem since I don't think it is used in any supported PowerMac.

RAM: 2 simm slot on a 68040 data bus.

Video: It is a "Valkyrie" Chip using a DRAM frame buffer. If I remember, Valkyrie is available in several PowerMacs and is already supported.

Memory Controller: it is a "F108" as in the LC 630 (ses Linux 68k port) that also handles IDE, SCSI and SCC serial ports. SCSI in this chip is a NCR 53C96. SCC is like the 8530 SCC (that we find in several Macs too).

ADB: "CUDA" chip similar to several 68k Mac. Accessed thru the "PrimeTime II". It is the 68HC05 and also handles PRAM, RTC, power supply control.

Quoted 9 lines

Sound: a "DFAC II" chip.

Other: "PRIMETIME II" chip manages SWIM II, VIA1, VIA2, sound controller and I/O bus adpater. Manages ADB sounds, CommSlot, PDS.

You can find the technote here:

http://developer.apple.com/techpubs/hardware/hardware2.html

This document does not have enough detail to be able to make a port for this hardware. As far as I know, such details are only available directly from Apple under NDA until they decide to "leak" the info out, such as releasing ports, drivers, etc.

Quoted 1 line

Note that I have no porting experience. :-)

We all start somewhere :-)

------------------------------------------------------------------------

Gary Thomas                              |
email: [email protected]                  | "Fine wine is a necessity of
   ... opinions expressed here are mine  |        life for me"
       and no one else would claim them! |
                                         |      Thomas Jefferson

------------------------------------------------------------------------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#6 lore raw

According to Gary Thomas <[email protected]>:

[ porting to 6200 ]

Quoted 7 lines
Quoted 4 lines

You can find the technote here:

http://developer.apple.com/techpubs/hardware/hardware2.html

This document does not have enough detail to be able to make a port for this hardware.

I know this. But it helps finding out the general architecture and tells what is inside so we can start to gather code from other ports that already guessed things. (like Linux Mac68k)

Quoted 3 lines

As far as I know, such details are only available directly from Apple under NDA until they decide to "leak" the info out, such as releasing ports, drivers, etc.

I know this too.

Quoted 3 lines
Quoted 1 line

Note that I have no porting experience. :-)

We all start somewhere :-)

Well... you are probably right. I'd better try to boot Linux on my BeBox :-)

Hub

Quoted 3 lines

Je souhaiterais essayer Internet Explorer 4.0 sous Linux. Il existe 2 versions: une sous HP/UX et une sous Solaris Laquelle dois je utiliser?

-+- MJM in Guide du linuxien pervers : "Choisir son environnement" -+-

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#7 lore raw
Quoted 3 lines · Hubert Figuiere

I know this. But it helps finding out the general architecture and tells what is inside so we can start to gather code from other ports that already guessed things. (like Linux Mac68k)

There's no such thing is Linux Mac68k, AmigaLinux, AtariLinux, ApolloLinux... They're all called Linux/m68k.

Greetings,

Geert

--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#9 lore raw
In reply to Hubert Figuiere
Quoted 11 lines · Hubert Figuiere

I'm investigating the possibilities to support 5200/6200 (and its little brother 5300/6300) just because this machine is:

a) not supported by either MkLinux or LinuxPPC
b) I have one (in fact my fiancee has it).

There are several custom chips inside (like on any other Mac). First the big problem is that 6200 is a PowerPC inside a 68040 machine. It uses a "CAPELLA" custom chip as a bus translation unit. This may be a problem since I don't think it is used in any supported PowerMac.

I don't think the Capella support will be too big a hassle, as I'm under the impression that such hardware should be mostly software-transparent. I could be completely wrong, though, as it might need some configuration with regards to the memory management code or something. Hopefully not.

Quoted 3 lines

Video: It is a "Valkyrie" Chip using a DRAM frame buffer. If I remember, Valkyrie is available in several PowerMacs and is already supported.

Yes, and I added some code to at least get closer to suppporting the Valkyrie on x200/x300 machines already. That shouldn't be a problem, I don't think.

Quoted 4 lines

Memory Controller: it is a "F108" as in the LC 630 (ses Linux 68k port) that also handles IDE, SCSI and SCC serial ports. SCSI in this chip is a NCR 53C96. SCC is like the 8530 SCC (that we find in several Macs too).

The memory controller _may_ require some tweaks, but I doubt it, since booting the machine gets a lot farther than I'd expect if the memory mapping stuff didn't work. :-)

Quoted 3 lines

ADB: "CUDA" chip similar to several 68k Mac. Accessed thru the "PrimeTime II". It is the 68HC05 and also handles PRAM, RTC, power supply control.

As long as we can get the base of the cuda portion of the chip, that's easy enough.

Quoted 1 line

Sound: a "DFAC II" chip.

There probably wouldn't be sound support initially, but that's not exactly a super-high priority compared to booting. ;-)

Quoted 1 line

Other: "PRIMETIME II" chip manages SWIM II, VIA1, VIA2, sound

Are you sure it's not a SWIM III? Because if it's a II, we may have to add some stuff to the floppy support eventually. We can probably swipe code from NetBSD-mac68k, though. It'll be a pain in the rear, but workable. Just a few swimii_blah functions or whatever....

Right now, the big problem is the interrupt controller. The moment we enable it, the monitor shuts off (according to several reports). That's on the 5x00's, of course, since I don't suppose you can turn off the monitor in software on the 6x00's. :-) Anyway, there are some critical addresses missing. If I don't hear any details, I'll try to hack some in MacsBug....

Later,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#14 lore raw
In reply to a sun
Quoted 10 lines · a sun

Oh, and the i/o base address is different, which may or may not be a problem, and supporting certain pieces of hardware (which will remain nameless) will also require speed penalties (this is the other reason MkLinux is slower than LinuxPPC...).

heh. am i correct in assuming then that just using memory barriers just won't cut it for a certain device that seems to have a bunch of delay()'s sprinkled throughout it? strangely, this same piece of hardware seems to be necessary to get the newer tech g3 extension and the mklinux booter happy... any insights there?

Oh, so you heard about that one, eh? :-) I got the impression from sources that will remain nameless that if a certain register is set to certain values, that certain piece of hardware will either write data to or read data from the address stored in the register (details are fuzzy, sorry), and that the issue is forcing the instructions to execute in the correct order, thus putting a safe value into the register before the sync instruction (I think) gets called, by means of delays, carefully crafted branch instructions and other stuff to keep from having to do anything nasty like a pipeline flush (i.e. even worse delay). I think I remember hearing that it only caused problems if the motherboard 601 was running the machine (i.e. not an upgrade card), but I could be remembering wrong.

David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y-

------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#15 lore raw
In reply to a sun
Quoted 5 lines · a sun

heh. am i correct in assuming then that just using memory barriers just won't cut it for a certain device that seems to have a bunch of delay()'s sprinkled throughout it? strangely, this same piece of hardware seems to be necessary to get the newer tech g3 extension and the mklinux booter happy... any insights there?

Actually, on looking at it, there is the use of memory barriers. The real change is in the code for the memory barriers (and possibly in other places, too... not certain). See

.../osfmk/src/mach_kernel/ppc/proc_reg.h:440

in the MkLinux sources. :-)

Later,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#8 lore raw
In reply to Gary Thomas
Quoted 6 lines · Gary Thomas
Quoted 1 line

http://developer.apple.com/techpubs/hardware/hardware2.html

This document does not have enough detail to be able to make a port for this hardware. As far as I know, such details are only available directly from Apple under NDA until they decide to "leak" the info out, such as releasing ports, drivers, etc.

True, but some of the information is frequently available through other means, like information available in MacsBug, especially where hardware addresses are concerned. It should be enough to at least get past the interrupt hurdle (since I think the code's currently putting the interrupt controller somewhere in the middle of either the ADB hardware or video hardware (hence the monitor shutting off). It's not as easy as working with docs, but it's still (historically speaking, anyway) easier than actually obtaining docs. ;-)

LATER,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#22 lore raw
In reply to David A. Gatwood
Quoted 2 lines · David A. Gatwood

It's a lot harder than this, unfortunately. The NuBus machines' memory isn't contiguous. Thus, code would have to be written and/or obtained to

doh!

Quoted 5 lines

find out what memory is available in the machine and where that memory is located in RAM. That's going to be a nasty problem unless some code is pulled from the MkLinux booter. I'd expect that to also require a substantial number of changes to the way memory is handled in linux, but I could be wrong.

hhmmm. don't some other arch's have non contiguous memory?

Quoted 8 lines

Beyond that, it will also require changes to irq.c to handle the interrupt controller and a lot of code for DMA, if that's desired (I don't think it's even remotely similar, AFAICT). Of course, that stuff can be obtained from Mach, but it'll be a lot of work. Oh, and the i/o base address is different, which may or may not be a problem, and supporting certain pieces of hardware (which will remain nameless) will also require speed penalties (this is the other reason MkLinux is slower than LinuxPPC...).

what pieces of hardware? important ones?

--
Tom Vier - 0x82B007A8
[email protected] | goto the Zero Page at:
Tortured Souls Software | http://www.erols.com/thomassr/zero/

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#18 lore raw
In reply to a sun
Quoted 8 lines

well, my "oh so clever plan" is actually to use the gestalt information to mock up something that i pass to the m68k interrupt routines. presto! no more uglification of irq.c. given the similarities between the apus stuff and the nubus powermac stuff, i'm actually turning the nubus powermacs into a variant of apus for now. a lot of my fiddling actually ends up making some minor changes to the m68k code and calling that instead.

Cort is in the process of rewriting irq.c, and I have a (somewhat large) patch based on Corey Minyard's work which redid irq.c and most all the machine dependant functions. You might want to take a look at this, since I suspect it might make help reduce the 'uglification'.

it's at

ftp://ftp.microux.com/pub/linux/linuxppc-rework-troy-2.patch.gz

Btw, I have a 7100/80 I'd like to try this on if you ever get it working ;)

--------------------------------------------------------------------------

| Troy Benjegerdes    |       [email protected]     |    [email protected]   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.    http://www.gnu.org   |

--------------------------------------------------------------------------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#16 lore raw
In reply to David A. Gatwood

Actually, on looking at it, there is the use of memory barriers. The real change is in the code for the memory barriers (and possibly in other places, too... not certain). See

.../osfmk/src/mach_kernel/ppc/proc_reg.h:440

in the MkLinux sources. :-)

oh my. i hadn't noticed that. thanks for pointing it out to me. i guess a plain eieio() is sometimes not good enough... no doubt, the designers of certain unmentionable devices were being directed by some cosmic purpose that we, the uninitiated, can only vaguely envision and hope to understand.

luckily, my trusty g3 upgrade card handily curtails my pursuit into the ineffable nature of such visionaries. i guess i'll have to add a CONFIG_601 to deal with certain "third-party" devices though. that way, we can have just as much fun as the other architectures with processor-specific tweaks.

-a
[email protected]

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#17 lore raw
Quoted 5 lines · a sun

oh my. i hadn't noticed that. thanks for pointing it out to me. i guess a plain eieio() is sometimes not good enough... no doubt, the designers of certain unmentionable devices were being directed by some cosmic purpose that we, the uninitiated, can only vaguely envision and hope to understand.

Actually, I think that the sync was the problem, but eieio might be, too. I note similar assmbly junk for both, so... who knows....

Quoted 5 lines

luckily, my trusty g3 upgrade card handily curtails my pursuit into the ineffable nature of such visionaries. i guess i'll have to add a CONFIG_601 to deal with certain "third-party" devices though. that way, we can have just as much fun as the other architectures with processor-specific tweaks.

Yeah. I'm planning on releasing certain development kernels (possibly not mainstream) that use plain old sync and eieio and see what speed difference it makes. We might find out that MkLinux's drivers aren't so bad after all.... You never know. Anyway, I don't think that register has always been supported, but somebody with more memory of the MkLinux coding history could say more (maybe).

Later,
David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y- ------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#19 lore raw
In reply to a sun
Quoted 4 lines · a sun

so, ben, i guess i'll also need memory addresses/sizes as well. after perusing the m68k code, i think that's the only thing that i forgot to tell you about. this will essentially make bootx report essentially the same information as the m68k boot loader.

I'll download this bootloader and see what it does. I don't know exactly how to get this memory map yet, it would be great if David could manage to find the info ...

Quoted 11 lines

well, my "oh so clever plan" is actually to use the gestalt information to mock up something that i pass to the m68k interrupt routines. presto! no more uglification of irq.c. given the similarities between the apus stuff and the nubus powermac stuff, i'm actually turning the nubus powermacs into a variant of apus for now. a lot of my fiddling actually ends up making some minor changes to the m68k code and calling that instead.

for now, i'm conveniently ignoring the dma stuff, but it looks like modifying the mac68k devices will actually prove to be more useful than dealing with the the standard pci powermac stuff.

I think so too. And PCI powermac is still evolving, it would be more difficult to take care of not breaking the NuBus support during evolutions.

Signature · 11 lines
           E-Mail: <mailto:[email protected]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email protected] ]]
#10 lore raw
In reply to David A. Gatwood
Quoted 6 lines · David A. Gatwood
Quoted 3 lines · Hubert Figuiere

I'm investigating the possibilities to support 5200/6200 (and its little brother 5300/6300) just because this machine is:

Quoted 8 lines
Quoted 8 lines

a) not supported by either MkLinux or LinuxPPC
b) I have one (in fact my fiancee has it).

There are several custom chips inside (like on any other Mac). First the big problem is that 6200 is a PowerPC inside a 68040 machine. It uses a "CAPELLA" custom chip as a bus translation unit. This may be a problem since I don't think it is used in any supported PowerMac.

I've got a 5200, which I am keen to get Linux running on at some point. The amount of time I can put aside is rather variable, but I do have some limited kernel hacking experience from my NetBSD/m68k days..

Willing to help, in short,

Jules

/----------------+-------------------------------+---------------------\

|  Jelibean aka  | [email protected]         |  6 Evelyn Rd	       |
|  Jules aka     | [email protected]              |  Richmond, Surrey   |
|  Julian Bean   | [email protected]        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |

\----------------------------------------------------------------------/

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#11 lore raw
In reply to David A. Gatwood
Quoted 7 lines · David A. Gatwood
Quoted 3 lines · Hubert Figuiere

ADB: "CUDA" chip similar to several 68k Mac. Accessed thru the "PrimeTime II". It is the 68HC05 and also handles PRAM, RTC, power supply control.

As long as we can get the base of the cuda portion of the chip, that's easy enough.

The CUDA hangs off VIA1 in the m68k machines. If this machine is just a 040 Mac with a PPC glued on top, the m68k code should do.

VIA1 and VIA2 are at fairly constant base addresses throughout the m68k series. But Apple might have played some tricks on us again :-(

Michael

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#12 lore raw
Quoted 2 lines · Michael Schmitz

The CUDA hangs off VIA1 in the m68k machines. If this machine is just a 040 Mac with a PPC glued on top, the m68k code should do.

Basically, yeah.

Quoted 2 lines

VIA1 and VIA2 are at fairly constant base addresses throughout the m68k series. But Apple might have played some tricks on us again :-(

'course I don't even know the base address for the IO space, but I'm gathering it's the same as the PDMs, and I vaguely remember reading that somewhere. Right now, the question basically boils down to the display going off (or black or something) when interrupts are enabled. If we can get past that, it should be mostly smooth sailing. We'll have to have base addresses for the IDE hardware, but I'd expect it to share that with the NuBus PowerBooks.... Apple's addresses seem to be very similar between the PDMs, the PERFORMA class, and the POWERBOOK class (NuBus).

David

David A. Gatwood Visit globegate's internet
[email protected] talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$ P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$ b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y-

------END GEEK CODE BLOCK------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]