diff --git a/proxyclient/experiments/prores.py b/proxyclient/experiments/prores.py index 0b4308f50..2351055f0 100644 --- a/proxyclient/experiments/prores.py +++ b/proxyclient/experiments/prores.py @@ -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 diff --git a/proxyclient/hv/trace_gpio.py b/proxyclient/hv/trace_gpio.py index 4560bf0ff..e5cf902b7 100644 --- a/proxyclient/hv/trace_gpio.py +++ b/proxyclient/hv/trace_gpio.py @@ -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"] diff --git a/proxyclient/m1n1/constructutils.py b/proxyclient/m1n1/constructutils.py index ae707e532..b5b47f770 100644 --- a/proxyclient/m1n1/constructutils.py +++ b/proxyclient/m1n1/constructutils.py @@ -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: @@ -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 = [] @@ -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 @@ -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) @@ -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 @@ -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): @@ -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 @@ -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): @@ -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 diff --git a/proxyclient/m1n1/fw/agx/cmdqueue.py b/proxyclient/m1n1/fw/agx/cmdqueue.py index 120822361..97cdf04bc 100644 --- a/proxyclient/m1n1/fw/agx/cmdqueue.py +++ b/proxyclient/m1n1/fw/agx/cmdqueue.py @@ -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 @@ -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 @@ -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( diff --git a/proxyclient/m1n1/fw/agx/initdata.py b/proxyclient/m1n1/fw/agx/initdata.py index 9d7e68ed6..097c9db5d 100644 --- a/proxyclient/m1n1/fw/agx/initdata.py +++ b/proxyclient/m1n1/fw/agx/initdata.py @@ -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 ) diff --git a/proxyclient/m1n1/fw/agx/microsequence.py b/proxyclient/m1n1/fw/agx/microsequence.py index eeec1ed69..7360507e4 100644 --- a/proxyclient/m1n1/fw/agx/microsequence.py +++ b/proxyclient/m1n1/fw/agx/microsequence.py @@ -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), diff --git a/proxyclient/m1n1/fw/dcp/ipc.py b/proxyclient/m1n1/fw/dcp/ipc.py index 503385c19..e73331ade 100644 --- a/proxyclient/m1n1/fw/dcp/ipc.py +++ b/proxyclient/m1n1/fw/dcp/ipc.py @@ -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) diff --git a/proxyclient/m1n1/hv/gdbserver/__init__.py b/proxyclient/m1n1/hv/gdbserver/__init__.py index ade807f2d..9d16bc830 100644 --- a/proxyclient/m1n1/hv/gdbserver/__init__.py +++ b/proxyclient/m1n1/hv/gdbserver/__init__.py @@ -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 @@ -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" @@ -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") @@ -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) @@ -303,7 +303,7 @@ 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" @@ -311,7 +311,7 @@ def __eval(self, data): 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" @@ -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" diff --git a/proxyclient/m1n1/hw/prores.py b/proxyclient/m1n1/hw/prores.py index 5985e72e2..652e350f5 100644 --- a/proxyclient/m1n1/hw/prores.py +++ b/proxyclient/m1n1/hw/prores.py @@ -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 diff --git a/proxyclient/m1n1/hw/uat.py b/proxyclient/m1n1/hw/uat.py index b544675dc..f0b8b4c03 100644 --- a/proxyclient/m1n1/hw/uat.py +++ b/proxyclient/m1n1/hw/uat.py @@ -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 diff --git a/proxyclient/m1n1/proxy.py b/proxyclient/m1n1/proxy.py index 09ee6d7af..18294ca4a 100644 --- a/proxyclient/m1n1/proxy.py +++ b/proxyclient/m1n1/proxy.py @@ -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 =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): @@ -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 @@ -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. @@ -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. * @@ -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, diff --git a/src/memory.c b/src/memory.c index aec6782a2..b4abecf9c 100644 --- a/src/memory.c +++ b/src/memory.c @@ -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. */ @@ -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); @@ -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; } diff --git a/src/minilzlib/lzmadec.c b/src/minilzlib/lzmadec.c index 1a3c4204f..5d3954003 100644 --- a/src/minilzlib/lzmadec.c +++ b/src/minilzlib/lzmadec.c @@ -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 { @@ -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. @@ -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 diff --git a/src/minilzlib/lzmadec.h b/src/minilzlib/lzmadec.h index 652165dcd..7a5a30e06 100644 --- a/src/minilzlib/lzmadec.h +++ b/src/minilzlib/lzmadec.h @@ -54,7 +54,7 @@ Module Name: // // Distances can be encoded in different ways, based on the distance slot. // Lengths of 2, 3, 4 bytes are directly encoded with their own slot. Lengths -// over 5 share a slot, which is then further subdivded into 3 different ways +// over 5 share a slot, which is then further subdivided into 3 different ways // of encoding them, which are described in the source. // #define LZMA_DISTANCE_SLOTS 64 @@ -81,13 +81,13 @@ typedef enum _LZMA_SEQUENCE_STATE // LzmaLitLitLitState, // - // States where we last saw two literals preceeded by a non-literal + // States where we last saw two literals preceded by a non-literal // LzmaMatchLitLitState, LzmaRepLitLitState, LzmaLitShortrepLitLitState, // - // States where we last saw one literal preceeded by a non-literal + // States where we last saw one literal preceded by a non-literal // LzmaMatchLitState, LzmaRepLitState, @@ -97,7 +97,7 @@ typedef enum _LZMA_SEQUENCE_STATE // LzmaMaxLitState, // - // States where we last saw a non-literal preceeded by a literal + // States where we last saw a non-literal preceded by a literal // LzmaLitMatchState = 7, LzmaLitRepState, diff --git a/src/nvme.c b/src/nvme.c index a98353f19..c37d54f9c 100644 --- a/src/nvme.c +++ b/src/nvme.c @@ -42,8 +42,8 @@ #define NVME_LINEAR_SQ_CTRL 0x24908 #define NVME_LINEAR_SQ_CTRL_EN BIT(0) -#define NVME_UNKNONW_CTRL 0x24008 -#define NVME_UNKNONW_CTRL_PRP_NULL_CHECK BIT(11) +#define NVME_UNKNOWN_CTRL 0x24008 +#define NVME_UNKNOWN_CTRL_PRP_NULL_CHECK BIT(11) #define NVME_MAX_PEND_CMDS_CTRL 0x1210 #define NVME_DB_LINEAR_ASQ 0x2490c @@ -349,7 +349,7 @@ bool nvme_init(void) /* setup controller and NVMMU for linear submission queue */ set32(nvme_base + NVME_LINEAR_SQ_CTRL, NVME_LINEAR_SQ_CTRL_EN); - clear32(nvme_base + NVME_UNKNONW_CTRL, NVME_UNKNONW_CTRL_PRP_NULL_CHECK); + clear32(nvme_base + NVME_UNKNOWN_CTRL, NVME_UNKNOWN_CTRL_PRP_NULL_CHECK); write32(nvme_base + NVME_MAX_PEND_CMDS_CTRL, ((NVME_QUEUE_SIZE - 1) << 16) | (NVME_QUEUE_SIZE - 1)); write32(nvme_base + NVMMU_NUM, NVME_QUEUE_SIZE - 1); diff --git a/src/rtkit.c b/src/rtkit.c index bf401c67d..ef148d49f 100644 --- a/src/rtkit.c +++ b/src/rtkit.c @@ -386,7 +386,7 @@ int rtkit_recv(rtkit_dev_t *rtk, struct rtkit_message *msg) msg->msg = asc_msg.msg0; msg->ep = (u8)asc_msg.msg1; - /* if this is an app message we can just forwad it to the caller */ + /* if this is an app message we can just forward it to the caller */ if (msg->ep >= 0x20) return 1; diff --git a/src/tps6598x.c b/src/tps6598x.c index 7bc0fe2c7..29a18fd0a 100644 --- a/src/tps6598x.c +++ b/src/tps6598x.c @@ -112,7 +112,7 @@ int tps6598x_disable_irqs(tps6598x_dev_t *dev, tps6598x_irq_state_t *state) u8 tmp[CD3218B12_IRQ_WIDTH] = {0x00}; read = i2c_smbus_read(dev->i2c, dev->addr, TPS_REG_INT_MASK1, tmp, CD3218B12_IRQ_WIDTH); if (read != CD3218B12_IRQ_WIDTH) - printf("tps6598x: failed verifcation, can't read TPS_REG_INT_MASK1\n"); + printf("tps6598x: failed verification, can't read TPS_REG_INT_MASK1\n"); else { printf("tps6598x: verify: TPS_REG_INT_MASK1 vs. saved IntMask1\n"); hexdump(tmp, sizeof(tmp)); @@ -138,7 +138,7 @@ int tps6598x_restore_irqs(tps6598x_dev_t *dev, tps6598x_irq_state_t *state) u8 tmp[CD3218B12_IRQ_WIDTH]; read = i2c_smbus_read(dev->i2c, dev->addr, TPS_REG_INT_MASK1, tmp, sizeof(tmp)); if (read != sizeof(tmp)) - printf("tps6598x: failed verifcation, can't read TPS_REG_INT_MASK1\n"); + printf("tps6598x: failed verification, can't read TPS_REG_INT_MASK1\n"); else { printf("tps6598x: verify saved IntMask1 vs. TPS_REG_INT_MASK1:\n"); hexdump(state->int_mask1, sizeof(state->int_mask1)); diff --git a/src/usb_dwc3_regs.h b/src/usb_dwc3_regs.h index 9c3d9ca6a..5409488a1 100644 --- a/src/usb_dwc3_regs.h +++ b/src/usb_dwc3_regs.h @@ -73,7 +73,7 @@ #define DWC3_GSNPSID_MASK 0xffff0000 #define DWC3_GSNPSREV_MASK 0xffff -/* DWC3 registers memory space boundries */ +/* DWC3 registers memory space boundaries */ #define DWC3_XHCI_REGS_START 0x0 #define DWC3_XHCI_REGS_END 0x7fff #define DWC3_GLOBALS_REGS_START 0xc100