Jump to content
InsanelyMac Forum

Õun

Members
  • Content count

    26
  • Joined

  • Last visited

About Õun

  • Rank
    InsanelyMac Protégé

Profile Information

  • Gender
    Male
  • Location
    Estonia
  1. Õun

    ACPI syntax for experts

    Another sample from HP creativity If (And (Local0, 0x00)) { Store (0x07, Local1) } Bitwise AND with 0 could never be true. Amazing how these things pop up in my DSDT.
  2. Does anyone know whats the difference between the following samples Store (\_SB.PCI0.LPCB.EC.CHKD (), Local0) Return (Local0) and Return (\_SB.PCI0.LPCB.EC.CHKD ()) I'm just curious, if the latter would work.
  3. Õun

    ACPI debugging

    Yup, ICH8 seems to have it too. I know how to write to it: Create OpRegion for it and use Store But how do you read it in SL? ioreg?
  4. Õun

    Moving from 32-bit to 64-bit

    As you have 6GB of memory it might give you some performance boost. I wouldn't worry about it though. I'm not familiar with iAtkos, so I don't know what boot loader it installed. In Chameleon RC4 I use arch=x86_64 to boot in 64bit mode. Remember though that all your kext must support it as well or they don't get loaded. If it works then you can enter the kernel flag to your boot.plist to avoid the typing every boot
  5. How to debug your DSDT code in (Snow) Leopard? I will try to gather different options into a single thread, maybe it will help other ACPI coders as well. What I have tried so far: 1. acpiexec Doesn't compile on Mac OS. Otherwise it would be the best option. I'm not good enough in C to figure out if its fixable or not. 2. ACPI spec Debug constant Debugging is disabled in Mac OS ACPI CA. So boot arguments acpi, acpi_level and acpi_layer don't work. 3. Remote kernel debugging I can't use that option as I don't have firewire or ethernet port. If someone has success story, please provide details. 4. i/o port 80 It has been defined as the debugging port on a lot of DSDT implementations, but I haven't figured out a method to use it. 5. Kernel debugging with boot arguments debug=0x12A provides some feedback on obvious errors (0x100, 0x20, 0x8 and 0x2 are the flags I'm using) - http://developer.apple.com/mac/library/doc...-CH221-BABDGEGF io=0x80 provides a lot of information from IOKit that is related to Power - http://www.opensource.apple.com/source/xnu...it/IOKitDebug.h 6. _DSM method In DSDT use _DSM Method to save information, see http://www.insanelymac.com/forum/index.php?showtopic=168014 Later you can view that information in IORegistry Explorer. But the execution time for _DSM method is a big limiting factor. You can't view the information that gets changed after the _DSM execution. 7. SATA Scratch Pad Register - Best Option Create this Operation Region under the SATA device, on ICH boards it's usually 0x001F0002. Check your board spec for the SATA device address and Scratch Pad Offset. On ICH8 and ICH10 it has been confirmed to be 0xD0. OperationRegion (DBGP, PCI_Config, 0xD0, 0x04) Field (DBGP, DWordAcc, NoLock, Preserve) { DBGR, 32 } Then you can use this sentence to write information to that register: Store (\PDC0, \_SB.PCI0.SATA.DBGR) (You will have to change it as needed, for example your PCI0 Device might be called differently) Remember that writing more than once will overwrite the value in that register. When you want to see the value you have to type this to your terminal: lspci -v -xxx -s 00:1f.2 (Your SATA device might be on a different address) If you have better ideas, let us know.
  6. Could you compile acpiexec for me as well? I don't have any xcode installed right now. Well I checked it out and seems that its more complicated than I expected. Not sure if its even possible as there are symbols missing. Oh well, Need to remote debug my system then
  7. Õun

    Master Chief's P5K PRO ACPI Warfare

    I checked your DSDT code and noticed that you have disabled the _PIC method (Well forwarded it to debug port which is the same thing). Is it because you know that SL is using APIC, so you have removed all the If statements that are checking it or is there something else? And I also noticed that you have implemented all the CPU throttling and C-states functions directly under CPUs, no if statements anymore to check the capabilities via _OST and dynamic loading after that. Again have you removed those checks because you know that SL will always support them? What I'm trying to do is optimize my DSDT to SL and remove all unnecessary things from my code, so your comments are more than welcome and if you can provide the background for your decisions, that would be even better. And one more question. When you user Store (something, DBG9), where and how can you see this information. Is it visible only when using remote debugging (Ethernet, Firewire etc), or will it be logged to any log as well? I have tried different boot options without success (debug=0x8, io=0x80)
  8. Õun

    DSDT fixes for Gigabyte boards

    Did you manage to move the Processor declarations to _SB? Did you still keep the Processor statement or moved to Device _HID ACPI0007? By the specification it should work, but I checked that my SL 10.6.2 uses ACPICA 20071219 version, which misses some important patches for this to work.
  9. Õun

    OSXRestart.kext

    I haven't tested your kext yet, as I'm still going through my DSDT code. I'm not just trying to patch it but learning it row by row and making changes when needed. My system (HP 8510w) is very similar to MBP3,1 so I have a good reference. But my question is, why would we need your kext at all? Why the Vanilla install fails to restart? For me, having extra kext is hack anyway, no matter how clean one it might be. Can't the restart issues be solved with DSDT coding?
  10. Õun

    DSDT explained

    Its really hard to fix other peoples DSDT. You must have very deep knowledge about your system, starting from chipset spec to Memory Regions, IO, DMA and IRQ addresses. Patches that float around in forums are usually general mistakes that can be patched. Like the HPET, RTC, PIC IRQ issue. Mac OS uses IRQ 0 and 8 with HPET device. In Windows world those IRQs are usually assigned to RTC and PIC. In Snow Leopard HPET needs even 3 IRQs.
  11. Õun

    DSDT issue eeepc 1005

    It is quite difficult to help with DSDT issues when you don't have the hardware. I mean, its possible but really time consuming. But I tried one thing, that might work. Try this DSDT, check if your sound starts to work. dsdt.aml.zip
  12. Õun

    DSDT explained

    Nope, its not a scope issue. Seems that HP uses some kind of internal software for BIOS development that generates their DSDT + the generated code has a lot of {censored} that is not needed for your laptop - and by that I mean its not even possible to use some of their code - For example my DSDT has 6 PCI Express Root Ports defined, although it uses only 3. I'm not trying to fix anything in that sample. I was just wondering if there is something I don't understand. My project is a little bit bigger. I'm rewriting most of the HP 8510w DSDT - Device by Device, Operation region by Operation region. Because my laptop (HP 8510w) is almost identical to Macbook Pro 3,1 I want to test out, how many issues can I fix with DSDT. So far I have found almost all the information I need - Embedded Controller excluded (that's one black box I can't and most likely will not find any documentation about). But does anyone know what are the fixed addresses (Memory, IO, etc) that Mac OS X is using. For example I know that PMBASE IO for Mac OS is 0x0400 - 0x0080. Not sure if there are any other fixed addresses.
  13. The original HP DSDT has quite many bugs, especially with C376 Method. You need to fix the syntax first. It's a little bit more complicated to newbie in DSDT, but basically you have to rearrange ({ and }) near the C376 method call.
  14. Õun

    DSDT explained

    Here is a sample code from my HP 8510w DSDT: ... Subtract (C025 (), C024, C023) ... Method (C025, 0, NotSerialized) { Store (C029, Local0) Return (Local0) } ... Why would I need such Method? As it's not even Serialized. How it's different from the following code: ... Subtract (C029, C024, C023) ...
  15. Installing latest Chameleon boot loader fixed Video. Vanilla kexts work without problems.
×