Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cfg/c64-https-uci-onchip-cold.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,13 @@ SEGMENTS {
# --- Resident crypto + TLS code / rodata. ---
CRYPTO_CODE: load = CRYPTO_HOT, type = ro;
CRYPTO_RODATA: load = CRYPTO_OVERLAY, type = ro; # onchip-comb variant: relieve CRYPTO_HOT
LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro; # CRYPTO_HOT has no room for it on comb # sibling ladder (x25519.s, x25519_init.s)
# Sibling ladder (x25519.s, x25519_init.s). It is here for the comb
# DEMO build (HTTPS_BODY_TO_REU=1), whose CRYPTO_HOT cannot hold it.
# The shipped product (TRUST_STORE=1, no viewer) has CRYPTO_HOT room to
# spare, so "no room" is a demo constraint, not a product one: compare
# the uci-comb-store and uci-comb-demo-store rows of
# tools/measure_margins.py before moving it, never a figure here.
LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro;
X25519_GLUE_CODE: load = CRYPTO_OVERLAY, type = ro; # src/crypto/x25519_tables.s, same home
RESIDENT_RODATA: load = CRYPTO_HOT, type = ro, optional = yes;
CRYPTO_INIT_CODE: load = CRYPTO_HOT, type = ro, optional = yes;
Expand Down
7 changes: 6 additions & 1 deletion cfg/c64-https-uci-onchip.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,12 @@ SEGMENTS {
# --- Resident crypto + TLS code / rodata. ---
CRYPTO_CODE: load = CRYPTO_HOT, type = ro;
CRYPTO_RODATA: load = CRYPTO_OVERLAY, type = ro; # onchip-comb variant: relieve CRYPTO_HOT
LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro; # CRYPTO_HOT has no room for it on comb # sibling ladder (x25519.s, x25519_init.s)
# Sibling ladder (x25519.s, x25519_init.s). This cfg links only
# COLD_BANK=0 comb images, which cannot hold TRUST_STORE (the Makefile
# refuses it), so neither shipped product is built here; whether
# CRYPTO_HOT could take the ladder is a question for this cfg's own
# build, measured, not for the cold cfg's figures.
LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro;
X25519_GLUE_CODE: load = CRYPTO_OVERLAY, type = ro; # src/crypto/x25519_tables.s, same home
RESIDENT_RODATA: load = CRYPTO_HOT, type = ro, optional = yes;
CRYPTO_INIT_CODE: load = CRYPTO_HOT, type = ro, optional = yes;
Expand Down
11 changes: 10 additions & 1 deletion tools/measure_margins.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
WIKI = ("HTTPS_HOST=en.wikipedia.org",
"HTTPS_PATH=/w/index.php?title=Commodore_64&action=raw")

# The five link profiles, plus the wikipedia target on both ip65 profiles:
# The five link profiles, the two shipped store products, the comb demo,
# plus the wikipedia target on both ip65 profiles:
# ip65's NET_CODE tail is a joint budget with HTTPS_TARGET_RODATA, so the
# default target's figure does not say whether a longer target links.
PROFILES = {
Expand All @@ -66,6 +67,14 @@
"uci-comb": ("BACKEND=uci", "USE_NISTCURVES_ONCHIP_COMB=1"),
"ip65-wiki": ("BACKEND=ip65",) + WIKI,
"ip65-onchip-wiki": ("BACKEND=ip65", "USE_NISTCURVES_ONCHIP=1") + WIKI,
# The two shipped UCI products, flag for flag as PACKAGE_VARIANTS in
# tools/package/_common.sh builds them (TRUST_STORE=1 TRUST_RELEASE=1).
# The plain uci-onchip / uci-comb rows above are NOT what ships: the
# store moves CRYPTO_OVERLAY and CRYPTO_HOT by hundreds of bytes.
"uci-onchip-store": ("BACKEND=uci", "USE_NISTCURVES_ONCHIP=1",
"TRUST_STORE=1", "TRUST_RELEASE=1"),
"uci-comb-store": ("BACKEND=uci", "USE_NISTCURVES_ONCHIP_COMB=1",
"TRUST_STORE=1", "TRUST_RELEASE=1"),
# The comb Wikipedia demo with the trust store (#155 phase 2): the
# build the cold bank exists for. HTTPS_BODY_TO_REU re-arms the viewer.
"uci-comb-demo-store": ("BACKEND=uci", "USE_NISTCURVES_ONCHIP_COMB=1",
Expand Down
16 changes: 16 additions & 0 deletions tools/test_cold_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ def check(ok, msg):
# The cold cfg's whole delta from the comb cfg. If the comb cfg changes, the
# change is owed to the cold one too, and this fails until it is made.
CFG_EDITS = [
# The ladder's placement comment: the cold cfg speaks for the shipped
# TRUST_STORE products, which the comb cfg (COLD_BANK=0) cannot link.
(
' # Sibling ladder (x25519.s, x25519_init.s). This cfg links only\n'
' # COLD_BANK=0 comb images, which cannot hold TRUST_STORE (the Makefile\n'
' # refuses it), so neither shipped product is built here; whether\n'
" # CRYPTO_HOT could take the ladder is a question for this cfg's own\n"
" # build, measured, not for the cold cfg's figures.\n"
' LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro;\n',
' # Sibling ladder (x25519.s, x25519_init.s). It is here for the comb\n'
' # DEMO build (HTTPS_BODY_TO_REU=1), whose CRYPTO_HOT cannot hold it.\n'
' # The shipped product (TRUST_STORE=1, no viewer) has CRYPTO_HOT room to\n'
' # spare, so "no room" is a demo constraint, not a product one: compare\n'
' # the uci-comb-store and uci-comb-demo-store rows of\n'
' # tools/measure_margins.py before moving it, never a figure here.\n'
' LIB_X25519_CODE: load = CRYPTO_OVERLAY, type = ro;\n'),
(" OVERLAY_FILE_PAD: start = $C000, size = $2000, file = %O, define = yes, fill = yes, fillval = $00;\n",
" # Cold bank: the PRG's copy of the cold groups (src/net/uci/cold_bank.s),\n"
" # back to back; boot stashes it into the REU. The head of what was\n"
Expand Down