Skip to content

[arch][m68k] Add support for plain 68000 exception handling#499

Open
jrac wants to merge 1 commit intolittlekernel:masterfrom
jrac:68000
Open

[arch][m68k] Add support for plain 68000 exception handling#499
jrac wants to merge 1 commit intolittlekernel:masterfrom
jrac:68000

Conversation

@jrac
Copy link
Copy Markdown
Contributor

@jrac jrac commented Mar 23, 2026

Generates per-vector stubs, with each vectory entry pointing to a unique stub slot, which branches to a common handler.

We construct a synthetic exception frame that can be passed to the existing C handlers.

Generates per-vector stubs, with each vectory entry pointing to a unique stub slot, which
branches to a common handler.

We construct a synthetic exception frame that can be passed to the existing C handlers.
Copy link
Copy Markdown
Member

@travisg travisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are a few issues here but otherwise LGTM.

.set stub, stub + STUB_SIZE
.endr
.org (15 * 4)
.set stub, _m68k_irq_stub_gen
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be _m68k_irq15_stub_gen?

.long stub
.set stub, stub + STUB_SIZE
.org (16 * 4)
.set stub, _m68k_general_stub_gen
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this resetting the stub its referring to back to the first entry of the general stub table? i think this makes entry 16 point to entry 2, etc

.org (61 * 4)
.long _060_isp_unimp
.org (62 * 4)
.set stub, _m68k_general_stub_gen
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this has a similar problem to the previous stub gen issue at 16.


.text

.weak _060_isp_unimp
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably re-think this unimp thing and always have it implemented somewhere? As it is in the 010 path it falls through to the IRQ code, which is I guess maybe okay there because of the frame decode. Here, since you moved it out of the conditional, it'll fall through to the first stub table, which is i guess entry #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants