The Pedigree Project  0.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
VmwareGraphics Class Reference
+ Inheritance diagram for VmwareGraphics:
+ Collaboration diagram for VmwareGraphics:

Classes

class  VmwareFramebuffer
 

Public Member Functions

 VmwareGraphics (Device *pDev)
 
virtual void getName (String &str)
 
virtual void dump (String &str)
 
virtual bool getCurrentScreenMode (Display::ScreenMode &sm)
 
virtual bool getScreenModes (List< Display::ScreenMode * > &sms)
 
virtual bool setScreenMode (Display::ScreenMode sm)
 
virtual bool setScreenMode (size_t modeId)
 
virtual bool setScreenMode (size_t nWidth, size_t nHeight, size_t nBpp)
 
void setMode (size_t w, size_t h, size_t bpp)
 
void redraw (size_t x, size_t y, size_t w, size_t h)
 
void copy (size_t x1, size_t y1, size_t x2, size_t y2, size_t w, size_t h)
 
- Public Member Functions inherited from Display
 Display (Device *p)
 
virtual Type getType ()
 
virtual void * getFramebuffer ()
 
virtual rgb_tnewBuffer ()
 
virtual void setCurrentBuffer (rgb_t *pBuffer)
 
virtual void updateBuffer (rgb_t *pBuffer, size_t x1=~0UL, size_t y1=~0UL, size_t x2=~0UL, size_t y2=~0UL)
 
virtual void killBuffer (rgb_t *pBuffer)
 
virtual void bitBlit (rgb_t *pBuffer, size_t fromX, size_t fromY, size_t toX, size_t toY, size_t width, size_t height)
 
virtual void fillRectangle (rgb_t *pBuffer, size_t x, size_t y, size_t width, size_t height, rgb_t colour)
 
virtual bool getPixelFormat (PixelFormat &pf)
 
- Public Member Functions inherited from Device
 Device (Device *p)
 
DevicegetParent () const
 
void setParent (Device *p)
 
virtual String getSpecificType ()
 
virtual void setSpecificType (String str)
 
void setPciPosition (uint32_t bus, uint32_t device, uint32_t func)
 
void setPciIdentifiers (uint8_t classCode, uint8_t subclassCode, uint16_t vendorId, uint16_t deviceId, uint8_t progIf)
 
void setPciConfigHeader (const PciBus::ConfigSpace &space)
 
PciBus::ConfigSpace getPciConfigHeader () const
 
uint8_t getPciClassCode ()
 
uint8_t getPciSubclassCode ()
 
uint16_t getPciVendorId ()
 
uint16_t getPciDeviceId ()
 
uint8_t getPciProgInterface ()
 
uint32_t getPciBusPosition ()
 
uint32_t getPciDevicePosition ()
 
uint32_t getPciFunctionNumber ()
 
virtual Vector< Address * > & addresses ()
 
virtual uintptr_t getInterruptNumber ()
 
virtual void setInterruptNumber (uintptr_t n)
 
void addChild (Device *pDevice)
 
DevicegetChild (size_t n)
 
size_t getNumChildren ()
 
void removeChild (size_t n)
 
void removeChild (Device *d)
 
void replaceChild (Device *src, Device *dest)
 

Private Member Functions

size_t readRegister (size_t offset)
 
void writeRegister (size_t offset, uint32_t value)
 
void writeFifo (uint32_t value)
 
void syncFifo ()
 

Private Attributes

IoBasem_pIo
 
MemoryMappedIom_Framebuffer
 
MemoryMappedIom_CommandRegion
 
VmwareFramebufferm_pFramebuffer
 
Device::Addressm_pFramebufferRawAddress
 

Friends

class VmwareFramebuffer
 

Additional Inherited Members

- Public Types inherited from Device
enum  Type {
  Generic, Root, Disk, Bus,
  Display, Network, Sound, Console,
  Mouse, Controller, UsbController, UsbGeneric,
  UsbContainer
}
 
typedef Device *(* Callback) (Device *)
 
- Static Public Member Functions inherited from Device
static void foreach (Callback callback, Device *root=0)
 
template<class F , class... Args>
static void foreach (pedigree_std::Callable< F > &callback, Device *root, Args...args)
 
static void addToRoot (Device *device)
 
static void searchByVendorId (uint16_t vendorId, void(*callback)(Device *), Device *root=0)
 
static void searchByVendorIdAndDeviceId (uint16_t vendorId, uint16_t deviceId, void(*callback)(Device *), Device *root=0)
 
static void searchByClass (uint16_t classCode, void(*callback)(Device *), Device *root=0)
 
static void searchByClassAndSubclass (uint16_t classCode, uint16_t subclassCode, void(*callback)(Device *), Device *root=0)
 
static void searchByClassSubclassAndProgInterface (uint16_t classCode, uint16_t subclassCode, uint8_t progInterface, void(*callback)(Device *), Device *root=0)
 
- Public Attributes inherited from Display
struct Display::rgb_t PACKED
 
- Protected Member Functions inherited from Device
 NOT_COPYABLE_OR_ASSIGNABLE (Device)
 
- Static Protected Member Functions inherited from Device
static Deviceroot ()
 
- Protected Attributes inherited from Device
Vector< Address * > m_Addresses
 
Vector< Device * > m_Children
 
Devicem_pParent
 
uintptr_t m_InterruptNumber
 
String m_SpecificType
 
PciBus::ConfigSpace m_ConfigHeader
 
uint8_t m_ClassCode
 
uint8_t m_SubclassCode
 
uint16_t m_VendorId
 
uint16_t m_DeviceId
 
uint8_t m_ProgInterface
 
uint32_t m_PciBusPos
 
uint32_t m_PciDevicePos
 
uint32_t m_PciFunctionNum
 
- Static Protected Attributes inherited from Device
static Device m_Root
 
static Mutex m_TreeLock
 

Detailed Description

Definition at line 63 of file modules/drivers/x86/vmware-gfx/main.cc.

Member Function Documentation

virtual void VmwareGraphics::dump ( String str)
inlinevirtual

Dumps a textual representation of the device into the given string.

Reimplemented from Display.

Definition at line 205 of file modules/drivers/x86/vmware-gfx/main.cc.

virtual bool VmwareGraphics::getCurrentScreenMode ( Display::ScreenMode sm)
inlinevirtual

Returns the current screen mode.

Returns
True if operation succeeded, false otherwise.
Todo:
Not necessarily always correct for boundary cases

Reimplemented from Display.

Definition at line 212 of file modules/drivers/x86/vmware-gfx/main.cc.

References Display::PixelFormat::nBpp.

virtual void VmwareGraphics::getName ( String str)
inlinevirtual

Stores the device's name in str.

Reimplemented from Display.

Definition at line 200 of file modules/drivers/x86/vmware-gfx/main.cc.

virtual bool VmwareGraphics::getScreenModes ( List< Display::ScreenMode * > &  sms)
inlinevirtual

Fills the given List with all of the available screen modes.

Returns
True if operation succeeded, false otherwise.

Reimplemented from Display.

Definition at line 255 of file modules/drivers/x86/vmware-gfx/main.cc.

References List< T, nodePoolSize >::pushBack().

size_t VmwareGraphics::readRegister ( size_t  offset)
inlineprivate
Todo:
Lock these

Definition at line 480 of file modules/drivers/x86/vmware-gfx/main.cc.

References DEBUG_LOG, IoBase::read32(), and IoBase::write32().

void VmwareGraphics::setMode ( size_t  w,
size_t  h,
size_t  bpp 
)
inline
Todo:
If we switch to any mode after the first one has been set, the old region needs to be deallocated.

Definition at line 319 of file modules/drivers/x86/vmware-gfx/main.cc.

References Dec, Hex, and NOTICE.

virtual bool VmwareGraphics::setScreenMode ( Display::ScreenMode  sm)
inlinevirtual

Sets the current screen mode.

Returns
True if operation succeeded, false otherwise.

Reimplemented from Display.

Definition at line 279 of file modules/drivers/x86/vmware-gfx/main.cc.

References Machine::getVga(), and Vga::setMode().

virtual bool VmwareGraphics::setScreenMode ( size_t  modeId)
inlinevirtual

Sets the current screen mode using a set of well-defined VBE IDs. Example: 0x117 = 1024x768x16.

Reimplemented from Display.

Definition at line 295 of file modules/drivers/x86/vmware-gfx/main.cc.

References Display::setScreenMode().

virtual bool VmwareGraphics::setScreenMode ( size_t  nWidth,
size_t  nHeight,
size_t  nBpp 
)
inlinevirtual

Sets the current screen mode using a width, height, and pixel depth

Todo:
"Closest match": allow a threshold for a match in case the specific mode specified cannot be set.

Reimplemented from Display.

Definition at line 300 of file modules/drivers/x86/vmware-gfx/main.cc.


The documentation for this class was generated from the following file: