Skip to content

Commit

Permalink
Spelling fixes
Browse files Browse the repository at this point in the history
Correct misspellings identified by the check-spelling action.

Signed-off-by: Josh Soref <jsoref@gmail.com>
  • Loading branch information
jsoref authored and marcan committed Dec 13, 2023
1 parent c11a012 commit e52eaf4
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion proxyclient/experiments/prores.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def bswp16(x):
unk_pad_0x5a_=b'\x00',
bitstream_version=0,
encoder_identifier=0xcafeface,
# cannot change arbitrily, will break
# cannot change arbitrarily, will break
pix_surface_w_byteswap_=bswp16(im_W),
pix_surface_h_byteswap_=bswp16(im_H),
# seemingly can change arbitrarily
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/hv/trace_gpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#trace_device("/arm-io/gpio", True)

# trace gpio interrups, useful to follow the cascaded interrupts
# trace gpio interrupts, useful to follow the cascaded interrupts
aic_phandle = getattr(hv.adt["/arm-io/aic"], "AAPL,phandle")
try:
node = hv.adt["/arm-io/gpio0"]
Expand Down
22 changes: 11 additions & 11 deletions proxyclient/m1n1/constructutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def ZPadding(size):
return Const(bytes(size), Bytes(size))

def recusive_reload(obj, token=None):
def recursive_reload(obj, token=None):
global g_depth

if token is None:
Expand All @@ -36,7 +36,7 @@ def recusive_reload(obj, token=None):
obj.subcon = obj.subcon._reloadcls(token=token)
else:
if isinstance(obj.subcon, Construct):
recusive_reload(obj.subcon, token)
recursive_reload(obj.subcon, token)
if isinstance(obj, Construct) and hasattr(obj, 'subcons'):
# Construct types that have lists
new_subcons = []
Expand All @@ -47,7 +47,7 @@ def recusive_reload(obj, token=None):
item = item._reloadcls()
else:
if isinstance(item, Construct):
recusive_reload(item, token)
recursive_reload(item, token)
new_subcons.append(item)
obj.subcons = new_subcons

Expand All @@ -60,7 +60,7 @@ def recusive_reload(obj, token=None):
obj.cases[i] = item._reloadcls(token=token)
else:
if isinstance(item, Construct):
recusive_reload(item, token)
recursive_reload(item, token)

for field in dir(obj):
value = getattr(obj, field)
Expand All @@ -70,7 +70,7 @@ def recusive_reload(obj, token=None):
setattr(obj, field, value._reloadcls(token=token))
else:
if isinstance(value, Construct):
recusive_reload(value, token)
recursive_reload(value, token)

obj._token = token

Expand Down Expand Up @@ -140,7 +140,7 @@ class ConstructClassException(Exception):
pass


# We need to inherrit Construct as a metaclass so things like If and Select will work
# We need to inherit Construct as a metaclass so things like If and Select will work
class ReloadableConstructMeta(ReloadableMeta, Construct):

def __new__(cls, name, bases, attrs):
Expand Down Expand Up @@ -187,9 +187,9 @@ def __new__(cls, name, bases, attrs):
return cls

class ConstructClassBase(Reloadable, metaclass=ReloadableConstructMeta):
""" Offers two benifits over regular construct
""" Offers two benefits over regular construct
1. It's reloadable, and can recusrivly reload other refrenced ConstructClasses
1. It's reloadable, and can recursively reload other referenced ConstructClasses
2. It's a class, so you can define methods
Currently only supports parsing, but could be extended to support building
Expand Down Expand Up @@ -276,7 +276,7 @@ def _reloadcls(cls, force=False, token=None):
#print(f"_reloadcls({cls})", id(cls))
newcls = Reloadable._reloadcls.__func__(cls, force)
if hasattr(newcls, "subcon"):
recusive_reload(newcls.subcon, token)
recursive_reload(newcls.subcon, token)
return newcls

def _apply(self, obj):
Expand Down Expand Up @@ -386,9 +386,9 @@ def _parse(self, stream, context, path):
return Pointer._parse(self, stream, context, path)

class ConstructClass(ConstructClassBase, Container):
""" Offers two benifits over regular construct
""" Offers two benefits over regular construct
1. It's reloadable, and can recusrivly reload other refrenced ConstructClasses
1. It's reloadable, and can recursively reload other referenced ConstructClasses
2. It's a class, so you can define methods
Currently only supports parsing, but could be extended to support building
Expand Down
6 changes: 3 additions & 3 deletions proxyclient/m1n1/fw/agx/cmdqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class WorkCommandBarrier(ConstructClass):
"""
sent before WorkCommand3D on the Submit3d queue.
Might be for initilzing the tile buckets?
Might be for initializing the tile buckets?
Example:
00000004 0c378018 ffffffa0 00000c00 00000006 00000900 08002c9a 00000000
Expand All @@ -29,7 +29,7 @@ class WorkCommandBarrier(ConstructClass):

class WorkCommandInitBM(ConstructClass):
"""
occationally sent before WorkCommandTA on the SubmitTA queue.
occasionally sent before WorkCommandTA on the SubmitTA queue.
Example:
00000004 0c378018 ffffffa0 00000c00 00000006 00000900 08002c9a 00000000
Expand Down Expand Up @@ -494,7 +494,7 @@ class CommandQueueInfo(ConstructClass):
""" Structure type shared by Submit3D, SubmitTA and SubmitCompute
Applications have multiple of these, one of each submit type
TODO: Can applications have more than one of each type? One per encoder?
Mostly managed by GPU, only intialize by CPU
Mostly managed by GPU, only initialize by CPU
"""
subcon = Struct(
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/fw/agx/initdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ class IOMapping(ConstructClass):
"phys_addr" / Int64ul,
"virt_addr" / Int64ul,
"size" / Int32ul,
"range_size" / Int32ul, # Useally the same as size, but for MCC, this is the size of a single MMC register range.
"range_size" / Int32ul, # Usually the same as size, but for MCC, this is the size of a single MMC register range.
"readwrite" / Int64ul
)

Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/fw/agx/microsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ class FinalizeComputeCmd(ConstructClass):
"unk_54" / Int32ul,
"unk_58" / Int32ul,
Ver("G == G14 && V < V13_0B4", "unk_5c_g14" / Int64ul),
"restart_branch_offset" / Int32sl, # realative offset from start of Finalize to StartComputeCmd
"restart_branch_offset" / Int32sl, # relative offset from start of Finalize to StartComputeCmd
"unk_60" / Int32ul,
Ver("V >= V13_0B4", "unk_64" / HexDump(Bytes(0xd))),
Ver("V >= V13_0B4", "unkptr_71" / Int64ul),
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/fw/dcp/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ class ServiceRelay(IPCObject):
else:
sr_mapDeviceMemoryWithIndex = Callback(IOMFBStatus, "sr_mapDeviceMemoryWithIndex", obj=FourCC, index=uint, flags=uint, unk_u64=OutPtr(ulong), addr=OutPtr(ulong), length=OutPtr(ulong))

D400 = Callback(void, "get_property", obj=FourCC, key=string(0x40), value=OutPtr(Bytes(0x200)), lenght=InOutPtr(uint))
D400 = Callback(void, "get_property", obj=FourCC, key=string(0x40), value=OutPtr(Bytes(0x200)), length=InOutPtr(uint))
D401 = Callback(bool_, "sr_get_uint_prop", obj=FourCC, key=string(0x40), value=InOutPtr(ulong))
D404 = Callback(void, "sr_set_uint_prop", obj=FourCC, key=string(0x40), value=uint)
D406 = Callback(void, "set_fx_prop", obj=FourCC, key=string(0x40), value=uint)
Expand Down
16 changes: 8 additions & 8 deletions proxyclient/m1n1/hv/gdbserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class GDBServer:
"fpsr" / Int32ul,
"fpcr" / Int32ul,
)
__seperator = re.compile("[,;:]")
__separator = re.compile("[,;:]")

def __init__(self, hv, address, log):
self.__hc = None
Expand Down Expand Up @@ -177,12 +177,12 @@ def __eval(self, data):
self.__hv.reboot()

if data[0] in b"m":
split = GDBServer.__seperator.split(data[1:].decode(), maxsplit=1)
split = GDBServer.__separator.split(data[1:].decode(), maxsplit=1)
fields = [int(field, 16) for field in split]
return bytes(self.__hv.readmem(fields[0], fields[1]).hex(), "utf-8")

if data[0] in b"M":
split = GDBServer.__seperator.split(data[1:].decode(), maxsplit=2)
split = GDBServer.__separator.split(data[1:].decode(), maxsplit=2)
mem = bytes.fromhex(split[2])[:int(split[1], 16)]
if self.__hv.writemem(int(split[0], 16), mem) < len(mem):
return "E22"
Expand Down Expand Up @@ -237,7 +237,7 @@ def __eval(self, data):
return b"OK"

if data[0] in b"q":
split = GDBServer.__seperator.split(data[1:].decode(), maxsplit=1)
split = GDBServer.__separator.split(data[1:].decode(), maxsplit=1)
if split[0] == "C":
cpu_id = self.__hg or self.__hv.ctx.cpu_id
return b"QC" + bytes(format(cpu_id, "x"), "utf-8")
Expand Down Expand Up @@ -266,7 +266,7 @@ def __eval(self, data):
return b""

if split[0] == "Xfer":
xfer = GDBServer.__seperator.split(split[1], maxsplit=4)
xfer = GDBServer.__separator.split(split[1], maxsplit=4)
if xfer[0] == "features" and xfer[1] == "read":
resource = os.path.join("features", xfer[2])
annex = pkgutil.get_data(__name__, resource)
Expand Down Expand Up @@ -303,15 +303,15 @@ def __eval(self, data):

if data[0] in b"X":
partition = data[1:].partition(b":")
split = GDBServer.__seperator.split(partition[0].decode(), maxsplit=1)
split = GDBServer.__separator.split(partition[0].decode(), maxsplit=1)
mem = partition[2][:int(split[1], 16)]
if self.__hv.writemem(int(split[0], 16), mem) < len(mem):
return b"E22"

return b"OK"

if data[0] in b"z":
split = GDBServer.__seperator.split(data[1:].decode(), maxsplit=2)
split = GDBServer.__separator.split(data[1:].decode(), maxsplit=2)
if split[0] == "1":
self.__hv.remove_hw_bp(int(split[1], 16))
return b"OK"
Expand All @@ -328,7 +328,7 @@ def __eval(self, data):
return b""

if data[0] in b"Z":
split = GDBServer.__seperator.split(data[1:].decode(), maxsplit=2)
split = GDBServer.__separator.split(data[1:].decode(), maxsplit=2)
if split[0] == "1":
self.__hv.add_hw_bp(int(split[1], 16))
return b"OK"
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/hw/prores.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# 01 -> 16bpp?
# 10 -> 16bpp?
# 11 -> 16bpp?
# the last three all produce slightly differnet outputs
# the last three all produce slightly different outputs
# so might be 10/12/14/16?????
'flags2', # +0x004
'output_iova', # +0x008
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/hw/uat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MemoryAttr(IntEnum):
# 00 = Device nGnRnE
Device = 1
# f4 = Normal, Outer Writeback RW, Inner NC
Shared = 2 # Probally Outer-shareable. Shared with either the main cpu or AGX hardware
Shared = 2 # Probably Outer-shareable. Shared with either the main cpu or AGX hardware
# 4f = Normal, Outer NC, Inner Writeback RW
UNK3 = 3
# 00 = Device nGnRnE
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class DART(IntEnum):
# 4 byte command, 48 byte null padded data + 4 byte checksum
# Responses are of the format: struct format <Ii24sI
# 4byte Response , 4 byte status, 24 byte string, 4 byte Checksum
# Response must start 0xff55aaXX where XX distiguishes between them
# Response must start 0xff55aaXX where XX distinguishes between them
# In little endian mode these numbers as listed as REQ_* constants
# defined under UartInterface
#
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/trace/agx.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PongMsg(GpuMsg):
UNK = 47, 0

class PongEp(EP):
# This endpoint recives pongs. The cpu code reads some status registers after receiving one
# This endpoint receives pongs. The cpu code reads some status registers after receiving one
# Might be a "work done" message.
BASE_MESSAGE = GpuMsg

Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/xnutools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DebuggerState = Struct(
"panic_options" / Hex(Int64ul),
"current_op" / Hex(Int32ul),
"proceed_on_sync_failre" / Int32ul,
"proceed_on_sync_failure" / Int32ul,
"message" / Hex(Int64ul),
"panic_str" / Hex(Int64ul),
"panic_args" / Hex(Int64ul),
Expand Down
2 changes: 1 addition & 1 deletion src/chickens_firestorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void init_m1_firestorm(void)
init_common_firestorm();

// "Cross-beat Crypto(AES/PMUL) ICache fusion is not disabled for branch
// uncondtional "recoded instruction."
// unconditional "recoded instruction."
reg_set(SYS_IMP_APL_HID0, HID0_FETCH_WIDTH_DISABLE | HID0_CACHE_FUSION_DISABLE);

reg_set(SYS_IMP_APL_HID7, HID7_FORCE_NONSPEC_IF_STEPPING |
Expand Down
10 changes: 5 additions & 5 deletions src/libfdt/libfdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
* pointer to the property's value
* if lenp is non-NULL, *lenp contains the length of the property
* value (>=0)
* if namep is non-NULL *namep contiains a pointer to the property
* if namep is non-NULL *namep contains a pointer to the property
* name.
* NULL, on error
* if lenp is non-NULL, *lenp contains an error code (<0):
Expand Down Expand Up @@ -1461,7 +1461,7 @@ static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
* @fdt: pointer to the device tree blob
* @name: name of property to add
* @len: length of property value in bytes
* @valp: returns a pointer to where where the value should be placed
* @valp: returns a pointer to where the value should be placed
*
* returns:
* 0, on success
Expand Down Expand Up @@ -1489,7 +1489,7 @@ int fdt_pack(void *fdt);
* @address, @size: 64-bit values (native endian)
*
* Adds a reserve map entry to the given blob reserving a region at
* address address of length size.
* address of length size.
*
* This function will insert data into the reserve map and will
* therefore change the indexes of some entries in the table.
Expand Down Expand Up @@ -1596,7 +1596,7 @@ int fdt_setprop(void *fdt, int nodeoffset, const char *name,
* @len: length of the property value
* @prop_data: return pointer to property data
*
* fdt_setprop_placeholer() allocates the named property in the given node.
* fdt_setprop_placeholder() allocates the named property in the given node.
* If the property exists it is resized. In either case a pointer to the
* property data is returned.
*
Expand Down Expand Up @@ -2050,7 +2050,7 @@ int fdt_del_node(void *fdt, int nodeoffset);
* returns:
* 0, on success
* -FDT_ERR_NOSPACE, there's not enough space in the base device tree
* -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or
* -FDT_ERR_NOTFOUND, the overlay points to some nonexistent nodes or
* properties in the base DT
* -FDT_ERR_BADPHANDLE,
* -FDT_ERR_BADOVERLAY,
Expand Down
6 changes: 3 additions & 3 deletions src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static inline void write_sctlr(u64 val)
* [L1 index] [L2 index] [L3 index] [page offset]
* 12 bits 11 bits 11 bits 14 bits
*
* We initalize one double-size L1 table which covers the entire virtual memory space,
* We initialize one double-size L1 table which covers the entire virtual memory space,
* point to the two halves in the single L0 table and then create L2/L3 tables on demand.
*/

Expand Down Expand Up @@ -447,7 +447,7 @@ static void mmu_add_default_mappings(void)
mmu_add_mapping(ram_base | REGION_RX_EL1, ram_base, ram_size, MAIR_IDX_NORMAL, PERM_RX_EL0);

/*
* Create four seperate full mappings of MMIO space, with different access types
* Create four separate full mappings of MMIO space, with different access types
*/
mmu_add_mapping(0xc000000000, 0x0000000000, 0x0800000000, MAIR_IDX_DEVICE_GRE, PERM_RW_EL0);
mmu_add_mapping(0xd000000000, 0x0000000000, 0x0800000000, MAIR_IDX_DEVICE_nGRE, PERM_RW_EL0);
Expand Down Expand Up @@ -496,7 +496,7 @@ void mmu_init(void)
printf("MMU: Initializing...\n");

if (read_sctlr() & SCTLR_M) {
printf("MMU: already intialized.\n");
printf("MMU: already initialized.\n");
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/minilzlib/lzmadec.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Module Name:
#include "lzmadec.h"

//
// Probability Bit Model for Lenghts in Rep and in Match sequences
// Probability Bit Model for lengths in Rep and in Match sequences
//
typedef struct _LENGTH_DECODER_STATE
{
Expand Down Expand Up @@ -291,7 +291,7 @@ LzDecodeLen (
uint16_t limit;

//
// Lenghts of 2 and higher are encoded in 3 possible types of arithmetic-
// Lengths of 2 and higher are encoded in 3 possible types of arithmetic-
// coded bit trees, depending on the size of the length.
//
// Lengths 2-9 are encoded in trees called "Low" using 3 bits of data.
Expand Down Expand Up @@ -377,7 +377,7 @@ LzDecodeMatch (
// called "direct bits". The formula below also tells us how many such
// direct bits to use in this scenario. In other words, distBits can
// either be the number of "context encoded bits" for slots 4-13, or it
// can be the the number of "direct bits" for slots 14-63. This gives
// can be the number of "direct bits" for slots 14-63. This gives
// us a range of of 2 to 26 bits, which are then used as middle bits.
// Finally, the last 4 bits are called the "align" bits. The smallest
// possible number we can encode is now going to be 0b10[00][0000] and
Expand Down
Loading

0 comments on commit e52eaf4

Please sign in to comment.