IP Library Granted Patent US 9,898,386
Granted Patent B2
US 9,898,386 · App. 14/054,484 · Granted Feb 20, 2018

Detecting byte ordering type errors in software code

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,898,386
App. No.
14/054,484
Granted
Feb 20, 2018
Kind
B2
Abstract

An approach is provided in which an endianness violation detection sub-system detects endianness violations between hardware units. The endianness violation detection sub-system tracks memory operations performed by multiple hardware units via debug channels and generates lookup table entries that are stored in a lookup table. When the endianness violation detection sub-system detects endianness relevant load attributes of a load operation that are different than corresponding endianness relevant store attributes of a store operation, the endianness violation detection sub-system generates an endianness violation. In one embodiment, the endianness violation detection sub-system identifies an endianness violation when the endianness violation detection sub-system detects a difference in the byte ordering type between a hardware unit performing a store operation and a hardware unit performing a load operation.

Claims (72)

1. A method comprising:

retrieving, by at least one of one or more processors included in an endianness violation detection subsystem a load real data address corresponding to a load operation, and a store real data address corresponding to a store operation;

retrieving, by at least one of the one or more processors, a load size corresponding to the load operation and a store size corresponding to the store operation;

computing, by the one or more processors, a load real data address range based upon the load real data address and the load size and a store real data address range based upon the store real data address and the store size that overlaps the lead real data address range; wherein the store real data address range is included in store debug data generated by a first hardware unit in response to execution of the store operation, and wherein the load real data address range is included in load debug data generated by a second hardware unit in response to execution of the load operation;

determining, by at least one of the one or more processors, that at least one endianness relevant load attribute corresponding to the load operation is different than at least one endianness relevant store attribute corresponding to the store operation, the load size included in the one or more endianness relevant load attributes and the store size included in the one or more endianness relevant store attributes;

generating an endianness violation, by at least one of the one or more processors, in response to the determination;

filtering out, based on a first filter rule, future store debug data generated by the first hardware that corresponds to the store real data address range, wherein the future store debug data is located by one or more of the processors subsequent to the generation of the endianness violation; and

ignoring, by the one or more processors, the filtered out future store debug data.

2. The method of claim 1 further comprising:

determining that the load size is different than the store size; and

performing the generation of the endianness violation in response to the determination that the load size is different than the store size.

3. The method of claim 1 wherein, prior to the locating of the store real data address range that overlaps the load real data address range, the method further comprises:

obtaining, by at least one of the one or more processors, the future store debug data from the first hardware unit over one of a plurality of debug channels;

extracting, by at least one of the one or more processors, a store effective data address from the store debug data;

translating the store effective data address to a store real data address using a shadow memory management unit, wherein the shadow memory management unit receives memory management unit update information over one or more of the plurality of debug channels; and

storing the received store debug data and the store real data address in a lookup table entry.

4. The method of claim 1 wherein the first hardware unit executes the store operation and generates the store debug data, and wherein the second hardware unit executes the load operation and generates the load debug data.

5. The method of claim 4 further comprising:

retrieving, by at least one of the one or more processors, a first byte ordering type identifier corresponding to the first hardware unit, the first byte ordering type identifier included in the one or more endianness relevant store attributes;

retrieving a second byte ordering type identifier corresponding to the second hardware unit, the second byte ordering type identifier included in the one or more endianness relevant load attributes; and

generating the endianness violation in response to determining that the first byte ordering type identifier is different than the second byte ordering type identifier.

6. The method of claim 4 wherein the first hardware unit and the second hardware unit are different hardware unit types selected from the group consisting of a processor core and a hardware accelerator.

7. The method of claim 4 further comprising:

filtering, by at least one of the one or more processors, unfiltered debug data according to the first filter rule.

8. The method of claim 7 wherein, in response to generating the endianness violation, the method further comprises:

generating a second filter rule that filters out different debug data generated by the second hardware unit and corresponds to the load real data address range.

9. The method of claim 1 further comprising:

determining, by at least one of the one or more processors, a load effective instruction address of a load instruction and a store effective instruction address of a store instruction, the load instruction corresponding to the load operation and the store instruction corresponding to the store operation; and

including the load effective instruction address and the store effective instruction address in the endianness violation.

10. The method of claim 9 further comprising:

correlating, by a code correlation system, the load effective instruction address to a first source code address corresponding to the load instruction; and

correlating, by the code correlation system, the store effective instruction address to a second source code address corresponding to the store instruction.

11. A system comprising:

one or more hardware units;

one or more memories accessible by at least one of the one or more hardware units; and endianness analyzer circuitry configured to:

retrieve a load real data address corresponding to a load operation, and a store real data address corresponding to a store operation;

retrieve a load size corresponding to the load operation and a store size corresponding to the store operation;

compute a load real data address range based upon the load real data address and the lead size and a store real data address range based upon the store real data address that overlaps the load real data address range, wherein the store real data address range is included in store debug data generated by a first one of the one or more hardware units in response to execution of the store operation, and wherein the load real data address range is included in load debug data generated by a second one of the one or more hardware units in response to execution of the load operation;

determine that at least one endianness relevant load attribute corresponding to the load operation is different than at least one endianness relevant store attribute corresponding to the store operation, the lead size included in the one or mere endianness relevant lead attributes and the store size included in the one or more endianness relevant store attributes;

generate an endianness violation in response to the determination;

and determine a load effective instruction address of a load instruction and a store effective instruction address of a store instruction, the load instruction corresponding to the load operation and the store instruction corresponding to the store operation;

include the load effective instruction address and the store effective instruction address in the endianness violation;

correlate, by a code correlation system, the load effective instruction address to a first source code address corresponding to the load instruction;

correlate; by the code correlation system, the store effective instruction address to a second source code address corresponding to the store instruction;

filter out, based on a first filter rule, future store debug data generated by the one or more hardware units that corresponds to the store real data address range, wherein the future store debug data is located by the one or more hardware units subsequent to the generation of the endianness violation; and

ignore the filtered out future store debug data.

12. The system of claim 11 wherein the endianness analyzer circuitry is further configured to:

determine that the bad size is different than the store size; and

perform the generation of the endianness violation in response to the determination that the load size is different than the store size.

13. The system of claim 11 wherein the endianness analyzer circuitry is further configured to:

obtain the store debug data from the one or more hardware units over one of a plurality of debug channels prior to the locating of the store real data address range that overlaps the load real data address range;

extract a store effective data address from the future store debug data;

translate the store effective data address to a store real data address using a shadow memory management unit, wherein the shadow memory management unit receives memory management unit update information over one or more of the plurality of debug channels; and

store the received store debug data and the store real data address in a lookup table entry.

14. The system of claim 11 wherein the endianness analyzer circuitry is further configured to:

retrieve a first byte ordering type identifier corresponding to a first hardware unit that generates the store debug data, the first byte ordering type identifier included in the one or more endianness relevant store attributes;

retrieve a second byte ordering type identifier corresponding to a second hardware unit that generates the load debug data, the second byte ordering type identifier included in the one or more endianness relevant load attributes; and

generate the endianness violation in response to determining that the first byte ordering type identifier is different than the second byte ordering type identifier.

15. The system of claim 14 wherein the first hardware unit and the second hardware unit are different hardware unit types selected from the group consisting of a processor core and a hardware accelerator.

16. The system of claim 14 wherein the endianness analyzer circuitry is further configured to:

generate a second filter rule that filters out different debug data generated by the second hardware unit and corresponds to the load real data address range.

17. A device comprising:

a plurality of hardware units;

a shared memory area accessible by one or more of the plurality of hardware units; and

an endianness violation detection sub-system, communicatively coupled to the plurality of hardware units by corresponding debug channels and configured to:

retrieve a load real data address corresponding to a load operation, and a store real data address corresponding to a store operation;

retrieve a load size corresponding to the load operation and a store size corresponding to the store operation;

compute a load real data address range based upon the load real data address and the load size and a store real data address range based upon the store real data address that overlaps the load real data address range, wherein the store real data address range is included in store debug data generated by a first one of the plurality of hardware units in response to execution of the store operation, and wherein the load real data address range is included in load debug data generated by a second one of the plurality of hardware units in response to execution of the load operation;

determine that at least one endianness relevant load attribute corresponding to the load operation is different than at least one endianness relevant store attribute corresponding to the store operation, the load size included in the one or more endianness relevant load attributes and the store size included in the one or more endianness relevant store attributes;

generate are endianness violation, by at least one of the one or more processors, in response to the determination; and

filter out, based on a first filter rule, future store debug data generated by the one or more hardware units that corresponds to the store real data address range, wherein the future store debug data is located by one or more of the plurality of hardware units subsequent to the generation of the endianness violation; and

ignore the filtered out future store debug data.

Assignments (22)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040925 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Feb 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V. F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 052917/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040928 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Jan 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 052915/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 10, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 050744/0097 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040626 FRAME: 0683. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME EFFECTIVE NOVEMBER 7, 2016. Recorded Jan 12, 2017
From: NXP SEMICONDUCTORS USA, INC. (MERGED INTO); FREESCALE SEMICONDUCTOR, INC. (UNDER)
To: NXP USA, INC.
Reel/Frame 041414/0883 →
CHANGE OF NAME Recorded Nov 16, 2016
From: FREESCALE SEMICONDUCTOR INC.
To: NXP USA, INC.
Reel/Frame 040626/0683 →
RELEASE OF SECURITY INTEREST Recorded Nov 7, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 040928/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 21, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V., F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 040925/0001 →
SUPPLEMENT TO THE SECURITY AGREEMENT Recorded Jun 16, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 039138/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE FILING AND REMOVE APPL. NO. 14085520 REPLACE IT WITH 14086520 PREVIOUSLY RECORDED AT REEL: 037515 FRAME: 0390. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Mar 1, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037926/0642 →
CORRECTIVE ASSIGNMENT TO CORRECT THE INCORRECT APPL. NO. 14/085,520 PREVIOUSLY RECORDED AT REEL: 037515 FRAME: 0420. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 11, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037879/0581 →
CORRECTIVE ASSIGNMENT OF INCORRECT NUMBER 14085520 PREVIOUSLY RECORDED AT REEL: 037458 FRAME: 0420. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTON OF SECURITY INTEREST IN PATENTS. Recorded Feb 11, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037785/0568 →
CORRECTIVE ASSIGNMENT OF INCORRECT PATENT APPLICATION NUMBER 14085520 ,PREVIOUSLY RECORDED AT REEL: 037458 FRAME: 0399. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 11, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037785/0454 →
CORRECTIVE ASSIGNMENT OF INCORRECT APPL. NO. 14/085,520 PREVIOUSLY RECORDED AT REEL: 037515 FRAME: 0390. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 11, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037792/0227 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED ON REEL 037458 FRAME 0420. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Jan 14, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037515/0420 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED ON REEL 037458 FRAME 0399. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Jan 14, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037515/0390 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 7, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FOUNDING, INC.
Reel/Frame 037458/0420 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 7, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FOUNDING, INC.
Reel/Frame 037458/0399 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037357/0790 →
SUPPLEMENT TO IP SECURITY AGREEMENT Recorded Mar 13, 2014
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., COLLATERAL AGENT
Reel/Frame 032445/0689 →
SUPPLEMENT TO IP SECURITY AGREEMENT Recorded Mar 13, 2014
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 032445/0577 →
SUPPLEMENT TO IP SECURITY AGREEMENT Recorded Mar 13, 2014
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 032445/0493 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2013
From: KAHNE, BRIAN C.; ARENDS, JOHN H.; COLLINS, RICHARD G.; HOLT, JAMES C.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 031410/0103 →