Skip to content

Commit 12f78e5

Browse files
Merge branch 'reactos:master' into AppleTV-Desktop
2 parents b0820fb + b18a46e commit 12f78e5

File tree

54 files changed

+3483
-880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3483
-880
lines changed

boot/freeldr/freeldr/arch/i386/pc/machpc.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ DBG_DEFAULT_CHANNEL(HWDETECT);
9292
/* Timeout in ms for sending to keyboard controller. */
9393
#define CONTROLLER_TIMEOUT 250
9494

95+
#include <pshpack1.h>
96+
typedef struct _PNP_DOCK_INFO
97+
{
98+
ULONG DockLocationID;
99+
ULONG SerialNumber;
100+
USHORT Capabilities;
101+
} PNP_DOCK_INFO, *PPNP_DOCK_INFO;
102+
#include <poppack.h>
95103

96104
VOID
97105
PcGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
@@ -188,6 +196,7 @@ DetectDockingStation(
188196
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
189197
PCONFIGURATION_COMPONENT_DATA PeripheralKey;
190198
PDOCKING_STATE_INFORMATION DockingState;
199+
PPNP_DOCK_INFO DockInfo;
191200
ULONG Size, Result;
192201

193202
Result = PnpBiosGetDockStationInformation(DiskReadBuffer);
@@ -219,8 +228,14 @@ DetectDockingStation(
219228
DockingState->ReturnCode = Result;
220229
if (Result == 0)
221230
{
222-
/* FIXME: Add more device specific data */
223-
ERR("FIXME: System docked\n");
231+
DockInfo = (PPNP_DOCK_INFO)DiskReadBuffer;
232+
DockingState->DockLocationID = DockInfo->DockLocationID;
233+
DockingState->SerialNumber = DockInfo->SerialNumber;
234+
DockingState->Capabilities = DockInfo->Capabilities;
235+
TRACE("System docked\n");
236+
TRACE("Location: 0x%08lx\n", DockInfo->DockLocationID);
237+
TRACE("Serial: 0x%08lx\n", DockInfo->SerialNumber);
238+
TRACE("Capabilities: 0x%04hx\n", DockInfo->Capabilities);
224239
}
225240

226241
/* Create controller key */

boot/freeldr/freeldr/include/arch/pc/pcbios.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ typedef struct _ACPI_BIOS_DATA
8181

8282
typedef struct _DOCKING_STATE_INFORMATION
8383
{
84-
USHORT Unused[5];
84+
ULONG DockLocationID;
85+
ULONG SerialNumber;
86+
USHORT Capabilities;
8587
USHORT ReturnCode;
8688
} DOCKING_STATE_INFORMATION, *PDOCKING_STATE_INFORMATION;
8789

dll/win32/rpcrt4/ndr_fullpointer.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,41 @@ static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables,
8686
{
8787
if (RefId >= pXlatTables->RefIdToPointer.NumberOfEntries)
8888
{
89+
#ifdef __REACTOS__
90+
void* ptrNew;
91+
ptrNew = realloc(pXlatTables->RefIdToPointer.XlatTable, sizeof(void *) * RefId * 2);
92+
if (!ptrNew)
93+
{
94+
ERR("Couldn't reallocate RefIdToPointer.XlatTable from %lu to %lu entries\n",
95+
pXlatTables->RefIdToPointer.NumberOfEntries, RefId * 2);
96+
free(pXlatTables->RefIdToPointer.XlatTable);
97+
}
98+
pXlatTables->RefIdToPointer.XlatTable = ptrNew;
99+
if (ptrNew)
100+
{
101+
ptrNew = realloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2);
102+
if (!ptrNew)
103+
{
104+
ERR("Couldn't reallocate RefIdToPointer.StateTable from %lu to %lu entries\n",
105+
pXlatTables->RefIdToPointer.NumberOfEntries, RefId * 2);
106+
free(pXlatTables->RefIdToPointer.StateTable);
107+
}
108+
pXlatTables->RefIdToPointer.StateTable = ptrNew;
109+
}
110+
#else
89111
pXlatTables->RefIdToPointer.XlatTable =
90112
realloc(pXlatTables->RefIdToPointer.XlatTable, sizeof(void *) * RefId * 2);
91113
pXlatTables->RefIdToPointer.StateTable =
92114
realloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2);
115+
#endif
93116
if (!pXlatTables->RefIdToPointer.XlatTable || !pXlatTables->RefIdToPointer.StateTable)
94117
{
118+
#ifdef __REACTOS__
119+
free(pXlatTables->RefIdToPointer.XlatTable);
120+
free(pXlatTables->RefIdToPointer.StateTable);
121+
pXlatTables->RefIdToPointer.XlatTable = NULL;
122+
pXlatTables->RefIdToPointer.StateTable = NULL;
123+
#endif
95124
pXlatTables->RefIdToPointer.NumberOfEntries = 0;
96125
return;
97126
}

drivers/network/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ add_subdirectory(afd)
33
add_subdirectory(dd)
44
add_subdirectory(ndis)
55
add_subdirectory(ndisuio)
6+
add_subdirectory(netio)
67
add_subdirectory(tcpip)
78
add_subdirectory(tdi)

drivers/network/afd/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
include_directories(
33
BEFORE include
4+
../tdihelpers/include
45
${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers)
56

67
list(APPEND SOURCE
@@ -13,8 +14,8 @@ list(APPEND SOURCE
1314
afd/main.c
1415
afd/read.c
1516
afd/select.c
16-
afd/tdi.c
17-
afd/tdiconn.c
17+
../tdihelpers/tdi.c
18+
../tdihelpers/tdiconn.c
1819
afd/write.c
1920
include/afd.h)
2021

drivers/network/afd/include/afd.h

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -337,71 +337,6 @@ VOID SignalSocket(
337337
PAFD_ACTIVE_POLL Poll OPTIONAL, PIRP _Irp OPTIONAL,
338338
PAFD_POLL_INFO PollReq, NTSTATUS Status);
339339

340-
/* tdi.c */
341-
342-
NTSTATUS TdiOpenAddressFile(
343-
PUNICODE_STRING DeviceName,
344-
PTRANSPORT_ADDRESS Name,
345-
ULONG ShareType,
346-
PHANDLE AddressHandle,
347-
PFILE_OBJECT *AddressObject);
348-
349-
NTSTATUS TdiAssociateAddressFile(
350-
HANDLE AddressHandle,
351-
PFILE_OBJECT ConnectionObject);
352-
353-
NTSTATUS TdiDisassociateAddressFile(
354-
PFILE_OBJECT ConnectionObject);
355-
356-
NTSTATUS TdiListen
357-
( PIRP *Irp,
358-
PFILE_OBJECT ConnectionObject,
359-
PTDI_CONNECTION_INFORMATION *RequestConnectionInfo,
360-
PTDI_CONNECTION_INFORMATION *ReturnConnectionInfo,
361-
PIO_COMPLETION_ROUTINE CompletionRoutine,
362-
PVOID CompletionContext);
363-
364-
NTSTATUS TdiReceive
365-
( PIRP *Irp,
366-
PFILE_OBJECT ConnectionObject,
367-
USHORT Flags,
368-
PCHAR Buffer,
369-
UINT BufferLength,
370-
PIO_COMPLETION_ROUTINE CompletionRoutine,
371-
PVOID CompletionContext);
372-
373-
NTSTATUS TdiSend
374-
( PIRP *Irp,
375-
PFILE_OBJECT ConnectionObject,
376-
USHORT Flags,
377-
PCHAR Buffer,
378-
UINT BufferLength,
379-
PIO_COMPLETION_ROUTINE CompletionRoutine,
380-
PVOID CompletionContext);
381-
382-
NTSTATUS TdiReceiveDatagram(
383-
PIRP *Irp,
384-
PFILE_OBJECT TransportObject,
385-
USHORT Flags,
386-
PCHAR Buffer,
387-
UINT BufferLength,
388-
PTDI_CONNECTION_INFORMATION From,
389-
PIO_COMPLETION_ROUTINE CompletionRoutine,
390-
PVOID CompletionContext);
391-
392-
NTSTATUS TdiSendDatagram(
393-
PIRP *Irp,
394-
PFILE_OBJECT TransportObject,
395-
PCHAR Buffer,
396-
UINT BufferLength,
397-
PTDI_CONNECTION_INFORMATION To,
398-
PIO_COMPLETION_ROUTINE CompletionRoutine,
399-
PVOID CompletionContext);
400-
401-
NTSTATUS TdiQueryMaxDatagramLength(
402-
PFILE_OBJECT FileObject,
403-
PUINT MaxDatagramLength);
404-
405340
/* write.c */
406341

407342
NTSTATUS NTAPI

drivers/network/afd/include/tdi_proto.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

drivers/network/afd/include/tdiconn.h

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
spec2def(netio.sys netio.spec ADD_IMPORTLIB)
3+
4+
# NETIO.SYS is a NT 6 driver
5+
remove_definitions(-D_WIN32_WINNT=0x502)
6+
add_definitions(-D_WIN32_WINNT=0x600)
7+
8+
# Including AFD is needed by the TDI helpers.
9+
# They have been part of AFD before.
10+
11+
include_directories(
12+
BEFORE include
13+
../afd/include
14+
../tdihelpers/include
15+
${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers)
16+
17+
list(APPEND SOURCE
18+
netio.c
19+
../tdihelpers/tdi.c
20+
../tdihelpers/tdiconn.c
21+
${CMAKE_CURRENT_BINARY_DIR}/netio.def)
22+
23+
add_library(netio MODULE ${SOURCE})
24+
target_link_libraries(netio ${PSEH_LIB})
25+
set_module_type(netio kernelmodedriver)
26+
add_importlibs(netio ntoskrnl hal)
27+
add_cd_file(TARGET netio DESTINATION reactos/system32/drivers FOR all)
28+
add_registry_inf(netio_reg.inf)

0 commit comments

Comments
 (0)