There is no need to include the BIOS / EFI setup utility in the Mac Pro firmware. All settings can be made from a EFI shell, a EFI program, or from an operating system that starts in EFI mode.
The simplest options is to use the command
setup_var from a EFI shell to modify individual variables. For example, the command
setup_var 0x78 should return the current value of the variable "Set Processor Ratio (20-1)" which would be 7 on my 2.8 GHz Mac Pro 3,1.
The command
setup_var 0x78 6 should set the CPU multiplier to 6 and the processor speed to 2.4GHz.
The setup_var command might be specific to the GUID of the
"Setup" variable in NVRAM. The page I linked in my previous post has a download link to an EFI shell with the setup_var command modified to work with firmware that use the "EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9" GUID for their Setup variable. (setup_var.zip - Size: 813.84 KB / Downloads: 4)
It took me a day of googling to figure out what this
setup_var command actually is and where it originates from. It is not a part of the default EFI shell created by Intel. The one I linked to is a version of grub2-add-setup_var-cmd.patch. The link to Github is broken, but a copy can be found
here.
The file was originally written by Bernhard Froemel in 2009. The original posting of the code is now
only available in archive form. The file is actually not even source code, but a diff to some file in the GRUB bootloader. Here are some selected sections of the file:
Code:
+/* setup_var.c - InsydeH2o Setup variable modification tool, can modify single
+ * bytes within the Setup variable */
+/* (c) 2009 by Bernhard Froemel
+ *
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2006,2007,2008,2009,2008 Free Software Foundation, Inc.
+#define INSYDE_SETUP_VAR ((grub_efi_char16_t*)"S\0e\0t\0u\0p\0\0\0")
+#define INSYDE_SETUP_VAR_NSIZE (12)
+#define INSYDE_SETUP_VAR_SIZE (0x2bc)
+#define INSYDE_SETUP_VAR_GUID { 0xa04a27f4, 0xdf00, 0x4d42, { 0xb5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3d } }
+#define MAX_VARIABLE_SIZE (1024)
+ grub_printf(
+"Final warning: YOU MAY BRICK YOUR LAPTOP IF YOU USE THIS TOOL - I TAKE N O \n");
+ grub_printf(
+"RESPONSIBILITY FOR Y O U R ACTIONS.\n");
+ /* scan for Setup variable */
+ grub_printf("Looking for Setup variable...\n");
+ do
+ {
+ name_size = MAX_VARIABLE_SIZE;
+ status = efi_call_3(grub_efi_system_table->runtime_services->get_next_variable_name,
+ &name_size,
+ name,
+ &guid);
Luckily there is a ready-made version of GRUB on Github with the patch included.
I am still investigating. I did not know there was a EFI shell or any shell included in GRUB and have no idea how to start it.
Note, that
setup_var uses GRUB runtime services to access the EFI NVRAM variables. Therefore it needs the ballast of the whole GRUB framework to run. It would be far easier to implement the same functionality in Linux by a Python script that would read and write to the /sys/firmware/efi/efivars/ filesystem.