void ArchBoardSpecific::frameBufferInit()
{
  // frame buffer initialization code from http://wiki.osdev.org/ARM_Integrator-CP_PL110_Dirty
  typedef struct _PL110MMIO
  {
      uint32 volatile tim0; //0
      uint32 volatile tim1; //4
      uint32 volatile tim2; //8
      uint32 volatile d; //c
      uint32 volatile upbase; //10
      uint32 volatile f; //14
      uint32 volatile g; //18
      uint32 volatile control; //1c
  } PL110MMIO;

  PL110MMIO *plio;

  plio = (PL110MMIO*) 0x90000000;

  /* 640x480 pixels */
  plio->tim0 = 0x3f1f3f9c;
  plio->tim1 = 0x080b61df;
  plio->upbase = getVESAConsoleLFBPtr();
  /* 16-bit color */
  plio->control = 0x1929; // 1 1000 0010 1001
}
Example #2
0
uint32 ArchBoardSpecific::getUsableMemoryRegion(uint32 region __attribute__((unused)), pointer &start_address, pointer &end_address, uint32 &type)
{
  start_address = 0;
  end_address = getVESAConsoleLFBPtr() & ~0xC0000000;
  type = 1;
  return 0;
}
Example #3
0
void ArchBoardSpecific::frameBufferInit()
{
  uint32 num_bytes = ArchCommon::getVESAConsoleWidth() * ArchCommon::getVESAConsoleHeight() * ArchCommon::getVESAConsoleBitsPerPixel() / 8;
  frame_descriptor[3] = num_bytes << 2;
  frame_descriptor[2] = 0; // ID not used
  frame_descriptor[1] = (uint32)getVESAConsoleLFBPtr() - 0xC0000000 + 0xA0000000; // frame buffer address
  frame_descriptor[0] = (uint32)(frame_descriptor) - 0x80000000 + 0xA0000000; // address of the next frame descriptor (always repeat the same)
  uint32* DMA0 = (uint32*) 0x90000200;
  DMA0[0] = frame_descriptor[0];
  uint32* PRSR = (uint32*) 0x90000104;
  *PRSR = (0x3 << 9); // status OK & continue to next command
  uint32* LCCR = (uint32*) 0x90000000;
  LCCR[1] = 639;
  LCCR[2] = 479;
  LCCR[3] = (0x4 << 24); // 16 bit color
  LCCR[0] = 0x1; // enable lcd controller
}