diff options
Diffstat (limited to 'src/VBox/Devices/PC')
7 files changed, 277 insertions, 10 deletions
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm index 96b8e631..b70cd3f5 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm @@ -1621,7 +1621,7 @@ section CONST progbits vstart=0xf0 align=1 ; size=0xcda class=DATA group=DGROUP section CONST2 progbits vstart=0xdca align=1 ; size=0x3fa class=DATA group=DGROUP ; disGetNextSymbol 0xf0dca LB 0x3fa -> off=0x0 cb=0000000000000012 uValue=00000000000f0dca 'bios_cvs_version_string' bios_cvs_version_string: ; 0xf0dca LB 0x12 - db 'VirtualBox 7.0.18', 000h + db 'VirtualBox 7.0.20', 000h ; disGetNextSymbol 0xf0ddc LB 0x3e8 -> off=0x0 cb=0000000000000008 uValue=00000000000f0ddc '_bios_prefix_string' _bios_prefix_string: ; 0xf0ddc LB 0x8 db 'BIOS: ', 000h, 000h @@ -19429,4 +19429,4 @@ biosorg_check_before_or_at_0FFEEh: ; 0xfff80 LB 0x70 cpu_reset: ; 0xffff0 LB 0x10 jmp far 0f000h:0e05bh ; ea 5b e0 00 f0 ; 0xffff0 orgs.asm:2114 ; disGetNextSymbol 0xffff5 LB 0xb -> off=0xb cb=0000000000000000 uValue=0000000000100000 '_dummy_addr_0x100000' - db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 0d4h + db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 0dbh diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum index 8fb531ac..c546774a 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum @@ -1 +1 @@ -ad4d1a253850bc31cfa497722faafa3a *VBoxPcBios286.rom +60aec905c47ddf2c8a658f7fdedf61b6 *VBoxPcBios286.rom diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm index 85af1d40..9e1c4215 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm @@ -1566,7 +1566,7 @@ section CONST progbits vstart=0xf0 align=1 ; size=0xd14 class=DATA group=DGROUP section CONST2 progbits vstart=0xe04 align=1 ; size=0x3fa class=DATA group=DGROUP ; disGetNextSymbol 0xf0e04 LB 0x3fa -> off=0x0 cb=0000000000000012 uValue=00000000000f0e04 'bios_cvs_version_string' bios_cvs_version_string: ; 0xf0e04 LB 0x12 - db 'VirtualBox 7.0.18', 000h + db 'VirtualBox 7.0.20', 000h ; disGetNextSymbol 0xf0e16 LB 0x3e8 -> off=0x0 cb=0000000000000008 uValue=00000000000f0e16 '_bios_prefix_string' _bios_prefix_string: ; 0xf0e16 LB 0x8 db 'BIOS: ', 000h, 000h @@ -19195,4 +19195,4 @@ biosorg_check_before_or_at_0FFEEh: ; 0xfff80 LB 0x70 cpu_reset: ; 0xffff0 LB 0x10 jmp far 0f000h:0e05bh ; ea 5b e0 00 f0 ; 0xffff0 orgs.asm:2114 ; disGetNextSymbol 0xffff5 LB 0xb -> off=0xb cb=0000000000000000 uValue=0000000000100000 '_dummy_addr_0x100000' - db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 032h + db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 039h diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum index 9cb9bea8..7934d06b 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum @@ -1 +1 @@ -79eeb980dd6104d8bc534c8c7c4e877a *VBoxPcBios386.rom +dbb41e6f7bffdc046e70fcc71697c569 *VBoxPcBios386.rom diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm index 80829ed2..44b44449 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm @@ -1621,7 +1621,7 @@ section CONST progbits vstart=0xf0 align=1 ; size=0xcda class=DATA group=DGROUP section CONST2 progbits vstart=0xdca align=1 ; size=0x3fa class=DATA group=DGROUP ; disGetNextSymbol 0xf0dca LB 0x3fa -> off=0x0 cb=0000000000000012 uValue=00000000000f0dca 'bios_cvs_version_string' bios_cvs_version_string: ; 0xf0dca LB 0x12 - db 'VirtualBox 7.0.18', 000h + db 'VirtualBox 7.0.20', 000h ; disGetNextSymbol 0xf0ddc LB 0x3e8 -> off=0x0 cb=0000000000000008 uValue=00000000000f0ddc '_bios_prefix_string' _bios_prefix_string: ; 0xf0ddc LB 0x8 db 'BIOS: ', 000h, 000h @@ -19906,4 +19906,4 @@ biosorg_check_before_or_at_0FFEEh: ; 0xfff80 LB 0x70 cpu_reset: ; 0xffff0 LB 0x10 jmp far 0f000h:0e05bh ; ea 5b e0 00 f0 ; 0xffff0 orgs.asm:2114 ; disGetNextSymbol 0xffff5 LB 0xb -> off=0xb cb=0000000000000000 uValue=0000000000100000 '_dummy_addr_0x100000' - db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fbh, 0b9h + db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fbh, 0c0h diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum index fc4dd6b7..9ad9c6d4 100644 --- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum +++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum @@ -1 +1 @@ -bd634fab26a7c7e944a845a9415c8623 *VBoxPcBios8086.rom +c032703c5648215f94b3881f8ea0174a *VBoxPcBios8086.rom diff --git a/src/VBox/Devices/PC/vbox-tpm.dsl b/src/VBox/Devices/PC/vbox-tpm.dsl index a24f9f16..889f1515 100644 --- a/src/VBox/Devices/PC/vbox-tpm.dsl +++ b/src/VBox/Devices/PC/vbox-tpm.dsl @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2021-2023 Oracle and/or its affiliates. + * Copyright (C) 2021-2024 Oracle and/or its affiliates. * * This file is part of VirtualBox base platform packages, as * available from https://www.virtualbox.org. @@ -27,6 +27,8 @@ DefinitionBlock ("SSDT.aml", "SSDT", 1, "VBOX ", "VBOXTPMT", 2) { + External(DBG, MethodObj, ,) + Scope (\_SB) { Device (TPM) @@ -88,6 +90,271 @@ DefinitionBlock ("SSDT.aml", "SSDT", 1, "VBOX ", "VBOXTPMT", 2) { Return (RES) } + + Method (TPFS, 1, Serialized) + { + If (LGreaterEqual(Arg0, 0x100)) + { + Return (Zero) + } + + OperationRegion (TPP1, SystemMemory, Add(0xFED45000, Arg0), One) + Field (TPP1, ByteAcc, NoLock, Preserve) + { + TPPF, 8 + } + + Return (TPPF) + } + + /** + * Device-Specific Method + */ + Method (_DSM, 4, Serialized) + { + /** + * The TPM Physical Presence Interface MMIO region. + */ + OperationRegion (TPMP, SystemMemory, 0xFED45100, 0x5A) + Field (TPMP, AnyAcc, NoLock, Preserve) + { + PPIN, 8, + PPIP, 32, + PPRP, 32, + PPRQ, 32, + PPRM, 32, + LPPR, 32 + } + + Name (TPB2, Package (0x02) + { + Zero, + Zero + }) + + Name (TPB3, Package (0x03) + { + Zero, + Zero, + Zero + }) + + /** + * Physical Presence Interface Specification PPI. + */ + If (LEqual (Arg0, ToUUID("3dddfaa6-361b-4eb4-a424-8d10089d1653"))) + { + /** + * Standard _DSM query function. + */ + If (LEqual (Arg2, Zero)) + { + DBG("_DSM: Query\n") + Return (Buffer (0x02) { 0xFF, 0x01 }) + } + + /** + * Query supported PPI revision. + * + * Result: + * 1.3 (string). + */ + If (LEqual (Arg2, One)) + { + DBG("_DSM: PPI Revision\n") + Return ("1.3") + } + + /** + * Submit TPM Operation Request to pre-OS environment. + * + * Input: + * Package[0] - Operation value of the request + * Result: + * - 0: Success + * - 1: Operation value of the request not supported. + * - 2: General failure + */ + If (LEqual (Arg2, 0x02)) + { + DBG("_DSM: Submit TPM Operation Request\n") + + Store(DerefOf(Index(Arg3, Zero)), Local0) + Store(TPFS(Local0), Local1) + If (LEqual(And(Local1, 0x07), Zero)) + { + Return (One) + } + + Store(Local0, PPRQ) + Store(Zero, PPRM) + Return (Zero) + } + + /** + * Get Pending TPM Operation Requested by the OS. + * + * Result: + * Package[0] - Function Return Code: + * - 0: Success + * - 1: General Failure + * Package[1] - Pending operation requested by the OS: + * - 0: None + * - >0: Operation value of the pending request + * Package[2] - Optional argument to pending operation requested by the OS: + * - 0: None + * - >0: Argument value of the pending request + */ + If (LEqual (Arg2, 0x03)) + { + DBG("_DSM: Get Pending TPM Operation Request\n") + + if (LEqual(Arg1, One)) + { + Store(PPRQ, Index(TPB2, One)) + Return (TPB2) + } + + if (LEqual(Arg1, 0x02)) + { + Store(PPRQ, Index(TPB3, One)) + Store(PPRM, Index(TPB3, 0x02)) + Return (TPB3) + } + + Return (TPB3) + } + + /** + * Get Platform-Specific Action to Transition to Pre-OS Environment. + * + * Result: + * - 0: None + * - 1: Shutdown + * - 2: Reboot + * - 3: OS vendor specific + */ + If (LEqual (Arg2, 0x04)) + { + DBG("_DSM: Get Platform-Specific Action to Transition to Pre-OS Environment\n") + + Return (0x02) + } + + /** + * Return TPM Operation Response to OS Environment. + */ + If (LEqual (Arg2, 0x05)) + { + DBG("_DSM: Return TPM Operation Response to OS Environment\n") + + Store (LPPR, Index (TPB3, One)) + Store (PPRP, Index (TPB3, 0x02)) + Return (TPB3) + } + + /** + * Submit preferred user language - deprecated + * + * Result: + * - 3: Not implemented + */ + If (LEqual (Arg2, 0x06)) + { + DBG("_DSM: Submit preferred user language\n") + + Return (0x03) + } + + /** + * Submit TPM Operation Request to Pre-OS Environment 2 + */ + If (LEqual (Arg2, 0x07)) + { + DBG("_DSM: Submit TPM Operation Request 2\n") + + Store(DerefOf(Index(Arg3, Zero)), Local0) /* Local0 = *Arg3[0] (Arg3 is a Package) */ + Store(TPFS(Local0), Local1) /* Local1 = TPFS(Local0) */ + Store(And(Local1, 0x07), Local1) /* Local1 &= 0x7 */ + If (LEqual(Local1, Zero)) + { + Return (One) /* Operation not implemented */ + } + + If (LEqual(Local1, 0x02)) + { + Return (0x03) /* Operation blocked by current firmware settings */ + } + + If (LEqual(Arg1, One)) + { + Store(Local0, PPRQ) + Store(Zero, PPRM) + } + + If (LEqual(Arg1, 0x02)) + { + Store(DerefOf(Index(Arg3, One)), Local2) /* Local2 = *Arg3[1] (Arg3 is a Package) */ + + Store(Local0, PPRQ) + Store(Local2, PPRM) + } + + Return (Zero) + } + + /** + * Get User Confirmation Status for Operation. + * + * Input is the operation value maybe needing user confirmation + * Result: + * - 0: Not implemented + * - 1: Firmware only + * - 2: Blocked for OS by firmware configuration. + * - 3: Allowed and physically present user required + * - 4: Allowed and physically present user not required. + */ + If (LEqual (Arg2, 0x08)) + { + DBG("_DSM: Get user confirmation status for operation\n") + + Store(DerefOf(Index(Arg3, Zero)), Local0) + Store(TPFS(Local0), Local1) + + Return (And(Local1, 0x7)) + } + + DBG("TPM_DSM: Unknown function\n") + Return (Buffer (One) { 0x00 }) + } + + /** + * TCG Platform Reset Attack Mitigation Specification interface. + */ + If (LEqual (Arg0, ToUUID("376054ed-cc13-4675-901c-4756d7f2d45d"))) + { + /** + * Standard _DSM query function. + */ + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + /** + * Set Memory Overwrite Request (MOR) bit to specified value. + */ + If (LEqual (Arg2, One)) + { + /* Memory is always zeroed on reset. */ + Return (Zero) + } + + Return (Buffer (One) { 0x00 }) + } + + Return (Buffer (One) { 0x00 }) + } } } } |