Skip to content

Commit

Permalink
fixed the patch code badge to enble image addressing, if it's availab…
Browse files Browse the repository at this point in the history
…le, and set it to a level 3 address to give it the best chance of accepting patch pages...
  • Loading branch information
mlmcl62 committed Sep 28, 2021
1 parent c47539a commit 5bb2477
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
;
; Globals
; g_xfermech - transfer mechanism currently in use
; g_capsupportedcaps - list of supported capabilities
;
; Locals
; name - name of a test
Expand Down Expand Up @@ -75,31 +76,32 @@ goto MAIN.DONE
setlocal name 'CAP_SUPPORTEDCAPS MSG_GET'
dsmentry src ds dg_control dat_capability msg_get 'CAP_SUPPORTEDCAPS,0,0,0'
if '${sts:}' != 'SUCCESS' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
setglobal g_capsupportedcaps '${ret:}'
echo.passfail '${get:name}' 'pass'
;
setlocal name 'CAP_SUPPORTEDCAPS ICAP_PATCHCODEDETECTIONENABLED found'
if ',${ret:},' !~contains ',ICAP_PATCHCODEDETECTIONENABLED,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
if ',${get:g_capsupportedcaps},' !~contains ',ICAP_PATCHCODEDETECTIONENABLED,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'pass'
;
setlocal name 'CAP_SUPPORTEDCAPS ICAP_PATCHCODEMAXSEARCHPRIORITIES found'
if ',${ret:},' !~contains ',ICAP_PATCHCODEMAXSEARCHPRIORITIES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
if ',${get:g_capsupportedcaps},' !~contains ',ICAP_PATCHCODEMAXSEARCHPRIORITIES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'pass'
;
setlocal name 'CAP_SUPPORTEDCAPS ICAP_PATCHCODESEARCHMODE found'
if ',${ret:},' !~contains ',ICAP_PATCHCODESEARCHMODE,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
if ',${get:g_capsupportedcaps},' !~contains ',ICAP_PATCHCODESEARCHMODE,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'pass'
;
setlocal name 'CAP_SUPPORTEDCAPS ICAP_PATCHCODESEARCHPRIORITIES found'
if ',${ret:},' !~contains ',ICAP_PATCHCODESEARCHPRIORITIES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
if ',${get:g_capsupportedcaps},' !~contains ',ICAP_PATCHCODESEARCHPRIORITIES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'pass'
;
setlocal name 'CAP_SUPPORTEDCAPS ICAP_SUPPORTEDPATCHCODETYPES found'
if ',${ret:},' !~contains ',ICAP_SUPPORTEDPATCHCODETYPES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
if ',${get:g_capsupportedcaps},' !~contains ',ICAP_SUPPORTEDPATCHCODETYPES,' goto MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'pass'
;
goto MAIN.CAP_SUPPORTEDCAPS.DONE
:MAIN.CAP_SUPPORTEDCAPS.FAIL
echo.passfail '${get:name}' 'fail - ${sts:} ${ret:}'
echo.passfail '${get:name}' 'fail - ${sts:} ${get:g_capsupportedcaps}'
setlocal certifyresult 'fail'
goto MAIN.DONE
:MAIN.CAP_SUPPORTEDCAPS.DONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
;
; Globals
; g_patchcodemaxsearchpriorities.max - maximum patchcodes we can get (max of ICAP_PATCHCODEMAXSEARCHPRIORITIES)
; g_capsupportedcaps - list of supported capabilities
;
; Locals
; patchcodesearchpriorities.itemlist - first ICAP_PATCHCODEMAXSEARCHPRIORITIES of ICAP_SUPPORTEDPATCHCODETYPES
Expand Down Expand Up @@ -105,6 +106,50 @@ echo.passfail '${get:indent}${get:name}' 'pass'



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Some scanners need image addressing on to detect patches,
; so if we detect that, enable it and set values for all
; of the fields...
;
setlocal name 'Image Address skipped'
if ',${get:g_capsupportedcaps},' !~contains 'CAP_IMAGEADDRESSENABLED' goto MAIN.IMAGEADDRESSENABLED.SKIP
;
dsmentry src ds dg_control dat_capability msg_set 'CAP_IMAGEADDRESSENABLED,TWON_ONEVALUE,TWTY_BOOL,TRUE'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
;
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDA_LEVEL,TWON_ONEVALUE,TWTY_UINT32,TWIA_FIXED'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDB_LEVEL,TWON_ONEVALUE,TWTY_UINT32,TWIA_LEVEL3'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDC_LEVEL,TWON_ONEVALUE,TWTY_UINT32,TWIA_LEVEL2'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDD_LEVEL,TWON_ONEVALUE,TWTY_UINT32,TWIA_LEVEL1'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
;
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDA_PRINTFORMAT,TWON_ONEVALUE,TWTY_STR32,#####'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDB_PRINTFORMAT,TWON_ONEVALUE,TWTY_STR32,###'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDC_PRINTFORMAT,TWON_ONEVALUE,TWTY_STR32,###'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDD_PRINTFORMAT,TWON_ONEVALUE,TWTY_STR32,###'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
;
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDA_VALUE,TWON_ONEVALUE,TWTY_STR32,FIXED'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDB_VALUE,TWON_ONEVALUE,TWTY_STR32,300'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDC_VALUE,TWON_ONEVALUE,TWTY_STR32,20'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
dsmentry src ds dg_control dat_capability msg_set 'CAP_IAFIELDD_VALUE,TWON_ONEVALUE,TWTY_STR32,1'
if '${sts:}' != 'SUCCESS' goto MAIN.IMAGEADDRESSENABLED.SKIP
;
setlocal name 'Image Address set'
:MAIN.IMAGEADDRESSENABLED.SKIP
echo.passfail '${get:indent}${get:name}' 'pass'



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set ICAP_PATCHCODEDETECTIONENABLED to TRUE
;
Expand Down

0 comments on commit 5bb2477

Please sign in to comment.