ReactOS  0.4.14-dev-50-g13bb5e2
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 167 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 193 of file pcbios.h.

◆ REGS_EAX

#define REGS_EAX   0

Definition at line 186 of file pcbios.h.

◆ REGS_EBP

#define REGS_EBP   24

Definition at line 192 of file pcbios.h.

◆ REGS_EBX

#define REGS_EBX   4

Definition at line 187 of file pcbios.h.

◆ REGS_ECX

#define REGS_ECX   8

Definition at line 188 of file pcbios.h.

◆ REGS_EDI

#define REGS_EDI   20

Definition at line 191 of file pcbios.h.

◆ REGS_EDX

#define REGS_EDX   12

Definition at line 189 of file pcbios.h.

◆ REGS_EFLAGS

#define REGS_EFLAGS   36

Definition at line 197 of file pcbios.h.

◆ REGS_ES

#define REGS_ES   30

Definition at line 194 of file pcbios.h.

◆ REGS_ESI

#define REGS_ESI   16

Definition at line 190 of file pcbios.h.

◆ REGS_FS

#define REGS_FS   32

Definition at line 195 of file pcbios.h.

◆ REGS_GS

#define REGS_GS   34

Definition at line 196 of file pcbios.h.

◆ REGS_SIZE

#define REGS_SIZE   40

Definition at line 198 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 92 of file i386rtl.c.

95 {
96  REGS Regs;
97 
98  RtlZeroMemory(&Regs, sizeof(Regs));
99 
100  /* Set the boot drive and the boot partition */
101  Regs.b.dl = (UCHAR)(BootDrive ? BootDrive : FrldrBootDrive);
102  Regs.b.dh = (UCHAR)(BootPartition ? BootPartition : FrldrBootPartition);
103 
104  /*
105  * Don't stop the floppy drive motor when we are just booting a bootsector,
106  * a drive, or a partition. If we were to stop the floppy motor, the BIOS
107  * wouldn't be informed and if the next read is to a floppy then the BIOS
108  * will still think the motor is on and this will result in a read error.
109  */
110  // DiskStopFloppyMotor();
111 
112  Relocator16Boot(&Regs,
113  /* Stack segment:pointer */
114  0x0000, 0x7C00,
115  /* Code segment:pointer */
116  0x0000, 0x7C00);
117 }
ULONG FrldrBootPartition
unsigned char dh
Definition: pcbios.h:129
unsigned char dl
Definition: pcbios.h:128
UCHAR FrldrBootDrive
unsigned char UCHAR
Definition: xmlstorage.h:181
BYTEREGS b
Definition: pcbios.h:151
VOID __cdecl Relocator16Boot(IN REGS *In, IN USHORT StackSegment, IN USHORT StackPointer, IN USHORT CodeSegment, IN USHORT CodePointer)
Definition: pcbios.h:146
#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 
)