달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

원본 : http://www.insanelymac.com/forum/index.php?showtopic=252061&st=0

Many thanks to mucha, bcc9 thumbsup_anim.gif for his genius discovery and for his method for finding and editing framebuffer personalities
unfortunately i can’t post in the ATI graphic section cause i don’t have suffisant privilege whistle.gif
the proof in the attachements

수정을 위한 유용한 몇가지 화일들과 가이드를 첨부 화일을 참고하면 됩니다.

우선 bbc9의 토픽(radeondump & tutorial) & Dong (RadeonHD)를 참고하길 바란다. 몇가지 터미널 스킬과 바이너리 수정을 위한 bbc9의 방법이 도움이 될 것이다.

가장 중요한 것은 아이디어이므로 추가적인 유용한 정보는 피드백이 있다면 언제든지 환영이다. 부트로더는 Chameleon rev 747 을 기본 베이스로 기본적인 프레임버퍼와 DeviceID(0x9480), (kabyl의 부트파일은 나에게는 해당되지 않았다.) 수정된 ati.c 이다.


A- The Structure of a personality:(자신의 칩셋을 위해 수정하기 위한 구조)


Mobility Radeon HD 4650 (M96,DevID 0x9480) 과 비슷한 칩셋이 채용된 iMac 10,1 & iMac11,2의 Radeon HD 4670 (M96, DevID 0x9488 )을 기본으로 사용할 것이다.

3 가지 기본적인 수정을 위해, 다음과 같이 각 커넥트: port0, port1, port3를 이용할 것이다.


02 00 00 00 40 00 00 00 09 01 00 00 02 01 00 03
02 00 00 00 00 01 00 00 09 01 00 00 20 01 02 02
00 04 00 00 04 03 00 00 00 01 00 00 10 00 01 01

첫번째, port 0를 본다면 다음과 같다.

02 00 00 00 40 00 00 00 09 01 00 00 02 01 00 03

8개의 파트로 나누어 본다면 다음과 같다.

02 00 00 00 - 40 00 00 00 - 09 01 - 00 00 - 02 - 01 - 00 - 03

그리고 다음과 같이 교체한다.


1- ConnectorType : 02 00 00 00 > 0x00000002 +++
2- ATY,ControlFlags : 40 00 00 00 > 0x00000040 - - -
3- Features : 09 01 > 0x0109 - - -
4- ?? : 00 00 > 0x0000 - - -
5- Transmitter : 02 > 0x02 +++
6- Encoder : 01 > 0x01 +++
7- HotplugID : 00 > 0x00 - - -
8- SenseID : 03 > 0x03 +++

- - - > 이 값들은 쉽게 예상가능(거의 동일한 커넥터 형태의 상수)
+++ > 검색한 값, 틀린 값 == 동작하지 않음.

각 필드를 위한 가능한 값들의 자세한 정보는 다음과 같다. (몇개의 값들은 확인되었지만 몇개의 다른 사용자화된 값들을 예상했지만 시스템에 동작되는지 여부는 피드백이 필요하다.(내 보드에서는
LVDS 와 VGA 값은 확인되었다.)

1- ConnectorType;

/* bbc9의 4 byte radeondump */
#define CONNECTORTYPE_LVDS 0x00000002
#define CONNECTORTYPE_DVI 0x00000004
#define CONNECTORTYPE_VGA 0x00000010
#define CONNECTORTYPE_S-V 0x00000080
#define CONNECTORTYPE_DP 0x00000400
#define CONNECTORTYPE_HDMI 0x00000800

2- ATY,ControlFlags;

/* ioreg 키에 의해 발견한 동일한 4 byte : ATY,ControlFlags. hardcoded for each connector type
u can try one by one until u find the working one for u
0x0002 : LVDS > ControlFlag : 0x0040 / 0x0100
0x0004 : DVI-? > ControlFlag : 0x0016 - 0x0014 / 0x214
0x0010 : VGA > ControlFlag : 0x0010
0x0080 : S-Video > ControlFlag : 0x0002
0x0200 : DVI-? > ControlFlag : 0x0014 / 0x0214 - 0x0204
0x0400 : DisplayPort > ControlFlag : 0x0100 - 0x0104 - 0x0304 / 0x0604 - 0x0400
0x0800 : HDMI > ControlFlag : 0x0200
0x1000 : DVI-? > ControlFlag : 0x0016
*/

3-Features;

/* Features byte 0 ,
LVDS screen 사용예, 0x09 = 0x01 + 0x08 > Internal + Backlight */

#define FEATURE_USE_INTERNAL 0x01
#define FEATURE_USE_RGB_ON_YUV 0x04
#define FEATURE_USE_BACKLIGHT 0x08
#define FEATURE_BACKLIGHT_INVERTED 0x10
#define FEATURE_USE_CLAMSHELL 0x20

/* 1 byte, 하드코팅한 각 커넥터 타입
0x0002 : LVDS > Features : 0x09
0x0004 : DVI-? > Features : 0x00
0x0010 : VGA > Features : 0x00
0x0080 : S-Video > Features : 0x04
0x0200 : DVI-? > Features : 0x00
0x0400 : DisplayPort > Features : 0x00
0x0800 : HDMI > Features : 0x00
0x1000 : DVI-? > Features : 0x00
*/

/* Features byte 1 , no idea ???*/

4- Unkown ;

5- Transmitter;

/* u can get this from dmesg after installing Dong’s RadeonHD with debug info */
/* Transmitter Bits 0-3 (TransmitterID) */
#define UNIPHY 0x00
#define UNIPHY_1 0x01
#define UNIPHY_2 0x02

/* Transmitter Bits 4-7 (LinkID) */
#define DUAL_LINK 0x00 // LINK_A + LINK_B
#define LINK_A 0x10
#define LINK_B 0x20

/* Transmitter byte */
#define UNIPHY_A 0x10 // = UNIPHY:LINK_A
#define UNIPHY_B 0x20 // = UNIPHY:LINK_B
#define UNIPHY_AB 0x00 // = UNIPHY:DUAL_LINK
#define UNIPHY_C 0x11 // = UNIPHY_1:LINK_A
#define UNIPHY_D 0x21 // = UNIPHY_1:LINK_B
#define UNIPHY_CD 0x01 // = UNIPHY_1:DUAL_LINK
#define UNIPHY_E 0x12 // = UNIPHY_2:LINK_A
#define UNIPHY_F 0x22 // = UNIPHY_2:LINK_B
#define UNIPHY_EF 0x02 // = UNIPHY_2:DUAL_LINK
#define DACA 0x00
#define DACB 0x10


6- Encoder;

/* u can get this from Dmesg as above for R8XX architecture and above there is 06 Digital Encoder: DIG_1 > DIG_6*/
/* Encoder Bits 0-3 (DIG_ID : Digital) */
#define DIG_1 0x00 // = DIG_A
#define DIG_2 0x01 // = DIG_B
#define DIG_3 0x02 // = DIG_C Only for Radeon HD 5XXX Series and above
#define DIG_4 0x03 // = DIG_D Only for Radeon HD 5XXX Series and above
#define DIG_5 0x04 // = DIG_E Only for Radeon HD 5XXX Series and above
#define DIG_6 0x05 // = DIG_F Only for Radeon HD 5XXX Series and above

/* Encoder Bits 4-7 (DAC_ID : Analog) */
#define DAC 0x10

7- HotplugID;

/* 4 bits it’s a unique id for each port, i have tried with 0 for port0, 1 for port1 and 2 for port2 and it’s just working */

8- SenseID;

/* SenseLine = (i2cid & 0xf) +1 ,you get i2cid from bbc9 radeondump */
Bits 0-3: Sense Line
Bit 4: Use hw i2c flag

이제 몇가지 실행한다면

B- 커넥터 타입, ATY,ControlFlags,Features, HotplugId 와 SenseLineId 값 얻기:


다음과 같은 커맨드가 필요하다.:
1- videocard bios 덤프 ( everest 를 이용하여 덤프하고 파일명을 1002_9480.rom으로 바꾼다. ) ,
2-
bbc9의 radeondump tool

Terminal을 실행하여 다음과 같이 실행한다.

#./radeondump < your_videobios.rom > connector.txt
결과는 다음과 같다 :

———————————————————————————————————————————————
Desktop Mucha$ ./radeondump < 1002_9480.rom
ATOM BIOS Rom:
SubsystemVendorID: 0x103c SubsystemID: 0x3629
IOBaseAddress: 0x7000
Filename: br33507.001
BIOS Bootup Message:
HP_Quanta_Jones_Cujo_M96M_DDR3 M96 DDR3 128bit 550e/667m

Connector at index 0 type: LVDS (7)
Connector’s i2cid: 96
Connector at index 1 type: VGA (1)
Connector’s i2cid: 95
Connector at index 2 type: HDMI-A (11)
Connector’s i2cid: 90
———————————————————————————————————————————————-
이 값들의 의미는:

port0 > LVDS=0x00000002 - ControlFlag=0x0040 - Features = 0x09————————————-HotplugId=0x00 - i2cid=96 > SenseLine = 0x07
port1 > VGA =0x00000010 - ControlFlag=0x0010 - Features = 0x00 ———————————— HotplugId=0x01 - i2cid=95 > SenseLine = 0x06
port2 > HDMI=0x00000800 - ControlFlag=0x0200 - Features = 0x00 ————————————-HotplugId=0x02 - i2cid=90 > SenseLine = 0x01


C- Encoder 와 Transmitter ID 값 얻기:

몇가지 유용한 정보 : “http://www.botchco.com/agd5f/?p=51”
그리고 취해야 할 리눅스 드라이버의 댓글??사항에서
Encoder-Transmitter Routing rules정보.

“http://lxr.free-electrons.com/source/drivers/gpu/drm/radeon/radeon_encoders.c”

—————————————————————————————————————————————————-
682 /*
683 * DIG Encoder/Transmitter Setup
684 *
685 * DCE 3.0/3.1 (RV6XX, Radeon HD 3XXX Series and older)
686 * - 2 DIG transmitter blocks. UNIPHY (links A and B ) and LVTMA.
687 * Supports up to 3 digital outputs
688 * - 2 DIG encoder blocks.
689 * DIG1 can drive UNIPHY link A or link B
690 * DIG2 can drive UNIPHY link B or LVTMA
691 *
692 * DCE 3.2 (RV7XX, Radeon HD 4XXX Series)
693 * - 3 DIG transmitter blocks. UNIPHY0/1/2 (links A and B ).
694 * Supports up to 5 digital outputs
695 * - 2 DIG encoder blocks.
696 * DIG1/2 can drive UNIPHY0/1/2 link A or link B
697 *
698 * DCE 4.0 (RV8XX, Radeon HD 5XXX Series)
699 * - 3 DIG transmitter blocks UNPHY0/1/2 (links A and B ).
700 * Supports up to 6 digital outputs
701 * - 6 DIG encoder blocks.
702 * - DIG to PHY mapping is hardcoded
703 * DIG1 drives UNIPHY0 link A, A+B
704 * DIG2 drives UNIPHY0 link B
705 * DIG3 drives UNIPHY1 link A, A+B
706 * DIG4 drives UNIPHY1 link B
707 * DIG5 drives UNIPHY2 link A, A+B
708 * DIG6 drives UNIPHY2 link B
709 *
710 * Routing
711 * crtc -> dig encoder -> UNIPHY/LVTMA (1 or 2 links)
712 * Examples:
713 * crtc0 -> dig2 -> LVTMA links A+B -> TMDS/HDMI
714 * crtc1 -> dig1 -> UNIPHY0 link B -> DP
715 * crtc0 -> dig1 -> UNIPHY2 link A -> LVDS
716 * crtc1 -> dig2 -> UNIPHY1 link B+A -> TMDS/HDMI
717 */
———————————————————————————————————————————

Dong’s RadeonHD.kext 가 필요하다. 10/20/2009 update사용하였다. info.plist를 수정하여 디버그를 true 로 verbose level 을 2 로 세팅하여 준다.

그리고 /S/L/E 에서 ATI4600 & ATIFramebuffer를 백업하고 제거한다.

그리고 radeonHD를 설치하고 재부팅한다. (external VGA,DVI 혹은 HDMI screen 을 연결한다.)

이제 데스크탑에서 Terminal을 실행하여 다음과 같이 실행한다.
$sudo -s

>>type your password

#dmesg >Encoder.txt
다음과 같은 결과값을 얻을 것이다.:

———————————————————————————————————————————-
CailWriteATIRegister(1724,40002)
CAIL: CailReleaseMemory
ParseTable said: CD_SUCCESS
Call to AtomBIOS Exec succeeded
DAC_LoadDetection Successful
rhdAtomBIOSScratchDACSenseResults
BIOSScratch_0: 0x40002
rhdAtomBIOSScratchDACSenseResults sensed RHD_SENSED_VGA
AtomOutputvalueDACA: Sensed Output: VGA
atomTMDSPropertyControl
atomTMDSPropertyControl
Setting AtomOutputvalueDACA to incoherent
atomTMDSPropertyControl
RHDConnectorEnableHDMI
atomTMDSPropertyControl
RHDHPDCheck
RHDHPDCheck returned: 0 mask: 1
RHDMonitorInit
rhdMonitorPanel
RHDAtomBiosFunc
rhdAtomLvdsGetTimings
rhdAtomLvdsTimings
rhdAtomLvdsTimings: LVDS Modeline: 1366x768 72000 1366 (1366) 1414 1446 (1486) 1486 768 (768) 771 775 (806) 806
Call to AtomBIOS Get Panel Mode succeeded
RHDAtomBiosFunc
rhdAtomLvdsGetTimings
rhdAtomLvdsDDC
rhdAtomLvdsDDC: unknown record type: 24
Query for AtomBIOS Get Panel EDID: failed
RHDAtomOutputAllocFree
Mapping DIG1 encoder to KLDSKP_UNIPHYE
Crtc[0]: found native mode from Monitor[LVDS Panel]:
Modeline “1366x768” 72 1366 1414 1446 1486 768 771 775 806
Connector “PANEL” uses Monitor “LVDS Panel”:
RHDMonitorInit
Connector “VGA 1”: Failed to retrieve Monitor information.
RHDValidateScaledToMode
rhdModeValidateCrtc
DxModeValid: ATOM CRTC 1
rhdAtomOutputModeValid
Listing modesetting layout:
ATOM CRTC 1: tied to Atom PLL 1 and LUT A:
Outputs: AtomOutputduleDemandUniphyE (PANEL)
ATOM CRTC 2: tied to Atom PLL 2 and LUT B:
Outputs: AtomOutputvalueDACA (VGA 1)
Unused Outputs: AtomOutputUniphyB
RHDModesPoolCreate
———————————————————————————————————————-

위에서 나의 SPECIFIC videocard routing 은 다음과 같다:

CRTC0>DIG1>UNIPHYE>LVDS Encoder= 0x00 Transmitter = 0x12
CRTC1>DAC > DACA >VGA Encoder=0x10 Transmitter = 0x00
CRTC1>DIG2>UNIPHYB>HDMI Encoder= 0x01 Transmitter = 0x20 (i don’t have a hdmi display to test)

이제 컴파일레이션을 하는데 , 나의 수정된 Shrike 개인정보는 다음과 같다 :


02 00 00 00 40 00 00 00 09 01 00 00 12 00 00 07 LVDS
10 00 00 00 10 00 00 00 00 01 00 00 00 10 01 06 VGA
00 08 00 00 00 02 00 00 00 01 00 00 20 01 02 01 HDMI

이 수정은
LVDS 와 VGA 디스플레이 둘다 해상도 변경을 가능하게 해준다. QE/CI Extended desktop 과 Mirroring 가지 포함하여

Peregrine 를 동일하게 수정하여 테스트하였고 동작하는 것을 확인하였다.

D- 원하는 Framebuffer personality 를 패치하기 위한 쉬운 방법 (adresses를 계산하지 않고 i386 과 x86_64 둘다 지원):


hexadecimal editor가 필요하다:

1- 첨부된 화일을 다운로드 받는다 : Sharks_FB.txt Birds_FB.txt 와 Monkeys_FB.txt,
2- 선택된 텍스트화일을 열고 원하는 personality hexadecimal code 를 복사한다. (patch해야하는 ),
3- ATIFramebuffer.kext 화일을 열고 ATIFramebuffer binary 를 hexadecimal editor에 드래그한다.
4- edit>search 를 선택하고, search 필드에 클립보드 컨텐트를 붙여넣기 한다. hex value 를 선택하고 wrap option을 설정한다.
5- 검색된 personality중 2 instances를 찾아야 한다. : 첫번째는 x86_64 이고 두번째는 i386을 위한것이다. (2개인 것을 확인),
6- 패치하고 바이너리를 저장한다. 설치하고 재부팅한다. ENJOY

For Radeon HD 3XXX and prior choose Sharks,
For Radeon HD 4XXX choose Birds,
For Radeon HD 5XXX choose Monkeys.

'Hackintosh > Graphic Card' 카테고리의 다른 글

HIS Radeon HD 5750 512MB  (2) 2011.11.04
ATI Radeon HD 4870 중고가격  (0) 2011.08.02
Nividia drivers geforce 4xx+580  (0) 2011.02.21
Graphic Card  (0) 2010.10.19
XFX ATI HD 5870 1GB edition BP  (2) 2010.09.10
:
Posted by uno-ani