Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeySlice committed Mar 24, 2022
2 parents 4b2e9d6 + 9337508 commit 31187f6
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 380 deletions.
14 changes: 7 additions & 7 deletions CloverPackage/makeiso
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ mkdir -p ${IMGROOT}/usr/bin
echo "[MKDIR] ${IMGROOT}/usr/local/bin"
mkdir -p "${IMGROOT}"/usr/local/bin
cp -p "${SYMROOT}"/utils/* "${IMGROOT}"/usr/local/bin
echo "[MKDIR] ${IMGROOT}/Library/Application Support/Clover"
mkdir -p "${IMGROOT}/Library/Application Support/Clover"
cp -p "${SRCROOT}"/CloverUpdater/CloverUpdaterUtility "${IMGROOT}/Library/Application Support/Clover/"
cp -pr "${SRCROOT}"/CloverUpdater/build/CloverUpdater.app "${IMGROOT}/Library/Application Support/Clover/"
echo "[MKDIR] ${IMGROOT}/Library/PreferencePanes"
mkdir -p "${IMGROOT}/Library/PreferencePanes"
cp -pr "${SRCROOT}"/CloverPrefpane/Build/Clover.prefPane "${IMGROOT}/Library/PreferencePanes/"
#echo "[MKDIR] ${IMGROOT}/Library/Application Support/Clover"
#mkdir -p "${IMGROOT}/Library/Application Support/Clover"
#cp -p "${SRCROOT}"/CloverUpdater/CloverUpdaterUtility "${IMGROOT}/Library/Application Support/Clover/"
#cp -pr "${SRCROOT}"/CloverUpdater/build/CloverUpdater.app "${IMGROOT}/Library/Application Support/Clover/"
#echo "[MKDIR] ${IMGROOT}/Library/PreferencePanes"
#mkdir -p "${IMGROOT}/Library/PreferencePanes"
#cp -pr "${SRCROOT}"/CloverPrefpane/Build/Clover.prefPane "${IMGROOT}/Library/PreferencePanes/"
echo "[CP] cdboot"
cp -f ${SYMROOT}/i386/cdboot ${CDBOOT}
echo "[CP] $THEME"
Expand Down
4 changes: 2 additions & 2 deletions CloverPackage/package/po/clover.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Clover r5142\n"
"POT-Creation-Date: 2021-11-02 19:01+0300\n"
"Project-Id-Version: Clover r5145\n"
"POT-Creation-Date: 2022-03-16 19:08+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
4 changes: 2 additions & 2 deletions Library/MemLogLibDefault/printf_lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ __attribute__((noinline, section(".printf_lite")))
#endif
static void print_ulonglong(UINT_BIGGEST_TYPE v, unsigned int base, PrintfParams* printfParams, int printfSign)
{
int n = 0;
// int n = 0;
unsigned INT_BIGGEST_TYPE d = 1;
#if PRINTF_LITE_FIELDWIDTH_SUPPORT == 1
int nbDigits = 1 + printfSign;
Expand Down Expand Up @@ -550,7 +550,7 @@ static void print_ulonglong(UINT_BIGGEST_TYPE v, unsigned int base, PrintfParams
#else
print_char_macro( (char)(dgt + '0'), printfParams);
#endif
n += 1;
// n += 1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/Injectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ UINT8* mProperties = NULL;
CHAR8* gDeviceProperties = NULL;

UINT32 cPropSize = 0;
UINT8* cProperties = NULL;
UINT8* cProperties = NULL; //this is properties as string
CHAR8* BootOSName = NULL;

UINT16 KeyboardVendor = 0x05ac; //Apple inc.
Expand Down
2 changes: 2 additions & 0 deletions rEFIt_UEFI/Platform/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ SetDevices (LOADER_ENTRY *Entry)
MsgLog("Properties with Label=%ls ignored because getDevicePath() return NULL\n", Prop.DevicePathAsString.wc_str());
continue;
}

device = devprop_add_device_pci(device_inject_string, NULL, DevicePath);
DBG("add device: %ls\n", Prop.DevicePathAsString.wc_str());
for ( size_t jdx = 0 ; jdx < Prop.propertiesArray.size() ; ++jdx ) {
Expand Down Expand Up @@ -1799,6 +1800,7 @@ SetDevices (LOADER_ENTRY *Entry)
// StringDirty = false;
//-------
mPropSize = (UINT32)hex2bin(newDeviceProperties, mProperties, EFI_PAGES_TO_SIZE(nbPages)); // cast should be safe as hex2bin return <= MAXUINT32
// gDeviceProperties is not used
gDeviceProperties = newDeviceProperties.forgetDataWithoutFreeing(); // do this AFTER hex2bin
// DBG("Final size of mProperties=%d\n", mPropSize);
//---------
Expand Down
39 changes: 24 additions & 15 deletions rEFIt_UEFI/Platform/ati.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ const card_config_t card_configs[] = {
{"Elqui", 5},
{"Caroni", 5},
{"Florin", 6},
{"Python", 3},
{"Adder", 3},
{"Henbury",3},
{"Belknap",3},
{"Carswell",3},

{"Radeon",4},
};

Expand Down Expand Up @@ -320,18 +326,18 @@ const radeon_card_info_t radeon_cards[] = {
{ 0x67CA, CHIP_FAMILY_ELLESMERE, "AMD Radeon Polaris 10", kNull },
{ 0x67CC, CHIP_FAMILY_ELLESMERE, "AMD Radeon Polaris 10", kNull },
{ 0x67CF, CHIP_FAMILY_ELLESMERE, "AMD Radeon Polaris 10", kNull },
{ 0x67DF, CHIP_FAMILY_ELLESMERE, "AMD Radeon RX 480/570/580", kBaladi },
{ 0x67DF, CHIP_FAMILY_ELLESMERE, "AMD Radeon RX 480/570/580", kOrinoco },

// Polaris 11
{ 0x67E0, CHIP_FAMILY_BAFFIN, "AMD Radeon RX 460", kAcre },
{ 0x67E1, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67E3, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67E3, CHIP_FAMILY_BAFFIN, "AMD Radeon Pro WX4100", kNull },
{ 0x67E7, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67E8, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67E9, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67EB, CHIP_FAMILY_BAFFIN, "AMD Radeon Polaris 11", kNull },
{ 0x67EF, CHIP_FAMILY_BAFFIN, "AMD Radeon Pro 555", kAcre }, //fb=Caroni in 10.13.6
{ 0x67FF, CHIP_FAMILY_BAFFIN, "AMD Radeon RX 560", kNull },
{ 0x67EF, CHIP_FAMILY_BAFFIN, "AMD Radeon Pro 555", kAcre }, //fb=Caroni in 10.13.6
{ 0x67FF, CHIP_FAMILY_BAFFIN, "AMD Radeon RX 560", kNull },

// PITCAIRN
{ 0x6800, CHIP_FAMILY_PITCAIRN, "AMD Radeon HD 7970M", kBuri }, // Mobile
Expand Down Expand Up @@ -504,6 +510,8 @@ const radeon_card_info_t radeon_cards[] = {
{ 0x7300, CHIP_FAMILY_FIJI, "AMD Radeon R9 Fury", kNull },
// Navi10
{ 0x731F, CHIP_FAMILY_NAVI10, "AMD Radeon RX5700", kNull },
// Navi15
{ 0x7340, CHIP_FAMILY_NAVI10, "AMD Radeon RX5500", kNull },
// Navi21
{ 0x73BF, CHIP_FAMILY_NAVI20, "AMD Radeon RX6800XT", kNull },
/*
Expand Down Expand Up @@ -1287,7 +1295,7 @@ AtiDevProp ati_devprop_list[] = {

// {FLAGTRUE, false, "ATY,MCLK", get_mclk_val, NULVAL },
// {FLAGTRUE, false, "ATY,SCLK", get_sclk_val, NULVAL },
{FLAGTRUE, false, "ATY,RefCLK", get_refclk_val, DWRVAL(0x0a8c) },
//{FLAGTRUE, false, "ATY,RefCLK", get_refclk_val, DWRVAL(0x0a8c) },

{FLAGTRUE, false, "ATY,PlatformInfo", get_platforminfo_val, NULVAL },
{FLAGOLD, false, "compatible", get_name_pci_val, NULVAL },
Expand All @@ -1312,7 +1320,7 @@ XBool get_bootdisplay_val(value_t *val, INTN index, XBool Sier)
v = 1;
val->type = kCst;
val->size = 4;
val->data = (__typeof__(val->data))AllocatePool(4);
val->data = (__typeof__(val->data))AllocateZeroPool(4);
*(val->data) = (UINT8)v;
return true;
}
Expand All @@ -1334,7 +1342,7 @@ XBool get_dual_link_val(value_t *val, INTN index, XBool Sier)

val->type = kCst;
val->size = 4;
val->data = (__typeof__(val->data))AllocatePool(4);
val->data = (__typeof__(val->data))AllocateZeroPool(4);
*(val->data) = (UINT8)v;
return true;
}
Expand Down Expand Up @@ -1415,6 +1423,8 @@ XBool get_name_pci_val(value_t *val, INTN index, XBool Sier)
return true;
}

const char AMDRadeon[] = "AMD Radeon %s";

XBool get_model_val(value_t *val, INTN index, XBool Sier)
{
CHAR8 *ModelName = (__typeof__(ModelName))AllocateZeroPool(35);
Expand All @@ -1428,25 +1438,25 @@ XBool get_model_val(value_t *val, INTN index, XBool Sier)
} else {
switch (card->pci_dev->revision) {
case 0xC4:
snprintf(ModelName, 35, "AMD Radeon %s", "Pro 550");
snprintf(ModelName, 35, AMDRadeon, "Pro 550");
break;
case 0xC7:
snprintf(ModelName, 35, "AMD Radeon %s", "RX 480");
snprintf(ModelName, 35, AMDRadeon, "RX 480");
break;
case 0xC5:
case 0xCF:
case 0xD7:
case 0xE0:
snprintf(ModelName, 35, "AMD Radeon %s", "RX 470");
snprintf(ModelName, 35, AMDRadeon, "RX 470");
break;
case 0xC2:
case 0xC6:
case 0xEF:
snprintf(ModelName, 35, "AMD Radeon %s", "RX 570");
snprintf(ModelName, 35, AMDRadeon, "RX 570");
break;

default:
snprintf(ModelName, 35, "AMD Radeon %s", "RX 580");
snprintf(ModelName, 35, AMDRadeon, "RX 580");
break;
}
val->size = (UINT32)AsciiStrLen(ModelName);
Expand Down Expand Up @@ -1529,7 +1539,7 @@ XBool get_binimage_owr(value_t *val, INTN index, XBool Sier)
}
val->type = kCst;
val->size = 4;
val->data = (__typeof__(val->data))AllocatePool(4);
val->data = (__typeof__(val->data))AllocateZeroPool(4);
*(val->data) = 1;
return true;
}
Expand Down Expand Up @@ -1944,7 +1954,7 @@ XBool radeon_card_posted(void)
{
UINTN reg;
// ati_chip_family_t chip_family = card->info->chip_family;
#if 1
#if 0
//dump radeon registers after BIOS POST
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_0_SCRATCH);
// DBG("BIOS_0_SCRATCH=0x%08llX, ", reg);
Expand Down Expand Up @@ -2233,7 +2243,6 @@ XBool setup_ati_devprop(LOADER_ENTRY *Entry, pci_dt_t *ati_dev)
}
}


DBG("ATI %s %s %dMB (%s) [%04hX:%04hX] (subsys [%04hX:%04hX]):: %s\n",
chip_family_name[card->info->chip_family], card->info->model_name,
(UINT32)RShiftU64(card->vram_size, 20), card->cfg_name,
Expand Down
6 changes: 6 additions & 0 deletions rEFIt_UEFI/Platform/ati.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,14 @@ typedef enum {
kElqui,
kCaroni,
kFlorin,
kPython,
kAdder,
kHenbury,
kBelknap,
kCarswell,
kRadeon, // this is absent FB if not set
kCfgEnd

} config_name_t;

typedef struct {
Expand Down
Loading

0 comments on commit 31187f6

Please sign in to comment.