Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #234

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion proxyclient/experiments/dcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def start():
mon.poll()

fb_size = align_up(width * height * 4, 8 * 0x4000)
print(f"Dispaly {width}x{height}, fb size: {fb_size}")
print(f"Display {width}x{height}, fb size: {fb_size}")

buf = u.memalign(0x4000, fb_size)

Expand Down
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
10 changes: 5 additions & 5 deletions proxyclient/m1n1/constructutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,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 @@ -169,9 +169,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 recusrivly 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 @@ -343,9 +343,9 @@ def _build(self, obj, stream, context, path):
return obj

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 recusrivly 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
4 changes: 2 additions & 2 deletions proxyclient/m1n1/fw/agx/cmdqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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 @@ -392,7 +392,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/microsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class TimestampCmd(ConstructClass):
"unk_1" / Int8ul,
"unk_2" / Int8ul,
"unk_3" / Int8ul, # Sometimes 0x80
# all these pointers point to 0xfa0... addresses. Might be where the timestamp should be writen?
# all these pointers point to 0xfa0... addresses. Might be where the timestamp should be written?
"ts0_addr" / Int64ul,
"ts0" / ROPointer(this.ts0_addr, Timestamp),
"ts1_addr" / 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 @@ -661,7 +661,7 @@ class IOMobileFramebufferAP(IPCObject):
D598 = Callback(void, "find_swap_function_gated")

class ServiceRelay(IPCObject):
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))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source change

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
2 changes: 1 addition & 1 deletion proxyclient/m1n1/hw/aes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AESControlReg(Register32):
START = 0, 0
STOP = 1, 1
CLEAR_FIFO = 2, 2
# TOOD: not convinced about RESET anymore, I remember this un-broke the engine once but I can't reproduce that anymore
# TODO: not convinced about RESET anymore, I remember this un-broke the engine once but I can't reproduce that anymore
RESET = 3, 3


Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/hw/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class R_SMSTA(Register32):
XIP = 28 # Xaction in progress
XEN = 27 # Xaction ended
UJF = 26 # UnJam failure
JMD = 25 # Jam ocurred
JMD = 25 # Jam occurred
JAM = 24 # Currently jammed
MTO = 23 # Master timeout
MTA = 22 # Master arb lost
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/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class GUARD(IntFlag):
REGION_RX_EL1 = 0xc0000000000

# Uses UartInterface.proxyreq() to send requests to M1N1 and process
# reponses sent back.
# responses sent back.
class M1N1Proxy(Reloadable):
S_OK = 0
S_BADCMD = -1
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 @@ -28,7 +28,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 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/dlmalloc/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ static FORCEINLINE void* win32direct_mmap(size_t size) {
return (ptr != 0)? ptr: MFAIL;
}

/* This function supports releasing coalesed segments */
/* This function supports releasing coalesced segments */
static FORCEINLINE int win32munmap(void* ptr, size_t size) {
MEMORY_BASIC_INFORMATION minfo;
char* cptr = (char*)ptr;
Expand Down Expand Up @@ -1768,7 +1768,7 @@ static FORCEINLINE int win32munmap(void* ptr, size_t size) {
#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
#endif /* HAVE_MMAP && HAVE_MREMAP */

/* mstate bit set if continguous morecore disabled or failed */
/* mstate bit set if contiguous morecore disabled or failed */
#define USE_NONCONTIGUOUS_BIT (4U)

/* segment bit set in create_mspace_with_base */
Expand Down Expand Up @@ -4682,7 +4682,7 @@ void* dlmalloc(size_t bytes) {

void dlfree(void* mem) {
/*
Consolidate freed chunks with preceeding or succeeding bordering
Consolidate freed chunks with preceding or succeeding bordering
free chunks, if they exist, and then place in a bin. Intermixed
with special cases for top, dv, mmapped chunks, and usage errors.
*/
Expand Down Expand Up @@ -6216,10 +6216,10 @@ int mspace_mallopt(int param_number, int value) {
Wolfram Gloger ([email protected]).
* Use last_remainder in more cases.
* Pack bins using idea from [email protected]
* Use ordered bins instead of best-fit threshhold
* Use ordered bins instead of best-fit threshold
* Eliminate block-local decls to simplify tracing and debugging.
* Support another case of realloc via move into top
* Fix error occuring when initial sbrk_base not word-aligned.
* Fix error occurring when initial sbrk_base not word-aligned.
* Rely on page size for units instead of SBRK_UNIT to
avoid surprises about sbrk alignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen
Expand Down
2 changes: 1 addition & 1 deletion src/hv_exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static bool hv_handle_msr(struct exc_info *ctx, u64 iss)
SYSREG_MAP(SYS_ACTLR_EL1, SYS_IMP_APL_ACTLR_EL12)
SYSREG_PASS(SYS_IMP_APL_HID4)
SYSREG_PASS(SYS_IMP_APL_EHID4)
/* We don't normally trap hese, but if we do, they're noisy */
/* We don't normally trap these, but if we do, they're noisy */
SYSREG_PASS(SYS_IMP_APL_GXF_STATUS_EL1)
SYSREG_PASS(SYS_IMP_APL_CNTVCT_ALIAS_EL0)
SYSREG_PASS(SYS_IMP_APL_TPIDR_GL1)
Expand Down
2 changes: 1 addition & 1 deletion src/hv_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void hv_pt_init(void)

msr(VTCR_EL2, FIELD_PREP(VTCR_PS, pa_range) | // Full PA size
FIELD_PREP(VTCR_TG0, 2) | // 16KB page size
FIELD_PREP(VTCR_SH0, 3) | // PTWs Inner Sharable
FIELD_PREP(VTCR_SH0, 3) | // PTWs Inner Shareable
FIELD_PREP(VTCR_ORGN0, 1) | // PTWs Cacheable
FIELD_PREP(VTCR_IRGN0, 1) | // PTWs Cacheable
FIELD_PREP(VTCR_SL0, sl0) | // Start level
Expand Down
6 changes: 3 additions & 3 deletions src/libfdt/libfdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,15 @@ static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
* to within the device blob itself, not a copy of the value). If
* lenp is non-NULL, the length of the property value is also
* returned, in the integer pointed to by lenp. If namep is non-NULL,
* the property's namne will also be returned in the char * pointed to
* the property's name will also be returned in the char * pointed to
* by namep (this will be a pointer to within the device tree's string
* block, not a new copy of the name).
*
* returns:
* 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 @@ -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 inexistent 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 @@ -442,7 +442,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 @@ -491,7 +491,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
4 changes: 2 additions & 2 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
6 changes: 3 additions & 3 deletions src/minilzlib/lzmadec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/rtkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,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;

Expand Down
4 changes: 2 additions & 2 deletions src/tps6598x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/usb_dwc3_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down