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

draft: support for hexagon VM #88

Draft
wants to merge 3 commits into
base: hexagon_sysemu_20_dec_2023
Choose a base branch
from

Conversation

androm3da
Copy link

No description provided.

@androm3da androm3da self-assigned this Apr 25, 2024
docs/system/hexagon/hvm.rst Show resolved Hide resolved
target/hexagon/translate.c Outdated Show resolved Hide resolved
@androm3da androm3da force-pushed the bcain/hvm_00 branch 7 times, most recently from 3204331 to 38d15d5 Compare May 2, 2024 02:21
@androm3da
Copy link
Author

Some progress here..

When booting linux, we get through ~4600 instructions before we hit one of these panics in setup_command_line():

        saved_command_line = memblock_alloc(len + ilen, SMP_CACHE_BYTES);
        if (!saved_command_line)
                panic("%s: Failed to allocate %zu bytes\n", __func__, len + ilen);

        static_command_line = memblock_alloc(len, SMP_CACHE_BYTES);
        if (!static_command_line)
                panic("%s: Failed to allocate %zu bytes\n", __func__, len);

@androm3da
Copy link
Author

Some progress here..

When booting linux, we get through ~4600 instructions before we hit one of these panics in setup_command_line():

        saved_command_line = memblock_alloc(len + ilen, SMP_CACHE_BYTES);
        if (!saved_command_line)
                panic("%s: Failed to allocate %zu bytes\n", __func__, len + ilen);

        static_command_line = memblock_alloc(len, SMP_CACHE_BYTES);
        if (!static_command_line)
                panic("%s: Failed to allocate %zu bytes\n", __func__, len);

Now that I think of it, the unimplemented vmnewmap instruction is the most likely cause of the failing memblock_alloc() that leads to the panic

@androm3da androm3da force-pushed the bcain/hvm_00 branch 2 times, most recently from aea8b67 to f6b3f52 Compare May 8, 2024 00:38
@androm3da androm3da force-pushed the hexagon_sysemu_20_dec_2023 branch from cc9e4ca to 4531d97 Compare July 10, 2024 01:00
Status: boots linux kernel up to setup_command_line() before panic

Hacks:
* vmnewmap call not implemented (does get invoked by linux)
* vmyield call not implemented (does get invoked by linux)
* trap0 not quite right (not _yet_ invoked by linux)
... and more

Signed-off-by: Brian Cain <[email protected]>
FIXME: while following the spec for vmnewmap and the kernel source, I thought
I understood the expected behavior but based on what I've seen so far I
think it's not yet implemented correctly.

Signed-off-by: Brian Cain <[email protected]>
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.

1 participant