Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7789103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:11:41+00:00 2026-06-01T21:11:41+00:00

I have a board with an APM86290(ppc) SOC on it. This is my first

  • 0

I have a board with an APM86290(ppc) SOC on it. This is my first foray into this type of development and I’m trying to work with the SPI controller which is mapped using a 36bit address(according to the datasheet). I want to read some of the registers using mmap() and /dev/mem. Is there normally a uniform way to address those high four bits? Or is this likely something specific to this processor/compiler? This is how I was attempting to do it now.

#define OFFSET 0xfa0000000 

int main()
{
    int i;
    unsigned int * someRegister;

    int fd = open("/dev/mem",O_RDWR|O_SYNC);
    if(fd < 0)
    {
            printf("Can't open /dev/mem\n");
            return 1;
    }
    someRegister = (unsigned int *) mmap(0, sizeof(int), PROT_READ|PROT_WRITE, MAP_SHARED, fd, OFFSET);
    if(someRegister <= NULL)
    {
            printf("Can't mmap\n");
            return 1;
    }
    else
    {
            printf("register=%x\n",OFFSET);
            printf("contents=%x\n",*someRegister);
    }

    return 0;
}

The output of the above program returns these errors

Machine check in kernel mode.
Instruction Read PLB Error
PLB Master Port Request Error
PLB read error 0x11000000 at 0x00000000_00000000

I thought maybe it wasn’t using the 36bit addresses and truncating something, but When I do a cat /proc/iomem

effff8000-effffffff : ocm_mem
fa0000000-fa000001f : serial

Which show the 36 bit values I’m expecting.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:11:42+00:00Added an answer on June 1, 2026 at 9:11 pm

    It depends a lot on your setup. There’s a 64-bit version of mmap() that you could try: mmap64(). If that won’t work for you, you may need to map an upper and lower register for each 36-bit register.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written VHDL code for VGA controller for spartan 3E board. The code
So I have this board, to play a boardgame... The problem is, how do
Well I have this: Board: public class Board { public int BoardID { get;
I'm implementing a card game. In this game I have a Board that is
Thanks to this board I have managed to retrieve the name and the price
I have this on my controller: class EmployeeAccountsController extends AppController { var $layout =
I have this samsung chip on a board (samsung s3c2510a) and I want to
I have an Arduino board connected to my PC's serial port. The board sends
Using Bread::Board I have an object/service A with with accessor $A->foo . Object/service B
I have created a forum board app, based on YAML schema found in 'real

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.