Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux does not boot with L1 and L2 disabled #169

Closed
jzbydniewski opened this issue Apr 29, 2024 · 3 comments
Closed

Linux does not boot with L1 and L2 disabled #169

jzbydniewski opened this issue Apr 29, 2024 · 3 comments
Assignees

Comments

@jzbydniewski
Copy link

jzbydniewski commented Apr 29, 2024

Observed with HS58. When I disable L1 and L2 cache by setting ARC_CACHE=n I can see Linux doesn't boot. No signs of life are shown on UART console.

Debugging with gdb shows it crash with 'invalid mem access' message

image

backtrace:

image

I can't reproduce this on nSIM, but that's likely because it doesn't emulate L1/L2 anyway.

@jzbydniewski jzbydniewski changed the title Linux does not boot with ARC_CACHE=n Linux does not boot with L1 and L2 disabled Apr 29, 2024
@abrodkin
Copy link
Member

@jzbydniewski backtrace above is unfortunately quite misleading as a lot has happened between real problem and halting of the CPU at die(). Nice thing about the Linux kernel tough, even if nothing gets printed to the console, you may just inspect contents of the internal buffer by symbol __log_buf - it will have all what was meant to be printed.
Of that information we're interested in the usual crash dump, and in particular contents of ECR & ERET registers.
Please try to get that data and then based on ERET contents let's see which instruction corresponds to that address in your Linux kernel image.

@xxkent
Copy link

xxkent commented Apr 30, 2024

I can reproduce this problem on HAPS but don't see any messages in UART and __log_buf. I'll see what the problem is there.

@xxkent
Copy link

xxkent commented Feb 3, 2025

In this case, the error occurred when attempting to execute atomic instructions. Atomic operations like 'ex' and 'atld' don't work when L1D$ and L2D$ are off. If the L1 caches are disabled, then the atomics will automatically be translated in uncached transactions which will target the next level memory, which will be the NoC. The CLN will return error.

Update for 'HS5x Databook: 13.6 Atomic Operations': Atomic instructions are supported by the CLN only on Shared memory, and on locations held in the L2-cache. An error response is returned for other targets.

@xxkent xxkent closed this as completed Feb 3, 2025
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

No branches or pull requests

3 participants