IP Library Granted Patent US 8,042,002
Granted Patent B2
US 8,042,002 · App. 12/016,664 · Granted Oct 18, 2011

Method and apparatus for handling shared hardware and software debug resource events in a data processing system

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 8,042,002
App. No.
12/016,664
Granted
Oct 18, 2011
Kind
B2
Abstract

For some data processing systems, it is important to be able to handle overlapping debug events generated by a shared set of debug resources which are trying to cause both exception processing and debug mode entry. However, exception processing and debug mode entry generally have conflicting requirements. In one embodiment, exception priority processing is initially given to the software debug event. Normal state saving is performed and the first instruction of the debug exception handler is fetched, but not executed. Priority is then switched from the software debug event to the hardware debug event and a debug halted state is entered. Once processing of the hardware debug event has been completed, priority is returned to the software debug event and the debug exception handler is executed.

Claims (52)

1. A method, comprising:

determining that a software debug event is pending, wherein the software debug event is an event that causes invocation of a software debug interrupt handler to handle the software debug event;

determining that a hardware debug event is pending at a same time that the software debug event is pending, wherein the hardware debug event is an event that causes a processor to cease fetching and executing instructions and to enter a debug halted state;

determining that the pending software debug event initially has priority over the pending hardware debug event;

when the software debug event is being handled, fetching a first instruction of the software debug interrupt handler;

when the software debug event is being handled, executing the first instruction of the software debug interrupt handler;

after said step of fetching the first instruction of the software debug interrupt handler and before said step of executing the first instruction of the software debug interrupt handler, switching priority to the hardware debug event;

handling the hardware debug event between the steps of fetching the first instruction and executing the first instruction; and

after said step of handling the hardware debug event, resuming execution of the software debug interrupt handler for handling of the software debug event.

2. A method as in claim 1 , further comprising:

when the software debug event is being handled, discontinuing instruction issue;

when the software debug event is being handled, proceeding to an instruction boundary; and

when the software debug event is being handled, flushing an instruction pipeline.

3. A method as in claim 2 , further comprising:

selecting the instruction boundary.

4. A method as in claim 3 , wherein selecting the instruction boundary comprises programming a register.

5. A method as in claim 1 , further comprising:

when the software debug event is being handled, saving contents of a program counter.

6. A method as in claim 1 , wherein said step of handling the hardware debug event comprises:

preserving state information;

entering a hardware debug mode;

receiving one or more hardware debug commands via a debug port;

performing the one or more hardware debug commands; and

exiting the hardware debug mode.

7. A method as in claim 6 , wherein said step of entering a hardware debug mode comprises halting the processor.

8. An apparatus, comprising:

a first debug resource for causing a software debug event, the software debug event for causing invocation of a software debug interrupt handler to handle the software debug event;

a second debug resource for causing a hardware debug event, the hardware debug event for causing a processor to cease fetching and executing instructions and to enter a debug halted state; and

circuitry for detecting if the software debug event has occurred and for detecting if the hardware debug event has occurred, said circuitry initially giving priority to the software debug event if both the software debug event and the hardware debug event are pending at a same time, said circuitry beginning handling of the software debug event, said circuitry transferring priority from the software debug event to the hardware debug event after fetching a first instruction for handling the software debug event and before executing the first instruction for handling the software debug event, said circuitry completing handling of the hardware debug event before completing handling of the software debug event.

9. An apparatus as in claim 8 , wherein the first debug resource comprises a first debug register, and wherein the second debug resource comprises a second debug register.

10. An apparatus as in claim 8 , further comprising:

an instruction pipe,

wherein the instruction pipe is flushed during handling of the software debug event.

11. An apparatus as in claim 8 , further comprising:

a program counter register,

wherein a first value of the program counter register is saved in storage circuitry, and wherein a second value is stored in the program counter register,

wherein the first value of the program counter is used during normal operation and wherein the second value is used during handling of the software debug event.

12. An apparatus as in claim 11 , wherein the storage circuitry used to save the first value of the program counter register comprises an exception register.

13. An apparatus as in claim 8 , further comprising:

instruction fetch circuitry for fetching one or more instructions used during handling of the software debug event.

14. An apparatus, comprising:

circuitry for detecting that a software debug event has occurred and for detecting that a hardware debug event has occurred, wherein the software debug event and the hardware debug event are synchronously generated and pending at a same time in response to a processor executing an instruction;

circuitry for initially giving priority to the software debug event;

circuitry for beginning handling of the software debug event;

circuitry for stopping handling of the software debug event and for transferring priority from the software debug event to the hardware debug event after a first instruction for handling the software debug event has been fetched and before the first instruction is executed; and

circuitry for completing handling of the hardware debug event, wherein the first instruction for handling of the software debug event is executed after the handling of the hardware debug event is completed.

15. An apparatus as in claim 14 , wherein the circuitry for transferring priority from the software debug event to the hardware debug event before completing handling of the software debug event comprises a state machine.

16. An apparatus as in claim 15 , wherein the circuitry for initially giving priority to the software debug event if both the software debug event and the hardware debug event have occurred comprises said state machine.

17. An apparatus as in claim 14 , wherein the processor further comprises a program counter for storing a program counter value corresponding to the first instruction before priority is transferred to the circuitry for completing handling of the debug event.

18. An apparatus as in claim 14 , wherein the processor comprises a register for storing an interrupt processing vector, the interrupt processing vector for pointing to a point at which processing is halted after the first instruction is fetched.

19. An apparatus as in claim 14 , wherein the first instruction for the handling of the software debug event is executed after the handling of the hardware debug event is completed and prior to execution of any other instruction after the handling of the hardware debug event is completed.

20. An apparatus as in claim 14 , wherein the apparatus is formed on an integrated circuit.

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 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 037486 FRAME 0517. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Dec 10, 2019
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 053547/0421 →
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 TO CORRECT THE APPLICATION NO. FROM 13,883,290 TO 13,833,290 PREVIOUSLY RECORDED ON REEL 041703 FRAME 0536. ASSIGNOR(S) HEREBY CONFIRMS THE THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS.. Recorded Feb 20, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: SHENZHEN XINGUODU TECHNOLOGY CO., LTD.
Reel/Frame 048734/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040632 FRAME: 0001. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME. Recorded Sep 21, 2017
From: FREESCALE SEMICONDUCTOR INC.
To: NXP USA, INC.
Reel/Frame 044209/0047 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENTS 8108266 AND 8062324 AND REPLACE THEM WITH 6108266 AND 8060324 PREVIOUSLY RECORDED ON REEL 037518 FRAME 0292. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 1, 2017
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 041703/0536 →
CHANGE OF NAME Recorded Nov 8, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: NXP USA, INC.
Reel/Frame 040632/0001 →
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 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 13, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037518/0292 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 12, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037486/0517 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037354/0688 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0553 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0143 →
SECURITY AGREEMENT Recorded Nov 6, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 031591/0266 →
SECURITY AGREEMENT Recorded Jun 18, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 030633/0424 →
SECURITY AGREEMENT Recorded May 13, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 024397/0001 →
SECURITY AGREEMENT Recorded Mar 15, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 024085/0001 →
SECURITY AGREEMENT Recorded Jul 7, 2008
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 021194/0593 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 18, 2008
From: MOYER, WILLIAM C.; GUMULJA, JIMMY; SCOTT, JEFFREY W.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 020387/0271 →