Skip to content

Copy/paste bug in vc_mem_ioctl()? #8

Closed

Description

@simonjhall

https://github.com/raspberrypi/linux/blob/rpi-patches/arch/arm/mach-bcm2708/vc_mem.c

Looks like a copy/paste bug in case VC_MEM_IOC_MEM_BASE.
mm_vc_mem_size is returned, not mm_vc_mem_base. Plus the comments are the same as the other case statement.

Activity

  1. GrayGirling commented on Apr 13, 2012

    @GrayGirling

    I think this is a bug too. I have made the relevant correction and will check it in once I've tested it.

    It should be noted, however, that these functions are currently unsafe (and probably not yet relied upon anywhere sensitive).

    Although R-Pi always supports the same amount of RAM (256Mb) the start of VideoCore memory varies with the "start.elf" version used to boot it. The supported variants put the VideoCore base either at 128Mb, 192Mb or 224Mb - the code here will be correct only in the first case.

  2. popcornmix commented on Apr 16, 2012

    @popcornmix
    Collaborator

    Well spotted simonjhall.

    We only use this interface from vcdbg (from grabbing debug info), but due to this interface not supporting the different memory splits, we override the base with a command line argument, so I believe the bug is harmless.

    I'm hoping we'll move to a world where the different memory splits are not needed in the near (ish) future, so correctly supporting the different splits is not necessary. Worth fixing the size/base mixup just for neatness.

  3. simonjhall commented on Apr 16, 2012

    @simonjhall
    Author

    Ah fair dos. Do you want me to close?
    Btw (since you guys seem savvy to this sort of stuff) - is there a proper place to discuss future code development etc? Programming posts on rpi.org/forum quickly get drowned out!

  4. popcornmix commented on Apr 16, 2012

    @popcornmix
    Collaborator

    PM (on rpi.org) me your email address if you'd like to discuss things.

  5. simonjhall commented on Apr 16, 2012

    @simonjhall
    Author

    Cool. Which user name are you on there? I'm not spying any popcornmix!
    (teh_orph for me)

    On 16 April 2012 15:17, popcornmix <
    reply@reply.github.com

    wrote:

    PM (on rpi.org) me your email address if you'd like to discuss things.


    Reply to this email directly or view it on GitHub:
    #8 (comment)

  6. popcornmix commented on Apr 17, 2012

    @popcornmix
    Collaborator

    I'm dom...

  7. 227 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions