ReactOS  0.4.15-dev-489-g75a0787
pcbios.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for pcbios.h:

Go to the source code of this file.

Classes

struct  BIOS_MEMORY_MAP
 
struct  _ACPI_BIOS_DATA
 
struct  DWORDREGS
 
struct  WORDREGS
 
struct  BYTEREGS
 
union  REGS
 

Macros

#define MAX_BIOS_DESCRIPTORS   80
 
#define INT386_SUCCESS(regs)   ((regs.x.eflags & EFLAGS_CF) == 0)
 
#define REGS_EAX   0
 
#define REGS_EBX   4
 
#define REGS_ECX   8
 
#define REGS_EDX   12
 
#define REGS_ESI   16
 
#define REGS_EDI   20
 
#define REGS_EBP   24
 
#define REGS_DS   28
 
#define REGS_ES   30
 
#define REGS_FS   32
 
#define REGS_GS   34
 
#define REGS_EFLAGS   36
 
#define REGS_SIZE   40
 

Typedefs

typedef struct BIOS_MEMORY_MAPPBIOS_MEMORY_MAP
 
typedef struct _ACPI_BIOS_DATA ACPI_BIOS_DATA
 
typedef struct _ACPI_BIOS_DATAPACPI_BIOS_DATA
 

Enumerations

enum  BIOS_MEMORY_TYPE {
  BiosMemoryUsable = 1, BiosMemoryBootLoader, BiosMemoryBootStrap, BiosMemoryReserved,
  BiosMemoryUsable = 1, BiosMemoryReserved = 2, BiosMemoryAcpiReclaim = 3, BiosMemoryAcpiNvs = 4,
  BiosMemoryUnusable = 5, BiosMemoryDisabled = 6, BiosMemoryPersistent = 7, BiosMemoryUndefined08 = 8,
  BiosMemoryUndefined09 = 9, BiosMemoryUndefined10 = 10, BiosMemoryUndefined11 = 11, BiosMemoryOemDefined12 = 12
}
 

Functions

 C_ASSERT (FIELD_OFFSET(BIOS_MEMORY_MAP, ExtendedAttributes)==20)
 
 C_ASSERT (sizeof(BIOS_MEMORY_MAP)==24)
 
int __cdecl Int386 (int ivec, REGS *in, REGS *out)
 
VOID __cdecl ChainLoadBiosBootSectorCode (IN UCHAR BootDrive OPTIONAL, IN ULONG BootPartition OPTIONAL)
 
VOID __cdecl Relocator16Boot (IN REGS *In, IN USHORT StackSegment, IN USHORT StackPointer, IN USHORT CodeSegment, IN USHORT CodePointer)
 
VOID __cdecl Reboot (VOID)
 
VOID DetectHardware (VOID)
 

Macro Definition Documentation

◆ INT386_SUCCESS

#define INT386_SUCCESS (   regs)    ((regs.x.eflags & EFLAGS_CF) == 0)

Definition at line 173 of file pcbios.h.

◆ MAX_BIOS_DESCRIPTORS

#define MAX_BIOS_DESCRIPTORS   80

Definition at line 12 of file pcbios.h.

◆ REGS_DS

#define REGS_DS   28

Definition at line 199 of file pcbios.h.

◆ REGS_EAX

#define REGS_EAX   0

Definition at line 192 of file pcbios.h.

◆ REGS_EBP

#define REGS_EBP   24

Definition at line 198 of file pcbios.h.

◆ REGS_EBX

#define REGS_EBX   4

Definition at line 193 of file pcbios.h.

◆ REGS_ECX

#define REGS_ECX   8

Definition at line 194 of file pcbios.h.

◆ REGS_EDI

#define REGS_EDI   20

Definition at line 197 of file pcbios.h.

◆ REGS_EDX

#define REGS_EDX   12

Definition at line 195 of file pcbios.h.

◆ REGS_EFLAGS

#define REGS_EFLAGS   36

Definition at line 203 of file pcbios.h.

◆ REGS_ES

#define REGS_ES   30

Definition at line 200 of file pcbios.h.

◆ REGS_ESI

#define REGS_ESI   16

Definition at line 196 of file pcbios.h.

◆ REGS_FS

#define REGS_FS   32

Definition at line 201 of file pcbios.h.

◆ REGS_GS

#define REGS_GS   34

Definition at line 202 of file pcbios.h.

◆ REGS_SIZE

#define REGS_SIZE   40

Definition at line 204 of file pcbios.h.

Typedef Documentation

◆ ACPI_BIOS_DATA

◆ PACPI_BIOS_DATA

◆ PBIOS_MEMORY_MAP

Enumeration Type Documentation

◆ BIOS_MEMORY_TYPE

Enumerator
BiosMemoryUsable 
BiosMemoryBootLoader 
BiosMemoryBootStrap 
BiosMemoryReserved 
BiosMemoryUsable 
BiosMemoryReserved 
BiosMemoryAcpiReclaim 
BiosMemoryAcpiNvs 
BiosMemoryUnusable 
BiosMemoryDisabled 
BiosMemoryPersistent 
BiosMemoryUndefined08 
BiosMemoryUndefined09 
BiosMemoryUndefined10 
BiosMemoryUndefined11 
BiosMemoryOemDefined12 

Definition at line 14 of file pcbios.h.

15 {
16  // ACPI 1.0.
17  BiosMemoryUsable = 1,
21  // ACPI 3.0.
23  // ACPI 4.0.
25  // ACPI 6.0.
32  // BiosMemoryUndefinedNN = 13-0xEFFFFFFF
33  // BiosMemoryOemDefinedNN = 0xF0000000-0xFFFFFFFF
BIOS_MEMORY_TYPE
Definition: pcbios.h:14

Function Documentation

◆ C_ASSERT() [1/2]

C_ASSERT ( FIELD_OFFSET(BIOS_MEMORY_MAP, ExtendedAttributes)  = =20)

◆ C_ASSERT() [2/2]

C_ASSERT ( sizeof(BIOS_MEMORY_MAP = =24)

◆ ChainLoadBiosBootSectorCode()

VOID __cdecl ChainLoadBiosBootSectorCode ( IN UCHAR BootDrive  OPTIONAL,
IN ULONG BootPartition  OPTIONAL 
)

Definition at line 1420 of file machpc.c.

1423 {
1424  REGS Regs;
1425 
1426  RtlZeroMemory(&Regs, sizeof(Regs));
1427 
1428  /* Set the boot drive and the boot partition */
1429  Regs.b.dl = (UCHAR)(BootDrive ? BootDrive : FrldrBootDrive);
1430  Regs.b.dh = (UCHAR)(BootPartition ? BootPartition : FrldrBootPartition);
1431 
1432  /*
1433  * Don't stop the floppy drive motor when we are just booting a bootsector,
1434  * a drive, or a partition. If we were to stop the floppy motor, the BIOS
1435  * wouldn't be informed and if the next read is to a floppy then the BIOS
1436  * will still think the motor is on and this will result in a read error.
1437  */
1438  // DiskStopFloppyMotor();
1439 
1440  Relocator16Boot(&Regs,
1441  /* Stack segment:pointer */
1442  0x0000, 0x7C00,
1443  /* Code segment:pointer */
1444  0x0000, 0x7C00);
1445 }
unsigned char dh
Definition: pcbios.h:135
unsigned char dl
Definition: pcbios.h:134
ULONG FrldrBootPartition
unsigned char UCHAR
Definition: xmlstorage.h:181
BYTEREGS b
Definition: pcbios.h:157
UCHAR FrldrBootDrive
VOID __cdecl Relocator16Boot(IN REGS *In, IN USHORT StackSegment, IN USHORT StackPointer, IN USHORT CodeSegment, IN USHORT CodePointer)
Definition: pcbios.h:152
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261

◆ DetectHardware()

VOID DetectHardware ( VOID  )

◆ Int386()

◆ Reboot()

VOID __cdecl Reboot ( VOID  )

Definition at line 37 of file hardware.h.

38 {
39  DbgBreakPoint();
40 }
void DbgBreakPoint()
Definition: mach.c:553

◆ Relocator16Boot()

VOID __cdecl Relocator16Boot ( IN REGS In,
IN USHORT  StackSegment,
IN USHORT  StackPointer,
IN USHORT  CodeSegment,
IN USHORT  CodePointer 
)