#include "mm.h"
#include <drivers/xbox/xgpu.h>
Go to the source code of this file.
|
| VOID | XboxConsPutChar (int Ch) |
| |
| BOOLEAN | XboxConsKbHit (VOID) |
| |
| int | XboxConsGetCh (VOID) |
| |
| VOID | XboxVideoInit (VOID) |
| |
| VOID | XboxVideoClearScreen (UCHAR Attr) |
| |
| VIDEODISPLAYMODE | XboxVideoSetDisplayMode (PCSTR DisplayModem, BOOLEAN Init) |
| |
| VOID | XboxVideoGetDisplaySize (PULONG Width, PULONG Height, PULONG Depth) |
| |
| ULONG | XboxVideoGetBufferSize (VOID) |
| |
| VOID | XboxVideoGetFontsFromFirmware (PULONG RomFontPointers) |
| |
| VOID | XboxVideoSetTextCursorPosition (UCHAR X, UCHAR Y) |
| |
| VOID | XboxVideoHideShowTextCursor (BOOLEAN Show) |
| |
| VOID | XboxVideoPutChar (int Ch, UCHAR Attr, unsigned X, unsigned Y) |
| |
| VOID | XboxVideoCopyOffScreenBufferToVRAM (PVOID Buffer) |
| |
| BOOLEAN | XboxVideoIsPaletteFixed (VOID) |
| |
| VOID | XboxVideoSetPaletteColor (UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) |
| |
| VOID | XboxVideoGetPaletteColor (UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue) |
| |
| VOID | XboxVideoSync (VOID) |
| |
| VOID | XboxVideoPrepareForReactOS (VOID) |
| |
| VOID | XboxPrepareForReactOS (VOID) |
| |
| VOID | XboxMemInit (VOID) |
| |
| PFREELDR_MEMORY_DESCRIPTOR | XboxMemGetMemoryMap (ULONG *MemoryMapSize) |
| |
| BOOLEAN | XboxDiskReadLogicalSectors (UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) |
| |
| BOOLEAN | XboxDiskGetDriveGeometry (UCHAR DriveNumber, PGEOMETRY DriveGeometry) |
| |
| ULONG | XboxDiskGetCacheableBlockCount (UCHAR DriveNumber) |
| |
| TIMEINFO * | XboxGetTime (VOID) |
| |
| PCONFIGURATION_COMPONENT_DATA | XboxHwDetect (_In_opt_ PCSTR Options) |
| |
| VOID | XboxHwIdle (VOID) |
| |
| VOID | XboxSetLED (PCSTR Pattern) |
| |
◆ XboxConsGetCh()
◆ XboxConsKbHit()
◆ XboxConsPutChar()
Definition at line 29 of file xboxcons.c.
30{
33
35
37 if (NeedScroll)
38 {
41 }
42
44 {
46 }
48 {
50
51 if (!NeedScroll)
53 }
55 {
57 }
58 else
59 {
62 }
63
65 {
68 }
69}
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
VOID FbConsScrollUp(_In_ UCHAR Attr)
static unsigned CurrentCursorX
static unsigned CurrentCursorY
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Referenced by MachInit().
◆ XboxDiskGetCacheableBlockCount()
| ULONG XboxDiskGetCacheableBlockCount |
( |
UCHAR |
DriveNumber | ) |
|
Definition at line 194 of file xboxdisk.c.
195{
197
199 if (!DeviceUnit)
200 return 1;
201
202
203
204
205
207 return 64;
208 else
210}
Data structure for the ATA device.
static PDEVICE_UNIT XboxDiskDriveNumberToDeviceUnit(UCHAR DriveNumber)
Referenced by MachInit().
◆ XboxDiskGetDriveGeometry()
◆ XboxDiskReadLogicalSectors()
◆ XboxGetTime()
Definition at line 40 of file xboxrtc.c.
41{
43
45 {
46 ;
47 }
48
55 if (TimeInfo.
Year > 80)
56 TimeInfo.
Year += 1900;
57 else
58 TimeInfo.
Year += 2000;
59
60 return &TimeInfo;
61}
static UCHAR HalpQueryCMOS(UCHAR Reg)
Referenced by MachInit().
◆ XboxHwDetect()
Definition at line 265 of file machxbox.c.
267{
270
271 TRACE(
"DetectHardware()\n");
272
273
275
278
279
282
283 TRACE(
"DetectHardware() Done\n");
284 return SystemKey;
285}
VOID FldrCreateSystemKey(_Out_ PCONFIGURATION_COMPONENT_DATA *SystemNode, _In_ PCSTR IdentifierString)
VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
FIND_PCI_BIOS FindPciBios
static PCM_PARTIAL_RESOURCE_LIST XboxGetHarddiskConfigurationData(UCHAR DriveNumber, ULONG *pSize)
static VOID DetectIsaBios(_In_opt_ PCSTR Options, _Inout_ PCONFIGURATION_COMPONENT_DATA SystemKey, _Out_ ULONG *BusNumber)
BOOLEAN XboxFindPciBios(PPCI_REGISTRY_INFO BusData)
GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Referenced by MachInit().
◆ XboxHwIdle()
◆ XboxMemGetMemoryMap()
Definition at line 228 of file xboxmem.c.
229{
232
233 TRACE(
"XboxMemGetMemoryMap()\n");
234
236 if (MbMap)
237 {
238
239
240 for (
i = 0;
i <
Count;
i++, MbMap++)
241 {
243
245 {
246 ERR(
"Memory descriptor base or size is greater than 4 GB, should not happen on Xbox!\n");
248 }
249
254 }
255 }
256 else
257 {
258
259
260
262 0,
265
267 {
268
273 "Video memory");
274 }
275 }
276
279}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
@ LoaderFirmwarePermanent
unsigned long base_addr_low
unsigned long base_addr_high
unsigned long length_high
memory_map_t * XboxGetMultibootMemoryMap(INT *Count)
static FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[MAX_BIOS_DESCRIPTORS+1]
ULONG PcMemFinalizeMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap)
static ULONG AvailableMemoryMb
VOID ReserveMemory(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG_PTR BaseAddress, SIZE_T Size, TYPE_OF_MEMORY MemoryType, PCHAR Usage)
TYPE_OF_MEMORY XboxMultibootMemoryType(ULONG Type)
VOID SetMemory(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG_PTR BaseAddress, SIZE_T Size, TYPE_OF_MEMORY MemoryType)
Referenced by MachInit().
◆ XboxMemInit()
Definition at line 117 of file xboxmem.c.
118{
123
126
127
128 PciCfg1.
u.
bits.Enable = 1;
129 PciCfg1.
u.
bits.BusNumber = 0;
130 PciCfg1.
u.
bits.DeviceNumber = 0;
131 PciCfg1.
u.
bits.FunctionNumber = 0;
132 PciCfg1.
u.
bits.Reserved = 0;
133
134 PciCfg1.
u.
bits.RegisterNumber = 0x84;
135
138
143
145 {
146
151 {
152
154 {
155
157 }
158 else
159 {
161 }
162 }
163 }
164
165
168
170
172}
#define WRITE_REGISTER_ULONG(r, v)
#define PCI_TYPE1_DATA_PORT
#define PCI_TYPE1_ADDRESS_PORT
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
PPC_QUAL void __wbinvd(void)
union _PCI_TYPE1_CFG_BITS::@195 u
struct _PCI_TYPE1_CFG_BITS::@195::@196 bits
static VOID XboxInitializePCI(VOID)
static ULONG InstalledMemoryMb
Referenced by MachInit().
◆ XboxPrepareForReactOS()
Definition at line 379 of file machxbox.c.
380{
381
384}
#define DebugDisableScreenPort()
VOID XboxVideoPrepareForReactOS(VOID)
Referenced by MachInit().
◆ XboxSetLED()
Definition at line 198 of file xboxi2c.c.
198 {
201
208 case 'r':
210 break;
211 case 'g':
213 break;
214 case 'o':
217 break;
218 }
220 }
222 }
223}
_ACRTIMP size_t __cdecl strlen(const char *)
GLint GLint GLint GLint GLint x
GLdouble GLdouble GLdouble r
static void I2cSetFrontpanelLed(UCHAR b)
Referenced by MachInit().
◆ XboxVideoClearScreen()
Definition at line 37 of file xboxvideo.c.
38{
40}
VOID FbConsClearScreen(_In_ UCHAR Attr)
Referenced by MachInit().
◆ XboxVideoCopyOffScreenBufferToVRAM()
| VOID XboxVideoCopyOffScreenBufferToVRAM |
( |
PVOID |
Buffer | ) |
|
Definition at line 181 of file xboxvideo.c.
182{
184}
VOID FbConsCopyOffScreenBufferToVRAM(_In_ PVOID Buffer)
Copies a full text-mode CGA-style character buffer rectangle to the console.
Referenced by MachInit().
◆ XboxVideoGetBufferSize()
Definition at line 157 of file xboxvideo.c.
158{
160}
ULONG FbConsGetBufferSize(VOID)
Returns the size in bytes, of a full text-mode CGA-style character buffer rectangle that can fill the...
Referenced by MachInit().
◆ XboxVideoGetDisplaySize()
Definition at line 151 of file xboxvideo.c.
152{
154}
VOID FbConsGetDisplaySize(_Out_ PULONG Width, _Out_ PULONG Height, _Out_ PULONG Depth)
Returns the width and height in number of CGA characters/attributes, of a full text-mode CGA-style ch...
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Referenced by MachInit(), and XboxConsPutChar().
◆ XboxVideoGetFontsFromFirmware()
| VOID XboxVideoGetFontsFromFirmware |
( |
PULONG |
RomFontPointers | ) |
|
◆ XboxVideoGetPaletteColor()
◆ XboxVideoHideShowTextCursor()
◆ XboxVideoInit()
Definition at line 96 of file xboxvideo.c.
97{
101
102
104
106
107
109 {
110
112 WARN(
"Could not detect framebuffer memory size, fallback to 4 MB\n");
113 }
114
117
118
122 else
124
125
129
131
139
141}
#define READ_REGISTER_ULONG(r)
static UCHAR BytesPerPixel
static ULONG ScreenHeight
VOID VidFbClearScreenColor(_In_ UINT32 Color, _In_ BOOLEAN FullScreen)
BOOLEAN VidFbInitializeVideo(_In_ ULONG_PTR BaseAddress, _In_ ULONG BufferSize, _In_ UINT32 ScreenWidth, _In_ UINT32 ScreenHeight, _In_ UINT32 PixelsPerScanLine, _In_ UINT32 BitsPerPixel, _In_opt_ PPIXEL_BITMASK PixelMasks)
Initializes internal framebuffer information based on the given parameters.
static UCHAR NvGetCrtc(UCHAR Index)
static ULONG XboxGetFramebufferSize(_In_ ULONG_PTR Offset)
#define MAKE_COLOR(Red, Green, Blue)
#define NV2A_CRTC_FRAMEBUFFER_START
#define NV2A_RAMDAC_FP_VVALID_END
#define NV2A_RAMDAC_FP_HVALID_END
Referenced by MachInit().
◆ XboxVideoIsPaletteFixed()
◆ XboxVideoPrepareForReactOS()
| VOID XboxVideoPrepareForReactOS |
( |
VOID |
| ) |
|
◆ XboxVideoPutChar()
Definition at line 43 of file xboxvideo.c.
44{
46}
VOID FbConsPutChar(_In_ UCHAR Char, _In_ UCHAR Attr, _In_ ULONG Column, _In_ ULONG Row)
Displays a character with specific text attributes at a given position.
Referenced by MachInit(), and XboxConsPutChar().
◆ XboxVideoSetDisplayMode()
◆ XboxVideoSetPaletteColor()
◆ XboxVideoSetTextCursorPosition()
◆ XboxVideoSync()