Closed Bug 532713 Opened 15 years ago Closed 15 years ago

Mac minidumper doesn't decode extended family ids

Categories

(Toolkit :: Crash Reporting, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

It does:
      info_ptr->processor_revision =
       (info_ptr->cpu.x86_cpu_info.version_information & 0xF) |
       ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4);

This ignores the extended model number.

It should be doing something like:
      info_ptr->processor_revision =
       (info_ptr->cpu.x86_cpu_info.version_information & 0xF) |
       ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4) |
       ((info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 4);
That should be:

       ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4);
Comment on attachment 415925 [details] [diff] [review]
Fix up processor model/family decoding

Ted, can you push this through to breakpad upstream for me.
Attachment #415925 - Flags: review?(ted.mielczarek)
Comment on attachment 415925 [details] [diff] [review]
Fix up processor model/family decoding

>+      if (info_ptr->processor_level == 0xF || info_ptr->processor_level == 0x6) {

Hmmm.  AMD documentation suggests that the extended family and extended model should only be used when the family is 0xF.  Intel documentation suggests that extended model info should *always* be used.  (I couldn't find either saying 0xF or 0x6.)

http://www.intel.com/design/processor/applnots/241618.htm
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf
The intel instruction manual I was  (http://www.intel.com/Assets/PDF/manual/253666.pdf) has this to say:

CPUID—CPU Identification 
The Extended Family ID needs to be examined only when the Family ID is 0FH. Integrate the fields into a display using the following rule: 


IF Family_ID ≠ 0FH 
  THEN Displayed_Family = Family_ID; 
  ELSE Displayed_Family = Extended_Family_ID + Family_ID; 
  (* Right justify and zero-extend 4-bit field. *) 
FI; 

(* Show Display_Family as HEX field. *) 

The Extended Model ID needs to be examined only when the Family ID is 06H or 0FH. 
Integrate the field into a display using the following rule:

IF (Family_ID = 06H or Family_ID = 0FH) 
  THEN Displayed_Model = (Extended_Model_ID << 4) + Model_ID; 
  (* Right justify and zero-extend 4-bit field; display Model_ID as HEX field.*) 
  ELSE Displayed_Model = Model_ID; 
FI; 
(* Show Display_Model as HEX field. *)
Too many pieces of contradictory documentation.  The one you used sounds like a reasonable middle ground, though.
Comment on attachment 415925 [details] [diff] [review]
Fix up processor model/family decoding

I'll land this upstream and in mozilla-central for you. Also, apparently I wrote that cpuid block in the first place. I guess I completely forgot about that.
Attachment #415925 - Flags: review?(ted.mielczarek) → review+
Assignee: nobody → jmuizelaar
Landed upstream:
http://code.google.com/p/google-breakpad/source/detail?r=440

I'll land this on trunk shortly as part of bug 514188.
Depends on: 514188
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
If you want this on branches, feel free to twiddle the appropriate flags.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: