Skip to content

Commit 0c7ab03

Browse files
some cleanup
1 parent e4c3b72 commit 0c7ab03

File tree

5 files changed

+31
-43
lines changed

5 files changed

+31
-43
lines changed

boot/freeldr/freeldr/arch/i386/appletv/appletvdisk.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,16 @@ AppleTVInitializeBootDevices(VOID)
637637

638638
return (DiskCount != 0);
639639
}
640+
641+
UCHAR
642+
AppleTVGetFloppyCount(VOID)
643+
{
644+
/* No floppy drive present */
645+
return 0;
646+
}
647+
648+
UCHAR
649+
DriveMapGetBiosDriveNumber(PCSTR DeviceName)
650+
{
651+
return 0;
652+
}

boot/freeldr/freeldr/arch/i386/appletv/appletvstubs.c

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313

1414
/* GENERAL FUNCTIONS *********************************************************/
1515

16-
UCHAR
17-
AppleTVGetFloppyCount(VOID)
18-
{
19-
/* No floppy drive present */
20-
return 0;
21-
}
22-
2316
VOID
2417
AppleTVGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
2518
{
2619
/* No EBDA on EFI-based Apple TV */
2720
}
21+
2822
VOID
2923
AppleTVHwIdle(VOID)
3024
{
@@ -37,26 +31,14 @@ AppleTVBeep(VOID)
3731
/* No beeper speaker support */
3832
}
3933

40-
UCHAR
41-
DriveMapGetBiosDriveNumber(PCSTR DeviceName)
42-
{
43-
return 0;
44-
}
45-
46-
BOOLEAN
47-
PxeInit(VOID)
48-
{
49-
return FALSE;
50-
}
51-
5234
VOID
5335
ChainLoadBiosBootSectorCode(UCHAR BootDrive, ULONG BootPartition)
5436
{
5537
// Not supported
5638
}
5739

5840
VOID
59-
DiskStopFloppyMotor()
41+
DiskStopFloppyMotor(VOID)
6042
{
6143
// Not supported
6244
}
@@ -101,19 +83,6 @@ AppleTVVideoHideShowTextCursor(BOOLEAN Show)
10183
// We don't have a cursor
10284
}
10385

104-
VIDEODISPLAYMODE
105-
AppleTVVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
106-
{
107-
// We only have one display mode
108-
return VideoTextMode;
109-
}
110-
111-
BOOLEAN
112-
AppleTVVideoIsPaletteFixed(VOID)
113-
{
114-
return FALSE;
115-
}
116-
11786
VOID
11887
AppleTVVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
11988
{

boot/freeldr/freeldr/arch/i386/appletv/appletvvideo.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,17 @@ AppleTVVideoScrollUp(VOID)
170170

171171
for (PixelCount = 0; PixelCount < Video->Width * CHAR_HEIGHT; PixelCount++)
172172
*Dst++ = BgColor;
173+
}
174+
175+
VIDEODISPLAYMODE
176+
AppleTVVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
177+
{
178+
// We only have one display mode
179+
return VideoTextMode;
180+
}
181+
182+
BOOLEAN
183+
AppleTVVideoIsPaletteFixed(VOID)
184+
{
185+
return FALSE;
173186
}

boot/freeldr/freeldr/arch/i386/appletv/machappletv.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
#include <debug.h>
1414
DBG_DEFAULT_CHANNEL(HWDETECT);
1515

16-
/* GLOBALS *******************************************************************/
17-
18-
extern PMACH_BOOTARGS BootArgs; // from eax register; see appletventry.S
19-
2016
/* FUNCTIONS *****************************************************************/
2117

2218
VOID
@@ -31,7 +27,7 @@ MachInit(const char *CmdLine)
3127
if (BootArgs->Version != 1
3228
&& BootArgs->Revision != 4)
3329
{
34-
ERR("This is not an Apple TV!\n");
30+
ERR("BootArgs struct missing or damaged; this probably isn't an Apple TV!\n");
3531

3632
_disable();
3733
__halt();
@@ -72,15 +68,12 @@ MachInit(const char *CmdLine)
7268

7369
/*
7470
* If we are booting in text mode, enable screen debugging
75-
* Enabling this can be achieved by holding Cmd/Win-V or S at startup
71+
* Text mode can be enabled by holding Windows/Command-V or Command-S at startup
7672
* or adding '-v' or '-s' to the 'Kernel Flags' key in com.apple.Boot.plist
7773
*/
7874
if (BootArgs->Video.DisplayMode == DISPLAY_MODE_TEXT)
7975
{
80-
// Clear screen
8176
AppleTVVideoClearScreen(COLOR_BLACK);
82-
83-
// Enable screen debug
8477
DebugEnableScreenPort();
8578
}
8679

boot/freeldr/freeldr/include/arch/appletv/boot_args.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ typedef struct ALIGNED(4) {
6161
UINT8 __reserved2[7];
6262
} MACH_BOOTARGS, *PMACH_BOOTARGS;
6363

64-
extern PMACH_BOOTARGS BootArgs;
64+
extern PMACH_BOOTARGS BootArgs; // from eax register; see appletventry.S

0 commit comments

Comments
 (0)