[Resolved] Request for Assistance of BIOS Hex-editing for Toshiba Satellite L630

Hi everyone, I have a Satellite Pro L630 which (obviously) does not have a BIOS update for Spectre V2. Hence, I wish to modify the BIOS to add new microcodes for the following CPUID :20652, 20655 so that it is protected against Spectre V2.

From what I have gathered, CPUID 20652 is for i3 3X0M only, and 20655 is for i3 3X0M and i5 4X0M. Using AiDA64, I have verified that my i3 is of CPUID 20652. However, I might consider upgrading it to an i5 460M in the near future because they are sold for just a few bucks second-hand. The 460M however, is strictly 20655.

Firstly, I used Universal BIOS BackUp toolkit 2.0 to retrieve my BIOS. I did this twice and verified the checksums, and got INSYDE-1.40.ROM as output. Upon placing this file in MCExtracter R64, both 20652 and 20655 comes up as outdated which is expected. I noted that the size of the 20652 Microcode is 0x1C00 and the size of the 20655 Microcode is 0x800. The new Microcodes for these CPUIDs, in comparison, are larger. After downloading the latest MCU in .bin format from https://github.com/platomav/CPUMicrocodes , I ran them in MCExtracter and they came up as 0x2400(20652) and 0x1000(20655).

Next, I attempted to use EzH2O V2.1.0.13 to modify this .ROM file. Using Micro Code option, I inserted the 20652 MCU and the 20655 MCU separately into the file and obtained 2 modified files. Upon opening the 20655 modded file in MCExtracter, the 20655 shows up fine(all other Microcodes are removed; including the pre-production ones. I think this is by design of the tool), but the 20622 modded one throws an error: “Microcode #1 is packed or badly extracted, please report it!” . I realized that the tool has incorrectly truncated the microcode (which is supposed to be 0x2400), and hence stopped using this method and proceeded to use this guide instead: https://web.archive.org/web/201410160356…microcodes.html

In HxD editor, I figured that the 20652 microcode of the .ROM is the first one after a series of "FF"s, and the 20655 microcode is immediately after that, followed by even more microcodes without spacers. Thus, there is exactly 0x1C00 lines for 20652 and 0x800 lines for 20655, which is less than 0x2400 lines and 0x1000 lines in the new microcodes. If I perform ‘paste write’ on microcode 20652, part of the old 20655 microcode will be replaced which is also undesirable.

Now, my question is, what should I do to incorporate both microcode updates for 20652 and 20655 into the .ROM file? I am fine with deleting other microcodes, especially those pre-production ones (there are total 9 microcodes, and only 3 are production). Should I paste the 2 microcodes in with HxD, and fill the rest of the microcode spacing with padding "FF"s? The site only detailed 2 situations-- one is that the microcode length is identical, and the other being the BIOS having padding to make room for the new microcode.


Edit:

I came across a forum post mentioning that Universal BIOS backup is not suitable for Insyde BIOS, and the correct way to backup(and mod) is to use Insydeflash.exe. However, Insydeflash.exe must flash something before backing up the olld BIOS for some reason. What should be done to backup the BIOS without flashing a new one in? Here’s the platform.ini settings:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
 

 
;The file is Insydeflash utility configuration file
 
[Version]
Version=00
;Insydeflash utility will display the value at top
 
[FDFile]
FileName=
 
;FileName -> Utility always load this file.
 
[BackupROM]
Flag=1
FilePath=
FileName=
 
;Flag 1 -> Backup current BIOS and new BIOS binary
;FilePath -> If user does not enter the file path, utility will use current directory.
;FileName -> If user does not enter the file name, utility will use platform ID.
;xxx.xxx = Current BIOS image
;xxx_01.xxx = Previous BIOS image
;xxx_new.xxx = New BIOS image
 
[UpdateBlock]
PatchFv=0
FileName=intel.fv
FileOffset=0
FlashSize=0
PhysicalAddress=FFF00000
FvID=945PL-A
IDErrorAction=1
 
;If user set PatchFv to 1, utility will go update mode.
;If user only need to update some blocks in file, please enter file offset and size
;in here. If flash size is 0, utility will update all binary in file.
;If flag in Platform_Check section is 1, utility will compare FvID with current
;platform ID. When ID comparison failed, user choose result by IDErrorAction.
;1 mean show error message box, 2 mean close utility and reboot/shutdown.
 

[Platform_Check]
flag=1
PlatformName=BB10
 
Check_Before_ROM_Size=0
;This flag is the switch of comparing bios project ID with ROM file project ID.
;When flag is 1, utility will check project ID of new file.If ID doesn't match, utility will
;close the application. When flag is 0, utility won't check project id.
;When flag is 2, utility will check 9 platform IDs. If one is match, it will go flash.
;When flag is 3, this depend on BIOS report.
;PlatformName -> If ROM file do not contain correct ID, user can define ID in this file.
;Check_Before_ROM_Size -> Check platform name before rom size.
 

 
[AC_Adapter]
flag=1
BatteryCheck=0
BatteryBound=30
;This flag is the switch of checking AC. When flag is 1, utility will check AC. If no AC
;plug in, utility will display warnning message. When flag is 0, utility won't check AC.
 
[Bios_Version_Check]
flag=1
 
;This flag is the switch of checking Bios Version. When flag is 1, utility will
;check Bios Version. If rom file Version is older than Bios, utility will display warnning
;message and close application. When flag is 0, utility won't check rom file version.
;When flag is 2, this depend on BIOS report.
 
[ForceFlash]
ALL=0
BB_PEI=0
CPU_Microcode=1
Variable=0
DXE=0
EC=0
Password=0
OEM_NVS=0
Logo=0
Type#09=0
Type#08=0
 
;ALL 1 -> Flash all ROM part. 0 -> Resverd all protect areas.
;BB_PEI, CPU_Microcode, Variable...
;1 -> Force flash these area if BIOS report them are protected areas.
;0 -> Protect these area if BIOS report them are protected areas.
 
[FlashComplete]
Action=1
Dialog=0
Counter=15
 
;Action 0 -> Do nothing, 1 -> Shut down, 2 -> Reboot
;Dialog 0 -> Do not display dialog, 1 -> Display dialog,
; 2 -> Display dialog and wait several seconds.
;If user needs to reboot or shut down automatically in several seconds,
;user can set counter be a integer.
 
[UI]
Confirm=1
Silent=0
SilentWithDialog=0
DisplayID=1
InsydeInfo=1
VersionInfo=1
GroupInfo=1
ConfirmInfo=1
OnFlashingBeep=0
OnFlashingBeepDelayTime=800
DisableMouseAndKeyboardInput=0
BeforeToolDelayTime=0
ProgramStartToWrongMessageBox=0
GetFDFileButton=0
DelayBeforeFlash=0
 
;Confirm 1 - > Display confirm dialog, 0 -> Do not display confirm dialog
;Silent 1 -> Silent mode, hide main dialog, 0 -> Normal mode
;SilentWithDialog 2 ->all dialog without main dailog, 1 -> With main dialog, 0 -> No main dialog
;DisplayID 1 -> Display BIOS ID, 0 -> Do not display BIOS ID
;InsydeInfo 1 -> Display Insyde copyright information and URL, 0 -> Do not display it
;VersionInfo 1 -> Display BIOS version, 0 -> Do not display BIOS version
;GroupInfo 1 -> Display group box, Do not display group box
;ConfirmInfo 1 -> Display version and date information in confirm dialog
;OnFlashingBeep 1 -> Beep on flashing, 0 -> Do not beep on flashing
;OnFlashingBeepDelayTime -> Set BEEP delay time(Milliseconds)
;DisableMouseAndKeyboardInput 1 -> Hook mouse and keyboard without "CTRL+ALT+DEL", 0 -> Do not hook mouse and keyboard.
;BeforeToolDelayTime ->If user need to delay several seconds before flash process, user can set decimal integer here.
;ProgramStartToWrongMessageBox 1 -> Pop-up a warning dialog before flash process, 0 -> Do not pop-up a warning dialog before flash process.
;GetFDFileButton 1 -> Pop-up a file browse dialog, 0 -> Do not pop-up a file browse dialog
;DelayBeforeFlash(second)
 
[Logo]
PatchLogo=0
FileName=
GUID=
 
[Others]
ClearCMOS=0
FlashDevice=0
DisableCompare=0
DisableVerify=0
ErrorRetry=3
;FlashDevice 0 -> Default, 1 -> SPI flash part, 2 -> Non-SPI flash part.
;DisableCompare 0 -> Read BIOS and compare difference before writing, 1 -> Do not read BIOS and compare difference before writing.
;DisableVerify 0-> Verify BIOS after writing, 1-> Do not verify BIOS after writing.
;ErrorRetry 0 -> Do not retry if it found error. 1 -> Try to flash again if write or verify error.
 
[Option]
Flag=1
 
;Flag 0-> Auto-flash mode.
;Flag 1-> User option mode, including option, start, exit buttons.
;Flag 2-> User flash mode, including start, exit buttons.
 
[ApplicatonFlash]
Flag=0
Model=
 
;Some specific platforms need to flash by application. Only support 32bit Windows.
;Flag 1-> Flash by application
;Flag 0-> Flash by BIOS
;Model is the name of the platform.
 
[ReturnErrorCode]
FileNotFound=3
ErrorBeforeFlash=4
 
;FileNotFound -> If InsydeFlash not found the BIOS binary file, it will return this error code.
;ErrorBeforeFlash -> If InsydeFlash cause error before flash process, it will return this error code.
 
[UpdateEC]
Flag=1
EC_Dialog=0
BIOS_Only=0
Progress_Bar=0
 
;0 -> Not flash EC by BIOS.
;1 or 2-> Flash by BIOS.
 
;0 -> Not show dialog comfirm when begin to update EC after flash bios.
;1 -> Show dialog comfirm.
 
;0 -> Flash EC whole file.
;1 -> Only flash BIOS part of the merge file.
 
;0 -> Flash EC without progress bar.
;1 -> Flash EC with progress bar.
 
[Update_Special_Area]
Flag=0
 
;0 -> Not flash Special data.
;1 -> Flash specialdata.
 
[Region]
BIOS=1
GbE=0
ME=0
DESC=0
Platform_Data=0
 
;This section is used to control SPI descriptor mode.
;BIOS 1 -> InsydeFlash will flash BIOS area.
;GbE 1 -> InsydeFlash will flash GbE area
;ME 1 -> InsydeFlash will flash ME area.
;DESC 1 -> InsydeFlash will flash DESC area.
;Platform_Data 1 -> InsydeFlash will flash platform data area.
 
[Log_file]
Flag=0
FileName=InsydeFlash.Log
 
;Flag 0 -> No log file, 1 -> InsydeFlash will create a log file.
 
[ReturnCodeDefinition]
RETURN_SUCCESSFUL=0
RETURN_MODEL_CHECK_FAIL=259
RETURN_USER_CONFIRM_CANCEL=1701
RETURN_AC_NOT_CONNECT=1702
RETURN_LOAD_DRIVER_FAIL=1703
RETURN_NEED_REBOOT=3010
RETURN_USER_EXIT=1704
RETURN_SAME_VERSION_CHECK=99999
 
;If value is "99999", tool will get default value.
;Value is not "99999", tool will get input value.
 
[VARIABLE]
Flag=0
SystemManufacturer=0
BoardManufacturer=0
SystemProductName=0
SystemSerialNumber=0
Uuid=0
POSTInfo=0
Version=0
SLP=0
Setup=0
BootPriority=0
LastBootRecord=0
AcpiGlobalVariable=0
SLP2M=0
SLP2P=0
;Flag set 0 -> Nothing to do, 1 -> Erase variable before flash, 2 -> Erase variable only
 
[MULTI_FD]
Flag=0
FD#01=PCI,0,1F,0,00,FFFFFFFF,3B038086,1.FD
FD#02=IO,538,0100,0100,CHMB0110.FD
FD#03=IO,538,0100,0000,CHMD0110.FD
FD#04=PCI,0,1f,0,0,0015808F,2815808F,8.fd
FD#05=IO,C0,5AABFE02,5AABFE02,9.fd
FD#06=IO,1F6,E7,E4,7.fd
FD#07=IO,C0,fe03,fe03,7.fd
FD#08=IO,C0,03,01,7.fd
FD#09=PCI,2,0,0,0,813,812,9.fd
 
;Flag 1 -> Multi-FD mode, 0 -> normal mode
;FD#XX support 99 files FD#01 ~ FD#99
;FD#XX=IO Type,Offset,Mask,Value,File name
;FD#XX=PCI Type,Bus,Device,Function,Offset,Mask,Value,File name
;Type -> Support IO space and PCI address type
;Offset -> Offset (HEX)
;Mask -> IO type support BYTE, WORD, DWORD (HEX). For example, BYTE -> 03, WORD -> 0A01, DWORD 100400D3
; -> PCI type support DWORD only
;File name -> File name of FD
;If [Offset] & Mask == Value, then flash the following file.
 

 

JUST COPY ONE BY ONE ! THEN TEST IT!

HERE IS MINE!!

sk00v240NEW.part1.rar (5 MB)

sk00v240NEW.part2.rar (4.7 MB)



Thanks for your input.

I am quite hesitant to flash the one from : https://support.toshiba.com/support/view…ntentId=3310416 (I presume this is the one you modded), because their models states PSK00U/01U/04U/60U, but mine’s PSK01L. I have seen variants of L630/L635 with Radeon GPU inside, where the entire motherboard layout is different in these models. Does this minor L vs U model difference matter? I do not have a SPI flasher/RaspPI at hand so re-flashing would be messy. It works.

I understand that I can set the flasher to only update the microcode by tweaking these settings:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 

[ForceFlash]
ALL=0
BB_PEI=0
[b]CPU_Microcode=1[/b]
Variable=0
DXE=0
EC=0
Password=0
OEM_NVS=0
Logo=0
Type#09=0
Type#08=0

;ALL 1 -> Flash all ROM part. 0 -> Resverd all protect areas.
;BB_PEI, CPU_Microcode, Variable...
;1 -> Force flash these area if BIOS report them are protected areas.
;0 -> Protect these area if BIOS report them are protected areas.

 


Will using this switch be safer? Also, is there any ways I can ensure the BIOS report them as protected areas before flashing?I used this switch.


Lastly, the image I attempted to extract with Universal BIOS backup toolkit was only 1536KB, as compared to 4172KB(the one for the 'U' variants). According to the admin post on bios-mod forums, the backup toolkit is not suitable for backing up Insyde BIOS. Is the image even valid? It even contains the serial number of my Laptop. I wished to use this image instead in case the 'U' variant image on Toshiba's site is unsuitable, but it might not work after all. I have attached it on this post if anyone want to take a look at it (sans the serial number; I replaced them with X's).
I did not use the BIOS made from the tool.

test.zip (1020 KB)

I was feeling brave(actually very tired and lacking of self-control) today and just flashed your BIOS with insydeflash, and it worked! Thanks a bunch!