AMD Geode/Video 3/Script: Difference between revisions

From JookWiki
(→‎Writing code: More editing)
(→‎Lessons learned: Add note about DAC VREF)
Line 250: Line 250:


-
-
TODO:
- dac vref


Narrator: "I did find some power down registers. But I confirmed these were set properly."
Narrator: "I did find some power down registers. But I confirmed these were set properly."

Revision as of 11:33, 20 August 2023

This is a work in progress textual description of the video.

Accessibility notice

Narrator: "Quick notice: A full textual description of this video is linked in the description below. Enjoy!"

A glossy purple slide shows the text "A full textual description of this video is linked in the description below"

Recount

Narrator: "Welcome back to my AMD Geode repair video series. If you weren't here for the first few videos, let me give you a quick recount."

A glossy red slide shows the text "Welcome back! Now for a quick recap"

Narrator: "In video 1 I bought and did some basic troubleshooting on an AMD Geode computer board. I drew some wrong conclusions and at the end damaged the board with bad soldering."

Two scenes from part one are shown. The first is me using a bench power supply to power board. The second is a sticky mess of me soldering the board. The text "Part 1: Troubleshooting" is shown.

Narrator: "In video 2 I spent 6 hours trying to repair the board. I was successful in the end but damaged another part later."

Two scenes from part two are shown. The first is soldering an inductor back on to the board. The second is running solder braid over the network adapter with bent and ruined network pins. The text "Part 2: Repair" is shown.

Lessons learned

Narrator: "Okay we're done. Let's talk about the lessons learned."

A glossy green slide shows the text "Lessons learned"

Narrator: "First, make a plan when soldering. Practice on e-waste to see if it's something you can do. Take breaks throughout and assess the situation. I didn't do any of these and I damaged the board."

A glossy green slide shows the the following text:

  • Lesson 1: Have a plan
  • Practice it on e-waste
  • Take breaks
  • Assess the situation
  • I didn't do these and failed

Narrator: "Secondly, understand the circuit properly! Had I done this I wouldn't have even had to solder the board. Let me explain."

A glossy orange slide shows the the following text:

  • Lesson 2:
  • Understand the circuit!
  • I could've avoided soldering altogether

Narrator: "In the video I drew this diagram"

A picture of the circuit board near the CPU is shown. Text and lines are drawn over it, forming a diagram that shows:

  • DAVdd connects to the LM4041AIM3-1.2 voltage reference
  • From the 1.22 volt reference a 0.25 nanofarad capacitor and 10 kiloohm resistor in parallel run to DVREF
  • The 1.21 kiloohm resistor follows from the DVREF capacitor and resistor to the DRSET pin

Narrator: "I also measured these voltages"

The diagram is updated. DAVdd is marked as 3.3 volts, DVREF is 1.22 volts and DRSET is 40 millivolts.

Narrator: "How is DAVdd 3.3 volts if it's connected to a 1.2 volt reference?"

The voltage reference is circled.

Narrator: "How is DVREF 1.22 volts if there's a 10k resistor?"

The 10k resistor is circled instead.

Narrator: "What is this capacitor doing here?"

The capacitor is circled instead.

Narrator: "It makes no sense!"

Three giant question marks are shown overlaid the diagram.

Narrator: "When it comes to the part of the board I spend time troubleshooting and soldering, it gets worse!"

A picture of the circuit board near is shown, near the VGA output port. It contains various surface mount chips, but in the center is a set of 3 small capacitors, 7 inductors, 3 ESD diodes and 7 resistors.

Narrator: "I thought this circuit had the video signals travelling through capacitors, through inductors, through these ESD diodes, and out through these termination resistors."

Text overlays the diagrams labels the capacitors, inductors, ESD diodes and resistors. The top three capacitors are labelled R, G and B. Three separate lines from each of these capacitors draw through a set of inductors, ESD diodes and resistors. The lines are coloured red, green and blue.

Narrator: "I figured that an ESD diode was faulty, pulling a signal line down to GND. This would be responsible for the low voltage."

The text "Would a bad ESD diode pull the signal low?" is shown. The green line is replaced with a shorter line that ends at one of the pins of its ESD diode.

Narrator: "Had I just measured the ESD resistors with my multimeter in resistance and diode mode I could've ruled this out."

A cartoon multimeter is shown with its black probe on the GND pin of the ESD diode and the red probe on the signal pin of the ESD diode.

Narrator: "Even then, I decided to remove the capacitors to isolate the signals"

The circuit board is shown again, this time with the top capacitors removed. The red, green and blue lines stop at the signal side of the capacitor and no longer flow to the inductors. The text "I removed the capacitors to rule out any fault..."

Narrator: "But these are connected to GND, not the signal!"

The red, green and blue lines turn to crossed out stubs. The text "But they weren't connected to the signal!" is shown.

Narrator: "Removing them would not show the fault at all! I was doomed from the start."

The red, green and blue lines start again at the inductors and flow to the resistors again.

Writing code

Narrator: "Without an obvious board issue, maybe I could find some hints in the chip itself?"

A glossy blue slide shows the text "Investigating the chip"

Narrator: "So I opened the data sheet and started looking for anything useful."

The datasheet cover page is shown. An 'AMD Geode' logo is shown as well as the text "AMD Geode™ LX Processors Data Book" dated February 2009.

Narrator: "I first looked at the at the video processor diagnostic register."

A table titled "MSR_DIAG_VP Bit Descriptions" is shown. It has these fields:

  • RSVD: Reserved
  • CM: 32-Bit CRC Mode. Selects 32-bit CRC generation
  • NDM: New Dither Mode. Selects either the legacy dither mode, or new dither mode
  • SM: Sim Mode. This field is used to put the VP in modes to aid verification
  • DVAL: DAC Test Value. 8-bit data value to drive to CRT DAC when selected by bit 19
  • D: DAC Test Value Select. Selects which data stream is sent to CRT DAC during CRT DAC test mode
  • RSVD: Reserved. Reserved for test purposes. Set to 000 for normal operation
  • SP: Spares. Read/write, no function

Narrator: "I found some interesting fields that can be used to test the video processor DAC."

Three fields are shown in more detail. I will quote from the data sheet here:

Bits 27 to 20: DAC Test Value

8-bit data value to drive to CRT DAC when selected by bit 19.

Duplicate copies of DAC Test Value are driven on DAC RGB.

  • crt_dac_r[7:0] = DAC Test Value[7:0] ([27:20] is this register)
  • crt_dac_g[7:0] = DAC Test Value[7:0] ([27:20] is this register)
  • crt_dac_b[7:0] = DAC Test Value[7:0] ([27:20] is this register)

To enable DAC Test Value to be driven to CRT DAC:

  • (DAC Test Value Select must = 0) AND
  • ((VTM[6] = 0 AND MBD_MSR_DIAG[18:16] = 101h) OR
  • (VTM[6] = 1 AND VTM[3:0] = 0001h)

Bit 19: DAC Test Value Select

Selects which data stream is sent to CRT DAC during CRT DAC test mode.

  • 0: 24-bit data to CRT DAC = {3{DAC Test Value[27:20]}} (3 time repeated 8-bit value).
  • 1: 24-bit data to CRT DAC = gfx_data[23:0] (raw input from Display Controller).

Bits 18:16: RSVD

Reserved. Reserved for test purposes. Set to 000 for normal operation.

Narrator: "It looks complicated, but it's quite straight forward. Here's how to use it:"

The text "How to use DAC test mode:" is shown on screen.

Narrator: "Don't. Save yourself. This is a nightmare of problems."

The single word "Don't" is shown in the center of the screen.

Narrator: "First: The MBD_MSR_DIAG register doesn't exist."

The three fields are shown again, with the "MBD_MSR_DIAG" register circled.

Narrator: "I googled it, it only has three results"

Top of a google results page is shown. It says there are about 3 results.

Google helpfully says "It looks like there aren't many great matches for your search"

The text "Google knows 3 results:" is shown on screen.

Narrator: "The top one is my website!"

Three Google results are shown:

The text "The top result is my website!" is shown on screen.

Narrator: "It's probably a typo for GLD_MSR_DIAG."

The GLD Diagnostic MSR register is shown, named GLD_MSR_DIAG.

It has a note: "This register is reversed for internal use by AMD and should not be written to."

The text "Maybe it meant GLD_MSR_DIAG?" is shown on screen.

Narrator: "But that makes no sense! It's reserved for AMD!"

The note about it being reserved is circled.

The text "But it's reserved and not for use?"

Narrator: "Maybe it's a typo for the reserved field I saw earlier?"

The three diagnostic fields from earlier are shown. The RSVD field is circled.

The text "Perhaps it meant the RSVD field?" is shown on screen.

Narrator: "The bit fields line up, both reference bits 18 to 16."

The numbers "18:16" are circled twice, with an arrow pointed between them.

The first instance is in the text "MBD_MSR_DIAG[18:16]".

The second instance is the bits for the RSVD field.

The text "The bit fields both match" is shown on screen.

Narrator: "I went to set the registers and found it's a mix of MSRs and memory mapping."

The VP Diagnostic MSR (MSG_DIAG_VP) and Video Processor Test Mode (VTM) registers are shown.

MSG_DIAG_VP has an MSD address of 48002010h.

VTM has a VP Memory Offset of 130h.

The text "They use a mix of MSRs and memory mapping?" is shown on screen.

Narrator: "The documentation on how to use these is fairly confusing."

Excerpts from the GeodeLink datasheet section are shown, including Table 4-2. MSR Mapping and the Memory and I/O Mapping section. Both have a lot of complicated wording and require further context to understand.

Narrator: "I gave up and just edited the Linux driver to set registers for me."

The following source code is shown:

/* Enable test mode? */
#define VP_DIAG_MSR 0x48002011
u32 diag_val = 0;
u32 vtm_val = 0;
diag_val |= (128 << 27); /* DVAL = 128 */
/* diag_val D is already 0 */
diag_val |= (0x5 << 18); /* RSVD = 0b101 */
/* VTM[6] is already 0 */
wrmsr(VP_DIAG_MSR, diag_val);
write_vp(par, VP_VTM, dcfg);

The text "I just edited the Linux driver:" is shown on screen.

(WIP)

Narrator: "Still, test mode just made the screen go black. Is that my fault?"

-

Narrator: "Has anyone else even used this? Am I alone in this Geode world?"

-

Narrator: "Ok ok ok. This didn't work. What else is there to check?"

-

TODO:

- dac vref

Narrator: "I did find some power down registers. But I confirmed these were set properly."

- misc register map, dacpwrdn

Narrator: "I found the GLCP_DAC register. It reports the voltage level of the DAC."

- GLCP_DAC showed low voltage

Narrator: "These bits reported the DAC voltage being... Low?"

-

Narrator: "Something's not adding up here."

-

Measurement

~ this should be around 4 minutes in to the video

I did what I should have done in the first place: Measured when the display WORKS!

  • The DVREF shunt looks okay and produces the correct voltage
  • The DVREF shunt has a 12nF cap in parallel
  • The DVREF shunt has 13k to the 3V3 rail
  • The DRSET resistor is 1.21K to GND
  • The VGA resistors seem fine and correct values
  • When external DVREF is used, the shunt drops to 800mV, the rail somehow drops to 960mV

Shorting between an existing 3.3V rail nearby caused the screen to suddenly display in full brightness.

Repair

I followed the rail and found a blown resistor, but I also wondered if the capacitor was somehow draining. So I removed both. This wasn't a completely correct fix: The bypass capacitor is in parallel to the circuit, it couldn't drop voltage like this normally. Had I measured it I could've confirmed it was 3.3V. The voltage drop here is 2.34V! So there's some in series resistor that must be dropping voltage based on current or use. The burned resistor looks like a good candidate.

Conclusion

At this point I believe the DAC is working, so the problem might be related to clocking.

I added in a fresh clock battery and it had no effect.

Things to try:

- BIOS flashing

- Fix network